diff --git a/.github/workflows/test-on-pr.yaml b/.github/workflows/test-on-pr.yaml index d819dafb..8f96d381 100644 --- a/.github/workflows/test-on-pr.yaml +++ b/.github/workflows/test-on-pr.yaml @@ -3,22 +3,15 @@ on: pull_request jobs: lint: - name: "Lint '${{ matrix.directory }}' kustomization" + name: "Lint kustomization" runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - directory: - - sources/crashes - - sources/traffics - steps: - name: 'checkout' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Build and validate ${{ matrix.directory }} kustomizations - uses: ubergesundheit/kube-check-action@v1.0.2 + - name: Build and validate kustomization + uses: ubergesundheit/kube-check-action@main with: - kustomize_build_input: ${{ matrix.directory }} - kube-linter_flags: "--config ${{ matrix.directory }}/.kube-linter.yaml" - kubeconform_flags: "-strict -kubernetes-version 1.24.10" + kustomize_build_input: sync + kube-linter_flags: "--config .kube-linter.yaml" + kubeconform_flags: "-strict -kubernetes-version 1.28.9 -schema-location 'https://raw.githubusercontent.com/ubergesundheit/kube-check-action/main/kubeconform-schemas/{{.ResourceKind}}.json' -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' -schema-location default" diff --git a/.gitignore b/.gitignore index 9df62e23..2e423662 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ secrets/ terraform/scaleway-config.tfvars DEVNOTES.md temp/ +*.key diff --git a/sources/crashes/.kube-linter.yaml b/.kube-linter.yaml similarity index 62% rename from sources/crashes/.kube-linter.yaml rename to .kube-linter.yaml index 547caca2..c5143895 100644 --- a/sources/crashes/.kube-linter.yaml +++ b/.kube-linter.yaml @@ -1,6 +1,4 @@ checks: exclude: - - no-read-only-root-fs - - run-as-non-root - unset-cpu-requirements - unset-memory-requirements diff --git a/.sops.yaml b/.sops.yaml new file mode 100644 index 00000000..4051710d --- /dev/null +++ b/.sops.yaml @@ -0,0 +1,5 @@ +creation_rules: +- encrypted_regex: ^(data|stringData)$ + path_regex: apps/*/* + age: >- + age1nzqaqzm7wfz04ld5esukhkghmayzt8xmnrjlau0rdcycjlu53pesgew089 diff --git a/LICENSE b/LICENSE index a8fc8514..c13f9911 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016 +Copyright (c) 2024 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 6247a6f0..02a284ff 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,21 @@ # Deployment on Kubernetes -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fcodeformuenster%2Fkubernetes-deployment.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fcodeformuenster%2Fkubernetes-deployment?ref=badge_shield) +License: [MIT](LICENSE) -> experimental, work in progress, please fix me +## Old master -For now see: -- [terraform](terraform) -- [manifests](manifests) +Old master branch has been preserved in [`old-master`](https://github.com/codeformuenster/kubernetes-deployment/tree/old-master) branch. +## Encrypted secrets -## License -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fcodeformuenster%2Fkubernetes-deployment.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fcodeformuenster%2Fkubernetes-deployment?ref=badge_large) \ No newline at end of file +Secrets in this repository should be encrypted using [SOPS](https://github.com/mozilla/sops) and [age](https://github.com/FiloSottile/age). + +``` +# decrypt +SOPS_AGE_KEY_FILE=/path/to/your/key.txt sops --output path/to/file --decrypt path/to/sops-secret.file + +# edit ... + +# encrypt again (public age key comes from the .sops.yaml) +sops --output path/to/sops-secret.file -e path/to/file +``` diff --git a/addons/clusterissuer.yaml b/addons/clusterissuer.yaml new file mode 100644 index 00000000..3c45890c --- /dev/null +++ b/addons/clusterissuer.yaml @@ -0,0 +1,14 @@ +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + name: letsencrypt-c4m +spec: + acme: + email: admin@codeformuenster.org + server: https://acme-v02.api.letsencrypt.org/directory + privateKeySecretRef: + name: letsencrypt-c4m-issuer-account-key + solvers: + - http01: + ingress: + class: changeme diff --git a/vsh-cluster/kustomization.yaml b/addons/kustomization.yaml similarity index 76% rename from vsh-cluster/kustomization.yaml rename to addons/kustomization.yaml index 30083cd9..6e1f9ad3 100644 --- a/vsh-cluster/kustomization.yaml +++ b/addons/kustomization.yaml @@ -2,5 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ./essentials -- ./apps +- ./clusterissuer.yaml diff --git a/apps/crashes/kustomization.yaml b/apps/crashes/kustomization.yaml new file mode 100644 index 00000000..38885c00 --- /dev/null +++ b/apps/crashes/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: c4m-crashes + +resources: +- ../../base/namespace-pss-restricted +- ./postgis.yaml +- ./shiny.yaml + +labels: +- includeSelectors: true + pairs: + app.kubernetes.io/part-of: crashfals diff --git a/vsh-cluster/apps/crashes/postgis.yaml b/apps/crashes/postgis.yaml similarity index 63% rename from vsh-cluster/apps/crashes/postgis.yaml rename to apps/crashes/postgis.yaml index d4a306d1..539bc1b3 100644 --- a/vsh-cluster/apps/crashes/postgis.yaml +++ b/apps/crashes/postgis.yaml @@ -14,11 +14,20 @@ spec: app.kubernetes.io/name: postgis app.kubernetes.io/component: database +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: postgis-crashes +automountServiceAccountToken: false + --- apiVersion: apps/v1 kind: Deployment metadata: name: postgis + annotations: + "ignore-check.kube-linter.io/no-read-only-root-fs": "writable fs is required" labels: app.kubernetes.io/name: postgis app.kubernetes.io/component: database @@ -37,6 +46,8 @@ spec: app.kubernetes.io/component: database spec: terminationGracePeriodSeconds: 10 + automountServiceAccountToken: false + serviceAccountName: postgis-crashes containers: - name: postgis image: quay.io/codeformuenster/verkehrsunfaelle:2019-11-15 @@ -45,7 +56,17 @@ spec: containerPort: 5432 resources: requests: - memory: "2048Mi" - cpu: "1000m" + memory: "360Mi" + cpu: "100m" + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + runAsGroup: 70 + runAsNonRoot: true + runAsUser: 70 + seccompProfile: + type: RuntimeDefault # limits: # cpu: "5000m" diff --git a/sources/crashes/shiny.yaml b/apps/crashes/shiny.yaml similarity index 61% rename from sources/crashes/shiny.yaml rename to apps/crashes/shiny.yaml index 6135e6cb..43ab6571 100644 --- a/sources/crashes/shiny.yaml +++ b/apps/crashes/shiny.yaml @@ -12,13 +12,20 @@ spec: app.kubernetes.io/name: shiny app.kubernetes.io/component: webserver +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: shiny-crashes +automountServiceAccountToken: false + --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: shiny annotations: - cert-manager.io/cluster-issuer: letsencrypt + cert-manager.io/cluster-issuer: letsencrypt-c4m labels: app.kubernetes.io/name: shiny app.kubernetes.io/component: webserver @@ -59,23 +66,54 @@ spec: app.kubernetes.io/name: shiny app.kubernetes.io/component: webserver spec: + automountServiceAccountToken: false + serviceAccountName: shiny-crashes + securityContext: + fsGroup: 998 containers: - name: shiny - image: quay.io/codeformuenster/crashes-shiny:4.9.9 + image: quay.io/codeformuenster/crashes-shiny:v6.7.2 resources: requests: - memory: "1024Mi" + memory: "350Mi" cpu: "640m" ports: - containerPort: 3838 + env: + - name: TMPDIR + value: /tmp/shiny + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsGroup: 998 + runAsNonRoot: true + runAsUser: 998 + seccompProfile: + type: RuntimeDefault volumeMounts: - name: renviron-file mountPath: /srv/shiny-server/.Renviron subPath: .Renviron + - name: shiny-tmp + mountPath: /var/log/shiny-server + subPath: log + - name: shiny-tmp + mountPath: /var/lib/shiny-server + subPath: lib + - name: shiny-tmp + mountPath: /tmp + subPath: tmp volumes: - name: renviron-file configMap: name: renviron + - name: shiny-tmp + emptyDir: + medium: Memory + sizeLimit: 100Mi --- apiVersion: v1 kind: ConfigMap @@ -87,4 +125,3 @@ metadata: data: .Renviron: | POSTGRES_HOST=postgis - FATHOM_SITEID=ESCBJ diff --git a/vsh-cluster/apps/kustomization.yaml b/apps/kustomization.yaml similarity index 83% rename from vsh-cluster/apps/kustomization.yaml rename to apps/kustomization.yaml index bde11812..01dfe026 100644 --- a/vsh-cluster/apps/kustomization.yaml +++ b/apps/kustomization.yaml @@ -2,5 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ./traffics - ./crashes +- ./traffics +- ./muenster-update diff --git a/apps/muenster-update/gitrepo.yaml b/apps/muenster-update/gitrepo.yaml new file mode 100644 index 00000000..7aa286a5 --- /dev/null +++ b/apps/muenster-update/gitrepo.yaml @@ -0,0 +1,15 @@ +apiVersion: source.toolkit.fluxcd.io/v1 +kind: GitRepository +metadata: + name: codeformuenster-muenster-jetzt + namespace: flux-system +spec: + interval: 1h + url: https://github.com/codeformuenster/muenster-jetzt.git + ref: + branch: master + ignore: | + # exclude all + /* + # include deployment dir + !/deployment/base diff --git a/apps/muenster-update/image-automations.yaml b/apps/muenster-update/image-automations.yaml new file mode 100644 index 00000000..e07b7b92 --- /dev/null +++ b/apps/muenster-update/image-automations.yaml @@ -0,0 +1,83 @@ +apiVersion: image.toolkit.fluxcd.io/v1beta2 +kind: ImageRepository +metadata: + name: muenster-jetzt-api-container-image + namespace: flux-system +spec: + image: docker.io/codeformuenster/muenster-jetzt-api + interval: 30m0s +--- +apiVersion: image.toolkit.fluxcd.io/v1beta2 +kind: ImageRepository +metadata: + name: muenster-jetzt-api-static-container-image + namespace: flux-system +spec: + image: docker.io/codeformuenster/muenster-jetzt-api-static + interval: 30m0s +--- +apiVersion: image.toolkit.fluxcd.io/v1beta2 +kind: ImageRepository +metadata: + name: muenster-jetzt-frontend-container-image + namespace: flux-system +spec: + image: docker.io/codeformuenster/muenster-jetzt-frontend + interval: 30m0s +--- +apiVersion: image.toolkit.fluxcd.io/v1beta2 +kind: ImagePolicy +metadata: + name: muenster-jetzt-api-staging + namespace: flux-system +spec: + imageRepositoryRef: + name: muenster-jetzt-api-container-image + policy: + alphabetical: + order: asc + filterTags: + pattern: '^master-[a-fA-F0-9]{7}-(?P\d{10,})$' + extract: '$timestamp' +--- +apiVersion: image.toolkit.fluxcd.io/v1beta2 +kind: ImagePolicy +metadata: + name: muenster-jetzt-api-static-staging + namespace: flux-system +spec: + imageRepositoryRef: + name: muenster-jetzt-api-static-container-image + policy: + alphabetical: + order: asc + filterTags: + pattern: '^master-[a-fA-F0-9]{7}-(?P\d{10,})$' + extract: '$timestamp' +--- +apiVersion: image.toolkit.fluxcd.io/v1beta2 +kind: ImagePolicy +metadata: + name: muenster-jetzt-frontend-staging + namespace: flux-system +spec: + imageRepositoryRef: + name: muenster-jetzt-frontend-container-image + policy: + alphabetical: + order: asc + filterTags: + pattern: '^master-[a-fA-F0-9]{7}-(?P\d{10,})$' + extract: '$timestamp' +--- +apiVersion: image.toolkit.fluxcd.io/v1beta2 +kind: ImagePolicy +metadata: + name: muenster-jetzt-production + namespace: flux-system +spec: + imageRepositoryRef: + name: muenster-jetzt-frontend-container-image + policy: + semver: + range: ">=v0.1.0" diff --git a/vsh-cluster/essentials/kustomization.yaml b/apps/muenster-update/kustomization.yaml similarity index 51% rename from vsh-cluster/essentials/kustomization.yaml rename to apps/muenster-update/kustomization.yaml index 0ac771d2..f88fce72 100644 --- a/vsh-cluster/essentials/kustomization.yaml +++ b/apps/muenster-update/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ./longhorn -- ./flux -- ./ingress-nginx -- ./cert-manager.yaml +- ./gitrepo.yaml +- ./image-automations.yaml +- ./staging +- ./production diff --git a/apps/muenster-update/production/kustomization.yaml b/apps/muenster-update/production/kustomization.yaml new file mode 100644 index 00000000..82565b50 --- /dev/null +++ b/apps/muenster-update/production/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: c4m-muenster-jetzt-production + +resources: +- ../../../base/namespace-pss-restricted +- muenster-jetzt-production.enc.yaml +- sync.yaml diff --git a/apps/muenster-update/production/muenster-jetzt-production.enc.yaml b/apps/muenster-update/production/muenster-jetzt-production.enc.yaml new file mode 100644 index 00000000..dc760279 --- /dev/null +++ b/apps/muenster-update/production/muenster-jetzt-production.enc.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: Secret +metadata: + name: backend-api +type: Opaque +stringData: + DB_HOST: ENC[AES256_GCM,data:5Fmzns3Yl82cPY+1ZVA=,iv:XBzuVHueBT0XjKfeYBEA56YsA0vwwJAQIya+SWRpbPg=,tag:93QgYR6jABp21v61uJFz9A==,type:str] + DB_PORT: ENC[AES256_GCM,data:uW18eA==,iv:CFD17c3O1+KNwnCNJQ4jkILMozORkIJRqVx0p3BfrOg=,tag:z/Wo+tTL4iEQ6nm7aQXw0w==,type:str] + DB_NAME: ENC[AES256_GCM,data:JEDJl0u6c7HAKQSZykL6PfLg,iv:5Y/Ozc1u/WePjhUD7r5Qn7WbJn6nmwGm/hc8EvwyswQ=,tag:YbjSFAywGs8gsBNOu+xBMA==,type:str] + DB_USER: ENC[AES256_GCM,data:3Me7FXnG/cjKRs6pbz3bYqn9,iv:6JBKkruBZ+X9ijrX/tOVq14EtjTn6tueM0UQ60HUNdE=,tag:sDrhIGaDIYv3mjsmLQlHng==,type:str] + DB_PASSWORD: ENC[AES256_GCM,data:MrJu0seG/FUYvaIlyKVYqhf50+sQuzZWHo5DfzJ/FdFYc8TYnL1zliDa+BvhH7L3NeHZp2Zrz737D+PZtoJkDg==,iv:Dx2ZKKKD0TlRaw/3my6xBhmdoa6GEc9xRdjvLZZUUIc=,tag:nlMffiWfdZRUYcNxcrLsaw==,type:str] + DJANGO_SECRET_KEY: ENC[AES256_GCM,data:BiSUvwO527W8aBKut/QXt0cHdybQNrubljpMPKU/qH3HLNoD8cz3PsrJUcdxy+EP+y8=,iv:wrAcLlDzmiwZkGiN9y3oPhfKQubsFIU2s0jUBkgqBTI=,tag:sDx0mRvOUcllZVvG78nV6g==,type:str] + MUENSTERLAND_API_TOKEN: ENC[AES256_GCM,data:dzIVh96TEztsAPyhrfzfyjnRn15oIo+DxOoA9ypq9d0=,iv:uM6/nuwYu88TVzIAOrQf7gzT6bnFy0XoEHkDBWgC/D8=,tag:evik7SOm99uWU74LuhFO4A==,type:str] + DATENPORTAL_USER: ENC[AES256_GCM,data:SG0MhB9UVD7Ai68QyrI=,iv:SsvkN7b7bvcGxGzRbTdXLyR8U3YQBUro9JoxgoFUpuE=,tag:WM3+KBMG4o6U6tsqSve+Jw==,type:str] + DATENPORTAL_PASSWORD: ENC[AES256_GCM,data:3L/hRw+JYYgt,iv:jTBcPrYA50pemx/Ua/VoNxeXedIqsc+l6Ho5z9SdWNM=,tag:57gi3kgQXXTuqgzZU/ESMg==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1nzqaqzm7wfz04ld5esukhkghmayzt8xmnrjlau0rdcycjlu53pesgew089 + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSArd2xDRkdreVBQeXE5WTE0 + SjlIbUZ2OWZ6MXU2MEQ5aFhEbFpueHpIVlJnCkdOSlYyRTN0UWt1Zk5aUFdJeENG + Zm03RDdKZVJYWnFRU3BqbUxwQ1ZzN1kKLS0tIDRqU0tpS3Q1MmtBcFhaNm1HakdD + Y3cxS1RmcS90UmpLVzdQRTNyTXY1cUUKgKkRZArJxhi2FeXOaNQxTZMhvWgv1ZSu + yGlC96NAH8yUDeO4HCgTQeMR2Jf9XSpkNJ6lR4Ma1k0w3cMLubqPgA== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2024-05-16T15:22:23Z" + mac: ENC[AES256_GCM,data:7oWhpBnCKmR4jlPmhBuG0NQiuYdV11IwsfLSG0T5giFXaei/4hkKocTBaZEWLUOARaXMVcsZJNVaE6lgmkGBveqhO61hlacYzVtEuRTzhmAiGbvmLHyFfGKaMu95839H2irz8bae9E/saf5C5wqFmxqPJ09oodYt/BfhSlbYivI=,iv:qY/CPZ+Q83Seh3TmsdflPryR/+GVkVKiHSl5d4OQBno=,tag:FJpdAQoetCGnPMxBR6NjIg==,type:str] + pgp: [] + encrypted_regex: ^(data|stringData)$ + version: 3.8.1 diff --git a/apps/muenster-update/production/sync.yaml b/apps/muenster-update/production/sync.yaml new file mode 100644 index 00000000..45e94896 --- /dev/null +++ b/apps/muenster-update/production/sync.yaml @@ -0,0 +1,57 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: muenster-jetzt-production +spec: + interval: 1h + targetNamespace: c4m-muenster-jetzt-production + sourceRef: + kind: GitRepository + name: codeformuenster-muenster-jetzt + namespace: flux-system + path: "." + prune: true + images: + - name: docker.io/codeformuenster/muenster-jetzt-frontend + newTag: v0.2.1 # {"$imagepolicy": "flux-system:muenster-jetzt-production:tag"} + - name: docker.io/codeformuenster/muenster-jetzt-api + newTag: v0.2.1 # {"$imagepolicy": "flux-system:muenster-jetzt-production:tag"} + - name: docker.io/codeformuenster/muenster-jetzt-api-static + newTag: v0.2.1 # {"$imagepolicy": "flux-system:muenster-jetzt-production:tag"} + patches: + - patch: | + - op: add + path: /spec/ingressClassName + value: traefik + - op: replace + path: /metadata/annotations/cert-manager.io~1cluster-issuer + value: letsencrypt-c4m + target: + kind: Ingress + - patch: | + - op: add + path: /spec/rules/0/host + value: api.muenster-update.de + - op: add + path: /spec/tls + value: [{ hosts: [api.muenster-update.de], secretName: api-tls }] + target: + kind: Ingress + name: backend + - patch: | + - op: add + path: /spec/rules/0/host + value: muenster-update.de + - op: add + path: /spec/tls + value: [{ hosts: [muenster-update.de], secretName: frontend-tls }] + target: + kind: Ingress + name: frontend + - patch: | + - op: add + path: /spec/template/metadata/labels/host + value: api.muenster-update.de + target: + kind: Deployment + name: backend-api diff --git a/apps/muenster-update/staging/kustomization.yaml b/apps/muenster-update/staging/kustomization.yaml new file mode 100644 index 00000000..6c985f4e --- /dev/null +++ b/apps/muenster-update/staging/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: c4m-muenster-jetzt-staging + +resources: +- ../../../base/namespace-pss-restricted +- muenster-jetzt-staging.enc.yaml +- sync.yaml diff --git a/apps/muenster-update/staging/muenster-jetzt-staging.enc.yaml b/apps/muenster-update/staging/muenster-jetzt-staging.enc.yaml new file mode 100644 index 00000000..de5e8902 --- /dev/null +++ b/apps/muenster-update/staging/muenster-jetzt-staging.enc.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: Secret +metadata: + name: backend-api +type: Opaque +stringData: + DB_HOST: ENC[AES256_GCM,data:pCIW21PPgFE+Mv/Q/XE=,iv:knl66TrUONJqWl+kexF/vbVvxQlT/Co/XW9+kMxEQts=,tag:5wEggI6caTG+z0XlP+EzQA==,type:str] + DB_PORT: ENC[AES256_GCM,data:1QlQMQ==,iv:V7+HJJr8DLkwcCShF2+1YEPrB3pMmHN5YQ9ghNel4Zs=,tag:Nk4/i9q7qOrB4yAQos35eA==,type:str] + DB_NAME: ENC[AES256_GCM,data:EWLB1E6KqfruuZAM+8rrx0G+,iv:lJoo4/hu7a+sEMXvF/C7nf+9u+gXsJ0J66qNOeFqLQw=,tag:bVIwJIOZQHPulfSFYaQtVA==,type:str] + DB_USER: ENC[AES256_GCM,data:zIpRzWhj374OdA1x07peCcAi,iv:EI9Ltf+pp9I0tVR4y6n8pC/fm6nlcTqE2daA9OiUQu4=,tag:5vODQryYzb/qtDP4MhsjPQ==,type:str] + DB_PASSWORD: ENC[AES256_GCM,data:gvqTUYNgF8RGfcXWE2t+nOgpDBI5qlhkq8gPlXrOiALQt/XNsNGBG7MY2J0zsQvo0fztBu/p89UneafFcCteVA==,iv:q3bYUjWb+p0jaDW0u0B9sqvOS7CrrpIOWDryyIqPgdM=,tag:/yJwxWHQzAtdFcU9rYrzeA==,type:str] + DJANGO_SECRET_KEY: ENC[AES256_GCM,data:GTrO8VTkjlo4s2IIcDqLCO2mdhei3CLxZwuMueUBOl+yJrWu1S8D0E5GGgX1u/Q0+Fk=,iv:FsBMSUYh28A7zPrENp2COcU/TC9Ieopm4Joc515FHP8=,tag:bIvOHKj2Ouht124jYr/AJg==,type:str] + MUENSTERLAND_API_TOKEN: ENC[AES256_GCM,data:MXUz5wX5jFmaS22ufI2hmiOwGZJPMWjDyVGdjM1Fr5E=,iv:vEi3Nq4fKnaXykvxIMP9OlaZOR0NR0y4lzRyP5Umhko=,tag:+a/vS2wBKdiMVKw5W8UHIQ==,type:str] + DATENPORTAL_USER: ENC[AES256_GCM,data:0/EOK4btfOuVqCRj5zU=,iv:+7MUK4GXH7mL8a8gixxkWc4bHCDgDHUHZhkQv0KxxCo=,tag:dP/PrJHom9jJxUElBdkmCA==,type:str] + DATENPORTAL_PASSWORD: ENC[AES256_GCM,data:hA+06zZyz691,iv:dtPkD+1wS++rlG8kt3LnH8BEeMhd1XE/biH840V4MAQ=,tag:UViwz+WEhxm6B48ukgd96g==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1nzqaqzm7wfz04ld5esukhkghmayzt8xmnrjlau0rdcycjlu53pesgew089 + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBTd1o4VWNDZmViZEZEaE5x + dVAvbGFncHlyUmV3RDhRY3lEWEFacGdzOWxFCjZUZkEwSkIwUWJTVFM5cWJ2eExF + N0RobXNUb2FFMlBBYjBHeFIySzFWQ2sKLS0tIEc1eDR4UGJCWEM4MlNxK1p2ejll + enVFMHZ2aFRzaHUxZFc1YkVwR0ZpZjAKZ2bKxdaYf+y2PoMUN91z+dnzo1AH6P8I + 3w6IjTppKD3UIGtXDqshHteuVWGto/Wro2rQlzWjo/yP0euEMncLcA== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2024-05-16T15:22:05Z" + mac: ENC[AES256_GCM,data:Nkx//fjae9w2YAi29mBpON/vMxtY1OKpWMXWbcmBXo7HiL4iUz38SS4OgmDi2DeKi4QRPCKHoAyMuKWnHMoTWKgQ/+E5b6GCRgjzNfRi6jeLGydCO4qBRmsGcAHanqKDvvozEEah7yxlQ3vMGTTgfTE3LW4mW0KaqHpNyU8yl34=,iv:7mbi1nO6LRIqY71Ltp5tQO7ZenfNZE/lWzNsQH1S78U=,tag:uw1qfLllCKDiaDi7WbEYZg==,type:str] + pgp: [] + encrypted_regex: ^(data|stringData)$ + version: 3.8.1 diff --git a/apps/muenster-update/staging/sync.yaml b/apps/muenster-update/staging/sync.yaml new file mode 100644 index 00000000..2a0b4f48 --- /dev/null +++ b/apps/muenster-update/staging/sync.yaml @@ -0,0 +1,57 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: muenster-jetzt-staging +spec: + interval: 1h + targetNamespace: c4m-muenster-jetzt-staging + sourceRef: + kind: GitRepository + name: codeformuenster-muenster-jetzt + namespace: flux-system + path: "." + prune: true + images: + - name: docker.io/codeformuenster/muenster-jetzt-frontend + newTag: master-37865cb-1702974266 # {"$imagepolicy": "flux-system:muenster-jetzt-frontend-staging:tag"} + - name: docker.io/codeformuenster/muenster-jetzt-api + newTag: master-37865cb-1702974204 # {"$imagepolicy": "flux-system:muenster-jetzt-api-staging:tag"} + - name: docker.io/codeformuenster/muenster-jetzt-api-static + newTag: master-37865cb-1702974212 # {"$imagepolicy": "flux-system:muenster-jetzt-api-static-staging:tag"} + patches: + - patch: | + - op: add + path: /spec/ingressClassName + value: traefik + - op: replace + path: /metadata/annotations/cert-manager.io~1cluster-issuer + value: letsencrypt-c4m + target: + kind: Ingress + - patch: | + - op: add + path: /spec/rules/0/host + value: api.staging.muenster-update.de + - op: add + path: /spec/tls + value: [{ hosts: [api.staging.muenster-update.de], secretName: api-tls }] + target: + kind: Ingress + name: backend + - patch: | + - op: add + path: /spec/rules/0/host + value: staging.muenster-update.de + - op: add + path: /spec/tls + value: [{ hosts: [staging.muenster-update.de], secretName: frontend-tls }] + target: + kind: Ingress + name: frontend + - patch: | + - op: add + path: /spec/template/metadata/labels/host + value: api.staging.muenster-update.de + target: + kind: Deployment + name: backend-api diff --git a/apps/traffics/kustomization.yaml b/apps/traffics/kustomization.yaml new file mode 100644 index 00000000..66c97a44 --- /dev/null +++ b/apps/traffics/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: c4m-traffics + +resources: +- ../../base/namespace-pss-restricted +- shiny.yaml diff --git a/sources/traffics/shiny.yaml b/apps/traffics/shiny.yaml similarity index 63% rename from sources/traffics/shiny.yaml rename to apps/traffics/shiny.yaml index 122b9021..510ead90 100644 --- a/sources/traffics/shiny.yaml +++ b/apps/traffics/shiny.yaml @@ -16,6 +16,14 @@ spec: app.kubernetes.io/component: webserver app.kubernetes.io/part-of: traffics +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: shiny-traffics + namespace: traffics +automountServiceAccountToken: false + --- apiVersion: networking.k8s.io/v1 kind: Ingress @@ -23,7 +31,7 @@ metadata: name: shiny namespace: traffics annotations: - cert-manager.io/cluster-issuer: letsencrypt + cert-manager.io/cluster-issuer: letsencrypt-c4m labels: app.kubernetes.io/name: shiny app.kubernetes.io/component: webserver @@ -69,33 +77,45 @@ spec: app.kubernetes.io/component: webserver app.kubernetes.io/part-of: traffics spec: + automountServiceAccountToken: false + serviceAccountName: shiny-traffics + securityContext: + fsGroup: 998 containers: - name: shiny image: codeformuenster/traffic-dynamics-shiny:v0.6.4 + env: + - name: TMPDIR + value: /tmp/shiny ports: - containerPort: 3838 + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsGroup: 998 + runAsNonRoot: true + runAsUser: 998 + seccompProfile: + type: RuntimeDefault resources: requests: - memory: "1024Mi" + memory: "200Mi" cpu: "640m" volumeMounts: - - name: renviron-file - mountPath: /srv/shiny-server/.Renviron - subPath: .Renviron + - name: shiny-tmp + mountPath: /var/log/shiny-server + subPath: log + - name: shiny-tmp + mountPath: /var/lib/shiny-server + subPath: lib + - name: shiny-tmp + mountPath: /tmp + subPath: tmp volumes: - - name: renviron-file - configMap: - name: renviron ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: renviron - namespace: traffics - labels: - app.kubernetes.io/name: shiny - app.kubernetes.io/component: webserver - app.kubernetes.io/part-of: traffics -data: - .Renviron: | - FATHOM_SITEID=UFRTE + - name: shiny-tmp + emptyDir: + medium: Memory + sizeLimit: 100Mi diff --git a/sources/traffics/kustomization.yaml b/base/namespace-pss-restricted/kustomization.yaml similarity index 81% rename from sources/traffics/kustomization.yaml rename to base/namespace-pss-restricted/kustomization.yaml index 3ef1fd62..e06cce13 100644 --- a/sources/traffics/kustomization.yaml +++ b/base/namespace-pss-restricted/kustomization.yaml @@ -2,4 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- shiny.yaml +- namespace.yaml diff --git a/base/namespace-pss-restricted/namespace.yaml b/base/namespace-pss-restricted/namespace.yaml new file mode 100644 index 00000000..383627d8 --- /dev/null +++ b/base/namespace-pss-restricted/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: default + labels: + pod-security.kubernetes.io/enforce: restricted diff --git a/sources/cert-manager/overlay/kustomization.yaml b/base/namespace/kustomization.yaml similarity index 64% rename from sources/cert-manager/overlay/kustomization.yaml rename to base/namespace/kustomization.yaml index 9767556f..e06cce13 100644 --- a/sources/cert-manager/overlay/kustomization.yaml +++ b/base/namespace/kustomization.yaml @@ -1,8 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -bases: -- ../base - resources: -- ./cluster-issuer.yaml \ No newline at end of file +- namespace.yaml diff --git a/sources/kinto/verkehrsunfaelle/namespace.yaml b/base/namespace/namespace.yaml similarity index 58% rename from sources/kinto/verkehrsunfaelle/namespace.yaml rename to base/namespace/namespace.yaml index 6c8a6e61..5f1aec67 100644 --- a/sources/kinto/verkehrsunfaelle/namespace.yaml +++ b/base/namespace/namespace.yaml @@ -1,4 +1,5 @@ apiVersion: v1 kind: Namespace metadata: - name: verkehrsunfaelle + name: default + labels: {} diff --git a/docs/cluster.md b/docs/cluster.md deleted file mode 100644 index f4996dea..00000000 --- a/docs/cluster.md +++ /dev/null @@ -1,219 +0,0 @@ -# Some notes about cluster creation - - -## Create server instance on Scaleway - -Image: Ubuntu Bionic -Region: Paris 1 -Server: C2L Baremetal - 8 Dedicated X86 64bit 32 GB Memory - -Name: kube2-2 -Advanced / Boot Script: x86_64 mainline 4.19.53 rev1 - -# 10.1.166.41 kube2-0 -# 10.1.85.181 kube2-1 -# 10.1.224.117 kube2-2 - - -## Loadbalancer - - -## Prepare - -```bash - -cat << EOF > prepare.sh -#!/usr/bin/env bash - -# unattended package installation -# FIXME make default via some config -export DEBIAN_FRONTEND=noninteractive - -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=288778 -alias apt='command apt -qq -o=Dpkg::Use-Pty=0 -o=Dpkg::Progress-Fancy=0' - -# containerd -VERSION="1.2.7" -curl -sfSOL "https://storage.googleapis.com/cri-containerd-release/cri-containerd-${VERSION}.linux-amd64.tar.gz" -curl "https://storage.googleapis.com/cri-containerd-release/cri-containerd-${VERSION}.linux-amd64.tar.gz.sha256" -sha256sum "cri-containerd-${VERSION}.linux-amd64.tar.gz" - -tar --no-overwrite-dir --directory / -xzf "cri-containerd-${VERSION}.linux-amd64.tar.gz" - -# apt install libseccomp2 -# installed by default on scaleway/ubuntu -systemctl daemon-reload -systemctl restart containerd -systemctl enable containerd - - -curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - -echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list - -apt update -apt upgrade -y -apt-mark hold kubelet kubeadm kubectl -apt install -y --allow-change-held-packages kubelet kubeadm kubectl - - -# for kubeadm -modprobe br_netfilter -echo "br_netfilter" >> /etc/modules-load.d/kubeadm -# FIXME howto reload just that file instead of explicit modprobe before? - - -# for kubeadm or containerd? or kube-router? -echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.d/99-kubernetes-cri.conf -sysctl --system - -# for elasticsearch -echo "vm.max_map_count = 262144" >> /etc/sysctl.conf -sysctl --system - - -# for some weird situations we saw earlier? -# was once increased to 512000.. -# default on scaleway/ubuntu is 1024?? -ulimit -n 128000 -cat > /etc/security/limits.d/open_files.conf < /etc/security/limits.d/processes.conf < kubeadm-config.yaml -apiVersion: kubeadm.k8s.io/v1beta1 -kind: ClusterConfiguration -kubernetesVersion: stable -controlPlaneEndpoint: "kube.codeformuenster.org:6443" -networking: - podSubnet: 192.168.0.0/16 -EOF - -# check scaleway loadbalancer entries for kube.codeformuenster.org - -kubeadm init --config=kubeadm-config.yaml --experimental-upload-certs - -KUBECONFIG=/etc/kubernetes/admin.conf \ - kubectl taint nodes --all node-role.kubernetes.io/master- -``` - -**aditional masters** -```bash - -# on existing master if certs are removed from secrets (after 2h) -kubeadm init phase upload-certs --experimental-upload-certs - -# on existing master if token are outdated (after 30min) -kubeadm token create --print-join-command - -# on the aditional master run a command like this with the infos from the commands above -kubeadm join kube.codeformuenster.org:6443 --token l8eyof.rxzg8dzstjp2ykfs \ - --discovery-token-ca-cert-hash sha256:465ff3d15819e8cfe2c69939056b1afbcf7bc9ec5c7b444dee19b51d2c146ca2 \ - --experimental-control-plane --certificate-key 2ff6c5ad3853912e063c9f774205a06a0ddbd708e0a4722f18aabe5072b98b67 - -KUBECONFIG=/etc/kubernetes/admin.conf \ - kubectl get nodes -o wide - -KUBECONFIG=/etc/kubernetes/admin.conf \ - kubectl taint nodes --all node-role.kubernetes.io/master- - - -# CNI -kubectl apply --kustomize github.com/codeformuenster/kubernetes-deployment//sources/kube-router/overlay - -# remove kube-proxy and cleanup -kubectl -n kube-system delete daemonsets kube-proxy -kubectl apply -f https://raw.githubusercontent.com/codeformuenster/kubernetes-deployment/master/sources/kube-router/kube-proxy-cleanup.yaml -kubectl -n kube-system logs -f -l k8s-app=kube-proxy-cleanup -kubectl -n kube-system delete daemonsets kube-proxy-cleanup -``` - -## kubeconfig - -scp root@212.47.232.30:/etc/kubernetes/admin.conf ~/.kube/config.d/cfm-kube-cert-admin.config - - -## Outlook and Ideas - -- Terraform with some Kubeadm-HA support? - - https://github.com/inercia/terraform-provider-kubeadm - - -- hardening psps, maybe like this: -```yaml -apiVersion: extensions/v1beta1 -kind: PodSecurityPolicy -metadata: - name: restricted -spec: - privileged: false - runAsUser: - rule: MustRunAsNonRoot - seLinux: - rule: RunAsAny - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - volumes: - - 'secret' - - 'configMap' - hostPID: false - hostIPC: false - hostNetwork: false - readOnlyRootFilesystem: false - ``` \ No newline at end of file diff --git a/kind-1.18.sh b/kind-1.18.sh deleted file mode 100755 index 1ed83be6..00000000 --- a/kind-1.18.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash - -set -uo pipefail -trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR -IFS=$'\n\t' - -KIND_CLUSTER_NAME=c4m - -kind delete cluster --name="${KIND_CLUSTER_NAME}" - -echo "The name of the cluster will be '${KIND_CLUSTER_NAME}'" - -# create registry container unless it already exists -reg_name='kind-registry' -reg_port='5000' -running="$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)" -if [ "${running}" != 'true' ]; then - docker run \ - -d --restart=always -p "${reg_port}:5000" --name "${reg_name}" -v "$PWD"/registry-data:/var/lib/registry \ - registry:2 -fi -reg_ip="$(docker inspect -f '{{.NetworkSettings.IPAddress}}' "${reg_name}")" - -echo "running local registry at localhost:${reg_port}" - -# create a cluster with the local registry enabled in containerd -cat < ['192.168.8.143', '172.18.0.2'], - 'overwriteprotocol' => 'https', - ); - # > ERROR It looks like you are trying to reinstall your Nextcloud. However the file CAN_INSTALL is missing from your config directory. Please create the file CAN_INSTALL in your config folder to continue. - # (don't use this) - # CAN_INSTALL: "" - - # ['10.0.0.1'], - # 'overwritehost' => 'ssl-proxy.tld', - # 'overwriteprotocol' => 'https', - # 'overwritewebroot' => '/domain.tld/nextcloud', - # 'overwritecondaddr' => '^10\.0\.0\.1$', - # ); - - - persistence: - enabled: false - # size: 8Gi - - cronjob.enabled: true - - ingress: - # for nextcloud.host - enabled: true - annotations: - nginx.ingress.kubernetes.io/proxy-body-size: 4G - # nginx.ingress.kubernetes.io/ssl-redirect: "true" - # nginx.ingress.kubernetes.io/secure-backends: "true" - # nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" - # cert-manager.io/cluster-issuer: "letsencrypt-prd" - # tls: - # - secretName: nextcloud-cert - # hosts: - # - nc.xxx.com - - # 'forwarded-for-headers' => - # array ( - # 0 => 'X-Forwarded-For', - # 1 => 'HTTP_X_FORWARDED_FOR' - # ), - - # The client IP address will be set based on the use of PROXY protocol or from the X-Forwarded-For header value when use-forwarded-headers is enabled. - - - metrics: - enabled: true - - # nextcloud.mail.enabled: false - - # internalDatabase.enabled: false - # ^v- not the same? - internalDatabase: - enabled: false - - # https://github.com/helm/charts/tree/master/stable/mariadb#parameters - mariadb: - enabled: true - - replication: - enabled: false - - # rootUser.password: secretpassword - db: - name: nextcloud - user: nextcloud - password: xxxx - - master.persistence: - enabled: false - # size: 8Gi - # slave.persistence: - # enabled: false - # # size: 8Gi - - redis: - enabled: false diff --git a/manifests/cert-manager/kustomized.yaml b/manifests/cert-manager/kustomized.yaml deleted file mode 100644 index b890ef3a..00000000 --- a/manifests/cert-manager/kustomized.yaml +++ /dev/null @@ -1,1819 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - labels: - app.kubernetes.io/part-of: cert-manager - certmanager.k8s.io/disable-validation: "true" - name: cert-manager ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/part-of: cert-manager - controller-tools.k8s.io: "1.0" - name: certificates.certmanager.k8s.io -spec: - additionalPrinterColumns: - - JSONPath: .status.conditions[?(@.type=="Ready")].status - name: Ready - type: string - - JSONPath: .spec.secretName - name: Secret - type: string - - JSONPath: .spec.issuerRef.name - name: Issuer - priority: 1 - type: string - - JSONPath: .status.conditions[?(@.type=="Ready")].message - name: Status - priority: 1 - type: string - - JSONPath: .metadata.creationTimestamp - description: 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. - name: Age - type: date - group: certmanager.k8s.io - names: - kind: Certificate - plural: certificates - shortNames: - - cert - - certs - scope: Namespaced - validation: - openAPIV3Schema: - properties: - apiVersion: - description: '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/api-conventions.md#resources' - type: string - kind: - description: '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/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - acme: - description: ACME contains configuration specific to ACME Certificates. - Notably, this contains details on how the domain names listed on this - Certificate resource should be 'solved', i.e. mapping HTTP01 and DNS01 - providers to DNS names. - properties: - config: - items: - properties: - domains: - description: Domains is the list of domains that this SolverConfig - applies to. - items: - type: string - type: array - required: - - domains - type: object - type: array - required: - - config - type: object - commonName: - description: CommonName is a common name to be used on the Certificate - type: string - dnsNames: - description: DNSNames is a list of subject alt names to be used on the - Certificate - items: - type: string - type: array - duration: - description: Certificate default Duration - type: string - ipAddresses: - description: IPAddresses is a list of IP addresses to be used on the - Certificate - items: - type: string - type: array - isCA: - description: IsCA will mark this Certificate as valid for signing. This - implies that the 'signing' usage is set - type: boolean - issuerRef: - description: IssuerRef is a reference to the issuer for this certificate. - If the 'kind' field is not set, or set to 'Issuer', an Issuer resource - with the given name in the same namespace as the Certificate will - be used. If the 'kind' field is set to 'ClusterIssuer', a ClusterIssuer - with the provided name will be used. The 'name' field in this stanza - is required at all times. - properties: - kind: - type: string - name: - type: string - required: - - name - type: object - keyAlgorithm: - description: KeyAlgorithm is the private key algorithm of the corresponding - private key for this certificate. If provided, allowed values are - either "rsa" or "ecdsa" If KeyAlgorithm is specified and KeySize is - not provided, key size of 256 will be used for "ecdsa" key algorithm - and key size of 2048 will be used for "rsa" key algorithm. - enum: - - rsa - - ecdsa - type: string - keySize: - description: KeySize is the key bit size of the corresponding private - key for this certificate. If provided, value must be between 2048 - and 8192 inclusive when KeyAlgorithm is empty or is set to "rsa", - and value must be one of (256, 384, 521) when KeyAlgorithm is set - to "ecdsa". - format: int64 - type: integer - organization: - description: Organization is the organization to be used on the Certificate - items: - type: string - type: array - renewBefore: - description: Certificate renew before expiration duration - type: string - secretName: - description: SecretName is the name of the secret resource to store - this secret in - type: string - required: - - secretName - - issuerRef - type: object - status: - properties: - conditions: - items: - properties: - lastTransitionTime: - description: LastTransitionTime is the timestamp corresponding - to the last status change of this condition. - format: date-time - type: string - message: - description: Message is a human readable description of the details - of the last transition, complementing reason. - type: string - reason: - description: Reason is a brief machine readable explanation for - the condition's last transition. - type: string - status: - description: Status of the condition, one of ('True', 'False', - 'Unknown'). - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of the condition, currently ('Ready'). - type: string - required: - - type - - status - type: object - type: array - lastFailureTime: - format: date-time - type: string - notAfter: - description: The expiration time of the certificate stored in the secret - named by this resource in spec.secretName. - format: date-time - type: string - type: object - version: v1alpha1 -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/part-of: cert-manager - controller-tools.k8s.io: "1.0" - name: challenges.certmanager.k8s.io -spec: - additionalPrinterColumns: - - JSONPath: .status.state - name: State - type: string - - JSONPath: .spec.dnsName - name: Domain - type: string - - JSONPath: .status.reason - name: Reason - priority: 1 - type: string - - JSONPath: .metadata.creationTimestamp - description: 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. - name: Age - type: date - group: certmanager.k8s.io - names: - kind: Challenge - plural: challenges - scope: Namespaced - validation: - openAPIV3Schema: - properties: - apiVersion: - description: '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/api-conventions.md#resources' - type: string - kind: - description: '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/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - authzURL: - description: AuthzURL is the URL to the ACME Authorization resource - that this challenge is a part of. - type: string - config: - description: 'Config specifies the solver configuration for this challenge. - Only **one** of ''config'' or ''solver'' may be specified, and if - both are specified then no action will be performed on the Challenge - resource. DEPRECATED: the ''solver'' field should be specified instead' - type: object - dnsName: - description: DNSName is the identifier that this challenge is for, e.g. - example.com. - type: string - issuerRef: - description: IssuerRef references a properly configured ACME-type Issuer - which should be used to create this Challenge. If the Issuer does - not exist, processing will be retried. If the Issuer is not an 'ACME' - Issuer, an error will be returned and the Challenge will be marked - as failed. - properties: - kind: - type: string - name: - type: string - required: - - name - type: object - key: - description: Key is the ACME challenge key for this challenge - type: string - solver: - description: Solver contains the domain solving configuration that should - be used to solve this challenge resource. Only **one** of 'config' - or 'solver' may be specified, and if both are specified then no action - will be performed on the Challenge resource. - properties: - selector: - description: Selector selects a set of DNSNames on the Certificate - resource that should be solved using this challenge solver. - properties: - dnsNames: - description: List of DNSNames that can be used to further refine - the domains that this solver applies to. - items: - type: string - type: array - matchLabels: - description: 'A label selector that is used to refine the set - of certificate''s that this challenge solver will apply to. - TODO: use kubernetes standard types for matchLabels' - type: object - type: object - type: object - token: - description: Token is the ACME challenge token for this challenge. - type: string - type: - description: Type is the type of ACME challenge this resource represents, - e.g. "dns01" or "http01" - type: string - url: - description: URL is the URL of the ACME Challenge resource for this - challenge. This can be used to lookup details about the status of - this challenge. - type: string - wildcard: - description: Wildcard will be true if this challenge is for a wildcard - identifier, for example '*.example.com' - type: boolean - required: - - authzURL - - type - - url - - dnsName - - token - - key - - wildcard - - issuerRef - type: object - status: - properties: - presented: - description: Presented will be set to true if the challenge values for - this challenge are currently 'presented'. This *does not* imply the - self check is passing. Only that the values have been 'submitted' - for the appropriate challenge mechanism (i.e. the DNS01 TXT record - has been presented, or the HTTP01 configuration has been configured). - type: boolean - processing: - description: Processing is used to denote whether this challenge should - be processed or not. This field will only be set to true by the 'scheduling' - component. It will only be set to false by the 'challenges' controller, - after the challenge has reached a final state or timed out. If this - field is set to false, the challenge controller will not take any - more action. - type: boolean - reason: - description: Reason contains human readable information on why the Challenge - is in the current state. - type: string - state: - description: State contains the current 'state' of the challenge. If - not set, the state of the challenge is unknown. - enum: - - "" - - valid - - ready - - pending - - processing - - invalid - - expired - - errored - type: string - required: - - processing - - presented - - reason - type: object - required: - - metadata - - spec - - status - version: v1alpha1 -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/part-of: cert-manager - controller-tools.k8s.io: "1.0" - name: clusterissuers.certmanager.k8s.io -spec: - group: certmanager.k8s.io - names: - kind: ClusterIssuer - plural: clusterissuers - scope: Cluster - validation: - openAPIV3Schema: - properties: - apiVersion: - description: '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/api-conventions.md#resources' - type: string - kind: - description: '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/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - acme: - properties: - email: - description: Email is the email for this account - type: string - privateKeySecretRef: - description: PrivateKey is the name of a secret containing the private - key for this user account. - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - server: - description: Server is the ACME server URL - type: string - skipTLSVerify: - description: If true, skip verifying the ACME server TLS certificate - type: boolean - solvers: - description: Solvers is a list of challenge solvers that will be - used to solve ACME challenges for the matching domains. - items: - properties: - selector: - description: Selector selects a set of DNSNames on the Certificate - resource that should be solved using this challenge solver. - properties: - dnsNames: - description: List of DNSNames that can be used to further - refine the domains that this solver applies to. - items: - type: string - type: array - matchLabels: - description: 'A label selector that is used to refine - the set of certificate''s that this challenge solver - will apply to. TODO: use kubernetes standard types for - matchLabels' - type: object - type: object - type: object - type: array - required: - - server - - privateKeySecretRef - type: object - ca: - properties: - secretName: - description: SecretName is the name of the secret used to sign Certificates - issued by this Issuer. - type: string - required: - - secretName - type: object - selfSigned: - type: object - vault: - properties: - auth: - description: Vault authentication - properties: - appRole: - description: This Secret contains a AppRole and Secret - properties: - path: - description: Where the authentication path is mounted in - Vault. - type: string - roleId: - type: string - secretRef: - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - required: - - path - - roleId - - secretRef - type: object - tokenSecretRef: - description: This Secret contains the Vault token key - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - type: object - caBundle: - description: Base64 encoded CA bundle to validate Vault server certificate. - Only used if the Server URL is using HTTPS protocol. This parameter - is ignored for plain HTTP protocol connection. If not set the - system root certificates are used to validate the TLS connection. - format: byte - type: string - path: - description: Vault URL path to the certificate role - type: string - server: - description: Server is the vault connection address - type: string - required: - - auth - - server - - path - type: object - venafi: - properties: - cloud: - description: Cloud specifies the Venafi cloud configuration settings. - Only one of TPP or Cloud may be specified. - properties: - apiTokenSecretRef: - description: APITokenSecretRef is a secret key selector for - the Venafi Cloud API token. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - url: - description: URL is the base URL for Venafi Cloud - type: string - required: - - url - - apiTokenSecretRef - type: object - tpp: - description: TPP specifies Trust Protection Platform configuration - settings. Only one of TPP or Cloud may be specified. - properties: - caBundle: - description: CABundle is a PEM encoded TLS certifiate to use - to verify connections to the TPP instance. If specified, system - roots will not be used and the issuing CA for the TPP instance - must be verifiable using the provided root. If not specified, - the connection will be verified using the cert-manager system - root certificates. - format: byte - type: string - credentialsRef: - description: CredentialsRef is a reference to a Secret containing - the username and password for the TPP server. The secret must - contain two keys, 'username' and 'password'. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - url: - description: URL is the base URL for the Venafi TPP instance - type: string - required: - - url - - credentialsRef - type: object - zone: - description: Zone is the Venafi Policy Zone to use for this issuer. - All requests made to the Venafi platform will be restricted by - the named zone policy. This field is required. - type: string - required: - - zone - type: object - type: object - status: - properties: - acme: - properties: - uri: - description: URI is the unique account identifier, which can also - be used to retrieve account details from the CA - type: string - type: object - conditions: - items: - properties: - lastTransitionTime: - description: LastTransitionTime is the timestamp corresponding - to the last status change of this condition. - format: date-time - type: string - message: - description: Message is a human readable description of the details - of the last transition, complementing reason. - type: string - reason: - description: Reason is a brief machine readable explanation for - the condition's last transition. - type: string - status: - description: Status of the condition, one of ('True', 'False', - 'Unknown'). - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of the condition, currently ('Ready'). - type: string - required: - - type - - status - type: object - type: array - type: object - version: v1alpha1 -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/part-of: cert-manager - controller-tools.k8s.io: "1.0" - name: issuers.certmanager.k8s.io -spec: - group: certmanager.k8s.io - names: - kind: Issuer - plural: issuers - scope: Namespaced - validation: - openAPIV3Schema: - properties: - apiVersion: - description: '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/api-conventions.md#resources' - type: string - kind: - description: '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/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - acme: - properties: - email: - description: Email is the email for this account - type: string - privateKeySecretRef: - description: PrivateKey is the name of a secret containing the private - key for this user account. - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - server: - description: Server is the ACME server URL - type: string - skipTLSVerify: - description: If true, skip verifying the ACME server TLS certificate - type: boolean - solvers: - description: Solvers is a list of challenge solvers that will be - used to solve ACME challenges for the matching domains. - items: - properties: - selector: - description: Selector selects a set of DNSNames on the Certificate - resource that should be solved using this challenge solver. - properties: - dnsNames: - description: List of DNSNames that can be used to further - refine the domains that this solver applies to. - items: - type: string - type: array - matchLabels: - description: 'A label selector that is used to refine - the set of certificate''s that this challenge solver - will apply to. TODO: use kubernetes standard types for - matchLabels' - type: object - type: object - type: object - type: array - required: - - server - - privateKeySecretRef - type: object - ca: - properties: - secretName: - description: SecretName is the name of the secret used to sign Certificates - issued by this Issuer. - type: string - required: - - secretName - type: object - selfSigned: - type: object - vault: - properties: - auth: - description: Vault authentication - properties: - appRole: - description: This Secret contains a AppRole and Secret - properties: - path: - description: Where the authentication path is mounted in - Vault. - type: string - roleId: - type: string - secretRef: - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - required: - - path - - roleId - - secretRef - type: object - tokenSecretRef: - description: This Secret contains the Vault token key - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - type: object - caBundle: - description: Base64 encoded CA bundle to validate Vault server certificate. - Only used if the Server URL is using HTTPS protocol. This parameter - is ignored for plain HTTP protocol connection. If not set the - system root certificates are used to validate the TLS connection. - format: byte - type: string - path: - description: Vault URL path to the certificate role - type: string - server: - description: Server is the vault connection address - type: string - required: - - auth - - server - - path - type: object - venafi: - properties: - cloud: - description: Cloud specifies the Venafi cloud configuration settings. - Only one of TPP or Cloud may be specified. - properties: - apiTokenSecretRef: - description: APITokenSecretRef is a secret key selector for - the Venafi Cloud API token. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - url: - description: URL is the base URL for Venafi Cloud - type: string - required: - - url - - apiTokenSecretRef - type: object - tpp: - description: TPP specifies Trust Protection Platform configuration - settings. Only one of TPP or Cloud may be specified. - properties: - caBundle: - description: CABundle is a PEM encoded TLS certifiate to use - to verify connections to the TPP instance. If specified, system - roots will not be used and the issuing CA for the TPP instance - must be verifiable using the provided root. If not specified, - the connection will be verified using the cert-manager system - root certificates. - format: byte - type: string - credentialsRef: - description: CredentialsRef is a reference to a Secret containing - the username and password for the TPP server. The secret must - contain two keys, 'username' and 'password'. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - url: - description: URL is the base URL for the Venafi TPP instance - type: string - required: - - url - - credentialsRef - type: object - zone: - description: Zone is the Venafi Policy Zone to use for this issuer. - All requests made to the Venafi platform will be restricted by - the named zone policy. This field is required. - type: string - required: - - zone - type: object - type: object - status: - properties: - acme: - properties: - uri: - description: URI is the unique account identifier, which can also - be used to retrieve account details from the CA - type: string - type: object - conditions: - items: - properties: - lastTransitionTime: - description: LastTransitionTime is the timestamp corresponding - to the last status change of this condition. - format: date-time - type: string - message: - description: Message is a human readable description of the details - of the last transition, complementing reason. - type: string - reason: - description: Reason is a brief machine readable explanation for - the condition's last transition. - type: string - status: - description: Status of the condition, one of ('True', 'False', - 'Unknown'). - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of the condition, currently ('Ready'). - type: string - required: - - type - - status - type: object - type: array - type: object - version: v1alpha1 -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - labels: - app.kubernetes.io/part-of: cert-manager - controller-tools.k8s.io: "1.0" - name: orders.certmanager.k8s.io -spec: - additionalPrinterColumns: - - JSONPath: .status.state - name: State - type: string - - JSONPath: .spec.issuerRef.name - name: Issuer - priority: 1 - type: string - - JSONPath: .status.reason - name: Reason - priority: 1 - type: string - - JSONPath: .metadata.creationTimestamp - description: 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. - name: Age - type: date - group: certmanager.k8s.io - names: - kind: Order - plural: orders - scope: Namespaced - validation: - openAPIV3Schema: - properties: - apiVersion: - description: '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/api-conventions.md#resources' - type: string - kind: - description: '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/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - commonName: - description: CommonName is the common name as specified on the DER encoded - CSR. If CommonName is not specified, the first DNSName specified will - be used as the CommonName. At least one of CommonName or a DNSNames - must be set. This field must match the corresponding field on the - DER encoded CSR. - type: string - config: - description: 'Config specifies a mapping from DNS identifiers to how - those identifiers should be solved when performing ACME challenges. - A config entry must exist for each domain listed in DNSNames and CommonName. - Only **one** of ''config'' or ''solvers'' may be specified, and if - both are specified then no action will be performed on the Order resource. This - field will be removed when support for solver config specified on - the Certificate under certificate.spec.acme has been removed. DEPRECATED: - this field will be removed in future. Solver configuration must instead - be provided on ACME Issuer resources.' - items: - properties: - domains: - description: Domains is the list of domains that this SolverConfig - applies to. - items: - type: string - type: array - required: - - domains - type: object - type: array - csr: - description: Certificate signing request bytes in DER encoding. This - will be used when finalizing the order. This field must be set on - the order. - format: byte - type: string - dnsNames: - description: DNSNames is a list of DNS names that should be included - as part of the Order validation process. If CommonName is not specified, - the first DNSName specified will be used as the CommonName. At least - one of CommonName or a DNSNames must be set. This field must match - the corresponding field on the DER encoded CSR. - items: - type: string - type: array - issuerRef: - description: IssuerRef references a properly configured ACME-type Issuer - which should be used to create this Order. If the Issuer does not - exist, processing will be retried. If the Issuer is not an 'ACME' - Issuer, an error will be returned and the Order will be marked as - failed. - properties: - kind: - type: string - name: - type: string - required: - - name - type: object - required: - - csr - - issuerRef - type: object - status: - properties: - certificate: - description: Certificate is a copy of the PEM encoded certificate for - this Order. This field will be populated after the order has been - successfully finalized with the ACME server, and the order has transitioned - to the 'valid' state. - format: byte - type: string - challenges: - description: Challenges is a list of ChallengeSpecs for Challenges that - must be created in order to complete this Order. - items: - properties: - authzURL: - description: AuthzURL is the URL to the ACME Authorization resource - that this challenge is a part of. - type: string - config: - description: 'Config specifies the solver configuration for this - challenge. Only **one** of ''config'' or ''solver'' may be specified, - and if both are specified then no action will be performed on - the Challenge resource. DEPRECATED: the ''solver'' field should - be specified instead' - type: object - dnsName: - description: DNSName is the identifier that this challenge is - for, e.g. example.com. - type: string - issuerRef: - description: IssuerRef references a properly configured ACME-type - Issuer which should be used to create this Challenge. If the - Issuer does not exist, processing will be retried. If the Issuer - is not an 'ACME' Issuer, an error will be returned and the Challenge - will be marked as failed. - properties: - kind: - type: string - name: - type: string - required: - - name - type: object - key: - description: Key is the ACME challenge key for this challenge - type: string - solver: - description: Solver contains the domain solving configuration - that should be used to solve this challenge resource. Only **one** - of 'config' or 'solver' may be specified, and if both are specified - then no action will be performed on the Challenge resource. - properties: - selector: - description: Selector selects a set of DNSNames on the Certificate - resource that should be solved using this challenge solver. - properties: - dnsNames: - description: List of DNSNames that can be used to further - refine the domains that this solver applies to. - items: - type: string - type: array - matchLabels: - description: 'A label selector that is used to refine - the set of certificate''s that this challenge solver - will apply to. TODO: use kubernetes standard types for - matchLabels' - type: object - type: object - type: object - token: - description: Token is the ACME challenge token for this challenge. - type: string - type: - description: Type is the type of ACME challenge this resource - represents, e.g. "dns01" or "http01" - type: string - url: - description: URL is the URL of the ACME Challenge resource for - this challenge. This can be used to lookup details about the - status of this challenge. - type: string - wildcard: - description: Wildcard will be true if this challenge is for a - wildcard identifier, for example '*.example.com' - type: boolean - required: - - authzURL - - type - - url - - dnsName - - token - - key - - wildcard - - issuerRef - type: object - type: array - failureTime: - description: FailureTime stores the time that this order failed. This - is used to influence garbage collection and back-off. - format: date-time - type: string - finalizeURL: - description: FinalizeURL of the Order. This is used to obtain certificates - for this order once it has been completed. - type: string - reason: - description: Reason optionally provides more information about a why - the order is in the current state. - type: string - state: - description: State contains the current state of this Order resource. - States 'success' and 'expired' are 'final' - enum: - - "" - - valid - - ready - - pending - - processing - - invalid - - expired - - errored - type: string - url: - description: URL of the Order. This will initially be empty when the - resource is first created. The Order controller will populate this - field when the Order is first processed. This field will be immutable - after it is initially set. - type: string - type: object - required: - - metadata - - spec - - status - version: v1alpha1 -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingWebhookConfiguration -metadata: - annotations: - certmanager.k8s.io/inject-apiserver-ca: "true" - labels: - app: webhook - app.kubernetes.io/part-of: cert-manager - chart: webhook-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-webhook - namespace: cert-manager -webhooks: -- clientConfig: - service: - name: kubernetes - namespace: default - path: /apis/admission.certmanager.k8s.io/v1beta1/certificates - failurePolicy: Fail - name: certificates.admission.certmanager.k8s.io - namespaceSelector: - matchExpressions: - - key: certmanager.k8s.io/disable-validation - operator: NotIn - values: - - "true" - - key: name - operator: NotIn - values: - - cert-manager - rules: - - apiGroups: - - certmanager.k8s.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - certificates -- clientConfig: - service: - name: kubernetes - namespace: default - path: /apis/admission.certmanager.k8s.io/v1beta1/issuers - failurePolicy: Fail - name: issuers.admission.certmanager.k8s.io - namespaceSelector: - matchExpressions: - - key: certmanager.k8s.io/disable-validation - operator: NotIn - values: - - "true" - - key: name - operator: NotIn - values: - - cert-manager - rules: - - apiGroups: - - certmanager.k8s.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - issuers -- clientConfig: - service: - name: kubernetes - namespace: default - path: /apis/admission.certmanager.k8s.io/v1beta1/clusterissuers - failurePolicy: Fail - name: clusterissuers.admission.certmanager.k8s.io - namespaceSelector: - matchExpressions: - - key: certmanager.k8s.io/disable-validation - operator: NotIn - values: - - "true" - - key: name - operator: NotIn - values: - - cert-manager - rules: - - apiGroups: - - certmanager.k8s.io - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - clusterissuers ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app: cainjector - app.kubernetes.io/part-of: cert-manager - chart: cainjector-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-cainjector - namespace: cert-manager ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app: webhook - app.kubernetes.io/part-of: cert-manager - chart: webhook-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-webhook - namespace: cert-manager ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app: cert-manager - app.kubernetes.io/part-of: cert-manager - chart: cert-manager-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager - namespace: cert-manager ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app: cert-manager - app.kubernetes.io/part-of: cert-manager - chart: cert-manager-v0.8.1 - heritage: Tiller - rbac.authorization.k8s.io/aggregate-to-admin: "true" - rbac.authorization.k8s.io/aggregate-to-edit: "true" - release: cert-manager - name: cert-manager-edit -rules: -- apiGroups: - - certmanager.k8s.io - resources: - - certificates - - issuers - verbs: - - create - - delete - - deletecollection - - patch - - update ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app: cert-manager - app.kubernetes.io/part-of: cert-manager - chart: cert-manager-v0.8.1 - heritage: Tiller - rbac.authorization.k8s.io/aggregate-to-admin: "true" - rbac.authorization.k8s.io/aggregate-to-edit: "true" - rbac.authorization.k8s.io/aggregate-to-view: "true" - release: cert-manager - name: cert-manager-view -rules: -- apiGroups: - - certmanager.k8s.io - resources: - - certificates - - issuers - verbs: - - get - - list - - watch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - app: webhook - app.kubernetes.io/part-of: cert-manager - chart: webhook-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-webhook:webhook-requester -rules: -- apiGroups: - - admission.certmanager.k8s.io - resources: - - certificates - - issuers - - clusterissuers - verbs: - - create ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - labels: - app: cainjector - app.kubernetes.io/part-of: cert-manager - chart: cainjector-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-cainjector -rules: -- apiGroups: - - certmanager.k8s.io - resources: - - certificates - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - secrets - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - configmaps - - events - verbs: - - '*' -- apiGroups: - - admissionregistration.k8s.io - resources: - - validatingwebhookconfigurations - - mutatingwebhookconfigurations - verbs: - - '*' -- apiGroups: - - apiregistration.k8s.io - resources: - - apiservices - verbs: - - '*' ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - labels: - app: cert-manager - app.kubernetes.io/part-of: cert-manager - chart: cert-manager-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager -rules: -- apiGroups: - - certmanager.k8s.io - resources: - - certificates - - certificates/finalizers - - issuers - - clusterissuers - - orders - - orders/finalizers - - challenges - - challenges/finalizers - verbs: - - '*' -- apiGroups: - - "" - resources: - - configmaps - - secrets - - events - - services - - pods - verbs: - - '*' -- apiGroups: - - extensions - resources: - - ingresses - - ingresses/finalizers - verbs: - - '*' ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - labels: - app: cainjector - app.kubernetes.io/part-of: cert-manager - chart: cainjector-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-cainjector -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cert-manager-cainjector -subjects: -- kind: ServiceAccount - name: cert-manager-cainjector - namespace: cert-manager ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - labels: - app: webhook - app.kubernetes.io/part-of: cert-manager - chart: webhook-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-webhook:auth-delegator -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:auth-delegator -subjects: -- apiGroup: "" - kind: ServiceAccount - name: cert-manager-webhook - namespace: cert-manager ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - labels: - app: cert-manager - app.kubernetes.io/part-of: cert-manager - chart: cert-manager-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cert-manager -subjects: -- kind: ServiceAccount - name: cert-manager - namespace: cert-manager ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: webhook - app.kubernetes.io/part-of: cert-manager - chart: webhook-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-webhook - namespace: cert-manager -spec: - ports: - - name: https - port: 443 - targetPort: 6443 - selector: - app: webhook - app.kubernetes.io/part-of: cert-manager - release: cert-manager - type: ClusterIP ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: cainjector - app.kubernetes.io/part-of: cert-manager - chart: cainjector-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-cainjector - namespace: cert-manager -spec: - replicas: 1 - selector: - matchLabels: - app: cainjector - app.kubernetes.io/part-of: cert-manager - release: cert-manager - template: - metadata: - annotations: null - labels: - app: cainjector - app.kubernetes.io/part-of: cert-manager - release: cert-manager - spec: - containers: - - args: - - --v=2 - - --leader-election-namespace=$(POD_NAMESPACE) - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: quay.io/jetstack/cert-manager-cainjector:v0.8.1 - imagePullPolicy: IfNotPresent - name: cainjector - resources: {} - serviceAccountName: cert-manager-cainjector ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: webhook - app.kubernetes.io/part-of: cert-manager - chart: webhook-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-webhook - namespace: cert-manager -spec: - replicas: 1 - selector: - matchLabels: - app: webhook - app.kubernetes.io/part-of: cert-manager - release: cert-manager - template: - metadata: - annotations: null - labels: - app: webhook - app.kubernetes.io/part-of: cert-manager - release: cert-manager - spec: - containers: - - args: - - --v=2 - - --secure-port=6443 - - --tls-cert-file=/certs/tls.crt - - --tls-private-key-file=/certs/tls.key - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: quay.io/jetstack/cert-manager-webhook:v0.8.1 - imagePullPolicy: IfNotPresent - name: webhook - resources: {} - volumeMounts: - - mountPath: /certs - name: certs - serviceAccountName: cert-manager-webhook - volumes: - - name: certs - secret: - secretName: cert-manager-webhook-webhook-tls ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app: cert-manager - app.kubernetes.io/part-of: cert-manager - chart: cert-manager-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager - namespace: cert-manager -spec: - replicas: 1 - selector: - matchLabels: - app: cert-manager - app.kubernetes.io/part-of: cert-manager - release: cert-manager - template: - metadata: - annotations: - prometheus.io/path: /metrics - prometheus.io/port: "9402" - prometheus.io/scrape: "true" - labels: - app: cert-manager - app.kubernetes.io/part-of: cert-manager - release: cert-manager - spec: - containers: - - args: - - --v=2 - - --cluster-resource-namespace=$(POD_NAMESPACE) - - --leader-election-namespace=$(POD_NAMESPACE) - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: quay.io/jetstack/cert-manager-controller:v0.8.1 - imagePullPolicy: IfNotPresent - name: cert-manager - ports: - - containerPort: 9402 - resources: - requests: - cpu: 10m - memory: 32Mi - serviceAccountName: cert-manager ---- -apiVersion: apiregistration.k8s.io/v1beta1 -kind: APIService -metadata: - annotations: - certmanager.k8s.io/inject-ca-from: cert-manager/cert-manager-webhook-webhook-tls - labels: - app: webhook - app.kubernetes.io/part-of: cert-manager - chart: webhook-v0.8.1 - heritage: Tiller - release: cert-manager - name: v1beta1.admission.certmanager.k8s.io -spec: - group: admission.certmanager.k8s.io - groupPriorityMinimum: 1000 - service: - name: cert-manager-webhook - namespace: cert-manager - version: v1beta1 - versionPriority: 15 ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Certificate -metadata: - labels: - app: webhook - app.kubernetes.io/part-of: cert-manager - chart: webhook-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-webhook-ca - namespace: cert-manager -spec: - commonName: ca.webhook.cert-manager - duration: 43800h - isCA: true - issuerRef: - name: cert-manager-webhook-selfsign - secretName: cert-manager-webhook-ca ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Certificate -metadata: - labels: - app: webhook - app.kubernetes.io/part-of: cert-manager - chart: webhook-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-webhook-webhook-tls - namespace: cert-manager -spec: - dnsNames: - - cert-manager-webhook - - cert-manager-webhook.cert-manager - - cert-manager-webhook.cert-manager.svc - duration: 8760h - issuerRef: - name: cert-manager-webhook-ca - secretName: cert-manager-webhook-webhook-tls ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: ClusterIssuer -metadata: - name: letsencrypt -spec: - acme: - email: admin@codeformuenster.org - privateKeySecretRef: - name: cfm-issuer-account-key - server: https://acme-v02.api.letsencrypt.org/directory - solvers: - - http01: - ingress: - class: nginx - selector: {} ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Issuer -metadata: - labels: - app: webhook - app.kubernetes.io/part-of: cert-manager - chart: webhook-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-webhook-ca - namespace: cert-manager -spec: - ca: - secretName: cert-manager-webhook-ca ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Issuer -metadata: - labels: - app: webhook - app.kubernetes.io/part-of: cert-manager - chart: webhook-v0.8.1 - heritage: Tiller - release: cert-manager - name: cert-manager-webhook-selfsign - namespace: cert-manager -spec: - selfSigned: {} diff --git a/manifests/cert-manager/webhook-rolebinding.yaml b/manifests/cert-manager/webhook-rolebinding.yaml deleted file mode 100644 index e5fd8694..00000000 --- a/manifests/cert-manager/webhook-rolebinding.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# apiserver gets the ability to read authentication. This allows it to -# read the specific configmap that has the requestheader-* entries to -# api agg -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: cert-manager-webhook:webhook-authentication-reader - namespace: kube-system - labels: - app: webhook - chart: webhook-v0.8.1 - release: cert-manager - heritage: Tiller -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: extension-apiserver-authentication-reader -subjects: -- apiGroup: "" - kind: ServiceAccount - name: cert-manager-webhook - namespace: cert-manager diff --git a/manifests/fathom/0-namespace.yaml b/manifests/fathom/0-namespace.yaml deleted file mode 100644 index acd012ab..00000000 --- a/manifests/fathom/0-namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: fathom diff --git a/manifests/fathom/1-s3-secret-example.yaml b/manifests/fathom/1-s3-secret-example.yaml deleted file mode 100644 index 706a4247..00000000 --- a/manifests/fathom/1-s3-secret-example.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: fathom-backup-s3-credentials - namespace: fathom - labels: - app.kubernetes.io/name: fathom -type: Opaque -data: - MC_HOST_c4m: aHR0cHM6Ly88QWNjZXNzIEtleT46PFNlY3JldCBLZXk+QDxZT1VSLVMzLUVORFBPSU5UPg== diff --git a/manifests/fathom/Dockerfile.backup b/manifests/fathom/Dockerfile.backup deleted file mode 100644 index f719617d..00000000 --- a/manifests/fathom/Dockerfile.backup +++ /dev/null @@ -1,13 +0,0 @@ -FROM quay.io/bitnami/minio-client:2021-debian-10 - -USER root - -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get -yq --no-install-recommends install sqlite3=3.* && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -COPY makebackup.sh /usr/local/bin/makebackup.sh - -USER 1001 - -ENTRYPOINT ["/usr/local/bin/makebackup.sh"] diff --git a/manifests/fathom/fathom.yaml b/manifests/fathom/fathom.yaml deleted file mode 100644 index 244e03b9..00000000 --- a/manifests/fathom/fathom.yaml +++ /dev/null @@ -1,164 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: fathom - namespace: fathom - labels: - app.kubernetes.io/name: fathom -spec: - ports: - - port: 8080 - selector: - app.kubernetes.io/name: fathom - ---- -apiVersion: networking.k8s.io/v1beta1 -kind: Ingress -metadata: - name: fathom - namespace: fathom - labels: - app.kubernetes.io/name: fathom -spec: - rules: - - host: ct.codeformuenster.org - http: - paths: - - path: / - backend: - serviceName: fathom - servicePort: 8080 - tls: - - hosts: - - ct.codeformuenster.org - secretName: fathom-tls - ---- -apiVersion: cert-manager.io/v1alpha2 -kind: Certificate -metadata: - name: fathom-tls - namespace: fathom - labels: - app.kubernetes.io/name: fathom -spec: - secretName: fathom-tls - dnsNames: - - ct.codeformuenster.org - issuerRef: - kind: ClusterIssuer - name: letsencrypt - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: fathom-dot-env - namespace: fathom -data: - .env: | - FATHOM_GZIP=true - FATHOM_DEBUG=false - FATHOM_DATABASE_DRIVER="sqlite3" - FATHOM_DATABASE_NAME="/fathom-db/fathom.db" - FATHOM_DATABASE_USER="" - FATHOM_DATABASE_PASSWORD="" - FATHOM_DATABASE_HOST="" - FATHOM_DATABASE_SSLMODE="" - FATHOM_SECRET="C2qF85BqaonNvzxomeDyOzv+4o5DfoLGw9Hs40wG2REoyg8EmUqADDM7013myiiX" - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: fathom-database-volume-claim - namespace: fathom -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 200Mi - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: fathom - namespace: fathom - labels: - app.kubernetes.io/name: fathom -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: fathom - spec: - template: - metadata: - labels: - app.kubernetes.io/name: fathom - spec: - containers: - - name: fathom - image: quay.io/codeformuenster/fathom:flopp-fathom-93caa1a - ports: - - containerPort: 8080 - volumeMounts: - - name: fathom-config - mountPath: /app/.env - subPath: .env - readOnly: true - - mountPath: /fathom-db - name: fathom-database-volume - volumes: - - name: fathom-config - configMap: - name: fathom-dot-env - - name: fathom-database-volume - persistentVolumeClaim: - claimName: fathom-database-volume-claim ---- -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - name: fathom-backup - namespace: fathom - labels: - app.kubernetes.io/name: fathom -spec: - schedule: "3 2 * * *" - concurrencyPolicy: Forbid - suspend: false - jobTemplate: - spec: - parallelism: 1 - template: - spec: - containers: - - name: backup-uploader - image: quay.io/codeformuenster/fathom-backup:2021-02-12 - volumeMounts: - - mountPath: /tmp/backup - name: temp-volume - - mountPath: /fathom-db - name: fathom-database-volume - readOnly: true - env: - - name: MC_HOST_c4m - valueFrom: - secretKeyRef: - name: fathom-backup-s3-credentials - key: MC_HOST_c4m - - name: FATHOM_DATABASE_NAME - value: /fathom-db/fathom.db - restartPolicy: OnFailure - volumes: - - name: temp-volume - emptyDir: - medium: Memory - - name: fathom-database-volume - persistentVolumeClaim: - claimName: fathom-database-volume-claim - readOnly: true diff --git a/manifests/fathom/makebackup.sh b/manifests/fathom/makebackup.sh deleted file mode 100755 index 034d8a17..00000000 --- a/manifests/fathom/makebackup.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -set -uo pipefail -trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR -IFS=$'\n\t' - -fail= - -db_file_path=${FATHOM_DATABASE_NAME:-} -if [[ -z "${db_file_path}" ]]; then - echo "Error: No FATHOM_DATABASE_NAME variable found" - fail=1 -fi - -host_var=${MC_HOST_c4m:-} -if [[ -z "${host_var}" ]]; then - echo "Error: No MC_HOST_c4m variable found." - echo "It needs to be in this format: MC_HOST_=https://::@" - fail=1 -fi - -if [[ -n "$fail" ]]; then - exit 1 -fi - -workdir="/tmp/backup" -backup_target="c4m/codeformuenster/fathom-backup" - -# Create sqlite backup -sqlite3 "${db_file_path}" -bail "VACUUM main INTO '${workdir}/fathom.db';" - -# Compress -gzip -9 -k "${workdir}/fathom.db" - -# Upload -mc cp "${workdir}/fathom.db.gz" "${backup_target}/fathom-$(date --utc -Iseconds).db.gz" diff --git a/manifests/kube-router/kustomized.yaml b/manifests/kube-router/kustomized.yaml deleted file mode 100644 index d5c48d5a..00000000 --- a/manifests/kube-router/kustomized.yaml +++ /dev/null @@ -1,208 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/name: kube-router - app.kubernetes.io/part-of: kube-router - name: kube-router - namespace: kube-system ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/name: kube-router - app.kubernetes.io/part-of: kube-router - name: kube-router - namespace: kube-system -rules: -- apiGroups: - - "" - resources: - - namespaces - - pods - - services - - nodes - - endpoints - verbs: - - list - - get - - watch -- apiGroups: - - networking.k8s.io - resources: - - networkpolicies - verbs: - - list - - get - - watch -- apiGroups: - - extensions - resources: - - networkpolicies - verbs: - - get - - list - - watch ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/name: kube-router - app.kubernetes.io/part-of: kube-router - name: kube-router -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kube-router -subjects: -- kind: ServiceAccount - name: kube-router - namespace: kube-system ---- -apiVersion: v1 -data: - cni-conf.json: | - { - "cniVersion":"0.3.0", - "name":"mynet", - "plugins":[ - { - "name":"kubernetes", - "type":"bridge", - "bridge":"kube-bridge", - "isDefaultGateway":true, - "ipam":{ - "type":"host-local" - } - }, - { - "type":"portmap", - "capabilities":{ - "snat":true, - "portMappings":true - } - } - ] - } -kind: ConfigMap -metadata: - labels: - app.kubernetes.io/name: kube-router - app.kubernetes.io/part-of: kube-router - k8s-app: kube-router - tier: node - name: kube-router-cfg - namespace: kube-system ---- -apiVersion: extensions/v1beta1 -kind: DaemonSet -metadata: - labels: - app.kubernetes.io/name: kube-router - app.kubernetes.io/part-of: kube-router - k8s-app: kube-router - tier: node - name: kube-router - namespace: kube-system -spec: - selector: - matchLabels: - app.kubernetes.io/name: kube-router - app.kubernetes.io/part-of: kube-router - template: - metadata: - annotations: - scheduler.alpha.kubernetes.io/critical-pod: "" - labels: - app.kubernetes.io/name: kube-router - app.kubernetes.io/part-of: kube-router - k8s-app: kube-router - tier: node - spec: - containers: - - args: - - --run-router=true - - --run-firewall=true - - --run-service-proxy=true - - --kubeconfig=/var/lib/kube-router/kubeconfig - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: KUBE_ROUTER_CNI_CONF_FILE - value: /etc/cni/net.d/10-kuberouter.conflist - image: docker.io/cloudnativelabs/kube-router:v0.3.1 - imagePullPolicy: IfNotPresent - livenessProbe: - httpGet: - path: /healthz - port: 20244 - initialDelaySeconds: 10 - periodSeconds: 3 - name: kube-router - resources: - requests: - cpu: 250m - memory: 250Mi - securityContext: - privileged: true - volumeMounts: - - mountPath: /lib/modules - name: lib-modules - readOnly: true - - mountPath: /etc/cni/net.d - name: cni-conf-dir - - mountPath: /var/lib/kube-router - name: kubeconfig - readOnly: true - hostNetwork: true - initContainers: - - command: - - /bin/sh - - -c - - set -e -x; if [ ! -f /etc/cni/net.d/10-kuberouter.conflist ]; then if [ - -f /etc/cni/net.d/*.conf ]; then rm -f /etc/cni/net.d/*.conf; fi; TMP=/etc/cni/net.d/.tmp-kuberouter-cfg; - cp /etc/kube-router/cni-conf.json ${TMP}; mv ${TMP} /etc/cni/net.d/10-kuberouter.conflist; - fi - image: busybox - imagePullPolicy: Always - name: install-cni - volumeMounts: - - mountPath: /etc/cni/net.d - name: cni-conf-dir - - mountPath: /etc/kube-router - name: kube-router-cfg - serviceAccount: kube-router - serviceAccountName: kube-router - tolerations: - - key: CriticalAddonsOnly - operator: Exists - - effect: NoSchedule - key: node-role.kubernetes.io/master - operator: Exists - - effect: NoSchedule - key: node.kubernetes.io/not-ready - operator: Exists - volumes: - - hostPath: - path: /lib/modules - name: lib-modules - - hostPath: - path: /etc/cni/net.d - name: cni-conf-dir - - configMap: - name: kube-router-cfg - name: kube-router-cfg - - configMap: - items: - - key: kubeconfig.conf - path: kubeconfig - name: kube-proxy - name: kubeconfig - updateStrategy: - rollingUpdate: - maxUnavailable: 1 - type: RollingUpdate diff --git a/manifests/nominatim/kustomized.yaml b/manifests/nominatim/kustomized.yaml deleted file mode 100644 index 2aee2dee..00000000 --- a/manifests/nominatim/kustomized.yaml +++ /dev/null @@ -1,152 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: api - app.kubernetes.io/name: nominatim - app.kubernetes.io/part-of: nominatim - name: nominatim - namespace: nominatim -spec: - ports: - - name: api - port: 80 - targetPort: api - selector: - app.kubernetes.io/component: api - app.kubernetes.io/name: nominatim - app.kubernetes.io/part-of: nominatim ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/component: database - app.kubernetes.io/name: postgis - app.kubernetes.io/part-of: nominatim - name: postgis - namespace: nominatim -spec: - ports: - - name: pgql - port: 5432 - protocol: TCP - targetPort: 5432 - selector: - app.kubernetes.io/component: database - app.kubernetes.io/name: postgis - app.kubernetes.io/part-of: nominatim ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/component: api - app.kubernetes.io/name: nominatim - app.kubernetes.io/part-of: nominatim - name: nominatim - namespace: nominatim -spec: - selector: - matchLabels: - app.kubernetes.io/part-of: nominatim - template: - metadata: - labels: - app.kubernetes.io/component: api - app.kubernetes.io/name: nominatim - app.kubernetes.io/part-of: nominatim - spec: - containers: - - image: codeformuenster/nominatim-api:0.1.0 - name: nominatim - ports: - - containerPort: 80 - name: api ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - labels: - app.kubernetes.io/component: database - app.kubernetes.io/name: postgis - app.kubernetes.io/part-of: nominatim - name: postgis - namespace: nominatim -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/part-of: nominatim - serviceName: postgis - template: - metadata: - labels: - app.kubernetes.io/component: database - app.kubernetes.io/name: postgis - app.kubernetes.io/part-of: nominatim - spec: - containers: - - env: - - name: POSTGRES_PASSWORD - value: n0mn0m - - name: PGDATA - value: /var/lib/postgresql/data/pgdata - image: codeformuenster/postgis-nominatim:0.1.0 - name: postgis - ports: - - containerPort: 5432 - volumeMounts: - - mountPath: /var/lib/postgresql/data - name: data - subPath: pgdata - terminationGracePeriodSeconds: 60 - volumeClaimTemplates: - - metadata: - labels: - app.kubernetes.io/part-of: nominatim - name: data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 5Gi ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Certificate -metadata: - labels: - app.kubernetes.io/component: api - app.kubernetes.io/name: nominatim - app.kubernetes.io/part-of: nominatim - name: nominatim - namespace: nominatim -spec: - commonName: nominatim.codeformuenster.org - issuerRef: - kind: ClusterIssuer - name: letsencrypt - secretName: nominatim-tls ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - labels: - app.kubernetes.io/component: api - app.kubernetes.io/name: nominatim - app.kubernetes.io/part-of: nominatim - name: nominatim - namespace: nominatim -spec: - rules: - - host: nominatim.codeformuenster.org - http: - paths: - - backend: - serviceName: nominatim - servicePort: api - tls: - - hosts: - - nominatim.codeformuenster.org - secretName: nominatim-tls diff --git a/manifests/openebs/kustomized.yaml b/manifests/openebs/kustomized.yaml deleted file mode 100644 index 798106ba..00000000 --- a/manifests/openebs/kustomized.yaml +++ /dev/null @@ -1,675 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs ---- -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingWebhookConfiguration -metadata: - labels: - app: admission-webhook - app.kubernetes.io/part-of: openebs - openebs.io/component-name: admission-server - name: validation-webhook-cfg - namespace: openebs -webhooks: -- clientConfig: - caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURpekNDQW5PZ0F3SUJBZ0lKQUk5NG9wdWdKb1drTUEwR0NTcUdTSWIzRFFFQkN3VUFNRnd4Q3pBSkJnTlYKQkFZVEFuaDRNUW93Q0FZRFZRUUlEQUY0TVFvd0NBWURWUVFIREFGNE1Rb3dDQVlEVlFRS0RBRjRNUW93Q0FZRApWUVFMREFGNE1Rc3dDUVlEVlFRRERBSmpZVEVRTUE0R0NTcUdTSWIzRFFFSkFSWUJlREFlRncweE9UQXpNREl3Ck56TXlOREZhRncweU1EQXpNREV3TnpNeU5ERmFNRnd4Q3pBSkJnTlZCQVlUQW5oNE1Rb3dDQVlEVlFRSURBRjQKTVFvd0NBWURWUVFIREFGNE1Rb3dDQVlEVlFRS0RBRjRNUW93Q0FZRFZRUUxEQUY0TVFzd0NRWURWUVFEREFKagpZVEVRTUE0R0NTcUdTSWIzRFFFSkFSWUJlRENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUEFEQ0NBUW9DCmdnRUJBT0pxNmI2dnI0cDMzM3FRaHJQbmNCVFVIUE1ESnJtaEYvOU44NjZodzFvOGZLclFwNkJmRkcvZEQ0N2gKVGcvWnJ0U2VHT0NoRjFxSEk1dGp3SlVEeGphSUM3U0FkZGpxb1pJUGFoT1pjVlpxZE1POVVFTlFUbktIRXczVQpCUjJUaHdydi9QTTRxZitUazdRa1J6Y2VJQXg1VS9lbUlEV2t4NEk3RlRYQk1XT1hGUTNoRlFtWFppZHpHN21mCnZJTlhYN0krOHR3QVM0alNSdGhxYjVUTzMwYmpxQTFzY0RRdXlZU2R6OVg5TGw1WU1QSUtSZHpnYUR1d1Q5QkQKZjNxT1VqazN6M1FZd0IvWmowaXJtQlpKejJla0V3a1QxbWlyUHF2NTA5QVJ5V1U2QUlSSTN6dnB6S2tWeFJUaApmcUROa1M5SmRRV1Q3RW9vN2lITmRtZlhOYmtDQXdFQUFhTlFNRTR3SFFZRFZSME9CQllFRk1ORzZGeGlMYWFmCjFld2w1RDd1SXJiK0UrSE9NQjhHQTFVZEl3UVlNQmFBRk1ORzZGeGlMYWFmMWV3bDVEN3VJcmIrRStIT01Bd0cKQTFVZEV3UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFHQnYxeC92OWRnWU1ZY1h5TU9MUUNENgpVZWNsS3YzSFRTVGUybXZQcTZoTW56K0ExOGF6RWhPU0xONHZuQUNSd2pzRmVobWIrWk9wMVlYWDkzMi9OckRxCk1XUmh1bENiblFndjlPNVdHWXBDQUR1dnBBMkwyT200aU50S0FucUpGNm5ubHI1UFdQZnVJelB1eVlvQUpKRDkKSFpZRjVwa2hac0EwdDlUTDFuUmdPbFY4elZ0eUg2TTVDWm5nSEpjWG9CWlVvSlBvcGJsc3BpUnh6dzBkMUU0SgpUVmVHaXZFa0RJNFpFYTVuTzZyTUZzcXJ1L21ydVQwN1FCaWd5ZzlEY3h0QU5TUTczQUhOemNRUWpZMWg3L2RiCmJ6QXQ2aWxNZXZKc2lpVFlGYjRPb0dIVW53S2tTQUJuazFNQW5oUUhvYUNuS2dXZE1vU3orQWVuYkhzYXJSMD0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= - service: - name: admission-server-svc - namespace: openebs - path: /validate - name: admission-webhook.openebs.io - rules: - - apiGroups: - - '*' - apiVersions: - - '*' - operations: - - CREATE - - DELETE - resources: - - persistentvolumeclaims ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-maya-operator - namespace: openebs ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-maya-operator -rules: -- apiGroups: - - '*' - resources: - - nodes - - nodes/proxy - verbs: - - '*' -- apiGroups: - - '*' - resources: - - namespaces - - services - - pods - - deployments - - events - - endpoints - - configmaps - - jobs - verbs: - - '*' -- apiGroups: - - '*' - resources: - - storageclasses - - persistentvolumeclaims - - persistentvolumes - verbs: - - '*' -- apiGroups: - - volumesnapshot.external-storage.k8s.io - resources: - - volumesnapshots - - volumesnapshotdatas - verbs: - - get - - list - - watch - - create - - update - - patch - - delete -- apiGroups: - - apiextensions.k8s.io - resources: - - customresourcedefinitions - verbs: - - get - - list - - create - - update - - delete -- apiGroups: - - '*' - resources: - - disks - - blockdevices - - blockdeviceclaims - verbs: - - '*' -- apiGroups: - - '*' - resources: - - cstorpoolclusters - - storagepoolclaims - - storagepoolclaims/finalizers - - storagepools - verbs: - - '*' -- apiGroups: - - '*' - resources: - - castemplates - - runtasks - verbs: - - '*' -- apiGroups: - - '*' - resources: - - cstorpools - - cstorpools/finalizers - - cstorvolumereplicas - - cstorvolumes - verbs: - - '*' -- apiGroups: - - '*' - resources: - - cstorbackups - - cstorrestores - - cstorcompletedbackups - verbs: - - '*' -- nonResourceURLs: - - /metrics - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-maya-operator -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: openebs-maya-operator -subjects: -- kind: ServiceAccount - name: openebs-maya-operator - namespace: openebs -- apiGroup: rbac.authorization.k8s.io - kind: User - name: system:serviceaccount:default:default ---- -apiVersion: v1 -data: - node-disk-manager.config: | - probeconfigs: - - key: udev-probe - name: udev probe - state: true - - key: seachest-probe - name: seachest probe - state: true - - key: smart-probe - name: smart probe - state: true - filterconfigs: - - key: os-disk-exclude-filter - name: os disk exclude filter - state: true - exclude: "/,/etc/hosts,/boot" - - key: vendor-filter - name: vendor filter - state: true - include: "" - exclude: "CLOUDBYT,OpenEBS" - - key: path-filter - name: path filter - state: true - include: "/dev/sda" - exclude: "" -kind: ConfigMap -metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-ndm-config - namespace: openebs ---- -apiVersion: v1 -data: - cert.pem: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUQ3VENDQXRXZ0F3SUJBZ0lVYk84NS9JR0ZXYTA2Vm11WVdTWjdxaTUybmRRd0RRWUpLb1pJaHZjTkFRRUwKQlFBd1hERUxNQWtHQTFVRUJoTUNlSGd4Q2pBSUJnTlZCQWdNQVhneENqQUlCZ05WQkFjTUFYZ3hDakFJQmdOVgpCQW9NQVhneENqQUlCZ05WQkFzTUFYZ3hDekFKQmdOVkJBTU1BbU5oTVJBd0RnWUpLb1pJaHZjTkFRa0JGZ0Y0Ck1CNFhEVEU1TURNd01qQTNNek13TUZvWERUSXdNRE13TVRBM01qYzFNbG93S3pFcE1DY0dBMVVFQXhNZ1lXUnQKYVhOemFXOXVMWE5sY25abGNpMXpkbU11YjNCbGJtVmljeTV6ZG1Nd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQQpBNElCRHdBd2dnRUtBb0lCQVFERk5MRE1xKzd6eFZidDNPcnFhaVUyOFB6K25ZeFRCblA0NVhFWGFjSUpPWG1aClM1c2ZjMjM3WVNWS0I5Tlp4cXNYT08wcXpWb0xtNlZ0UDJjREpWZGZIVUQ0QXBZSC94UVBVTktrcFg3K0NVTFEKZ3VBNWowOXozdkFaeDJidXBTaXFFdE1mVldqNkh5V0Jyd2FuZW9IaVVXVVdpbmtnUXpCQzR1SWtiRkE2djYrZwp4ZzAwS09TY2NFRWY3eU5McjBvejBKVHRpRm1aS1pVVVBwK3N3WTRpRTZ3RER5bVVnTmY4SW8wUEExVkQ1TE9vCkFwQ0l2WDJyb1RNd3VkR1VrZUc1VTA2OWIrMWtQMEJsUWdDZk9TQTBmZEN3Snp0aWE1aHpaUlVIWGxFOVArN0kKekgyR0xXeHh1aHJPTlFmT25HcVRiUE13UmowekZIdmcycUo1azJ2VkFnTUJBQUdqZ2Rjd2dkUXdEZ1lEVlIwUApBUUgvQkFRREFnV2dNQk1HQTFVZEpRUU1NQW9HQ0NzR0FRVUZCd01CTUF3R0ExVWRFd0VCL3dRQ01BQXdIUVlEClZSME9CQllFRklnOVFSOSsyVW12THQwQXY4MlYwZml0bU81WE1COEdBMVVkSXdRWU1CYUFGTU5HNkZ4aUxhYWYKMWV3bDVEN3VJcmIrRStIT01GOEdBMVVkRVFSWU1GYUNGR0ZrYldsemMybHZiaTF6WlhKMlpYSXRjM1pqZ2h4aApaRzFwYzNOcGIyNHRjMlZ5ZG1WeUxYTjJZeTV2Y0dWdVpXSnpnaUJoWkcxcGMzTnBiMjR0YzJWeWRtVnlMWE4yCll5NXZjR1Z1WldKekxuTjJZekFOQmdrcWhraUc5dzBCQVFzRkFBT0NBUUVBSlpJRzd2d0RYaWxhWUFCS1Brc0oKZVJtdml4ZnYybTRVTVdzdlBKVVVJTXhHbzhtc1J6aWhBRjVuTExzaURKRDl4MjhraXZXaGUwbWE4aWVHYjY5Sgp1U1N4bys0OStaV3NVaTB3UlRDMi9ZWGlkWS9xNDU2c1g4ck9qQURDZlFUcFpYc2ZyekVWa2Q4NE0zdU5GTmhnCnMyWmxJMnNDTWljYXExNWxIWEh3akFkY2FqZit1VklwOXNHUElsMUhmZFcxWVFLc0NoU3dhdi80NUZJcFlMSVYKM3hiS2ZIbmh2czhJck5ZbTVIenAvVVdvcFN1Tm5tS1IwWGo3cXpGcllUYzV3eHZ3VVZrKzVpZFFreWMwZ0RDcApGbkFVdEdmaUVUQnBhU3pISjQ4STZqUFpneVE0NzlZMmRxRUtXcWtyc0RkZ2tVcXlnNGlQQ0YwWC9YVU9YU3VGClNnPT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= - key.pem: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NBUUVBeFRTd3pLdnU4OFZXN2R6cTZtb2xOdkQ4L3AyTVV3WnorT1Z4RjJuQ0NUbDVtVXViCkgzTnQrMkVsU2dmVFdjYXJGemp0S3MxYUM1dWxiVDluQXlWWFh4MUErQUtXQi84VUQxRFNwS1YrL2dsQzBJTGcKT1k5UGM5N3dHY2RtN3FVb3FoTFRIMVZvK2g4bGdhOEdwM3FCNGxGbEZvcDVJRU13UXVMaUpHeFFPcit2b01ZTgpOQ2prbkhCQkgrOGpTNjlLTTlDVTdZaFptU21WRkQ2ZnJNR09JaE9zQXc4cGxJRFgvQ0tORHdOVlErU3pxQUtRCmlMMTlxNkV6TUxuUmxKSGh1Vk5PdlcvdFpEOUFaVUlBbnprZ05IM1FzQ2M3WW11WWMyVVZCMTVSUFQvdXlNeDkKaGkxc2Nib2F6alVIenB4cWsyenpNRVk5TXhSNzROcWllWk5yMVFJREFRQUJBb0lCQVFDcXRIT2VsKzRlUWVKLwp3RTN4WUxTYUhIMURnZWxvTFJ2U2hmb2hSRURjYjA0ZExsODNHRnBKMGN2UGkzcWVLZVVNRXhEcGpoeTJFNk5kCk1CYmhtRDlMYkMxREFpb1EvZkxGVnpjZm9zcU02RU5YN3hKZGdQcEwyTjJKMHh2ODFDYWhJZTV6SHlIaDhYZ3MKQysvOHBZVXMvVHcrQ052VTI1UTVNZUNEbXViUUVuemJqQ3lIQm5SVmw1dVF6bk8zWEt2NEVyejdBT1BBWmFJTQozYmNFNC83c1JGczM4SE1aMVZTZ2JxUi9rM1N5SEFzNXhNWHVtY0hMMTBkK0FVK21BQ0svUThpdWJHMm9kNnJiCko3S0RONmFuUzRPZk4zZ3RtaEppN3ZsTjJVL3JycHdnblI0d3Y0bmV4U1ZlamYzQU9iaU9jNnYzZ0xJbXJ2Q3oKNzFETDFPaTVBb0dCQU9HeFp2RWFUSFFnNFdaQVJZbXlGZEtZeXY2MURDc1JycElmUlh3Q1YrcnBZTFM2NlV4SQprWHJISlNreWFqTjNTOXVsZUtUTXRWaU5wY2JCcjVNZ0lOaFFvdThRc2dpZlZHWFJGQ3d0OXJ3MGNDbEc1Y2pCClZ3bUQzYWFBTGR5WVQvbHc4dnk1Zndqc1hFZHd1OEQ2cC9rd0ZzMmlwZWQ4QVFPUVZlQ1dPeXF6QW9HQkFOK3YKL2VxKzZ5NHhPZ2ZtQ01KcHJ0THBBN1J0M3FsU0JKbEw3RkNsQXRCeUUxazBPTVIrZTdhSDBVTDdYWVR4YlBLOApBYnRZR3lzWDkydGM3RHlaU0k0cDFjUHhvcHdzNkt3N0RYZUt0YTNnVkRmSXVuZ3haR25XWjk2WmNjcEhyVzgyCnl5OTk5dTQ2WE1tQWZwSzEvbGxjdGdLem5FUVp5ZkhEUmlWdVVQTlhBb0dCQUxkMGxORDNKNTVkKzlvNTlFeHgKVGZ2WjUyZ1Rrc2lQbnU5NEsrc1puSTEvRnZUUjJrSC8yd0dLVDFLbGdGNUZZb3d3ZlZpNGJkQ0ZrM04walZ0eQppa0JMaTZYNFZEOWVCQ1NmUjE2Q0hrWHQraDRUVzBWTW80dEFmVE9TamJUNnVrZHc0Sk05MVYxVGc4OHVlKy9wCjBCQm1YcUxZeXpMWFFadTcvNUtIaTZDeEFvR0FaTWV2R0E5eWVEcFhrZTF6THR4Y2xzdkREb3lkMEIyUzB0cGgKR3lodEx5cm1Tcjk3Z0JRWWV2R1FONlIyeXduVzh6bi9jYi9OWmNvRGdFeTZac2NNNkhneXhuaGNzZzZOdWVOVgpPdkcwenlVTjdLQTBXeWl0dS8yTWlMOExoSDVzeG5taWE4Qk4rNkV4NHR0UXE1cnhnS09Eb1kzNHJyb0x3VEFnCnI0YVhWRHNDZ1lBYnRwZXhvNTJ4VmJkTzZCL3B5RUU2cEJCS1FkK3hiVkJNMDZwUzArSlFudSt5SVBmeXFhekwKbGdYTEhBSm01bU9Sb2RFRHk0WlVJRkM5RmhraGcrV0ZzSHJCOXpGU1IrZFc2Uzg1eFA4ZGxHVE42S2cydXJNQQowNTRCQUh4RWhPNU9QblNqT0VHSmQwYTdGQmc1UlkxN0RRQlFxV25SZENURHlDWmU0OStLcWc9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= -kind: Secret -metadata: - labels: - app: admission-webhook - app.kubernetes.io/part-of: openebs - openebs.io/component: admission-server - name: admission-server-certs - namespace: openebs -type: Opaque ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app: admission-webhook - app.kubernetes.io/part-of: openebs - openebs.io/component: admission-server - name: admission-server-svc - namespace: openebs -spec: - ports: - - port: 443 - targetPort: 443 - selector: - app: admission-webhook - app.kubernetes.io/part-of: openebs ---- -apiVersion: v1 -kind: Service -metadata: - labels: - app.kubernetes.io/part-of: openebs - name: maya-apiserver-service - namespace: openebs -spec: - ports: - - name: api - port: 5656 - protocol: TCP - targetPort: 5656 - selector: - app.kubernetes.io/part-of: openebs - name: maya-apiserver - sessionAffinity: None ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: admission-webhook - app.kubernetes.io/part-of: openebs - openebs.io/component-name: admission-server - openebs.io/version: 1.0.0 - name: openebs-admission-server - namespace: openebs -spec: - replicas: 1 - selector: - matchLabels: - app: admission-webhook - app.kubernetes.io/part-of: openebs - template: - metadata: - labels: - app: admission-webhook - app.kubernetes.io/part-of: openebs - openebs.io/component-name: admission-server - openebs.io/version: 1.0.0 - spec: - containers: - - args: - - -tlsCertFile=/etc/webhook/certs/cert.pem - - -tlsKeyFile=/etc/webhook/certs/key.pem - - -alsologtostderr - - -v=2 - - 2>&1 - image: quay.io/openebs/admission-server:1.0.0 - imagePullPolicy: IfNotPresent - name: admission-webhook - volumeMounts: - - mountPath: /etc/webhook/certs - name: webhook-certs - readOnly: true - serviceAccountName: openebs-maya-operator - volumes: - - name: webhook-certs - secret: - secretName: admission-server-certs ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-ndm-operator - openebs.io/component-name: ndm-operator - openebs.io/version: 1.0.0 - name: openebs-ndm-operator - namespace: openebs -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/part-of: openebs - name: openebs-ndm-operator - openebs.io/component-name: ndm-operator - strategy: - type: Recreate - template: - metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-ndm-operator - openebs.io/component-name: ndm-operator - openebs.io/version: 1.0.0 - spec: - containers: - - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPERATOR_NAME - value: node-disk-operator - - name: CLEANUP_JOB_IMAGE - value: quay.io/openebs/linux-utils:3.9 - image: quay.io/openebs/node-disk-operator-amd64:v0.4.0 - imagePullPolicy: Always - name: node-disk-operator - readinessProbe: - exec: - command: - - stat - - /tmp/operator-sdk-ready - failureThreshold: 1 - initialDelaySeconds: 4 - periodSeconds: 10 - serviceAccountName: openebs-maya-operator ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/part-of: openebs - name: maya-apiserver - openebs.io/component-name: maya-apiserver - openebs.io/version: 1.0.0 - name: maya-apiserver - namespace: openebs -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/part-of: openebs - name: maya-apiserver - openebs.io/component-name: maya-apiserver - template: - metadata: - labels: - app.kubernetes.io/part-of: openebs - name: maya-apiserver - openebs.io/component-name: maya-apiserver - openebs.io/version: 1.0.0 - spec: - containers: - - env: - - name: OPENEBS_IO_INSTALL_DEFAULT_CSTOR_SPARSE_POOL - value: "false" - - name: OPENEBS_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: OPENEBS_SERVICE_ACCOUNT - valueFrom: - fieldRef: - fieldPath: spec.serviceAccountName - - name: OPENEBS_MAYA_POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPENEBS_IO_JIVA_CONTROLLER_IMAGE - value: quay.io/openebs/jiva:1.0.0 - - name: OPENEBS_IO_JIVA_REPLICA_IMAGE - value: quay.io/openebs/jiva:1.0.0 - - name: OPENEBS_IO_JIVA_REPLICA_COUNT - value: "3" - - name: OPENEBS_IO_CSTOR_TARGET_IMAGE - value: quay.io/openebs/cstor-istgt:1.0.0 - - name: OPENEBS_IO_CSTOR_POOL_IMAGE - value: quay.io/openebs/cstor-pool:1.0.0 - - name: OPENEBS_IO_CSTOR_POOL_MGMT_IMAGE - value: quay.io/openebs/cstor-pool-mgmt:1.0.0 - - name: OPENEBS_IO_CSTOR_VOLUME_MGMT_IMAGE - value: quay.io/openebs/cstor-volume-mgmt:1.0.0 - - name: OPENEBS_IO_VOLUME_MONITOR_IMAGE - value: quay.io/openebs/m-exporter:1.0.0 - - name: OPENEBS_IO_CSTOR_POOL_EXPORTER_IMAGE - value: quay.io/openebs/m-exporter:1.0.0 - - name: OPENEBS_IO_ENABLE_ANALYTICS - value: "true" - - name: OPENEBS_IO_INSTALLER_TYPE - value: openebs-operator - image: quay.io/openebs/m-apiserver:1.0.0 - imagePullPolicy: IfNotPresent - livenessProbe: - exec: - command: - - /usr/local/bin/mayactl - - version - initialDelaySeconds: 30 - periodSeconds: 60 - name: maya-apiserver - ports: - - containerPort: 5656 - readinessProbe: - exec: - command: - - /usr/local/bin/mayactl - - version - initialDelaySeconds: 30 - periodSeconds: 60 - serviceAccountName: openebs-maya-operator ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-localpv-provisioner - openebs.io/component-name: openebs-localpv-provisioner - openebs.io/version: 1.0.0 - name: openebs-localpv-provisioner - namespace: openebs -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/part-of: openebs - name: openebs-localpv-provisioner - openebs.io/component-name: openebs-localpv-provisioner - strategy: - type: Recreate - template: - metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-localpv-provisioner - openebs.io/component-name: openebs-localpv-provisioner - openebs.io/version: 1.0.0 - spec: - containers: - - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: OPENEBS_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: OPENEBS_IO_ENABLE_ANALYTICS - value: "true" - - name: OPENEBS_IO_HELPER_IMAGE - value: quay.io/openebs/openebs-tools:3.8 - - name: OPENEBS_IO_INSTALLER_TYPE - value: openebs-operator - image: quay.io/openebs/provisioner-localpv:1.0.0 - imagePullPolicy: Always - livenessProbe: - exec: - command: - - pgrep - - .*localpv - initialDelaySeconds: 30 - periodSeconds: 60 - name: openebs-provisioner-hostpath - serviceAccountName: openebs-maya-operator ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-provisioner - openebs.io/component-name: openebs-provisioner - openebs.io/version: 1.0.0 - name: openebs-provisioner - namespace: openebs -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/part-of: openebs - name: openebs-provisioner - openebs.io/component-name: openebs-provisioner - template: - metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-provisioner - openebs.io/component-name: openebs-provisioner - openebs.io/version: 1.0.0 - spec: - containers: - - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: OPENEBS_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: quay.io/openebs/openebs-k8s-provisioner:1.0.0 - imagePullPolicy: IfNotPresent - livenessProbe: - exec: - command: - - pgrep - - .*openebs - initialDelaySeconds: 30 - periodSeconds: 60 - name: openebs-provisioner - serviceAccountName: openebs-maya-operator ---- -apiVersion: apps/v1beta1 -kind: Deployment -metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-snapshot-operator - openebs.io/component-name: openebs-snapshot-operator - openebs.io/version: 1.0.0 - name: openebs-snapshot-operator - namespace: openebs -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/part-of: openebs - name: openebs-snapshot-operator - openebs.io/component-name: openebs-snapshot-operator - strategy: - type: Recreate - template: - metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-snapshot-operator - openebs.io/component-name: openebs-snapshot-operator - openebs.io/version: 1.0.0 - spec: - containers: - - env: - - name: OPENEBS_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: quay.io/openebs/snapshot-controller:1.0.0 - imagePullPolicy: IfNotPresent - livenessProbe: - exec: - command: - - pgrep - - .*controller - initialDelaySeconds: 30 - periodSeconds: 60 - name: snapshot-controller - - env: - - name: OPENEBS_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - image: quay.io/openebs/snapshot-provisioner:1.0.0 - imagePullPolicy: IfNotPresent - livenessProbe: - exec: - command: - - pgrep - - .*provisioner - initialDelaySeconds: 30 - periodSeconds: 60 - name: snapshot-provisioner - serviceAccountName: openebs-maya-operator ---- -apiVersion: extensions/v1beta1 -kind: DaemonSet -metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-ndm - openebs.io/component-name: ndm - openebs.io/version: 1.0.0 - name: openebs-ndm - namespace: openebs -spec: - selector: - matchLabels: - app.kubernetes.io/part-of: openebs - name: openebs-ndm - openebs.io/component-name: ndm - template: - metadata: - labels: - app.kubernetes.io/part-of: openebs - name: openebs-ndm - openebs.io/component-name: ndm - openebs.io/version: 1.0.0 - spec: - containers: - - env: - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: SPARSE_FILE_DIR - - name: SPARSE_FILE_SIZE - value: "10737418240" - - name: SPARSE_FILE_COUNT - value: "1" - image: quay.io/openebs/node-disk-manager-amd64:v0.4.0 - imagePullPolicy: Always - livenessProbe: - exec: - command: - - pgrep - - .*ndm - initialDelaySeconds: 30 - periodSeconds: 60 - name: node-disk-manager - securityContext: - privileged: true - volumeMounts: - - mountPath: /host/node-disk-manager.config - name: config - readOnly: true - subPath: node-disk-manager.config - - mountPath: /run/udev - name: udev - - mountPath: /host/proc - name: procmount - readOnly: true - - mountPath: /var/openebs/sparse - name: sparsepath - hostNetwork: true - serviceAccountName: openebs-maya-operator - volumes: - - configMap: - name: openebs-ndm-config - name: config - - hostPath: - path: /run/udev - type: Directory - name: udev - - hostPath: - path: /proc - type: Directory - name: procmount - - hostPath: - path: /var/openebs/sparse - name: sparsepath - updateStrategy: - type: RollingUpdate diff --git a/sources/airflow/helm/airflow/.helmignore b/sources/airflow/helm/airflow/.helmignore deleted file mode 100644 index 6b8710a7..00000000 --- a/sources/airflow/helm/airflow/.helmignore +++ /dev/null @@ -1 +0,0 @@ -.git diff --git a/sources/airflow/helm/airflow/Chart.yaml b/sources/airflow/helm/airflow/Chart.yaml deleted file mode 100644 index fdb98132..00000000 --- a/sources/airflow/helm/airflow/Chart.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -appVersion: 1.10.4 -description: Airflow is a platform to programmatically author, schedule and monitor - workflows -home: https://airflow.apache.org/ -icon: https://airflow.apache.org/_images/pin_large.png -keywords: -- workflow -- dag -maintainers: -- email: gaetan@xeberon.net - name: gsemet -name: airflow -sources: -- https://airflow.apache.org/ -version: 5.2.0 diff --git a/sources/airflow/helm/airflow/OWNERS b/sources/airflow/helm/airflow/OWNERS deleted file mode 100644 index 14e08be0..00000000 --- a/sources/airflow/helm/airflow/OWNERS +++ /dev/null @@ -1,6 +0,0 @@ -approvers: -- gsemet -- maver1ck -reviewers: -- gsemet -- maver1ck diff --git a/sources/airflow/helm/airflow/README.md b/sources/airflow/helm/airflow/README.md deleted file mode 100644 index bdaa90f8..00000000 --- a/sources/airflow/helm/airflow/README.md +++ /dev/null @@ -1,549 +0,0 @@ -# Airflow / Celery - -[Airflow](https://airflow.apache.org/) is a platform to programmatically author, schedule and -monitor workflows. - - -## Install Chart - -To install the Airflow Chart into your Kubernetes cluster : - -```bash -helm install --namespace "airflow" --name "airflow" stable/airflow -``` - -After installation succeeds, you can get a status of Chart - -```bash -helm status "airflow" -``` - -If you want to delete your Chart, use this command: - -```bash -helm delete --purge "airflow" -``` - -### Helm ingresses - -The Chart provides ingress configuration to allow customization the installation by adapting -the `values.yaml` depending on your setup. -Please read the comments in the `values.yaml` file for more details on how to configure your reverse -proxy or load balancer. - -#### Customizable Ingress Rules - -This chart enables you to add various paths in the ingress. It includes two values for you to customize these paths, `precedingPaths` and `succeedingPaths`. The reason there are two possible paths values is because order of paths in an ingress rule matters and because we always add a default path in this chart that routes to the web interface we need loops that allow us to possibly add routes after or before this default one. An example of this happening is if an instance of traffic is routed to a path that covers multiple paths in the http ingress rule, the instance of traffic will be routed to the first one and then the second one. A common case of this will appear when enabling https for this chart using the ingress controller. For example the aws alb ingress controller's ssl-redirect [here](https://kubernetes-sigs.github.io/aws-alb-ingress-controller/guide/tasks/ssl_redirect/) needs the redirect route path to be hit before the airflow-web one. So you will set the values of `precedingPaths` as the following: - -```yaml -precedingPaths: - - path: "/*" - serviceName: "ssl-redirect" - servicePort: "use-annotation" -``` - -### Chart Prefix - -This Helm automatically prefixes all names using the release name to avoid collisions. - -### URL prefix - -This chart exposes 2 endpoints: - -- Airflow Web UI -- Flower, a debug UI for Celery - -Both can be placed either at the root of a domain or at a sub path, for example: - -``` -http://mycompany.com/airflow/ -http://mycompany.com/airflow/flower -``` - -NOTE: Mounting the Airflow UI under a subpath requires an airflow version >= 2.0.x. For the moment -(June 2018) this is **not** available on official package, you will have to use an image where -airflow has been updated to its current HEAD. You can use the following image: -`stibbons31/docker-airflow-dev:2.0dev`. It is rebase regularly on top of the `puckel/docker-airflow` -image. - -Please also note that the Airflow UI and Flower do not behave the same: - -- Airflow Web UI behaves transparently, to configure it one just needs to specify the - `web.baseUrl` value. Ingress can be configured with `ingress.web.host` and `ingress.web.path`. -- Flower cannot handle this scheme directly and requires a URL rewrite mechanism in front - of it. In short, it is able to generate the right URLs in the returned HTML file but cannot - respond to these URL. It is commonly found in software that wasn't intended to work under - something else than a root URL or localhost port. To use it, see the `values.yaml` for how - to configure your ingress controller to rewrite the URL (or "strip" the prefix path) and `flower.urlPrefix`. - - Note: unreleased Flower (as of June 2018) does not need the prefix strip feature anymore. It is - integrated in `docker-airflow-dev:2.0dev` image. - -### Airflow configuration - -`airflow.cfg` configuration can be changed by defining environment variables in the following form: -`AIRFLOW__
__`. - -See the -[Airflow documentation for more information](http://airflow.readthedocs.io/en/latest/configuration.html?highlight=__CORE__#setting-configuration-options) - -This helm chart allows you to add these additional settings with the value key `airflow.config`. -You can also add generic environment variables such as proxy or private pypi: - -```yaml -airflow: - config: - AIRFLOW__WEBSERVER__EXPOSE_CONFIG: True - PIP_INDEX_URL: http://pypi.mycompany.com/ - PIP_TRUSTED_HOST: pypi.mycompany.com - HTTP_PROXY: http://proxy.mycompany.com:1234 - HTTPS_PROXY: http://proxy.mycompany.com:1234 -``` - -If you are using a private image for your dags (see [Embedded Dags](#embedded-dags)) -or for use with the KubernetesPodOperator (available in version 1.10.0), then add -an image pull secret to the airflow config: -```yaml -airflow: - image: - pullSecret: my-docker-repo-secret -``` - -### Airflow connections - -Connections define how your Airflow instance connects to environment and 3rd party service providers. -This helm chart allows you to define your own connections at the time of Airflow initialization. -For each connection the id and the type has to be defined. All other properties are optional. - -Example: -```yaml -airflow: - connections: - - id: my_aws - type: aws - extra: '{"aws_access_key_id": "**********", "aws_secret_access_key": "***", "region_name":"eu-central-1"}' -``` - -Note: As connections may require to include sensitive data - the resulting script is stored encrypted in a kubernetes secret and mounted into the airflow scheduler container. It is probably wise not to put connection data in the default values.yaml and instead create an encrypted my-secret-values.yaml. this way it can be decrypted before the installation and passed to helm with -f - -#### Airflow variables - -Variables are a generic way to store and retrieve arbitrary content or settings as a simple key value store within Airflow. -These variables will be automatically imported by the scheduler when it starts up. - -Example: -```yaml -airflow: - variables: '{ "environment": "dev" }' -``` - -#### Airflow pools - -Some systems can get overwhelmed when too many processes hit them at the same time. -Airflow pools can be used to limit the execution parallelism on arbitrary sets of tasks. For more info see the [airflow -documentation](https://airflow.apache.org/concepts.html#pools). -The feature to import pools has only been added in airflow 1.10.2. -These pools will be automatically imported by the scheduler when it starts up. - -Example: -```yaml -airflow: - pools: '{ "example": { "description": "This is an example of a pool", "slots": 2 } }' -``` - -### Worker Statefulset - -Celery workers uses StatefulSet. -It is used to freeze their DNS using a Kubernetes Headless Service, and allow the webserver to -requests the logs from each workers individually. -This requires to expose a port (8793) and ensure the pod DNS is accessible to the web server pod, -which is why StatefulSet is for. - -#### Worker secrets - -You can add kubernetes secrets which will be mounted as volumes on the worker nodes -at `secretsDir/`. -```yaml -workers: - secretsDir: /var/airflow/secrets - secrets: - - redshift-user - - redshift-password - - elasticsearch-user - - elasticsearch-password -``` - -With the above configuration, you could read the `redshift-user` password -from within a dag or other function using: -```python -import os -from pathlib import Path - -def get_secret(secret_name): - secrets_dir = Path('/var/airflow/secrets') - secret_path = secrets_dir / secret_name - assert secret_path.exists(), f'could not find {secret_name} at {secret_path}' - secret_data = secret_path.read_text().strip() - return secret_data - -redshift_user = get_secret('redshift-user') -``` - -To create a secret, you can use: -```bash -$ kubectl create secret generic redshift-user --from-file=redshift-user=~/secrets/redshift-user.txt -``` -Where `redshift-user.txt` contains the user secret as a single text string. - -### Database connection credentials - -In this chart, postgres is used as the database backing Airflow. -Additionally, if you're using the `CeleryExecutor` then redis is used. -By default, insecure username/password combinations are used. - -For a real production deployment, it's a good idea to create secure credentials before installing the Helm chart. -For example, from the command line, run: -```bash -kubectl create secret generic airflow-postgres --from-literal=postgres-password=$(openssl rand -base64 13) -kubectl create secret generic airflow-redis --from-literal=redis-password=$(openssl rand -base64 13) -``` -Next, you can use those secrets with the Helm chart: -```yaml -# values.yaml - -postgresql: - existingSecret: airflow-postgres - -redis: - existingSecret: airflow-redis -``` -This approach has the additional advantage of keeping secrets outside of the Helm upgrade process. - -### Additional environment variables - -It is possible to specify additional environment variables using the same format as in a pod's `.spec.containers.env` definition. -These environment variables will be mounted in the web, scheduler, and worker pods. -You can use this feature to pass additional secret environment variables to Airflow. - -Here is a simple example showing how to pass in a Fernet key and LDAP password. -Of course, for this example to work, both the `airflow` and `ldap` Kubernetes secrets must already exist in the proper namespace; be sure to create those before running Helm. -```yaml -extraEnv: - - name: AIRFLOW__CORE__FERNET_KEY - valueFrom: - secretKeyRef: - name: airflow - key: fernet-key - - name: AIRFLOW__LDAP__BIND_PASSWORD - valueFrom: - secretKeyRef: - name: ldap - key: password -``` - -### Local binaries - -Please note a folder `~/.local/bin` will be automatically created and added to the PATH so that -Bash operators can use command line tools installed by `pip install --user` for instance. - -## Installing dependencies - -Add a `requirements.txt` file at the root of your DAG project (`dags.path` entry at `values.yaml`) and they will be automatically installed. That works for both shared persistent volume and init-container deployment strategies (see below). - -## DAGs Deployment - -Several options are provided for synchronizing your Airflow DAGs. - - -### Mount a Shared Persistent Volume - -You can store your DAG files on an external volume, and mount this volume into the relevant Pods -(scheduler, web, worker). In this scenario, your CI/CD pipeline should update the DAG files in the -PV. - -Since all Pods should have the same collection of DAG files, it is recommended to create just one PV -that is shared. This ensures that the Pods are always in sync about the DagBag. - -This is controlled by setting `persistence.enabled=true`. You will have to ensure yourself the -PVC are shared properly between your pods: -- If you are on AWS, you can use [Elastic File System (EFS)](https://aws.amazon.com/efs/). -- If you are on Azure, you can use -[Azure File Storage (AFS)](https://docs.microsoft.com/en-us/azure/aks/azure-files-dynamic-pv). - -To share a PV with multiple Pods, the PV needs to have accessMode 'ReadOnlyMany' or 'ReadWriteMany'. - -Since you're unlikely to be using init-container with this configuration, you'll need to mount a file to /requirements.txt to get additional Python modules for your DAGs to be installed on container start. Use the extraConfigMapMounts configuration option for this. - -### Git-Sync sidecar container - -This is probably the most popular way for airflow users to syncronize there dags. Its a pretty simple set up just a sidecar container in the pods that pulls dags from your repository of choice using git. To do this you must set up all the git values in this chart to a point where you can successfully connect to the repo. These are the values you will definitley need to set after enabling `dags.git.gitSync.enabled`. `dags.git.url` `dags.git.ref` `dags.git.gitSync.refreshTime`. If you are going the ssh connect route make sure to set the following `dags.git.privateKeyName`, `dags.git.repoHost`, `dags.git.secret`. In the secret have the private key and the known_hosts file as well so the host does not mistake the containers connection as a man in the middle attack and deny connection. - -### Use init-container - -If you enable set `dags.init_container.enabled=true`, the pods will try upon startup to fetch the -git repository defined by `dags.git_repo`, on branch `dags.git_branch` as DAG folder. - -This is the easiest way of deploying your DAGs to Airflow. - -If you are using a private Git repo, you can set `dags.gitSecret` to the name of a secret you created containing private keys and a `known_hosts` file. - -For example, this will create a secret named `my-git-secret` from your ed25519 key and known_hosts file stored in your home directory: `kubectl create secret generic my-git-secret --from-file=id_ed25519=~/.ssh/id_ed25519 --from-file=known_hosts=~/.ssh/known_hosts --from-file=id_id_ed25519.pub=~/.ssh/id_ed25519.pub` - -#### Init-container git connection ssh - -This set of instructions will enable you to clone your repository in the initContainer git-clone.sh script through an ssh connection. - -To do this you must have `dags.initContainer.enabled` set to true. Then you need to have the following set. `dags.git.url` This is the repository of your dags. `dags.git.ref` This is the branch with your dags on your repo. `dags.git.secret` This is the name of the secret cotaining your private ssh key. With this you need `dags.git.privateKeyName`, this is the name of the private key in the secret mounted in the keys directory on the initContainer. The last variable you need is this `dags.git.repoHost`. This is the host of your repo, for example if hosted on gitlab set the value as gitlab.com and if github put github.com. This enables us to tell ssh to use our private key when cloning otherwise we would recieve an unable to recognize host bug. - -### Embedded DAGs - -If you want more control on the way you deploy your DAGs, you can use embedded DAGs, where DAGs -are burned inside the Docker container deployed as Scheduler and Workers. - -Be aware this requires more tooling than using shared PVC, or init-container: - -- your CI/CD should be able to build a new docker image each time your DAGs are updated. -- your CI/CD should be able to control the deployment of this new image in your kubernetes cluster - -Example of procedure: - -- Fork the [puckel/docker-airflow](https://github.com/puckel/docker-airflow) repository -- Place your DAG inside the `dags` folder of the repository, and ensure your Python dependencies - are well installed (for example consuming a `requirements.txt` in your `Dockerfile`) -- Update the value of `airflow.image` in your `values.yaml` and deploy on your Kubernetes cluster - -## Logs - -By default (`logsPersistence.enabled: false`) logs from the web server, scheduler, and Celery workers are written to within the Docker container's filesystem. -Therefore, any restart of the pod will wipe the logs. -For production purposes, you will likely want to persist the logs externally (e.g. S3), which you have to set up yourself through configuration. -You can also persist logs using a `PersistentVolume` using `logsPersistence.enabled: true`. -To use an existing volume, pass the name to `logsPersistence.existingClaim`. -Otherwise, a new volume will be created. - -Note that it is also possible to persist logs by mounting a `PersistentVolume` to the log directory (`/usr/local/airflow/logs` by default) using `airflow.extraVolumes` and `airflow.extraVolumeMounts`. - -Refer to the `Mount a Shared Persistent Volume` section above for details on using persistent volumes. - -## Using one volume for both logs and DAGs - -You may want to store DAGs and logs on the same volume and configure Airflow to use subdirectories for them. One reason is that mounting the same volume multiple times with different subPaths can cause problems in Kubernetes, e.g. one of the mounts gets stuck during container initialisation. - -Here's an approach that achieves this: - -- Configure the `extraVolume` and `extraVolumeMount` arrays to put the (e.g. AWS EFS) volume at /usr/local/airflow/efs -- Configure `persistence.enabled` and `logsPersistence.enabled` to be false -- Configure `dags.path` to be /usr/local/airflow/efs/dags -- Configure `logs.path` to be /usr/local/airflow/efs/logs - -## Service monitor - -The service monitor is something introduced by the [CoresOS prometheus operator](https://github.com/coreos/prometheus-operator). -To be able to expose metrics to prometheus you need install a plugin, this can be added to the docker image. A good one is: https://github.com/epoch8/airflow-exporter. -This exposes dag and task based metrics from Airflow. -For service monitor configuration see the generic [Helm chart Configuration](#helm-chart-configuration). - -## Additional manifests - -It is possible to add additional manifests into a deployment, to extend the chart. One of the reason is to deploy a manifest specific to a cloud provider ( BackendConfig on GKE for example ). - -```yaml -extraManifests: - - apiVersion: cloud.google.com/v1beta1 - kind: BackendConfig - metadata: - name: "{{ .Release.Name }}-test" - spec: - securityPolicy: - name: "gcp-cloud-armor-policy-test" -``` - -## Helm chart Configuration - -The following table lists the configurable parameters of the Airflow chart and their default values. - -| Parameter | Description | Default | -|------------------------------------------|---------------------------------------------------------|---------------------------| -| `airflow.fernetKey` | Ferney key (see `values.yaml` for example) | (auto generated) | -| `airflow.service.type` | service type for Airflow UI | `ClusterIP` | -| `airflow.service.annotations` | (optional) service annotations for Airflow UI | `{}` | -| `airflow.service.externalPort` | (optional) external port for Airflow UI | `8080` | -| `airflow.service.nodePort.http` | (optional) when using service.type == NodePort, an optional NodePort to request | ``| -| `airflow.service.serviceSessionAffinity` | The session affinity for the airflow UI | `None` | -| `airflow.service.sessionAffinityConfig` | The session affinity config for the airflow UI | `None` | -| `airflow.executor` | the executor to run | `Celery` | -| `airflow.initRetryLoop` | max number of retries during container init | | -| `airflow.image.repository` | Airflow docker image | `puckel/docker-airflow` | -| `airflow.image.tag` | Airflow docker tag | `1.10.2` | -| `airflow.image.pullPolicy` | Image pull policy | `IfNotPresent` | -| `airflow.image.pullSecret` | Image pull secret | | -| `airflow.schedulerNumRuns` | -1 to loop indefinitively, 1 to restart after each exec | | -| `airflow.webReplicas` | how many replicas for web server | `1` | -| `airflow.config` | custom airflow configuration env variables | `{}` | -| `airflow.podDisruptionBudgetEnabled` | enable pod disruption budget | `true` | -| `airflow.podDisruptionBudget` | control pod disruption budget | `{'maxUnavailable': 1}` | -| `airflow.extraEnv` | specify additional environment variables to mount | `{}` | -| `airflow.extraConfigmapMounts` | Additional configMap volume mounts on the airflow pods. | `[]` | -| `airflow.podAnnotations` | annotations for scheduler, worker and web pods | `{}` | -| `airflow.extraInitContainers` | additional Init Containers to run in the scheduler pods | `[]` | -| `airflow.extraContainers` | additional containers to run in the scheduler, worker & web pods | `[]` | -| `airflow.extraVolumeMounts` | additional volumeMounts to the main container in scheduler, worker & web pods | `[]`| -| `airflow.extraVolumes` | additional volumes for the scheduler, worker & web pods | `[]` | -| `airflow.initdb` | run `airflow initdb` when starting the scheduler | `true` | -| `flower.urlPrefix` | path of the flower ui | "" | -| `flower.resources` | custom resource configuration for flower pod | `{}` | -| `flower.labels` | labels for the flower deployment | `{}` | -| `flower.annotations` | annotations for the flower deployment | `{}` | -| `flower.service.type` | service type for Flower UI | `ClusterIP` | -| `flower.service.annotations` | (optional) service annotations for Flower UI | `{}` | -| `flower.service.externalPort` | (optional) external port for Flower UI | `5555` | -| `web.baseUrl` | webserver UI URL | `http://localhost:8080` | -| `web.resources` | custom resource configuration for web pod | `{}` | -| `web.labels` | labels for the web deployment | `{}` | -| `web.annotations` | annotations for the web deployment | `{}` | -| `web.initialStartupDelay` | amount of time webserver pod should sleep before initializing webserver | `60` | -| `web.minReadySeconds` | minReadySeconds in the web deployment | `120` -| `web.livenessProbe.periodSeconds` | interval between probes | `60` | -| `web.livenessProbe.timeoutSeconds` | time allowed for a result to return | `1` | -| `web.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful | `1` | -| `web.livenessProbe.failureThreshold` | Minimum consecutive successes for the probe to be considered failed | `5` | -| `web.readinessProbe.periodSeconds` | interval between probes | `60` | -| `web.readinessProbe.timeoutSeconds` | time allowed for a result to return | `1` | -| `web.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful | `1` | -| `web.readinessProbe.failureThreshold` | Minimum consecutive successes for the probe to be considered failed | `5` | -| `web.initialDelaySeconds` | initial delay on livenessprobe before checking if webserver is available | `360` | -| `web.secretsDir` | directory in which to mount secrets on webserver nodes | /var/airflow/secrets | -| `web.secrets` | secrets to mount as volumes on webserver nodes | [] | -| `scheduler.resources` | custom resource configuration for scheduler pod | `{}` | -| `scheduler.labels` | labels for the scheduler deployment | `{}` | -| `scheduler.annotations` | annotations for the scheduler deployment | `{}` | -| `workers.enabled` | enable workers | `true` | -| `workers.replicas` | number of workers pods to launch | `1` | -| `workers.terminationPeriod` | gracefull termination period for workers to stop | `30` | -| `workers.resources` | custom resource configuration for worker pod | `{}` | -| `workers.celery.instances` | number of parallel celery tasks per worker | `1` | -| `workers.labels` | labels for the worker statefulSet | `{}` | -| `workers.annotations` | annotations for the worker statefulSet | `{}` | -| `workers.celery.gracefullTermination` | cancel the consumer and wait for the current task to finish before stopping the worker | `false` | -| `workers.podAnnotations` | annotations for the worker pods | `{}` | -| `workers.secretsDir` | directory in which to mount secrets on worker nodes | /var/airflow/secrets | -| `workers.secrets` | secrets to mount as volumes on worker nodes | [] | -| `nodeSelector` | Node labels for pod assignment | `{}` | -| `affinity` | Affinity labels for pod assignment | `{}` | -| `tolerations` | Toleration labels for pod assignment | `[]` | -| `ingress.enabled` | enable ingress | `false` | -| `ingress.web.host` | hostname for the webserver ui | "" | -| `ingress.web.path` | path of the werbserver ui (read `values.yaml`) | `` | -| `ingress.web.annotations` | annotations for the web ui ingress | `{}` | -| `ingress.web.livenessPath` | path to the web liveness probe | `{{ ingress.web.path }}/health` | -| `ingress.web.tls.enabled` | enables TLS termination at the ingress | `false` | -| `ingress.web.tls.secretName` | name of the secret containing the TLS certificate & key | `` | -| `ingress.web.succeedingPaths` | additional paths for the ingress coming after the airflow-web path | `{}` | -| `ingress.web.precedingPaths` | additional paths for the ingress that come before default path to airflow-web | `{}` | -| `ingress.flower.host` | hostname for the flower ui | "" | -| `ingress.flower.path` | path of the flower ui (read `values.yaml`) | `` | -| `ingress.flower.livenessPath` | path to the liveness probe (read `values.yaml`) | `/` | -| `ingress.flower.annotations` | annotations for the flower ui ingress | `{}` | -| `ingress.flower.tls.enabled` | enables TLS termination at the ingress | `false` | -| `ingress.flower.tls.secretName` | name of the secret containing the TLS certificate & key | `` | -| `persistence.enabled` | enable persistence storage for DAGs | `false` | -| `persistence.existingClaim` | if using an existing claim, specify the name here | `nil` | -| `persistence.subPath` | (optional) relative path on the volume to use for DAGs | (undefined) | -| `persistence.storageClass` | Persistent Volume Storage Class | (undefined) | -| `persistence.accessMode` | PVC access mode | `ReadWriteOnce` | -| `persistence.size` | Persistant storage size request | `1Gi` | -| `logsPersistence.enabled` | enable persistent storage for logs | `false` | -| `logsPersistence.existingClaim` | if using an existing claim, specify the name here | `nil` | -| `logsPersistence.subPath` | (optional) relative path on the volume to use for logs | (undefined) | -| `logsPersistence.storageClass` | Persistent Volume Storage Class | (undefined) | -| `logsPersistence.accessMode` | PVC access mode | `ReadWriteOnce` | -| `logsPersistence.size` | Persistant storage size request | `1Gi` | -| `dags.doNotPickle` | should the scheduler disable DAG pickling | `false` | -| `dags.path` | mount path for persistent volume | `/usr/local/airflow/dags` | -| `dags.initContainer.enabled` | Fetch the source code when the pods starts | `false` | -| `dags.initContainer.image.repository` | Init container Docker image. | `alpine/git` | -| `dags.initContainer.image.tag` | Init container Docker image tag. | `1.0.4` | -| `dags.initContainer.installRequirements` | auto install requirements.txt deps | `true` | -| `dags.git.url` | url to clone the git repository | nil | -| `dags.git.ref` | branch name, tag or sha1 to reset to | `master` | -| `dags.git.secret` | name of a secret containing an ssh deploy key | nil | -| `dags.git.privateKeyName` | name of private key mounted in secret(only needed if using ssh to connect to git) | '' | -| `dags.git.repoHost` | Host of git repo you are establish an ssh connection to ex. github.com (only needed if using ssh to connect to git) | '' | -| `dags.git.gitSync.enabled` | Enables a sidecar container that syncs dags | `false` | -| `dags.git.gitSync.image.repository` | Image of the sidecar container that syncs dags | `alpine/git` | -| `dags.git.gitSync.image.tag` | Image tag of sidecar container that syncs dags | `1.0.4` | -| `dags.git.gitSync.refreshTime` | How often the sidecar container syncs dags up with repository(in seconds) | nil | -| `logs.path` | mount path for logs persistent volume | `/usr/local/airflow/logs` | -| `rbac.create` | create RBAC resources | `true` | -| `serviceAccount.create` | create a service account | `true` | -| `serviceAccount.name` | the service account name | `` | -| `postgresql.enabled` | create a postgres server | `true` | -| `postgresql.existingSecret` | The name of an existing secret with a key named `postgresql.existingSecretKey` to use as the password | `nil` | -| `postgresql.existingSecretKey` | The name of the key containing the password in the secret named `postgresql.existingSecret` | `postgres-password` | -| `postgresql.uri` | full URL to custom postgres setup | (undefined) | -| `postgresql.postgresHost` | PostgreSQL Hostname | (undefined) | -| `postgresql.postgresUser` | PostgreSQL User | `postgres` | -| `postgresql.postgresPassword` | PostgreSQL Password | `airflow` | -| `postgresql.postgresDatabase` | PostgreSQL Database name | `airflow` | -| `postgresql.persistence.enabled` | Enable Postgres PVC | `true` | -| `postgresql.persistence.storageClass` | Persistent class | (undefined) | -| `postgresql.persistence.accessMode` | Access mode | `ReadWriteOnce` | -| `redis.enabled` | Create a Redis cluster | `true` | -| `redis.existingSecret` | The name of an existing secret with a key named `redis.existingSecretKey` to use as the password | `nil` | -| `redis.existingSecretKey` | The name of the key containing the password in the secret named `redis.existingSecret` | `redis-password` | -| `redis.redisHost` | Redis Hostname | (undefined) | -| `redis.password` | Redis password | `airflow` | -| `redis.master.persistence.enabled` | Enable Redis PVC | `false` | -| `redis.cluster.enabled` | enable master-slave cluster | `false` | -| `serviceMonitor.enabled` | enable service monitor | `false` | -| `serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` | -| `serviceMonitor.path` | The path at which the metrics should be scraped | `/admin/metrics` | -| `serviceMonitor.selector` | label Selector for Prometheus to find ServiceMonitors | `prometheus: kube-prometheus` | -| `prometheusRule.enabled` | enable prometheus rule | `false` | -| `prometheusRule.groups` | define alerting rules | `{}` | -| `prometheusRule.additionalLabels` | add additional labels to the prometheus rule | `{}` | -| `extraManifests` | add additional manifests to deploy | `[]` | - - -Full and up-to-date documentation can be found in the comments of the `values.yaml` file. - -## Upgrading - -### To 5.0.0 -This version splits the configuration for webserver and flower web UI from ingress configurations for separation of concerns. - -Two new parameters: - - `web.baseUrl` - - `flower.urlPrefix` - -This upgrade will fail if a custom ingress path is set for web and/or flower and `web.baseUrl` and/or `flower.urlPrefix` - -### To 4.0.0 -This version splits the specs for the NodeSelector, Affinity and Toleration features. Instead of being global, and injected in every component, they are now defined _by component_ to provide more flexibility for your deployments. As such, the migration steps are really simple. Just copy and paste your node/affinity/tolerance definitions in the four airflow components, which are `worker`, `scheduler`, `flower` and `web`. The default values file should help you with locating those. - -### To 3.0.0 -This version introduces a simplified way of managing secrets, including the database credentials to postgres and redis. -With the default settings in prior versions, database credentials were generated and stored in an Airflow-managed Kubernetes secret. -However, these credentials were also stored in postgres- and redis-managed secrets (created by the respective subcharts), leading to duplication. -Moreover, it was tricky to bring your own passwords and to load additional secrets as environment variables. - -To deal with these issues, we've removed the Airflow-managed Kubernetes secret (`templates/secret-env.yaml`). -If your deployment was called `airflow`, this upgrade will delete the `airflow-env` secret. -Instead, the pods now source the database secrets from the postgres- and redis-managed secrets, i.e. the postgres password is in the `airflow-postgres` secret. -This upgrade _shouldn't_ break the deployment, but you may need to make some adjustments if you were doing something nonstandard. - -For production, it's better create random passwords before installing the Helm chart. -You can use these passwords by specifying the newly added `postgres.existingSecret` and `redis.existingSecret` parameters. - -We've also added `airflow.extraEnv`, which provides a flexible way to inject environment variables into your pods. -This parameter is great for things like the Fernet key and LDAP password. - -The following parameters are no longer necessary and have been removed: `airflow.defaultSecretsMapping`, `airflow.secretsMapping`, `airflow.existingAirflowSecret`. -If you were using them, you'll have to migrate your settings to `postgres.existingSecret`, `redis.existingSecret`, and `airflow.extraEnv`, which are described in greater depth in the documentation above. - -### To 2.8.3+ -The parameter `airflow.service.type` no longer applies to the Flower service, but the default of `ClusterIP` has been maintained. If using a custom values file and have changed the service type, also specify `flower.service.type`. - -### To 2.0.0 -The parameter `workers.pod.annotations` has been renamed to `workers.podAnnotations`. If using a -custom values file, rename this parameter. diff --git a/sources/airflow/helm/airflow/charts/postgresql/Chart.yaml b/sources/airflow/helm/airflow/charts/postgresql/Chart.yaml deleted file mode 100644 index b0316802..00000000 --- a/sources/airflow/helm/airflow/charts/postgresql/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -appVersion: 9.6.2 -description: Object-relational database management system (ORDBMS) with an emphasis - on extensibility and on standards-compliance. -engine: gotpl -home: https://www.postgresql.org/ -icon: https://www.postgresql.org/media/img/about/press/elephant.png -keywords: -- postgresql -- postgres -- database -- sql -maintainers: -- name: databus23 -name: postgresql -sources: -- https://github.com/kubernetes/charts -- https://github.com/docker-library/postgres -version: 0.13.1 diff --git a/sources/airflow/helm/airflow/charts/postgresql/README.md b/sources/airflow/helm/airflow/charts/postgresql/README.md deleted file mode 100644 index 04ea0244..00000000 --- a/sources/airflow/helm/airflow/charts/postgresql/README.md +++ /dev/null @@ -1,147 +0,0 @@ -# PostgreSQL - -[PostgreSQL](https://postgresql.org) is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. - -## TL;DR; - -```bash -$ helm install stable/postgresql -``` - -## Introduction - -This chart bootstraps a [PostgreSQL](https://github.com/docker-library/postgres) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -## Prerequisites - -- Kubernetes 1.4+ with Beta APIs enabled -- PV provisioner support in the underlying infrastructure (Only when persisting data) - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```bash -$ helm install --name my-release stable/postgresql -``` - -The command deploys PostgreSQL on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Configuration - -The following table lists the configurable parameters of the PostgreSQL chart and their default values. - -| Parameter | Description | Default | -| ----------------------- | --------------------------------------------- | ---------------------------------------------------------- | -| `image` | `postgres` image repository | `postgres` | -| `imageTag` | `postgres` image tag | `9.6.2` | -| `imagePullPolicy` | Image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` | -| `imagePullSecrets` | Image pull secrets | `nil` | -| `postgresUser` | Username of new user to create. | `postgres` | -| `postgresPassword` | Password for the new user. | random 10 characters | -| `usePasswordFile` | Inject the password via file instead of env var | `false` | -| `postgresDatabase` | Name for new database to create. | `postgres` | -| `postgresInitdbArgs` | Initdb Arguments | `nil` | -| `schedulerName` | Name of an alternate scheduler | `nil` | -| `existingSecret` | Use Existing secret for Admin password | `nil` | -| `postgresConfig` | Runtime Config Parameters | `nil` | -| `persistence.enabled` | Use a PVC to persist data | `true` | -| `persistence.existingClaim`| Provide an existing PersistentVolumeClaim | `nil` | -| `persistence.storageClass` | Storage class of backing PVC | `nil` (uses alpha storage class annotation) | -| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` | -| `persistence.annotations` | Persistent Volume annotations | `{}` | -| `persistence.size` | Size of data volume | `8Gi` | -| `persistence.subPath` | Subdirectory of the volume to mount at | `postgresql-db` | -| `persistence.mountPath` | Mount path of data volume | `/var/lib/postgresql/data/pgdata` | -| `resources` | CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `100m` | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | -| `metrics.image` | Exporter image | `wrouesnel/postgres_exporter` | -| `metrics.imageTag` | Exporter image | `v0.1.1` | -| `metrics.imagePullPolicy` | Exporter image pull policy | `IfNotPresent` | -| `metrics.resources` | Exporter resource requests/limit | Memory: `256Mi`, CPU: `100m` | -| `metrics.customMetrics` | Additional custom metrics | `nil` | -| `service.externalIPs` | External IPs to listen on | `[]` | -| `service.port` | TCP port | `5432` | -| `service.type` | k8s service type exposing ports, e.g. `NodePort`| `ClusterIP` | -| `service.nodePort` | NodePort value if service.type is `NodePort` | `nil` | -| `networkPolicy.enabled` | Enable NetworkPolicy | `false` | -| `networkPolicy.allowExternal` | Don't require client label for connections | `true` | -| `nodeSelector` | Node labels for pod assignment | {} | -| `affinity` | Affinity settings for pod assignment | {} | -| `tolerations` | Toleration labels for pod assignment | [] | -| `podAnnotations` | Annotations for the postgresql pod | {} | -| `deploymentAnnotations` | Annotations for the postgresql deployment | {} | - -The above parameters map to the env variables defined in [postgres](http://github.com/docker-library/postgres). For more information please refer to the [postgres](http://github.com/docker-library/postgres) image documentation. - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install --name my-release \ - --set postgresUser=my-user,postgresPassword=secretpassword,postgresDatabase=my-database \ - stable/postgresql -``` - -The above command creates a PostgreSQL user named `my-user` with password `secretpassword`. Additionally it creates a database named `my-database`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install --name my-release -f values.yaml stable/postgresql -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -## Persistence - -The [postgres](https://github.com/docker-library/postgres) image stores the PostgreSQL data and configurations at the `/var/lib/postgresql/data/pgdata` path of the container. - -The chart mounts a [Persistent Volume](http://kubernetes.io/docs/user-guide/persistent-volumes/) at this location. The volume is created using dynamic volume provisioning. If the PersistentVolumeClaim should not be managed by the chart, define `persistence.existingClaim`. - -Note: When using persistence ensure that you either provide a `postgresPassword` or use `existingSecret`, otherwise `helm update` will generate a new random password which is ignored by postgres. That will cause confusing behaviour especially if services depend on the secret - -### Existing PersistentVolumeClaims - -1. Create the PersistentVolume -1. Create the PersistentVolumeClaim -1. Install the chart -```bash -$ helm install --set persistence.existingClaim=PVC_NAME postgresql -``` - -The volume defaults to mount at a subdirectory of the volume instead of the volume root to avoid the volume's hidden directories from interfering with `initdb`. If you are upgrading this chart from before version `0.4.0`, set `persistence.subPath` to `""`. - -## Metrics -The chart optionally can start a metrics exporter for [prometheus](https://prometheus.io). The metrics endpoint (port 9187) is not exposed and it is expected that the metrics are collected from inside the k8s cluster using something similar as the described in the [example Prometheus scrape configuration](https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml). - -The exporter allows to create custom metrics from additional SQL queries. See the Chart's `values.yaml` for an example and consult the [exporters documentation](https://github.com/wrouesnel/postgres_exporter#adding-new-metrics-via-a-config-file) for more details. - -## NetworkPolicy - -To enable network policy for PostgreSQL, -install [a networking plugin that implements the Kubernetes -NetworkPolicy spec](https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy#before-you-begin), -and set `networkPolicy.enabled` to `true`. - -For Kubernetes v1.5 & v1.6, you must also turn on NetworkPolicy by setting -the DefaultDeny namespace annotation. Note: this will enforce policy for _all_ pods in the namespace: - - kubectl annotate namespace default "net.beta.kubernetes.io/network-policy={\"ingress\":{\"isolation\":\"DefaultDeny\"}}" - -With NetworkPolicy enabled, traffic will be limited to just port 5432. - -For more precise policy, set `networkPolicy.allowExternal=false`. This will -only allow pods with the generated client label to connect to PostgreSQL. -This label will be displayed in the output of a successful install. diff --git a/sources/airflow/helm/airflow/charts/postgresql/templates/NOTES.txt b/sources/airflow/helm/airflow/charts/postgresql/templates/NOTES.txt deleted file mode 100644 index c5753a5d..00000000 --- a/sources/airflow/helm/airflow/charts/postgresql/templates/NOTES.txt +++ /dev/null @@ -1,41 +0,0 @@ -PostgreSQL can be accessed via port 5432 on the following DNS name from within your cluster: -{{ template "postgresql.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - -{{- if .Values.existingSecret }} -If you have not already created the postgres admin secret: - - kubectl create secret generic {{ .Values.existingSecret }} --namespace {{ .Release.Namespace }} --from-file=./postgres-password -{{ else }} -To get your user password run: - - PGPASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "postgresql.fullname" . }} -o jsonpath="{.data.postgres-password}" | base64 --decode; echo) -{{- end }} - -To connect to your database run the following command (using the env variable from above): - - kubectl run --namespace {{ .Release.Namespace }} {{ template "postgresql.fullname" . }}-client --restart=Never --rm --tty -i --image postgres \ - --env "PGPASSWORD=$PGPASSWORD" \{{- if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }} - --labels="{{ template "postgresql.fullname" . }}-client=true" \{{- end }} - --command -- psql -U {{ default "postgres" .Values.postgresUser }} \ - -h {{ template "postgresql.fullname" . }} {{ default "postgres" .Values.postgresDatabase }} - -{{ if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }} -Note: Since NetworkPolicy is enabled, only pods with label -{{ template "postgresql.fullname" . }}-client=true" -will be able to connect to this PostgreSQL cluster. -{{- end }} - -To connect to your database directly from outside the K8s cluster: - {{- if contains "NodePort" .Values.service.type }} - PGHOST=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath='{.items[0].status.addresses[0].address}') - PGPORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "postgresql.fullname" . }} -o jsonpath='{.spec.ports[0].nodePort}') - - {{- else if contains "ClusterIP" .Values.service.type }} - PGHOST=127.0.0.1 - PGPORT={{ default "5432" .Values.service.port }} - - # Execute the following commands to route the connection: - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "postgresql.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME {{ default "5432" .Values.service.port }}:{{ default "5432" .Values.service.port }} - - {{- end }} diff --git a/sources/airflow/helm/airflow/charts/postgresql/templates/_helpers.tpl b/sources/airflow/helm/airflow/charts/postgresql/templates/_helpers.tpl deleted file mode 100644 index 3e6431d7..00000000 --- a/sources/airflow/helm/airflow/charts/postgresql/templates/_helpers.tpl +++ /dev/null @@ -1,50 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "postgresql.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "postgresql.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for networkpolicy. -*/}} -{{- define "postgresql.networkPolicy.apiVersion" -}} -{{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.GitVersion -}} -"extensions/v1beta1" -{{- else if semverCompare "^1.7-0" .Capabilities.KubeVersion.GitVersion -}} -"networking.k8s.io/v1" -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "postgresql.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Generate chart secret name -*/}} -{{- define "postgresql.secretName" -}} -{{ default (include "postgresql.fullname" .) .Values.existingSecret }} -{{- end -}} diff --git a/sources/airflow/helm/airflow/charts/postgresql/templates/configmap.yaml b/sources/airflow/helm/airflow/charts/postgresql/templates/configmap.yaml deleted file mode 100644 index addf0842..00000000 --- a/sources/airflow/helm/airflow/charts/postgresql/templates/configmap.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "postgresql.fullname" . }} - labels: - app: {{ template "postgresql.name" . }} - chart: {{ template "postgresql.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - {{- if .Values.metrics.customMetrics }} - custom-metrics.yaml: {{ toYaml .Values.metrics.customMetrics | quote }} - {{- end }} \ No newline at end of file diff --git a/sources/airflow/helm/airflow/charts/postgresql/templates/deployment.yaml b/sources/airflow/helm/airflow/charts/postgresql/templates/deployment.yaml deleted file mode 100644 index f3335daa..00000000 --- a/sources/airflow/helm/airflow/charts/postgresql/templates/deployment.yaml +++ /dev/null @@ -1,156 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: {{ template "postgresql.fullname" . }} - labels: - app: {{ template "postgresql.name" . }} - chart: {{ template "postgresql.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.deploymentAnnotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -spec: - template: - selector: - matchLabels: - app: {{ template "postgresql.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "postgresql.name" . }} - release: {{ .Release.Name }} -{{- with .Values.podAnnotations }} - annotations: -{{ toYaml . | indent 8 }} -{{- end }} - spec: - {{- if .Values.affinity }} - affinity: -{{ toYaml .Values.affinity | indent 8 }} - {{- end }} - {{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 8 }} - {{- end }} - {{- if .Values.schedulerName }} - schedulerName: "{{ .Values.schedulerName }}" - {{- end }} - containers: - - name: {{ template "postgresql.fullname" . }} - image: "{{ .Values.image }}:{{ .Values.imageTag }}" - imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} - args: - {{- range $key, $value := default dict .Values.postgresConfig }} - - -c - - '{{ $key | snakecase }}={{ $value }}' - {{- end }} - env: - - name: POSTGRES_USER - value: {{ default "postgres" .Values.postgresUser | quote }} - # Required for pg_isready in the health probes. - - name: PGUSER - value: {{ default "postgres" .Values.postgresUser | quote }} - - name: POSTGRES_DB - value: {{ default "" .Values.postgresDatabase | quote }} - - name: POSTGRES_INITDB_ARGS - value: {{ default "" .Values.postgresInitdbArgs | quote }} - - name: PGDATA - value: /var/lib/postgresql/data/pgdata - {{- if .Values.usePasswordFile }} - - name: POSTGRES_PASSWORD_FILE - value: /conf/postgres-password - {{- else }} - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "postgresql.secretName" . }} - key: postgres-password - {{- end }} - - name: POD_IP - valueFrom: { fieldRef: { fieldPath: status.podIP } } - ports: - - name: postgresql - containerPort: 5432 - livenessProbe: - exec: - command: - - sh - - -c - - exec pg_isready --host $POD_IP - initialDelaySeconds: 120 - timeoutSeconds: 5 - failureThreshold: 6 - readinessProbe: - exec: - command: - - sh - - -c - - exec pg_isready --host $POD_IP - initialDelaySeconds: 5 - timeoutSeconds: 3 - periodSeconds: 5 - resources: -{{ toYaml .Values.resources | indent 10 }} - volumeMounts: - - name: data - mountPath: {{ .Values.persistence.mountPath }} - subPath: {{ .Values.persistence.subPath }} - {{- if .Values.usePasswordFile }} - - name: password-file - mountPath: /conf - readOnly: true - {{- end }} -{{- if .Values.metrics.enabled }} - - name: metrics - image: "{{ .Values.metrics.image }}:{{ .Values.metrics.imageTag }}" - imagePullPolicy: {{ default "" .Values.metrics.imagePullPolicy | quote }} - env: - - name: DATA_SOURCE_NAME - value: postgresql://{{ default "postgres" .Values.postgresUser }}@127.0.0.1:5432?sslmode=disable - ports: - - name: metrics - containerPort: 9187 - {{- if .Values.metrics.customMetrics }} - args: ["-extend.query-path", "/conf/custom-metrics.yaml"] - volumeMounts: - - name: custom-metrics - mountPath: /conf - readOnly: true - {{- end }} - resources: -{{ toYaml .Values.metrics.resources | indent 10 }} -{{- end }} - volumes: - - name: data - {{- if .Values.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim | default (include "postgresql.fullname" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if and .Values.metrics.enabled .Values.metrics.customMetrics }} - - name: custom-metrics - valueFrom: - configMapKeyRef: - name: {{ template "postgresql.fullname" . }} - key: custom-metrics.yaml - {{- end }} - {{- if .Values.usePasswordFile }} - - name: password-file - secret: - secretName: {{ template "postgresql.secretName" . }} - items: - - key: postgres-password - path: postgres-password - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - - name: {{ .Values.imagePullSecrets }} - {{- end }} diff --git a/sources/airflow/helm/airflow/charts/postgresql/templates/networkpolicy.yaml b/sources/airflow/helm/airflow/charts/postgresql/templates/networkpolicy.yaml deleted file mode 100644 index 1b04b884..00000000 --- a/sources/airflow/helm/airflow/charts/postgresql/templates/networkpolicy.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if .Values.networkPolicy.enabled }} -kind: NetworkPolicy -apiVersion: {{ template "postgresql.networkPolicy.apiVersion" . }} -metadata: - name: "{{ template "postgresql.fullname" . }}" - labels: - app: {{ template "postgresql.name" . }} - chart: {{ template "postgresql.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - podSelector: - matchLabels: - app: {{ template "postgresql.name" . }} - release: {{ .Release.Name }} - ingress: - # Allow inbound connections - - ports: - - port: 5432 - {{- if not .Values.networkPolicy.allowExternal }} - from: - - podSelector: - matchLabels: - {{ template "postgresql.fullname" . }}-client: "true" - {{- end }} - # Allow prometheus scrapes - - ports: - - port: 9187 -{{- end }} diff --git a/sources/airflow/helm/airflow/charts/postgresql/templates/pvc.yaml b/sources/airflow/helm/airflow/charts/postgresql/templates/pvc.yaml deleted file mode 100644 index 78b68321..00000000 --- a/sources/airflow/helm/airflow/charts/postgresql/templates/pvc.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "postgresql.fullname" . }} - labels: - app: {{ template "postgresql.name" . }} - chart: {{ template "postgresql.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- if .Values.persistence.annotations }} - annotations: -{{ toYaml .Values.persistence.annotations | indent 4 }} -{{- end }} -spec: - accessModes: - - {{ .Values.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} -{{- if .Values.persistence.storageClass }} -{{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" -{{- end }} -{{- end }} -{{- end -}} diff --git a/sources/airflow/helm/airflow/charts/postgresql/templates/secrets.yaml b/sources/airflow/helm/airflow/charts/postgresql/templates/secrets.yaml deleted file mode 100644 index 7d1ff118..00000000 --- a/sources/airflow/helm/airflow/charts/postgresql/templates/secrets.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if not .Values.existingSecret }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "postgresql.fullname" . }} - labels: - app: {{ template "postgresql.name" . }} - chart: {{ template "postgresql.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -type: Opaque -data: - {{ if .Values.postgresPassword }} - postgres-password: {{ .Values.postgresPassword | b64enc | quote }} - {{ else }} - postgres-password: {{ randAlphaNum 10 | b64enc | quote }} - {{ end }} -{{- end }} diff --git a/sources/airflow/helm/airflow/charts/postgresql/templates/svc.yaml b/sources/airflow/helm/airflow/charts/postgresql/templates/svc.yaml deleted file mode 100644 index 336f4f6a..00000000 --- a/sources/airflow/helm/airflow/charts/postgresql/templates/svc.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "postgresql.fullname" . }} - labels: - app: {{ template "postgresql.name" . }} - chart: {{ template "postgresql.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- if .Values.metrics.enabled }} - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9187" -{{- end }} -spec: - type: {{ .Values.service.type }} - ports: - {{- if .Values.metrics.enabled }} - - name: metrics - port: 9187 - targetPort: metrics - {{- end }} - - name: postgresql - port: {{ .Values.service.port }} - targetPort: postgresql - {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} - nodePort: {{ .Values.service.nodePort }} - {{- end }} -{{- if .Values.service.externalIPs }} - externalIPs: -{{ toYaml .Values.service.externalIPs | indent 4 }} -{{- end }} - selector: - app: {{ template "postgresql.name" . }} - release: {{ .Release.Name }} diff --git a/sources/airflow/helm/airflow/charts/postgresql/values.yaml b/sources/airflow/helm/airflow/charts/postgresql/values.yaml deleted file mode 100644 index 7830fec4..00000000 --- a/sources/airflow/helm/airflow/charts/postgresql/values.yaml +++ /dev/null @@ -1,134 +0,0 @@ -## postgres image repository -image: "postgres" -## postgres image version -## ref: https://hub.docker.com/r/library/postgres/tags/ -## -imageTag: "9.6.2" - -## Specify a imagePullPolicy -## 'Always' if imageTag is 'latest', else set to 'IfNotPresent' -## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images -## -# imagePullPolicy: - -## Specify imagePullSecrets -## ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod -## -# imagePullSecrets: myregistrykey - -## Create a database user -## Default: postgres -# postgresUser: -## Default: random 10 character string -# postgresPassword: - -## Inject postgresPassword via a volume mount instead of environment variable -usePasswordFile: false - -## Use Existing secret instead of creating one -## It must have a postgres-password key containing the desired password -# existingSecret: 'secret' - -## Create a database -## Default: the postgres user -# postgresDatabase: - -## Specify initdb arguments, e.g. --data-checksums -## ref: https://github.com/docker-library/docs/blob/master/postgres/content.md#postgres_initdb_args -## ref: https://www.postgresql.org/docs/current/static/app-initdb.html -# postgresInitdbArgs: - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Specify runtime config parameters as a dict, using camelCase, e.g. -## {"sharedBuffers": "500MB"} -## ref: https://www.postgresql.org/docs/current/static/runtime-config.html -# postgresConfig: - -## Persist data to a persistent volume -persistence: - enabled: true - - ## A manually managed Persistent Volume and Claim - ## Requires persistence.enabled: true - ## If defined, PVC must be created manually before volume will be bound - # existingClaim: - - ## database data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - accessMode: ReadWriteOnce - size: 8Gi - subPath: "postgresql-db" - mountPath: /var/lib/postgresql/data/pgdata - - # annotations: {} - -metrics: - enabled: false - image: wrouesnel/postgres_exporter - imageTag: v0.1.1 - imagePullPolicy: IfNotPresent - resources: - requests: - memory: 256Mi - cpu: 100m - ## Define additional custom metrics - ## ref: https://github.com/wrouesnel/postgres_exporter#adding-new-metrics-via-a-config-file - # customMetrics: - # pg_database: - # query: "SELECT d.datname AS name, CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') THEN pg_catalog.pg_database_size(d.datname) ELSE 0 END AS size FROM pg_catalog.pg_database d where datname not in ('template0', 'template1', 'postgres')" - # metrics: - # - name: - # usage: "LABEL" - # description: "Name of the database" - # - size_bytes: - # usage: "GAUGE" - # description: "Size of the database in bytes" - -## Configure resource requests and limits -## ref: http://kubernetes.io/docs/user-guide/compute-resources/ -## -resources: - requests: - memory: 256Mi - cpu: 100m - -service: - type: ClusterIP - port: 5432 - externalIPs: [] - ## Manually set NodePort value - ## Requires service.type: NodePort - # nodePort: - -networkPolicy: - ## Enable creation of NetworkPolicy resources. - ## - enabled: false - - ## The Policy model to apply. When set to false, only pods with the correct - ## client label will have network access to the port PostgreSQL is listening - ## on. When true, PostgreSQL will accept connections from any source - ## (with the correct destination port). - ## - allowExternal: true - -## Node labels and tolerations for pod assignment -## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector -## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature -nodeSelector: {} -tolerations: [] -affinity: {} - -## Annotations for the deployment and nodes. -deploymentAnnotations: {} -podAnnotations: {} diff --git a/sources/airflow/helm/airflow/charts/redis/.helmignore b/sources/airflow/helm/airflow/charts/redis/.helmignore deleted file mode 100644 index b2767ae1..00000000 --- a/sources/airflow/helm/airflow/charts/redis/.helmignore +++ /dev/null @@ -1,3 +0,0 @@ -.git -# OWNERS file for Kubernetes -OWNERS diff --git a/sources/airflow/helm/airflow/charts/redis/Chart.yaml b/sources/airflow/helm/airflow/charts/redis/Chart.yaml deleted file mode 100644 index 382e22c0..00000000 --- a/sources/airflow/helm/airflow/charts/redis/Chart.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: v1 -appVersion: 4.0.14 -description: Open source, advanced key-value store. It is often referred to as a data - structure server since keys can contain strings, hashes, lists, sets and sorted - sets. -engine: gotpl -home: http://redis.io/ -icon: https://bitnami.com/assets/stacks/redis/img/redis-stack-220x234.png -keywords: -- redis -- keyvalue -- database -maintainers: -- email: containers@bitnami.com - name: Bitnami -- email: cedric@desaintmartin.fr - name: desaintmartin -name: redis -sources: -- https://github.com/bitnami/bitnami-docker-redis -version: 7.0.0 diff --git a/sources/airflow/helm/airflow/charts/redis/README.md b/sources/airflow/helm/airflow/charts/redis/README.md deleted file mode 100644 index 4ee68bee..00000000 --- a/sources/airflow/helm/airflow/charts/redis/README.md +++ /dev/null @@ -1,383 +0,0 @@ -# Redis - -[Redis](http://redis.io/) is an advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs. - -## TL;DR - -```bash -# Testing configuration -$ helm install stable/redis -``` - -```bash -# Production configuration -$ helm install stable/redis --values values-production.yaml -``` - -## Introduction - -This chart bootstraps a [Redis](https://github.com/bitnami/bitnami-docker-redis) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the [BKPR](https://kubeprod.io/). - -## Prerequisites - -- Kubernetes 1.8+ -- PV provisioner support in the underlying infrastructure - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```bash -$ helm install --name my-release stable/redis -``` - -The command deploys Redis on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Upgrading an existing Release to a new major version - -A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an -incompatible breaking change needing manual actions. - -### To 7.0.0 - -This version causes a change in the Redis Master StatefulSet definition, so the command helm upgrade would not work out of the box. As an alternative, one of the following could be done: - - - Recommended: Create a clone of the Redis Master PVC (for example, using projects like [this one](https://github.com/edseymour/pvc-transfer)). Then launch a fresh release reusing this cloned PVC. - - ``` - helm install stable/redis --set persistence.existingClaim= - ``` - - - Alternative (not recommended, do at your own risk): `helm delete --purge` does not remove the PVC assigned to the Redis Master StatefulSet. As a consequence, the following commands can be done to upgrade the release - - ``` - helm delete --purge - helm install stable/redis --name - ``` - -Previous versions of the chart were not using persistence in the slaves, so this upgrade would add it to them. Another important change is that no values are inherited from master to slaves. For example, in 6.0.0 `slaves.readinessProbe.periodSeconds`, if empty, would be set to `master.readinessProbe.periodSeconds`. This approach lacked transparency and was difficult to maintain. From now on, all the slave parameters must be configured just as it is done with the masters. - -Some values have changed as well: - - - `master.port` and `slave.port` have been changed to `redisPort` (same value for both master and slaves) - - `master.securityContext` and `slave.securityContext` have been changed to `securityContext`(same values for both master and slaves) - -By default, the upgrade will not change the cluster topology. In case you want to use Redis Sentinel, you must explicitly set `sentinel.enabled` to `true`. - -### To 6.0.0 - -Previous versions of the chart were using an init-container to change the permissions of the volumes. This was done in case the `securityContext` directive in the template was not enough for that (for example, with cephFS). In this new version of the chart, this container is disabled by default (which should not affect most of the deployments). If your installation still requires that init container, execute `helm upgrade` with the `--set volumePermissions.enabled=true`. - -### To 5.0.0 - -The default image in this release may be switched out for any image containing the `redis-server` -and `redis-cli` binaries. If `redis-server` is not the default image ENTRYPOINT, `master.command` -must be specified. - -#### Breaking changes -- `master.args` and `slave.args` are removed. Use `master.command` or `slave.command` instead in order to override the image entrypoint, or `master.extraFlags` to pass additional flags to `redis-server`. -- `disableCommands` is now interpreted as an array of strings instead of a string of comma separated values. -- `master.persistence.path` now defaults to `/data`. - -### 4.0.0 - -This version removes the `chart` label from the `spec.selector.matchLabels` -which is immutable since `StatefulSet apps/v1beta2`. It has been inadvertently -added, causing any subsequent upgrade to fail. See https://github.com/helm/charts/issues/7726. - -It also fixes https://github.com/helm/charts/issues/7726 where a deployment `extensions/v1beta1` can not be upgraded if `spec.selector` is not explicitly set. - -Finally, it fixes https://github.com/helm/charts/issues/7803 by removing mutable labels in `spec.VolumeClaimTemplate.metadata.labels` so that it is upgradable. - -In order to upgrade, delete the Redis StatefulSet before upgrading: -```bash -$ kubectl delete statefulsets.apps --cascade=false my-release-redis-master -``` -And edit the Redis slave (and metrics if enabled) deployment: -```bash -kubectl patch deployments my-release-redis-slave --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]' -kubectl patch deployments my-release-redis-metrics --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]' -``` - -## Configuration - -The following table lists the configurable parameters of the Redis chart and their default values. - -| Parameter | Description | Default | | | -|-----------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|----------------------------------------------------|---------| -| `global.imageRegistry` | Global Docker image registry | `nil` | | | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | | | -| `image.registry` | Redis Image registry | `docker.io` | | | -| `image.repository` | Redis Image name | `bitnami/redis` | | | -| `image.tag` | Redis Image tag | `{VERSION}` | | | -| `image.pullPolicy` | Image pull policy | `Always` | | | -| `image.pullSecrets` | Specify docker-registry secret names as an array | `nil` | | | -| `cluster.enabled` | Use master-slave topology | `true` | | | -| `cluster.slaveCount` | Number of slaves | `1` | | | -| `existingSecret` | Name of existing secret object (for password authentication) | `nil` | | | -| `usePassword` | Use password | `true` | | | -| `usePasswordFile` | Mount passwords as files instead of environment variables | `false` | | | -| `password` | Redis password (ignored if existingSecret set) | Randomly generated | | | -| `configmap` | Redis configuration file to be used | `nil` | | | -| `networkPolicy.enabled` | Enable NetworkPolicy | `false` | | | -| `networkPolicy.allowExternal` | Don't require client label for connections | `true` | | | -| `securityContext.enabled` | Enable security context (both redis master and slave pods) | `true` | | | -| `securityContext.fsGroup` | Group ID for the container (both redis master and slave pods) | `1001` | | | -| `securityContext.runAsUser` | User ID for the container (both redis master and slave pods) | `1001` | | | -| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `false` | | | -| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the fullname template | | | -| `rbac.create` | Specifies whether RBAC resources should be created | `false` | | | -| `rbac.role.rules` | Rules to create | `[]` | | | -| `metrics.enabled` | Start a side-car prometheus exporter | `false` | | | -| `metrics.image.registry` | Redis exporter image registry | `docker.io` | | | -| `metrics.image.repository` | Redis exporter image name | `oliver006/redis_exporter` | | | -| `metrics.image.tag` | Redis exporter image tag | `v0.31.0` | | | -| `metrics.image.pullPolicy` | Image pull policy | `IfNotPresent` | | | -| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `nil` | | | -| `metrics.extraArgs` | Extra arguments for the binary; possible values [here](https://github.com/oliver006/redis_exporter#flags) | {} | | | -| `metrics.podLabels` | Additional labels for Metrics exporter pod | {} | | | -| `metrics.podAnnotations` | Additional annotations for Metrics exporter pod | {} | | | -| `metrics.service.type` | Kubernetes Service type (redis metrics) | `ClusterIP` | | | -| `metrics.service.annotations` | Annotations for the services to monitor (redis master and redis slave service) | {} | | | -| `metrics.service.loadBalancerIP` | loadBalancerIP if redis metrics service type is `LoadBalancer` | `nil` | | | -| `metrics.resources` | Exporter resource requests/limit | Memory: `256Mi`, CPU: `100m` | | | -| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` | | | -| `metrics.serviceMonitor.namespace` | Optional namespace which Prometheus is running in | `nil` | | | -| `metrics.serviceMonitor.interval` | How frequently to scrape metrics (use by default, falling back to Prometheus' default) | `nil` | | | -| `metrics.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | | | -| `metrics.priorityClassName` | Metrics exporter pod priorityClassName | {} | | | -| `persistence.existingClaim` | Provide an existing PersistentVolumeClaim | `nil` | | | -| `master.persistence.enabled` | Use a PVC to persist data (master node) | `true` | | | -| `master.persistence.path` | Path to mount the volume at, to use other images | `/data` | | | -| `master.persistence.subPath` | Subdirectory of the volume to mount at | `""` | | | -| `master.persistence.storageClass` | Storage class of backing PVC | `generic` | | | -| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | | | -| `master.persistence.size` | Size of data volume | `8Gi` | | | -| `master.statefulset.updateStrategy` | Update strategy for StatefulSet | onDelete | | | -| `master.statefulset.rollingUpdatePartition` | Partition update strategy | `nil` | | | -| `master.podLabels` | Additional labels for Redis master pod | {} | | | -| `master.podAnnotations` | Additional annotations for Redis master pod | {} | | | -| `redisPort` | Redis port (in both master and slaves) | `6379` | | | -| `master.command` | Redis master entrypoint string. The command `redis-server` is executed if this is not provided. | `/run.sh` | | | -| `master.disableCommands` | Array of Redis commands to disable (master) | `["FLUSHDB", "FLUSHALL"]` | | | -| `master.extraFlags` | Redis master additional command line flags | [] | | | -| `master.nodeSelector` | Redis master Node labels for pod assignment | {"beta.kubernetes.io/arch": "amd64"} | | | -| `master.tolerations` | Toleration labels for Redis master pod assignment | [] | | | -| `master.affinity` | Affinity settings for Redis master pod assignment | {} | | | -| `master.schedulerName` | Name of an alternate scheduler | `nil` | | | -| `master.service.type` | Kubernetes Service type (redis master) | `ClusterIP` | | | -| `master.service.port` | Kubernetes Service port (redis master) | `6379` | | | -| `master.service.nodePort` | Kubernetes Service nodePort (redis master) | `nil` | | | -| `master.service.annotations` | annotations for redis master service | {} | | | -| `master.service.loadBalancerIP` | loadBalancerIP if redis master service type is `LoadBalancer` | `nil` | | | -| `master.resources` | Redis master CPU/Memory resource requests/limits | Memory: `256Mi`, CPU: `100m` | | | -| `master.livenessProbe.enabled` | Turn on and off liveness probe (redis master pod) | `true` | | | -| `master.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (redis master pod) | `30` | | | -| `master.livenessProbe.periodSeconds` | How often to perform the probe (redis master pod) | `30` | | | -| `master.livenessProbe.timeoutSeconds` | When the probe times out (redis master pod) | `5` | | | -| `master.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (redis master pod) | `1` | | | -| `master.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `5` | | | -| `master.readinessProbe.enabled` | Turn on and off readiness probe (redis master pod) | `true` | | | -| `master.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated (redis master pod) | `5` | | | -| `master.readinessProbe.periodSeconds` | How often to perform the probe (redis master pod) | `10` | | | -| `master.readinessProbe.timeoutSeconds` | When the probe times out (redis master pod) | `1` | | | -| `master.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (redis master pod) | `1` | | | -| `master.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `5` | | | -| `master.priorityClassName` | Redis Master pod priorityClassName | {} | | | -| `volumePermissions.enabled` | Enable init container that changes volume permissions in the registry (for cases where the default k8s `runAsUser` and `fsUser` values do not work) | `false` | | | -| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | | | -| `volumePermissions.image.repository` | Init container volume-permissions image name | `bitnami/minideb` | | | -| `volumePermissions.image.tag` | Init container volume-permissions image tag | `latest` | | | -| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `IfNotPresent` | | | -| `volumePermissions.resources ` | Init container volume-permissions CPU/Memory resource requests/limits | {} | | | -| `slave.service.type` | Kubernetes Service type (redis slave) | `ClusterIP` | | | -| `slave.service.nodePort` | Kubernetes Service nodePort (redis slave) | `nil` | | | -| `slave.service.annotations` | annotations for redis slave service | {} | | | -| `slave.service.port` | Kubernetes Service port (redis slave) | `6379` | | | -| `slave.service.loadBalancerIP` | LoadBalancerIP if Redis slave service type is `LoadBalancer` | `nil` | | | -| `slave.command` | Redis slave entrypoint array. The docker image's ENTRYPOINT is used if this is not provided. | `/run.sh` | | | -| `slave.disableCommands` | Array of Redis commands to disable (slave) | `[FLUSHDB, FLUSHALL]` | | | -| `slave.extraFlags` | Redis slave additional command line flags | `[]` | | | -| `slave.livenessProbe.enabled` | Turn on and off liveness probe (redis slave pod) | `true` | | | -| `slave.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (redis slave pod) | `30` | | | -| `slave.livenessProbe.periodSeconds` | How often to perform the probe (redis slave pod) | `10` | | | -| `slave.livenessProbe.timeoutSeconds` | When the probe times out (redis slave pod) | `5` | | | -| `slave.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (redis slave pod) | `1` | | | -| `slave.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `5` | | | -| `slave.readinessProbe.enabled` | Turn on and off slave.readiness probe (redis slave pod) | `true` | | | -| `slave.readinessProbe.initialDelaySeconds` | Delay before slave.readiness probe is initiated (redis slave pod) | `5` | | | -| `slave.readinessProbe.periodSeconds` | How often to perform the probe (redis slave pod) | `10` | | | -| `slave.readinessProbe.timeoutSeconds` | When the probe times out (redis slave pod) | `10` | | | -| `slave.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (redis slave pod) | `1` | | | -| `slave.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. (redis slave pod) | `5` | | | -| `slave.persistence.enabled` | Use a PVC to persist data (slave node) | `true` | | | -| `slave.persistence.path` | Path to mount the volume at, to use other images | `/data` | | | -| `slave.persistence.subPath` | Subdirectory of the volume to mount at | `""` | | | -| `slave.persistence.storageClass` | Storage class of backing PVC | `generic` | | | -| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` | | | -| `slave.persistence.size` | Size of data volume | `8Gi` | | | -| `slave.statefulset.updateStrategy` | Update strategy for StatefulSet | onDelete | | | -| `slave.statefulset.rollingUpdatePartition` | Partition update strategy | `nil` | | | -| `slave.podLabels` | Additional labels for Redis slave pod | `master.podLabels` | | | -| `slave.podAnnotations` | Additional annotations for Redis slave pod | `master.podAnnotations` | | | -| `slave.schedulerName` | Name of an alternate scheduler | `nil` | | | -| `slave.resources` | Redis slave CPU/Memory resource requests/limits | `{}` | | | -| `slave.affinity` | Enable node/pod affinity for slaves | {} | | | -| `slave.priorityClassName` | Redis Slave pod priorityClassName | {} | | | -| `sentinel.enabled` | Enable sentinel containers | `false` | | | -| `sentinel.masterSet` | Name of the sentinel master set | `mymaster` | | | -| `sentinel.initialCheckTimeout` | Timeout for querying the redis sentinel service for the active sentinel list | `5` | | | -| `sentinel.quorum` | Quorum for electing a new master | `2` | | | -| `sentinel.downAfterMilliseconds` | Timeout for detecting a Redis node is down | `60000` | | | -| `sentinel.failoverTimeout` | Timeout for performing a election failover | `18000` | | | -| `sentinel.parallelSyncs` | Number of parallel syncs in the cluster | `1` | | | -| `sentinel.port` | Redis Sentinel port | `26379` | | | -| `sentinel.service.type` | Kubernetes Service type (redis sentinel) | `ClusterIP` | | | -| `sentinel.service.nodePort` | Kubernetes Service nodePort (redis sentinel) | `nil` | | | -| `sentinel.service.annotations` | annotations for redis sentinel service | {} | | | -| `sentinel.service.redisPort` | Kubernetes Service port for Redis read only operations | `6379` | | | -| `sentinel.service.sentinelPort` | Kubernetes Service port for Redis sentinel | `26379` | | | -| `sentinel.service.redisNodePort` | Kubernetes Service node port for Redis read only operations | `` | | | -| `sentinel.service.sentinelNodePort` | Kubernetes Service node port for Redis sentinel | `` | | | -| `sentinel.service.loadBalancerIP` | LoadBalancerIP if Redis sentinel service type is `LoadBalancer` | `nil` | | | -| `sentinel.livenessProbe.enabled` | Turn on and off liveness probe (redis sentinel pod) | `true` | | | -| `sentinel.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated (redis sentinel pod) | `5` | | | -| `sentinel.livenessProbe.periodSeconds` | How often to perform the probe (redis sentinel container) | `5` | | | -| `sentinel.livenessProbe.timeoutSeconds` | When the probe times out (redis sentinel container) | `5` | | | -| `sentinel.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (redis sentinel container) | `1` | | | -| `sentinel.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `5` | | | -| `sentinel.readinessProbe.enabled` | Turn on and off sentinel.readiness probe (redis sentinel pod) | `true` | | | -| `sentinel.readinessProbe.initialDelaySeconds` | Delay before sentinel.readiness probe is initiated (redis sentinel pod) | `5` | | | -| `sentinel.readinessProbe.periodSeconds` | How often to perform the probe (redis sentinel pod) | `5` | | | -| `sentinel.readinessProbe.timeoutSeconds` | When the probe times out (redis sentinel container) | `1` | | | -| `sentinel.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed (redis sentinel container) | `1` | | | -| `sentinel.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. (redis sentinel container) | `5` | | | -| `sentinel.resources` | Redis sentinel CPU/Memory resource requests/limits | `{}` | | | -| `sentinel.image.registry` | Redis Sentinel Image registry | `docker.io` | | | -| `sentinel.image.repository` | Redis Sentinel Image name | `bitnami/redis-sentinel` | | | -| `sentinel.image.tag` | Redis Sentinel Image tag | `{VERSION}` | | | -| `sentinel.image.pullPolicy` | Image pull policy | `Always` | | | -| `sentinel.image.pullSecrets` | Specify docker-registry secret names as an array | `nil` | | | -| `cluster.enabled` | Use master-slave topology | `sysctlImage.enabled` | Enable an init container to modify Kernel settings | `false` | -| `sysctlImage.command` | sysctlImage command to execute | [] | | | -| `sysctlImage.registry` | sysctlImage Init container registry | `docker.io` | | | -| `sysctlImage.repository` | sysctlImage Init container name | `bitnami/minideb` | | | -| `sysctlImage.tag` | sysctlImage Init container tag | `latest` | | | -| `sysctlImage.pullPolicy` | sysctlImage Init container pull policy | `Always` | | | -| `sysctlImage.mountHostSys` | Mount the host `/sys` folder to `/host-sys` | `false` | | | -| `sysctlImage.resources` | sysctlImage Init container CPU/Memory resource requests/limits | {} | | | - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```bash -$ helm install --name my-release \ - --set password=secretpassword \ - stable/redis -``` - -The above command sets the Redis server password to `secretpassword`. - -Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, - -```bash -$ helm install --name my-release -f values.yaml stable/redis -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -> **Note for minikube users**: Current versions of minikube (v0.24.1 at the time of writing) provision `hostPath` persistent volumes that are only writable by root. Using chart defaults cause pod failure for the Redis pod as it attempts to write to the `/bitnami` directory. Consider installing Redis with `--set persistence.enabled=false`. See minikube issue [1990](https://github.com/kubernetes/minikube/issues/1990) for more information. - -## NetworkPolicy - -To enable network policy for Redis, install -[a networking plugin that implements the Kubernetes NetworkPolicy spec](https://kubernetes.io/docs/tasks/administer-cluster/declare-network-policy#before-you-begin), -and set `networkPolicy.enabled` to `true`. - -For Kubernetes v1.5 & v1.6, you must also turn on NetworkPolicy by setting -the DefaultDeny namespace annotation. Note: this will enforce policy for _all_ pods in the namespace: - - kubectl annotate namespace default "net.beta.kubernetes.io/network-policy={\"ingress\":{\"isolation\":\"DefaultDeny\"}}" - -With NetworkPolicy enabled, only pods with the generated client label will be -able to connect to Redis. This label will be displayed in the output -after a successful install. - -## Persistence - -By default, the chart mounts a [Persistent Volume](http://kubernetes.io/docs/user-guide/persistent-volumes/) at the `/data` path. The volume is created using dynamic volume provisioning. If a Persistent Volume Claim already exists, specify it during installation. - -### Existing PersistentVolumeClaim - -1. Create the PersistentVolume -1. Create the PersistentVolumeClaim -1. Install the chart - -```bash -$ helm install --set persistence.existingClaim=PVC_NAME stable/redis -``` - -## Metrics - -The chart optionally can start a metrics exporter for [prometheus](https://prometheus.io). The metrics endpoint (port 9121) is exposed in the service. Metrics can be scraped from within the cluster using something similar as the described in the [example Prometheus scrape configuration](https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml). If metrics are to be scraped from outside the cluster, the Kubernetes API proxy can be utilized to access the endpoint. - -## Host Kernel Settings -Redis may require some changes in the kernel of the host machine to work as expected, in particular increasing the `somaxconn` value and disabling transparent huge pages. -To do so, you can set up a privileged initContainer with the `sysctlImage` config values, for example: -``` -sysctlImage: - enabled: true - mountHostSys: true - command: - - /bin/sh - - -c - - |- - install_packages systemd - sysctl -w net.core.somaxconn=10000 - echo never > /host-sys/kernel/mm/transparent_hugepage/enabled -``` -## Cluster topologies - -### Default: Master-Slave - -When installing the chart with `cluster.enabled=true`, it will deploy a Redis master StatefulSet (only one master node allowed) and a Redis slave StatefulSet. The slaves will be read-replicas of the master. Two services will be exposed: - - - Redis Master service: Points to the master, where read-write operations can be performed - - Redis Slave service: Points to the slaves, where only read operations are allowed. - -In case the master crashes, the slaves will wait until the master node is respawned again by the Kubernetes Controller Manager. - -### Master-Slave with Sentinel - -When installing the chart with `cluster.enabled=true` and `sentinel.enabled=true`, it will deploy a Redis master StatefulSet (only one master allowed) and a Redis slave StatefulSet. In this case, the pods will contain en extra container with Redis Sentinel. This container will form a cluster of Redis Sentinel nodes, which will promote a new master in case the actual one fails. In addition to this, only one service is exposed: - - - Redis service: Exposes port 6379 for Redis read-only operations and port 26379 for accesing Redis Sentinel. - -For read-only operations, access the service using port 6379. For write operations, it's necessary to access the Redis Sentinel cluster and query the current master using the command below (using redis-cli or similar: - -``` -SENTINEL get-master-addr-by-name -``` -This command will return the address of the current master, which can be accessed from inside the cluster. - -In case the current master crashes, the Sentinel containers will elect a new master node. - -## Notable changes - -### 7.0.0 -In order to improve the performance in case of slave failure, we added persistence to the read-only slaves. That means that we moved from Deployment to StatefulSets. This should not affect upgrades from previous versions of the chart, as the deployments did not contain any persistence at all. - -This version also allows enabling Redis Sentinel containers inside of the Redis Pods (feature disabled by default). In case the master crashes, a new Redis node will be elected as master. In order to query the current master (no redis master service is exposed), you need to query first the Sentinel cluster. Find more information [in this section](#master-slave-with-sentinel). diff --git a/sources/airflow/helm/airflow/charts/redis/ci/default-values.yaml b/sources/airflow/helm/airflow/charts/redis/ci/default-values.yaml deleted file mode 100644 index fc2ba605..00000000 --- a/sources/airflow/helm/airflow/charts/redis/ci/default-values.yaml +++ /dev/null @@ -1 +0,0 @@ -# Leave this file empty to ensure that CI runs builds against the default configuration in values.yaml. diff --git a/sources/airflow/helm/airflow/charts/redis/ci/dev-values.yaml b/sources/airflow/helm/airflow/charts/redis/ci/dev-values.yaml deleted file mode 100644 index be01913b..00000000 --- a/sources/airflow/helm/airflow/charts/redis/ci/dev-values.yaml +++ /dev/null @@ -1,9 +0,0 @@ -master: - persistence: - enabled: false - -cluster: - enabled: true - slaveCount: 1 - -usePassword: false diff --git a/sources/airflow/helm/airflow/charts/redis/ci/production-sentinel-values.yaml b/sources/airflow/helm/airflow/charts/redis/ci/production-sentinel-values.yaml deleted file mode 100644 index d4d9a38b..00000000 --- a/sources/airflow/helm/airflow/charts/redis/ci/production-sentinel-values.yaml +++ /dev/null @@ -1,525 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName - -## Bitnami Redis image version -## ref: https://hub.docker.com/r/bitnami/redis/tags/ -## -image: - registry: docker.io - repository: bitnami/redis - ## Bitnami Redis image tag - ## ref: https://github.com/bitnami/bitnami-docker-redis#supported-tags-and-respective-dockerfile-links - ## - tag: 4.0.14 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - -## Redis pod Security Context -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Cluster settings -cluster: - enabled: true - slaveCount: 3 - -## Use redis sentinel in the redis pod. This will disable the master and slave services and -## create one redis service with ports to the sentinel and the redis instances -sentinel: - enabled: true - ## Bitnami Redis Sentintel image version - ## ref: https://hub.docker.com/r/bitnami/redis-sentinel/tags/ - ## - image: - registry: docker.io - repository: bitnami/redis-sentinel - ## Bitnami Redis image tag - ## ref: https://github.com/bitnami/bitnami-docker-redis-sentinel#supported-tags-and-respective-dockerfile-links - ## - tag: 4.0.14 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - masterSet: mymaster - initialCheckTimeout: 5 - quorum: 2 - downAfterMilliseconds: 60000 - failoverTimeout: 18000 - parallelSyncs: 1 - port: 26379 - ## Configure extra options for Redis Sentinel liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) - ## - livenessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - ## Redis Sentinel resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - ## Redis Sentinel Service properties - service: - ## Redis Sentinel Service type - type: ClusterIP - sentinelPort: 26379 - redisPort: 6379 - - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # sentinelNodePort: - # redisNodePort: - - ## Provide any additional annotations which may be required. This can be used to - ## set the LoadBalancer service type to internal only. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - annotations: {} - loadBalancerIP: - -networkPolicy: - ## Specifies whether a NetworkPolicy should be created - ## - enabled: true - - ## The Policy model to apply. When set to false, only pods with the correct - ## client label will have network access to the port Redis is listening - ## on. When true, Redis will accept connections from any source - ## (with the correct destination port). - ## - # allowExternal: true - -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the fullname template - name: - -rbac: - ## Specifies whether RBAC resources should be created - ## - create: false - - role: - ## Rules to create. It follows the role specification - # rules: - # - apiGroups: - # - extensions - # resources: - # - podsecuritypolicies - # verbs: - # - use - # resourceNames: - # - gce.unprivileged - rules: [] - - -## Use password authentication -usePassword: true -## Redis password (both master and slave) -## Defaults to a random 10-character alphanumeric string if not set and usePassword is true -## ref: https://github.com/bitnami/bitnami-docker-redis#setting-the-server-password-on-first-run -## -password: -## Use existing secret (ignores previous password) -# existingSecret: - -## Mount secrets as files instead of environment variables -usePasswordFile: false - -## Persist data to a persistent volume -persistence: {} - ## A manually managed Persistent Volume and Claim - ## Requires persistence.enabled: true - ## If defined, PVC must be created manually before volume will be bound - # existingClaim: - -# Redis port -redisPort: 6379 - -## -## Redis Master parameters -## -master: - ## Redis command arguments - ## - ## Can be used to specify command line arguments, for example: - ## - command: "/run.sh" - ## Redis additional command line flags - ## - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: - ## - "--maxmemory-policy volatile-ttl" - ## - "--repl-backlog-size 1024mb" - extraFlags: [] - ## Comma-separated list of Redis commands to disable - ## - ## Can be used to disable Redis commands for security reasons. - ## Commands will be completely disabled by renaming each to an empty string. - ## ref: https://redis.io/topics/security#disabling-of-specific-commands - ## - disableCommands: - - FLUSHDB - - FLUSHALL - - ## Redis Master additional pod labels and annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - podLabels: {} - podAnnotations: {} - - ## Redis Master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - ## Configure extra options for Redis Master liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) - ## - livenessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - - ## Redis Master Node selectors and tolerations for pod assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature - ## - # nodeSelector: {"beta.kubernetes.io/arch": "amd64"} - # tolerations: [] - ## Redis Master pod/node affinity/anti-affinity - ## - affinity: {} - - ## Redis Master Service properties - service: - ## Redis Master Service type - type: ClusterIP - port: 6379 - - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - - ## Provide any additional annotations which may be required. This can be used to - ## set the LoadBalancer service type to internal only. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - annotations: {} - loadBalancerIP: - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - enabled: true - ## The path the volume will be mounted at, useful when using different - ## Redis images. - path: /data - ## The subdirectory of the volume to mount to, useful in dev environments - ## and one PV for multiple services. - subPath: "" - ## redis data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - accessModes: - - ReadWriteOnce - size: 8Gi - - ## Update strategy, can be set to RollingUpdate or onDelete by default. - ## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets - statefulset: - updateStrategy: RollingUpdate - ## Partition update strategy - ## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions - # rollingUpdatePartition: - - ## Redis Master pod priorityClassName - # priorityClassName: {} - - -## -## Redis Slave properties -## Note: service.type is a mandatory parameter -## The rest of the parameters are either optional or, if undefined, will inherit those declared in Redis Master -## -slave: - ## Slave Service properties - service: - ## Redis Slave Service type - type: ClusterIP - ## Redis port - port: 6379 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - - ## Provide any additional annotations which may be required. This can be used to - ## set the LoadBalancer service type to internal only. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - annotations: {} - loadBalancerIP: - - ## Redis slave port - port: 6379 - - ## Can be used to specify command line arguments, for example: - ## - command: "/run.sh" - ## Redis extra flags - extraFlags: [] - ## List of Redis commands to disable - disableCommands: - - FLUSHDB - - FLUSHALL - - ## Redis Slave pod/node affinity/anti-affinity - ## - affinity: {} - - ## Configure extra options for Redis Slave liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) - ## - livenessProbe: - enabled: true - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - failureThreshold: 5 - - ## Redis slave Resource - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - enabled: true - ## The path the volume will be mounted at, useful when using different - ## Redis images. - path: /data - ## The subdirectory of the volume to mount to, useful in dev environments - ## and one PV for multiple services. - subPath: "" - ## redis data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - accessModes: - - ReadWriteOnce - size: 8Gi - - ## Update strategy, can be set to RollingUpdate or onDelete by default. - ## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets - statefulset: - updateStrategy: RollingUpdate - ## Partition update strategy - ## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions - # rollingUpdatePartition: - - ## Redis slave selectors and tolerations for pod assignment - # nodeSelector: {"beta.kubernetes.io/arch": "amd64"} - # tolerations: [] - - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - ## Redis slave pod Annotation and Labels - podLabels: {} - podAnnotations: {} - - ## Redis slave pod priorityClassName - # priorityClassName: {} - -## Prometheus Exporter / Metrics -## -metrics: - enabled: true - - image: - registry: docker.io - repository: oliver006/redis_exporter - tag: v0.31.0 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - service: - type: ClusterIP - ## Use serviceLoadBalancerIP to request a specific static IP, - ## otherwise leave blank - # loadBalancerIP: - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9121" - - ## Metrics exporter resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - # resources: {} - - ## Extra arguments for Metrics exporter, for example: - ## extraArgs: - ## check-keys: myKey,myOtherKey - # extraArgs: {} - - ## Metrics exporter labels and tolerations for pod assignment - # nodeSelector: {"beta.kubernetes.io/arch": "amd64"} - # tolerations: [] - - ## Metrics exporter pod Annotation and Labels - # podAnnotations: {} - # podLabels: {} - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/helm/charts/tree/master/stable/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - - ## Metrics exporter pod priorityClassName - # priorityClassName: {} - -## -## Init containers parameters: -## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: latest - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - -## Redis config file -## ref: https://redis.io/topics/config -## -configmap: |- - # maxmemory-policy volatile-lru - -## Sysctl InitContainer -## used to perform sysctl operation to modify Kernel settings (needed sometimes to avoid warnings) -sysctlImage: - enabled: false - command: [] - registry: docker.io - repository: bitnami/minideb - tag: latest - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - mountHostSys: false - resources: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m diff --git a/sources/airflow/helm/airflow/charts/redis/ci/production-values.yaml b/sources/airflow/helm/airflow/charts/redis/ci/production-values.yaml deleted file mode 100644 index c141c641..00000000 --- a/sources/airflow/helm/airflow/charts/redis/ci/production-values.yaml +++ /dev/null @@ -1,525 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName - -## Bitnami Redis image version -## ref: https://hub.docker.com/r/bitnami/redis/tags/ -## -image: - registry: docker.io - repository: bitnami/redis - ## Bitnami Redis image tag - ## ref: https://github.com/bitnami/bitnami-docker-redis#supported-tags-and-respective-dockerfile-links - ## - tag: 4.0.14 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - -## Redis pod Security Context -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Cluster settings -cluster: - enabled: true - slaveCount: 3 - -## Use redis sentinel in the redis pod. This will disable the master and slave services and -## create one redis service with ports to the sentinel and the redis instances -sentinel: - enabled: false - ## Bitnami Redis Sentintel image version - ## ref: https://hub.docker.com/r/bitnami/redis-sentinel/tags/ - ## - image: - registry: docker.io - repository: bitnami/redis-sentinel - ## Bitnami Redis image tag - ## ref: https://github.com/bitnami/bitnami-docker-redis-sentinel#supported-tags-and-respective-dockerfile-links - ## - tag: 4.0.14 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - masterSet: mymaster - initialCheckTimeout: 5 - quorum: 2 - downAfterMilliseconds: 60000 - failoverTimeout: 18000 - parallelSyncs: 1 - port: 26379 - ## Configure extra options for Redis Sentinel liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) - ## - livenessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - ## Redis Sentinel resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - ## Redis Sentinel Service properties - service: - ## Redis Sentinel Service type - type: ClusterIP - sentinelPort: 26379 - redisPort: 6379 - - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # sentinelNodePort: - # redisNodePort: - - ## Provide any additional annotations which may be required. This can be used to - ## set the LoadBalancer service type to internal only. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - annotations: {} - loadBalancerIP: - -networkPolicy: - ## Specifies whether a NetworkPolicy should be created - ## - enabled: true - - ## The Policy model to apply. When set to false, only pods with the correct - ## client label will have network access to the port Redis is listening - ## on. When true, Redis will accept connections from any source - ## (with the correct destination port). - ## - # allowExternal: true - -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the fullname template - name: - -rbac: - ## Specifies whether RBAC resources should be created - ## - create: false - - role: - ## Rules to create. It follows the role specification - # rules: - # - apiGroups: - # - extensions - # resources: - # - podsecuritypolicies - # verbs: - # - use - # resourceNames: - # - gce.unprivileged - rules: [] - - -## Use password authentication -usePassword: true -## Redis password (both master and slave) -## Defaults to a random 10-character alphanumeric string if not set and usePassword is true -## ref: https://github.com/bitnami/bitnami-docker-redis#setting-the-server-password-on-first-run -## -password: -## Use existing secret (ignores previous password) -# existingSecret: - -## Mount secrets as files instead of environment variables -usePasswordFile: false - -## Persist data to a persistent volume -persistence: {} - ## A manually managed Persistent Volume and Claim - ## Requires persistence.enabled: true - ## If defined, PVC must be created manually before volume will be bound - # existingClaim: - -# Redis port -redisPort: 6379 - -## -## Redis Master parameters -## -master: - ## Redis command arguments - ## - ## Can be used to specify command line arguments, for example: - ## - command: "/run.sh" - ## Redis additional command line flags - ## - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: - ## - "--maxmemory-policy volatile-ttl" - ## - "--repl-backlog-size 1024mb" - extraFlags: [] - ## Comma-separated list of Redis commands to disable - ## - ## Can be used to disable Redis commands for security reasons. - ## Commands will be completely disabled by renaming each to an empty string. - ## ref: https://redis.io/topics/security#disabling-of-specific-commands - ## - disableCommands: - - FLUSHDB - - FLUSHALL - - ## Redis Master additional pod labels and annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - podLabels: {} - podAnnotations: {} - - ## Redis Master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - ## Configure extra options for Redis Master liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) - ## - livenessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - - ## Redis Master Node selectors and tolerations for pod assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature - ## - # nodeSelector: {"beta.kubernetes.io/arch": "amd64"} - # tolerations: [] - ## Redis Master pod/node affinity/anti-affinity - ## - affinity: {} - - ## Redis Master Service properties - service: - ## Redis Master Service type - type: ClusterIP - port: 6379 - - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - - ## Provide any additional annotations which may be required. This can be used to - ## set the LoadBalancer service type to internal only. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - annotations: {} - loadBalancerIP: - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - enabled: true - ## The path the volume will be mounted at, useful when using different - ## Redis images. - path: /data - ## The subdirectory of the volume to mount to, useful in dev environments - ## and one PV for multiple services. - subPath: "" - ## redis data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - accessModes: - - ReadWriteOnce - size: 8Gi - - ## Update strategy, can be set to RollingUpdate or onDelete by default. - ## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets - statefulset: - updateStrategy: RollingUpdate - ## Partition update strategy - ## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions - # rollingUpdatePartition: - - ## Redis Master pod priorityClassName - # priorityClassName: {} - - -## -## Redis Slave properties -## Note: service.type is a mandatory parameter -## The rest of the parameters are either optional or, if undefined, will inherit those declared in Redis Master -## -slave: - ## Slave Service properties - service: - ## Redis Slave Service type - type: ClusterIP - ## Redis port - port: 6379 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - - ## Provide any additional annotations which may be required. This can be used to - ## set the LoadBalancer service type to internal only. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - annotations: {} - loadBalancerIP: - - ## Redis slave port - port: 6379 - - ## Can be used to specify command line arguments, for example: - ## - command: "/run.sh" - ## Redis extra flags - extraFlags: [] - ## List of Redis commands to disable - disableCommands: - - FLUSHDB - - FLUSHALL - - ## Redis Slave pod/node affinity/anti-affinity - ## - affinity: {} - - ## Configure extra options for Redis Slave liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) - ## - livenessProbe: - enabled: true - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - failureThreshold: 5 - - ## Redis slave Resource - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - enabled: true - ## The path the volume will be mounted at, useful when using different - ## Redis images. - path: /data - ## The subdirectory of the volume to mount to, useful in dev environments - ## and one PV for multiple services. - subPath: "" - ## redis data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - accessModes: - - ReadWriteOnce - size: 8Gi - - ## Update strategy, can be set to RollingUpdate or onDelete by default. - ## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets - statefulset: - updateStrategy: RollingUpdate - ## Partition update strategy - ## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions - # rollingUpdatePartition: - - ## Redis slave selectors and tolerations for pod assignment - # nodeSelector: {"beta.kubernetes.io/arch": "amd64"} - # tolerations: [] - - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - ## Redis slave pod Annotation and Labels - podLabels: {} - podAnnotations: {} - - ## Redis slave pod priorityClassName - # priorityClassName: {} - -## Prometheus Exporter / Metrics -## -metrics: - enabled: true - - image: - registry: docker.io - repository: oliver006/redis_exporter - tag: v0.31.0 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - service: - type: ClusterIP - ## Use serviceLoadBalancerIP to request a specific static IP, - ## otherwise leave blank - # loadBalancerIP: - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9121" - - ## Metrics exporter resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - # resources: {} - - ## Extra arguments for Metrics exporter, for example: - ## extraArgs: - ## check-keys: myKey,myOtherKey - # extraArgs: {} - - ## Metrics exporter labels and tolerations for pod assignment - # nodeSelector: {"beta.kubernetes.io/arch": "amd64"} - # tolerations: [] - - ## Metrics exporter pod Annotation and Labels - # podAnnotations: {} - # podLabels: {} - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/helm/charts/tree/master/stable/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - - ## Metrics exporter pod priorityClassName - # priorityClassName: {} - -## -## Init containers parameters: -## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: latest - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - -## Redis config file -## ref: https://redis.io/topics/config -## -configmap: |- - # maxmemory-policy volatile-lru - -## Sysctl InitContainer -## used to perform sysctl operation to modify Kernel settings (needed sometimes to avoid warnings) -sysctlImage: - enabled: false - command: [] - registry: docker.io - repository: bitnami/minideb - tag: latest - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - mountHostSys: false - resources: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m diff --git a/sources/airflow/helm/airflow/charts/redis/ci/redis-lib-values.yaml b/sources/airflow/helm/airflow/charts/redis/ci/redis-lib-values.yaml deleted file mode 100644 index fa57b251..00000000 --- a/sources/airflow/helm/airflow/charts/redis/ci/redis-lib-values.yaml +++ /dev/null @@ -1,13 +0,0 @@ -## Redis library image -## ref: https://hub.docker.com/r/library/redis/ -## -image: - registry: docker.io - repository: redis - tag: '4.0.11' - -master: - command: "redis-server" - -slave: - command: "redis-server" diff --git a/sources/airflow/helm/airflow/charts/redis/ci/redisgraph-module-values.yaml b/sources/airflow/helm/airflow/charts/redis/ci/redisgraph-module-values.yaml deleted file mode 100644 index 80960203..00000000 --- a/sources/airflow/helm/airflow/charts/redis/ci/redisgraph-module-values.yaml +++ /dev/null @@ -1,10 +0,0 @@ -image: - registry: docker.io - repository: redislabs/redisgraph - tag: '1.0.0' - -master: - command: "redis-server" - -slave: - command: "redis-server" diff --git a/sources/airflow/helm/airflow/charts/redis/templates/NOTES.txt b/sources/airflow/helm/airflow/charts/redis/templates/NOTES.txt deleted file mode 100644 index bbb03df4..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/NOTES.txt +++ /dev/null @@ -1,102 +0,0 @@ -** Please be patient while the chart is being deployed ** - -{{- if contains .Values.master.service.type "LoadBalancer" }} -{{- if not .Values.usePassword }} -{{ if and (not .Values.networkPolicy.enabled) (.Values.networkPolicy.allowExternal) }} - -------------------------------------------------------------------------------- - WARNING - - By specifying "master.service.type=LoadBalancer" and "usePassword=false" you have - most likely exposed the Redis service externally without any authentication - mechanism. - - For security reasons, we strongly suggest that you switch to "ClusterIP" or - "NodePort". As alternative, you can also switch to "usePassword=true" - providing a valid password on "password" parameter. - -------------------------------------------------------------------------------- -{{- end }} -{{- end }} -{{- end }} - -{{- if .Values.cluster.enabled }} -{{- if .Values.sentinel.enabled }} -Redis can be accessed via port {{ .Values.sentinel.service.redisPort }} on the following DNS name from within your cluster: - -{{ template "redis.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local for read only operations - -For read/write operations, first access the Redis Sentinel cluster, which is available in port {{ .Values.sentinel.service.sentinelPort }} using the same domain name above. - -{{- else }} -Redis can be accessed via port {{ .Values.redisPort }} on the following DNS names from within your cluster: - -{{ template "redis.fullname" . }}-master.{{ .Release.Namespace }}.svc.cluster.local for read/write operations -{{ template "redis.fullname" . }}-slave.{{ .Release.Namespace }}.svc.cluster.local for read-only operations -{{- end }} - -{{- else }} -Redis can be accessed via port {{ .Values.redisPort }} on the following DNS name from within your cluster: - -{{ template "redis.fullname" . }}-master.{{ .Release.Namespace }}.svc.cluster.local - -{{- end }} - -{{ if .Values.usePassword }} -To get your password run: - - export REDIS_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "redis.fullname" . }} -o jsonpath="{.data.redis-password}" | base64 --decode) -{{- end }} - -To connect to your Redis server: - -1. Run a Redis pod that you can use as a client: - - kubectl run --namespace {{ .Release.Namespace }} {{ template "redis.fullname" . }}-client --rm --tty -i --restart='Never' \ - {{ if .Values.usePassword }} --env REDIS_PASSWORD=$REDIS_PASSWORD \{{ end }} - {{- if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }}--labels="{{ template "redis.name" . }}-client=true" \{{- end }} - --image {{ template "redis.image" . }} -- bash - -2. Connect using the Redis CLI: - -{{- if .Values.cluster.enabled }} - {{- if .Values.sentinel.enabled }} - redis-cli -h {{ template "redis.fullname" . }} -p {{ .Values.sentinel.service.redisPort }}{{ if .Values.usePassword }} -a $REDIS_PASSWORD{{ end }} # Read only operations - redis-cli -h {{ template "redis.fullname" . }} -p {{ .Values.sentinel.service.sentinelPort }}{{ if .Values.usePassword }} -a $REDIS_PASSWORD{{ end }} # Sentinel access - {{- else }} - redis-cli -h {{ template "redis.fullname" . }}-master{{ if .Values.usePassword }} -a $REDIS_PASSWORD{{ end }} - redis-cli -h {{ template "redis.fullname" . }}-slave{{ if .Values.usePassword }} -a $REDIS_PASSWORD{{ end }} - {{- end }} -{{- else }} - redis-cli -h {{ template "redis.fullname" . }}-master{{ if .Values.usePassword }} -a $REDIS_PASSWORD{{ end }} -{{- end }} - -{{ if and (.Values.networkPolicy.enabled) (not .Values.networkPolicy.allowExternal) }} -Note: Since NetworkPolicy is enabled, only pods with label -{{ template "redis.fullname" . }}-client=true" -will be able to connect to redis. -{{- else -}} - -To connect to your database from outside the cluster execute the following commands: - -{{- if contains "NodePort" .Values.master.service.type }} - - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "redis.fullname" . }}-master) - redis-cli -h $NODE_IP -p $NODE_PORT {{- if .Values.usePassword }} -a $REDIS_PASSWORD{{ end }} - -{{- else if contains "LoadBalancer" .Values.master.service.type }} - - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "redis.fullname" . }}' - - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "redis.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - redis-cli -h $SERVICE_IP -p {{ .Values.master.service.nodePort }} {{- if .Values.usePassword }} -a $REDIS_PASSWORD{{ end }} - -{{- else if contains "ClusterIP" .Values.master.service.type }} - - kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "redis.fullname" . }} {{ .Values.redisPort }}:{{ .Values.redisPort }} & - redis-cli -h 127.0.0.1 -p {{ .Values.redisPort }} {{- if .Values.usePassword }} -a $REDIS_PASSWORD{{ end }} - -{{- end }} -{{- end }} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/_helpers.tpl b/sources/airflow/helm/airflow/charts/redis/templates/_helpers.tpl deleted file mode 100644 index 51cc5e76..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/_helpers.tpl +++ /dev/null @@ -1,227 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "redis.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Expand the chart plus release name (used by the chart label) -*/}} -{{- define "redis.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "redis.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for networkpolicy. -*/}} -{{- define "networkPolicy.apiVersion" -}} -{{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "extensions/v1beta1" -}} -{{- else -}} -{{- print "networking.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Redis image name -*/}} -{{- define "redis.image" -}} -{{- $registryName := .Values.image.registry -}} -{{- $repositoryName := .Values.image.repository -}} -{{- $tag := .Values.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Redis Sentinel image name -*/}} -{{- define "sentinel.image" -}} -{{- $registryName := .Values.sentinel.image.registry -}} -{{- $repositoryName := .Values.sentinel.image.repository -}} -{{- $tag := .Values.sentinel.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper image name (for the metrics image) -*/}} -{{- define "redis.metrics.image" -}} -{{- $registryName := .Values.metrics.image.registry -}} -{{- $repositoryName := .Values.metrics.image.repository -}} -{{- $tag := .Values.metrics.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper image name (for the init container volume-permissions image) -*/}} -{{- define "redis.volumePermissions.image" -}} -{{- $registryName := .Values.volumePermissions.image.registry -}} -{{- $repositoryName := .Values.volumePermissions.image.repository -}} -{{- $tag := .Values.volumePermissions.image.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "redis.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "redis.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Get the password secret. -*/}} -{{- define "redis.secretName" -}} -{{- if .Values.existingSecret -}} -{{- printf "%s" .Values.existingSecret -}} -{{- else -}} -{{- printf "%s" (include "redis.fullname" .) -}} -{{- end -}} -{{- end -}} - -{{/* -Return sysctl image -*/}} -{{- define "redis.sysctl.image" -}} -{{- $registryName := default "docker.io" .Values.sysctlImage.registry -}} -{{- $repositoryName := .Values.sysctlImage.repository -}} -{{- $tag := default "latest" .Values.sysctlImage.tag | toString -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. -Also, we can't use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} - {{- if .Values.global.imageRegistry }} - {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} - {{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} - {{- end -}} -{{- else -}} - {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} -{{- end -}} -{{- end -}} - -{{/* -Return the proper Docker Image Registry Secret Names -*/}} -{{- define "redis.imagePullSecrets" -}} -{{/* -Helm 2.11 supports the assignment of a value to a variable defined in a different scope, -but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic. -Also, we can not use a single if because lazy evaluation is not an option -*/}} -{{- if .Values.global }} -{{- if .Values.global.imagePullSecrets }} -imagePullSecrets: -{{- range .Values.global.imagePullSecrets }} - - name: {{ . }} -{{- end }} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.sysctlImage.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.sysctlImage.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets .Values.sysctlImage.pullSecrets .Values.volumePermissions.image.pullSecrets }} -imagePullSecrets: -{{- range .Values.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.metrics.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.sysctlImage.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- range .Values.volumePermissions.image.pullSecrets }} - - name: {{ . }} -{{- end }} -{{- end -}} -{{- end -}} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/configmap.yaml b/sources/airflow/helm/airflow/charts/redis/templates/configmap.yaml deleted file mode 100644 index fa849285..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/configmap.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - name: {{ template "redis.fullname" . }} -data: - redis.conf: |- -{{- if .Values.configmap }} - # User-supplied configuration: -{{ .Values.configmap | indent 4 }} -{{- end }} - master.conf: |- - dir {{ .Values.master.persistence.path }} -{{- if .Values.master.disableCommands }} -{{- range .Values.master.disableCommands }} - rename-command {{ . }} "" -{{- end }} -{{- end }} - replica.conf: |- - dir {{ .Values.slave.persistence.path }} - slave-read-only yes -{{- if .Values.slave.disableCommands }} -{{- range .Values.slave.disableCommands }} - rename-command {{ . }} "" -{{- end }} -{{- end }} -{{- if .Values.sentinel.enabled }} - sentinel.conf: |- - dir "/tmp" - bind 0.0.0.0 - port {{ .Values.sentinel.port }} - sentinel monitor {{ .Values.sentinel.masterSet }} {{ template "redis.fullname" . }}-master-0.{{ template "redis.fullname" . }}-headless.{{ .Release.Namespace }}.svc.cluster.local {{ .Values.redisPort }} {{ .Values.sentinel.quorum }} - sentinel down-after-milliseconds {{ .Values.sentinel.masterSet }} {{ .Values.sentinel.downAfterMilliseconds }} - sentinel failover-timeout {{ .Values.sentinel.masterSet }} {{ .Values.sentinel.failoverTimeout }} - sentinel parallel-syncs {{ .Values.sentinel.masterSet }} {{ .Values.sentinel.parallelSyncs }} -{{- end }} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/headless-svc.yaml b/sources/airflow/helm/airflow/charts/redis/templates/headless-svc.yaml deleted file mode 100644 index 9d09e279..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/headless-svc.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "redis.fullname" . }}-headless - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -spec: - type: ClusterIP - clusterIP: None - ports: - - name: redis - port: {{ .Values.redisPort }} - targetPort: redis -{{- if .Values.sentinel.enabled }} - - name: redis-sentinel - port: {{ .Values.sentinel.port }} - targetPort: redis-sentinel -{{- end }} - selector: - app: {{ template "redis.name" . }} - release: "{{ .Release.Name }}" diff --git a/sources/airflow/helm/airflow/charts/redis/templates/health-configmap.yaml b/sources/airflow/helm/airflow/charts/redis/templates/health-configmap.yaml deleted file mode 100644 index 6f0194fe..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/health-configmap.yaml +++ /dev/null @@ -1,90 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - name: {{ template "redis.fullname" . }}-health -data: - ping_local.sh: |- -{{- if .Values.usePasswordFile }} - password_aux=`cat ${REDIS_PASSWORD_FILE}` - export REDIS_PASSWORD=$password_aux -{{- end }} - response=$( - timeout -s 9 $1 \ - redis-cli \ -{{- if .Values.usePassword }} - -a $REDIS_PASSWORD \ -{{- end }} - -h localhost \ - -p $REDIS_PORT \ - ping - ) - if [ "$response" != "PONG" ]; then - echo "$response" - exit 1 - fi -{{- if .Values.sentinel.enabled }} - ping_sentinel.sh: |- -{{- if .Values.usePasswordFile }} - password_aux=`cat ${REDIS_PASSWORD_FILE}` - export REDIS_PASSWORD=$password_aux -{{- end }} - response=$( - timeout -s 9 $1 \ - redis-cli \ -{{- if .Values.usePassword }} - -a $REDIS_PASSWORD \ -{{- end }} - -h localhost \ - -p $REDIS_SENTINEL_PORT \ - ping - ) - if [ "$response" != "PONG" ]; then - echo "$response" - exit 1 - fi - parse_sentinels.awk: |- - /ip/ {FOUND_IP=1} - /port/ {FOUND_PORT=1} - /runid/ {FOUND_RUNID=1} - !/ip|port|runid/ { - if (FOUND_IP==1) { - IP=$1; FOUND_IP=0; - } - else if (FOUND_PORT==1) { - PORT=$1; - FOUND_PORT=0; - } else if (FOUND_RUNID==1) { - printf "\nsentinel known-sentinel {{ .Values.sentinel.masterSet }} %s %s %s", IP, PORT, $0; FOUND_RUNID=0; - } - } -{{- end }} - ping_master.sh: |- -{{- if .Values.usePasswordFile }} - password_aux=`cat ${REDIS_MASTER_PASSWORD_FILE}` - export REDIS_MASTER_PASSWORD=$password_aux -{{- end }} - response=$( - timeout -s 9 $1 \ - redis-cli \ -{{- if .Values.usePassword }} - -a $REDIS_MASTER_PASSWORD \ -{{- end }} - -h $REDIS_MASTER_HOST \ - -p $REDIS_MASTER_PORT_NUMBER \ - ping - ) - if [ "$response" != "PONG" ]; then - echo "$response" - exit 1 - fi - ping_local_and_master.sh: |- - script_dir="$(dirname "$0")" - exit_status=0 - "$script_dir/ping_local.sh" $1 || exit_status=$? - "$script_dir/ping_master.sh" $1 || exit_status=$? - exit $exit_status diff --git a/sources/airflow/helm/airflow/charts/redis/templates/metrics-deployment.yaml b/sources/airflow/helm/airflow/charts/redis/templates/metrics-deployment.yaml deleted file mode 100644 index 0e45535b..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/metrics-deployment.yaml +++ /dev/null @@ -1,91 +0,0 @@ -{{- if .Values.metrics.enabled }} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: {{ template "redis.fullname" . }}-metrics - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -spec: - selector: - matchLabels: - release: "{{ .Release.Name }}" - role: metrics - app: {{ template "redis.name" . }} - template: - metadata: - labels: - release: "{{ .Release.Name }}" - chart: {{ template "redis.chart" . }} - role: metrics - app: {{ template "redis.name" . }} - {{- if .Values.metrics.podLabels }} -{{ toYaml .Values.metrics.podLabels | indent 8 }} - {{- end }} - annotations: - checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- if .Values.metrics.podAnnotations }} -{{ toYaml .Values.metrics.podAnnotations | indent 8 }} - {{- end }} - spec: -{{- include "redis.imagePullSecrets" . | indent 6 }} - {{- if .Values.metrics.nodeSelector }} - nodeSelector: -{{ toYaml .Values.metrics.nodeSelector | indent 8 }} - {{- end }} - serviceAccountName: "{{ template "redis.serviceAccountName" . }}" - {{- if .Values.metrics.priorityClassName }} - priorityClassName: "{{ .Values.metrics.priorityClassName }}" - {{- end }} - {{- if .Values.metrics.tolerations }} - tolerations: -{{ toYaml .Values.metrics.tolerations | indent 8 }} - {{- end }} - containers: - - name: metrics - image: {{ template "redis.metrics.image" . }} - imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} - args: - {{- range $key, $value := .Values.metrics.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - env: - - name: REDIS_ADDR - {{- if .Values.cluster.enabled }} - value: {{ printf "%s-master:%d,%s-slave:%d" ( include "redis.fullname" . ) ( int .Values.redisPort ) ( include "redis.fullname" . ) ( int .Values.redisPort ) | quote }} - {{- else }} - value: {{ printf "%s-master:%d" (include "redis.fullname" . ) (int .Values.redisPort) | quote }} - {{- end }} - - name: REDIS_ALIAS - value: {{ template "redis.fullname" . }} - {{- if .Values.usePassword }} - {{- if .Values.usePasswordFile }} - - name: REDIS_PASSWORD_FILE - value: "/secrets/redis-password" - {{- else }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: redis-password - {{- end }} - {{- end }} - volumeMounts: - {{- if .Values.usePasswordFile }} - - name: redis-password - mountPath: /secrets/ - {{- end }} - ports: - - name: metrics - containerPort: 9121 - resources: -{{ toYaml .Values.metrics.resources | indent 10 }} - volumes: - {{- if .Values.usePasswordFile }} - - name: redis-password - secret: - secretName: {{ template "redis.secretName" . }} - {{- end }} -{{- end }} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/metrics-prometheus.yaml b/sources/airflow/helm/airflow/charts/redis/templates/metrics-prometheus.yaml deleted file mode 100644 index 3f334543..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/metrics-prometheus.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if and (.Values.metrics.enabled) (.Values.metrics.serviceMonitor.enabled) }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "redis.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- end }} - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- range $key, $value := .Values.metrics.serviceMonitor.selector }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - endpoints: - - port: metrics - {{- if .Values.metrics.serviceMonitor.interval }} - interval: {{ .Values.metrics.serviceMonitor.interval }} - {{- end }} - selector: - matchLabels: - app: {{ template "redis.name" . }} - release: {{ .Release.Name }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} -{{- end -}} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/metrics-svc.yaml b/sources/airflow/helm/airflow/charts/redis/templates/metrics-svc.yaml deleted file mode 100644 index a2105152..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/metrics-svc.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if .Values.metrics.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "redis.fullname" . }}-metrics - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -{{- if .Values.metrics.service.annotations }} - annotations: -{{ toYaml .Values.metrics.service.annotations | indent 4 }} -{{- end }} -spec: - type: {{ .Values.metrics.service.type }} - {{ if eq .Values.metrics.service.type "LoadBalancer" -}} {{ if .Values.metrics.service.loadBalancerIP -}} - loadBalancerIP: {{ .Values.metrics.service.loadBalancerIP }} - {{ end -}} - {{- end -}} - ports: - - name: metrics - port: 9121 - targetPort: metrics - selector: - app: {{ template "redis.name" . }} - release: {{ .Release.Name }} - role: metrics -{{- end }} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/networkpolicy.yaml b/sources/airflow/helm/airflow/charts/redis/templates/networkpolicy.yaml deleted file mode 100644 index ff6c414a..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/networkpolicy.yaml +++ /dev/null @@ -1,62 +0,0 @@ -{{- if .Values.networkPolicy.enabled }} -kind: NetworkPolicy -apiVersion: {{ template "networkPolicy.apiVersion" . }} -metadata: - name: "{{ template "redis.fullname" . }}" - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -spec: - podSelector: - matchLabels: - app: {{ template "redis.name" . }} - release: "{{ .Release.Name }}" - ingress: - # Allow inbound connections - - ports: - - port: {{ .Values.redisPort }} - {{- if not .Values.networkPolicy.allowExternal }} - from: - - podSelector: - matchLabels: - {{ template "redis.fullname" . }}-client: "true" - {{- if .Values.metrics.enabled }} - - podSelector: - matchLabels: - release: "{{ .Release.Name }}" - role: metrics - app: {{ template "redis.name" . }} - {{- end }} - {{- end }} - - port: {{ .Values.sentinel.port }} - {{- if not .Values.networkPolicy.allowExternal }} - from: - - podSelector: - matchLabels: - {{ template "redis.fullname" . }}-client: "true" - {{- if .Values.metrics.enabled }} - - podSelector: - matchLabels: - release: "{{ .Release.Name }}" - role: metrics - app: {{ template "redis.name" . }} - {{- end }} - {{- end }} - {{- if .Values.metrics.enabled }} - # Allow prometheus scrapes for metrics - - port: 9121 - {{- if not .Values.networkPolicy.allowExternal }} - from: - - podSelector: - matchLabels: - {{ template "redis.fullname" . }}-client: "true" - - podSelector: - matchLabels: - release: "{{ .Release.Name }}" - role: metrics - app: {{ template "redis.name" . }} - {{- end }} - {{- end }} -{{- end }} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/redis-master-statefulset.yaml b/sources/airflow/helm/airflow/charts/redis/templates/redis-master-statefulset.yaml deleted file mode 100644 index 36c18ca4..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/redis-master-statefulset.yaml +++ /dev/null @@ -1,354 +0,0 @@ -apiVersion: apps/v1beta2 -kind: StatefulSet -metadata: - name: {{ template "redis.fullname" . }}-master - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -spec: - selector: - matchLabels: - release: "{{ .Release.Name }}" - role: master - app: {{ template "redis.name" . }} - serviceName: {{ template "redis.fullname" . }}-headless - template: - metadata: - labels: - release: "{{ .Release.Name }}" - chart: {{ template "redis.chart" . }} - role: master - app: {{ template "redis.name" . }} -{{- if .Values.master.podLabels }} -{{ toYaml .Values.master.podLabels | indent 8 }} -{{- end }} - annotations: - checksum/health: {{ include (print $.Template.BasePath "/health-configmap.yaml") . | sha256sum }} - checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- if .Values.master.podAnnotations }} -{{ toYaml .Values.master.podAnnotations | indent 8 }} - {{- end }} - spec: -{{- include "redis.imagePullSecrets" . | indent 6 }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - {{- end }} - serviceAccountName: "{{ template "redis.serviceAccountName" . }}" - {{- if .Values.master.priorityClassName }} - priorityClassName: "{{ .Values.master.priorityClassName }}" - {{- end }} - {{- with .Values.master.affinity }} - affinity: -{{ tpl (toYaml .) $ | indent 8 }} - {{- end }} - {{- if .Values.master.nodeSelector }} - nodeSelector: -{{ toYaml .Values.master.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.master.tolerations }} - tolerations: -{{ toYaml .Values.master.tolerations | indent 8 }} - {{- end }} - {{- if .Values.master.schedulerName }} - schedulerName: "{{ .Values.master.schedulerName }}" - {{- end }} - containers: - - name: {{ template "redis.fullname" . }} - image: "{{ template "redis.image" . }}" - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - {{- if .Values.securityContext.enabled }} - securityContext: - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - command: - - /bin/bash - - -c - - | - if [[ -n $REDIS_PASSWORD_FILE ]]; then - password_aux=`cat ${REDIS_PASSWORD_FILE}` - export REDIS_PASSWORD=$password_aux - fi - if [[ ! -f /opt/bitnami/redis/etc/master.conf ]];then - cp /opt/bitnami/redis/mounted-etc/master.conf /opt/bitnami/redis/etc/master.conf - fi - if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then - cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf - fi - ARGS=("--port" "${REDIS_PORT}") - {{- if .Values.usePassword }} - ARGS+=("--requirepass" "${REDIS_PASSWORD}") - {{- else }} - ARGS+=("--protected-mode" "no") - {{- end }} - ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf") - ARGS+=("--include" "/opt/bitnami/redis/etc/master.conf") - {{- if .Values.master.command }} - {{ .Values.master.command }} ${ARGS[@]} - {{- else }} - redis-server "${ARGS[@]}" - {{- end }} - env: - - name: REDIS_REPLICATION_MODE - value: master - {{- if .Values.usePassword }} - {{- if .Values.usePasswordFile }} - - name: REDIS_PASSWORD_FILE - value: "/opt/bitnami/redis/secrets/redis-password" - {{- else }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: redis-password - {{- end }} - {{- else }} - - name: ALLOW_EMPTY_PASSWORD - value: "yes" - {{- end }} - - name: REDIS_PORT - value: {{ .Values.redisPort | quote }} - ports: - - name: redis - containerPort: {{ .Values.redisPort }} - {{- if .Values.master.livenessProbe.enabled }} - livenessProbe: - initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_local.sh {{ .Values.master.livenessProbe.timeoutSeconds }} - {{- end }} - {{- if .Values.master.readinessProbe.enabled}} - readinessProbe: - initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.master.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_local.sh {{ .Values.master.livenessProbe.timeoutSeconds }} - {{- end }} - resources: -{{ toYaml .Values.master.resources | indent 10 }} - volumeMounts: - - name: health - mountPath: /health - {{- if .Values.usePasswordFile }} - - name: redis-password - mountPath: /opt/bitnami/redis/secrets/ - {{- end }} - - name: redis-data - mountPath: {{ .Values.master.persistence.path }} - subPath: {{ .Values.master.persistence.subPath }} - - name: config - mountPath: /opt/bitnami/redis/mounted-etc - - name: redis-tmp-conf - mountPath: /opt/bitnami/redis/etc/ - {{- if and .Values.cluster.enabled .Values.sentinel.enabled }} - - name: sentinel - image: "{{ template "sentinel.image" . }}" - imagePullPolicy: {{ .Values.sentinel.image.pullPolicy | quote }} - {{- if .Values.securityContext.enabled }} - securityContext: - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - command: - - /bin/bash - - -c - - | - if [[ -n $REDIS_PASSWORD_FILE ]]; then - password_aux=`cat ${REDIS_PASSWORD_FILE}` - export REDIS_PASSWORD=$password_aux - fi - if [[ ! -f /opt/bitnami/redis-sentinel/etc/sentinel.conf ]];then - cp /opt/bitnami/redis-sentinel/mounted-etc/sentinel.conf /opt/bitnami/redis-sentinel/etc/sentinel.conf - {{- if .Values.usePassword }} - printf "\nsentinel auth-pass {{ .Values.sentinel.masterSet }} $REDIS_PASSWORD" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf - {{- end }} - fi - echo "Getting information about current running sentinels" - # Get information from existing sentinels - existing_sentinels=$(timeout -s 9 {{ .Values.sentinel.initialCheckTimeout }} redis-cli --raw -h {{ template "redis.fullname" . }} -a $REDIS_PASSWORD -p {{ .Values.sentinel.service.sentinelPort }} SENTINEL sentinels {{ .Values.sentinel.masterSet }}) - echo "$existing_sentinels" | awk -f /health/parse_sentinels.awk | tee -a /opt/bitnami/redis-sentinel/etc/sentinel.conf - - redis-server /opt/bitnami/redis-sentinel/etc/sentinel.conf --sentinel - env: - {{- if .Values.usePassword }} - {{- if .Values.usePasswordFile }} - - name: REDIS_PASSWORD_FILE - value: "/opt/bitnami/redis/secrets/redis-password" - {{- else }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: redis-password - {{- end }} - {{- else }} - - name: ALLOW_EMPTY_PASSWORD - value: "yes" - {{- end }} - - name: REDIS_SENTINEL_PORT - value: {{ .Values.sentinel.port | quote }} - ports: - - name: redis-sentinel - containerPort: {{ .Values.sentinel.port }} - {{- if .Values.sentinel.livenessProbe.enabled }} - livenessProbe: - initialDelaySeconds: {{ .Values.sentinel.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.sentinel.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.sentinel.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.sentinel.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.sentinel.livenessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_sentinel.sh {{ .Values.sentinel.livenessProbe.timeoutSeconds }} - {{- end }} - {{- if .Values.sentinel.readinessProbe.enabled}} - readinessProbe: - initialDelaySeconds: {{ .Values.sentinel.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.sentinel.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.sentinel.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.sentinel.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.sentinel.readinessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_sentinel.sh {{ .Values.sentinel.livenessProbe.timeoutSeconds }} - {{- end }} - resources: -{{ toYaml .Values.sentinel.resources | indent 10 }} - volumeMounts: - - name: health - mountPath: /health - {{- if .Values.usePasswordFile }} - - name: redis-password - mountPath: /opt/bitnami/redis/secrets/ - {{- end }} - - name: redis-data - mountPath: {{ .Values.master.persistence.path }} - subPath: {{ .Values.master.persistence.subPath }} - - name: config - mountPath: /opt/bitnami/redis-sentinel/mounted-etc - - name: sentinel-tmp-conf - mountPath: /opt/bitnami/redis-sentinel/etc/ - {{- end }} - {{- $needsVolumePermissions := and .Values.volumePermissions.enabled (and ( and .Values.master.persistence.enabled (not .Values.persistence.existingClaim) ) .Values.securityContext.enabled) }} - {{- if or $needsVolumePermissions .Values.sysctlImage.enabled }} - initContainers: - {{- if $needsVolumePermissions }} - - name: volume-permissions - image: "{{ template "redis.volumePermissions.image" . }}" - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["/bin/chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.master.persistence.path }}"] - securityContext: - runAsUser: 0 - resources: -{{ toYaml .Values.volumePermissions.resources | indent 10 }} - volumeMounts: - - name: redis-data - mountPath: {{ .Values.master.persistence.path }} - subPath: {{ .Values.master.persistence.subPath }} - {{- end }} - {{- if .Values.sysctlImage.enabled }} - - name: init-sysctl - image: {{ template "redis.sysctl.image" . }} - imagePullPolicy: {{ default "" .Values.sysctlImage.pullPolicy | quote }} - resources: -{{ toYaml .Values.sysctlImage.resources | indent 10 }} - {{- if .Values.sysctlImage.mountHostSys }} - volumeMounts: - - name: host-sys - mountPath: /host-sys - {{- end }} - command: -{{ toYaml .Values.sysctlImage.command | indent 10 }} - securityContext: - privileged: true - runAsUser: 0 - {{- end }} - {{- end }} - volumes: - - name: health - configMap: - name: {{ template "redis.fullname" . }}-health - defaultMode: 0755 - {{- if .Values.usePasswordFile }} - - name: redis-password - secret: - secretName: {{ template "redis.secretName" . }} - {{- end }} - - name: config - configMap: - name: {{ template "redis.fullname" . }} - {{- if not .Values.master.persistence.enabled }} - - name: "redis-data" - emptyDir: {} - {{- else }} - {{- if .Values.persistence.existingClaim }} - - name: "redis-data" - persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim }} - {{- end }} - {{- end }} - {{- if .Values.sysctlImage.mountHostSys }} - - name: host-sys - hostPath: - path: /sys - {{- end }} - - name: redis-tmp-conf - emptyDir: {} - {{- if and .Values.cluster.enabled .Values.sentinel.enabled }} - - name: sentinel-tmp-conf - emptyDir: {} - {{- end }} - {{- if and .Values.master.persistence.enabled (not .Values.persistence.existingClaim) }} - volumeClaimTemplates: - - metadata: - name: redis-data - labels: - app: "{{ template "redis.name" . }}" - component: "master" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.master.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.master.persistence.size | quote }} - {{- if .Values.master.persistence.storageClass }} - {{- if (eq "-" .Values.master.persistence.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: {{ .Values.master.persistence.storageClass | quote }} - {{- end }} - {{- end }} - {{- end }} - updateStrategy: - type: {{ .Values.master.statefulset.updateStrategy }} - {{- if .Values.master.statefulset.rollingUpdatePartition }} - {{- if (eq "Recreate" .Values.master.statefulset.updateStrategy) }} - rollingUpdate: null - {{- else }} - rollingUpdate: - partition: {{ .Values.master.statefulset.rollingUpdatePartition }} - {{- end }} - {{- end }} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/redis-master-svc.yaml b/sources/airflow/helm/airflow/charts/redis/templates/redis-master-svc.yaml deleted file mode 100644 index 41c3aff5..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/redis-master-svc.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if not .Values.sentinel.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "redis.fullname" . }}-master - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -{{- if .Values.master.service.annotations }} - annotations: -{{ toYaml .Values.master.service.annotations | indent 4 }} -{{- end }} -spec: - type: {{ .Values.master.service.type }} - {{ if eq .Values.master.service.type "LoadBalancer" -}} {{ if .Values.master.service.loadBalancerIP -}} - loadBalancerIP: {{ .Values.master.service.loadBalancerIP }} - {{ end -}} - {{- end -}} - ports: - - name: redis - port: {{ .Values.master.service.port }} - targetPort: redis - {{- if .Values.master.service.nodePort }} - nodePort: {{ .Values.master.service.nodePort }} - {{- end }} - selector: - app: {{ template "redis.name" . }} - release: "{{ .Release.Name }}" - role: master -{{- end }} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/redis-role.yaml b/sources/airflow/helm/airflow/charts/redis/templates/redis-role.yaml deleted file mode 100644 index 26e04b72..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/redis-role.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if and .Values.rbac.create .Values.rbac.role.rules -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "redis.fullname" . }} - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -rules: -{{ toYaml .Values.rbac.role.rules }} -{{- end -}} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/redis-rolebinding.yaml b/sources/airflow/helm/airflow/charts/redis/templates/redis-rolebinding.yaml deleted file mode 100644 index 3a641097..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/redis-rolebinding.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: {{ template "redis.fullname" . }} - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "redis.fullname" . }} -subjects: -- kind: ServiceAccount - name: {{ template "redis.serviceAccountName" . }} -{{- end -}} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/redis-serviceaccount.yaml b/sources/airflow/helm/airflow/charts/redis/templates/redis-serviceaccount.yaml deleted file mode 100644 index 392fb3f0..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/redis-serviceaccount.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "redis.serviceAccountName" . }} - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -{{- end -}} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/redis-slave-statefulset.yaml b/sources/airflow/helm/airflow/charts/redis/templates/redis-slave-statefulset.yaml deleted file mode 100644 index fd71a81a..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/redis-slave-statefulset.yaml +++ /dev/null @@ -1,376 +0,0 @@ -{{- if .Values.cluster.enabled }} -apiVersion: apps/v1beta2 -kind: StatefulSet -metadata: - name: {{ template "redis.fullname" . }}-slave - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -spec: -{{- if .Values.slave.updateStrategy }} - strategy: -{{ toYaml .Values.slave.updateStrategy | indent 4 }} -{{- end }} -{{- if .Values.cluster.slaveCount }} - replicas: {{ .Values.cluster.slaveCount }} -{{- end }} - serviceName: {{ template "redis.fullname" . }}-headless - selector: - matchLabels: - release: "{{ .Release.Name }}" - role: slave - app: {{ template "redis.name" . }} - template: - metadata: - labels: - release: "{{ .Release.Name }}" - chart: {{ template "redis.chart" . }} - role: slave - app: {{ template "redis.name" . }} - {{- if .Values.slave.podLabels }} -{{ toYaml .Values.slave.podLabels | indent 8 }} - {{- end }} - annotations: - checksum/health: {{ include (print $.Template.BasePath "/health-configmap.yaml") . | sha256sum }} - checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- if .Values.slave.podAnnotations }} -{{ toYaml .Values.slave.podAnnotations | indent 8 }} - {{- end }} - spec: -{{- include "redis.imagePullSecrets" . | indent 6 }} - {{- if .Values.securityContext.enabled }} - securityContext: - fsGroup: {{ .Values.securityContext.fsGroup }} - {{- end }} - serviceAccountName: "{{ template "redis.serviceAccountName" . }}" - {{- if .Values.slave.priorityClassName }} - priorityClassName: "{{ .Values.slave.priorityClassName }}" - {{- end }} - {{- if .Values.slave.nodeSelector }} - nodeSelector: -{{ toYaml .Values.slave.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.slave.tolerations }} - tolerations: -{{ toYaml .Values.slave.tolerations | indent 8 }} - {{- end }} - {{- if .Values.slave.schedulerName }} - schedulerName: "{{ .Values.slave.schedulerName }}" - {{- end }} - {{- with .Values.slave.affinity }} - affinity: -{{ tpl (toYaml .) $ | indent 8 }} - {{- end }} - containers: - - name: {{ template "redis.fullname" . }} - image: {{ template "redis.image" . }} - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - {{- if .Values.securityContext.enabled }} - securityContext: - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - command: - - /bin/bash - - -c - - | - if [[ -n $REDIS_PASSWORD_FILE ]]; then - password_aux=`cat ${REDIS_PASSWORD_FILE}` - export REDIS_PASSWORD=$password_aux - fi - if [[ -n $REDIS_MASTER_PASSWORD_FILE ]]; then - password_aux=`cat ${REDIS_MASTER_PASSWORD_FILE}` - export REDIS_MASTER_PASSWORD=$password_aux - fi - if [[ ! -f /opt/bitnami/redis/etc/replica.conf ]];then - cp /opt/bitnami/redis/mounted-etc/replica.conf /opt/bitnami/redis/etc/replica.conf - fi - if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then - cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf - fi - ARGS=("--port" "${REDIS_PORT}") - {{- if .Values.usePassword }} - ARGS+=("--requirepass" "${REDIS_PASSWORD}") - ARGS+=("--slaveof" "${REDIS_MASTER_HOST}" "${REDIS_MASTER_PORT_NUMBER}") - ARGS+=("--masterauth" "${REDIS_MASTER_PASSWORD}") - {{- else }} - ARGS+=("--protected-mode" "no") - {{- end }} - ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf") - ARGS+=("--include" "/opt/bitnami/redis/etc/replica.conf") - {{- if .Values.slave.command }} - {{ .Values.slave.command }} "${ARGS[@]}" - {{- else }} - redis-server "${ARGS[@]}" - {{- end }} - env: - - name: REDIS_REPLICATION_MODE - value: slave - - name: REDIS_MASTER_HOST - value: {{ template "redis.fullname" . }}-master-0.{{ template "redis.fullname" . }}-headless.{{ .Release.Namespace }}.svc.cluster.local - - name: REDIS_PORT - value: {{ .Values.redisPort | quote }} - - name: REDIS_MASTER_PORT_NUMBER - value: {{ .Values.redisPort | quote }} - {{- if .Values.usePassword }} - {{- if .Values.usePasswordFile }} - - name: REDIS_PASSWORD_FILE - value: "/opt/bitnami/redis/secrets/redis-password" - - name: REDIS_MASTER_PASSWORD_FILE - value: "/opt/bitnami/redis/secrets/redis-password" - {{- else }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: redis-password - - name: REDIS_MASTER_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: redis-password - {{- end }} - {{- else }} - - name: ALLOW_EMPTY_PASSWORD - value: "yes" - {{- end }} - ports: - - name: redis - containerPort: {{ .Values.redisPort }} - {{- if .Values.slave.livenessProbe.enabled }} - livenessProbe: - initialDelaySeconds: {{ .Values.slave.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.livenessProbe.failureThreshold}} - exec: - command: - - sh - - -c - {{- if .Values.sentinel.enabled }} - - /health/ping_local.sh {{ .Values.slave.livenessProbe.timeoutSeconds }} - {{- else }} - - /health/ping_local_and_master.sh {{ .Values.slave.livenessProbe.timeoutSeconds }} - {{- end }} - {{- end }} - - {{- if .Values.slave.readinessProbe.enabled }} - readinessProbe: - initialDelaySeconds: {{ .Values.slave.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.slave.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.slave.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.slave.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.slave.readinessProbe.failureThreshold }} - exec: - command: - - sh - - -c - {{- if .Values.sentinel.enabled }} - - /health/ping_local.sh {{ .Values.slave.livenessProbe.timeoutSeconds }} - {{- else }} - - /health/ping_local_and_master.sh {{ .Values.slave.livenessProbe.timeoutSeconds }} - {{- end }} - {{- end }} - resources: -{{ toYaml .Values.slave.resources | indent 10 }} - volumeMounts: - - name: health - mountPath: /health - {{- if .Values.usePasswordFile }} - - name: redis-password - mountPath: /opt/bitnami/redis/secrets/ - {{- end }} - - name: redis-data - mountPath: /data - - name: config - mountPath: /opt/bitnami/redis/mounted-etc - - name: redis-tmp-conf - mountPath: /opt/bitnami/redis/etc - {{- if and .Values.cluster.enabled .Values.sentinel.enabled }} - - name: sentinel - image: "{{ template "sentinel.image" . }}" - imagePullPolicy: {{ .Values.sentinel.image.pullPolicy | quote }} - {{- if .Values.securityContext.enabled }} - securityContext: - runAsUser: {{ .Values.securityContext.runAsUser }} - {{- end }} - command: - - /bin/bash - - -c - - | - if [[ -n $REDIS_PASSWORD_FILE ]]; then - password_aux=`cat ${REDIS_PASSWORD_FILE}` - export REDIS_PASSWORD=$password_aux - fi - if [[ ! -f /opt/bitnami/redis-sentinel/etc/sentinel.conf ]];then - cp /opt/bitnami/redis-sentinel/mounted-etc/sentinel.conf /opt/bitnami/redis-sentinel/etc/sentinel.conf - {{- if .Values.usePassword }} - printf "\nsentinel auth-pass {{ .Values.sentinel.masterSet }} $REDIS_PASSWORD" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf - {{- end }} - fi - echo "Getting information about current running sentinels" - # Get information from existing sentinels - existing_sentinels=$(timeout -s 9 {{ .Values.sentinel.initialCheckTimeout }} redis-cli --raw -h {{ template "redis.fullname" . }} -a $REDIS_PASSWORD -p {{ .Values.sentinel.service.sentinelPort }} SENTINEL sentinels {{ .Values.sentinel.masterSet }}) - echo "$existing_sentinels" | awk -f /health/parse_sentinels.awk | tee -a /opt/bitnami/redis-sentinel/etc/sentinel.conf - - redis-server /opt/bitnami/redis-sentinel/etc/sentinel.conf --sentinel - env: - {{- if .Values.usePassword }} - {{- if .Values.usePasswordFile }} - - name: REDIS_PASSWORD_FILE - value: "/opt/bitnami/redis/secrets/redis-password" - {{- else }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ template "redis.secretName" . }} - key: redis-password - {{- end }} - {{- else }} - - name: ALLOW_EMPTY_PASSWORD - value: "yes" - {{- end }} - - name: REDIS_SENTINEL_PORT - value: {{ .Values.sentinel.port | quote }} - ports: - - name: redis-sentinel - containerPort: {{ .Values.sentinel.port }} - {{- if .Values.sentinel.livenessProbe.enabled }} - livenessProbe: - initialDelaySeconds: {{ .Values.sentinel.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.sentinel.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.sentinel.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.sentinel.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.sentinel.livenessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_sentinel.sh {{ .Values.sentinel.livenessProbe.timeoutSeconds }} - {{- end }} - {{- if .Values.sentinel.readinessProbe.enabled}} - readinessProbe: - initialDelaySeconds: {{ .Values.sentinel.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.sentinel.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.sentinel.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.sentinel.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.sentinel.readinessProbe.failureThreshold }} - exec: - command: - - sh - - -c - - /health/ping_sentinel.sh {{ .Values.sentinel.livenessProbe.timeoutSeconds }} - {{- end }} - resources: -{{ toYaml .Values.sentinel.resources | indent 10 }} - volumeMounts: - - name: health - mountPath: /health - {{- if .Values.usePasswordFile }} - - name: redis-password - mountPath: /opt/bitnami/redis/secrets/ - {{- end }} - - name: redis-data - mountPath: {{ .Values.master.persistence.path }} - subPath: {{ .Values.master.persistence.subPath }} - - name: config - mountPath: /opt/bitnami/redis-sentinel/mounted-etc - - name: sentinel-tmp-conf - mountPath: /opt/bitnami/redis-sentinel/etc - {{- end }} - {{- $needsVolumePermissions := and .Values.volumePermissions.enabled (and .Values.slave.persistence.enabled .Values.securityContext.enabled) }} - {{- if or $needsVolumePermissions .Values.sysctlImage.enabled }} - initContainers: - {{- if $needsVolumePermissions }} - - name: volume-permissions - image: "{{ template "redis.volumePermissions.image" . }}" - imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} - command: ["/bin/chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "{{ .Values.slave.persistence.path }}"] - securityContext: - runAsUser: 0 - resources: -{{ toYaml .Values.volumePermissions.resources | indent 10 }} - volumeMounts: - - name: redis-data - mountPath: {{ .Values.slave.persistence.path }} - subPath: {{ .Values.slave.persistence.subPath }} - {{- end }} - {{- if .Values.sysctlImage.enabled }} - - name: init-sysctl - image: {{ template "redis.sysctl.image" . }} - imagePullPolicy: {{ default "" .Values.sysctlImage.pullPolicy | quote }} - resources: -{{ toYaml .Values.sysctlImage.resources | indent 10 }} - {{- if .Values.sysctlImage.mountHostSys }} - volumeMounts: - - name: host-sys - mountPath: /host-sys - {{- end }} - command: -{{ toYaml .Values.sysctlImage.command | indent 10 }} - securityContext: - privileged: true - runAsUser: 0 - {{- end }} - {{- end }} - volumes: - - name: health - configMap: - name: {{ template "redis.fullname" . }}-health - defaultMode: 0755 - {{- if .Values.usePasswordFile }} - - name: redis-password - secret: - secretName: {{ template "redis.secretName" . }} - {{- end }} - - name: config - configMap: - name: {{ template "redis.fullname" . }} - {{- if .Values.sysctlImage.mountHostSys }} - - name: host-sys - hostPath: - path: /sys - {{- end }} - - name: sentinel-tmp-conf - emptyDir: {} - - name: redis-tmp-conf - emptyDir: {} - {{- if and .Values.slave.persistence.enabled }} - volumeClaimTemplates: - - metadata: - name: redis-data - labels: - app: "{{ template "redis.name" . }}" - component: "slave" - release: {{ .Release.Name | quote }} - heritage: {{ .Release.Service | quote }} - spec: - accessModes: - {{- range .Values.slave.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.slave.persistence.size | quote }} - {{- if .Values.slave.persistence.storageClass }} - {{- if (eq "-" .Values.slave.persistence.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: {{ .Values.slave.persistence.storageClass | quote }} - {{- end }} - {{- end }} - {{- end }} - updateStrategy: - type: {{ .Values.slave.statefulset.updateStrategy }} - {{- if .Values.slave.statefulset.rollingUpdatePartition }} - {{- if (eq "Recreate" .Values.slave.statefulset.updateStrategy) }} - rollingUpdate: null - {{- else }} - rollingUpdate: - partition: {{ .Values.slave.statefulset.rollingUpdatePartition }} - {{- end }} - {{- end }} -{{- end }} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/redis-slave-svc.yaml b/sources/airflow/helm/airflow/charts/redis/templates/redis-slave-svc.yaml deleted file mode 100644 index 9712c395..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/redis-slave-svc.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if and .Values.cluster.enabled (not .Values.sentinel.enabled) }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "redis.fullname" . }}-slave - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -{{- if .Values.slave.service.annotations }} - annotations: -{{ toYaml .Values.slave.service.annotations | indent 4 }} -{{- end }} -spec: - type: {{ .Values.slave.service.type }} - {{ if eq .Values.slave.service.type "LoadBalancer" -}} {{ if .Values.slave.service.loadBalancerIP -}} - loadBalancerIP: {{ .Values.slave.service.loadBalancerIP }} - {{ end -}} - {{- end -}} - ports: - - name: redis - port: {{ .Values.slave.service.port }} - targetPort: redis - {{- if .Values.slave.service.nodePort }} - nodePort: {{ .Values.slave.service.nodePort }} - {{- end }} - selector: - app: {{ template "redis.name" . }} - release: "{{ .Release.Name }}" - role: slave -{{- end }} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/redis-with-sentinel-svc.yaml b/sources/airflow/helm/airflow/charts/redis/templates/redis-with-sentinel-svc.yaml deleted file mode 100644 index fa3c24b2..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/redis-with-sentinel-svc.yaml +++ /dev/null @@ -1,37 +0,0 @@ -{{- if .Values.sentinel.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "redis.fullname" . }} - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -{{- if .Values.master.service.annotations }} - annotations: -{{ toYaml .Values.master.service.annotations | indent 4 }} -{{- end }} -spec: - type: {{ .Values.master.service.type }} - {{ if eq .Values.master.service.type "LoadBalancer" -}} {{ if .Values.master.service.loadBalancerIP -}} - loadBalancerIP: {{ .Values.master.service.loadBalancerIP }} - {{ end -}} - {{- end -}} - ports: - - name: redis - port: {{ .Values.sentinel.service.redisPort }} - targetPort: redis - {{- if .Values.sentinel.service.redisNodePort }} - nodePort: {{ .Values.sentinel.service.redisNodePort }} - {{- end }} - - name: redis-sentinel - port: {{ .Values.sentinel.service.sentinelPort }} - targetPort: redis-sentinel - {{- if .Values.sentinel.service.sentinelNodePort }} - nodePort: {{ .Values.sentinel.service.sentinelNodePort }} - {{- end }} - selector: - app: {{ template "redis.name" . }} - release: "{{ .Release.Name }}" -{{- end }} diff --git a/sources/airflow/helm/airflow/charts/redis/templates/secret.yaml b/sources/airflow/helm/airflow/charts/redis/templates/secret.yaml deleted file mode 100644 index 36c9ebf6..00000000 --- a/sources/airflow/helm/airflow/charts/redis/templates/secret.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if and .Values.usePassword (not .Values.existingSecret) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "redis.fullname" . }} - labels: - app: {{ template "redis.name" . }} - chart: {{ template "redis.chart" . }} - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -type: Opaque -data: - {{- if .Values.password }} - redis-password: {{ .Values.password | b64enc | quote }} - {{- else }} - redis-password: {{ randAlphaNum 10 | b64enc | quote }} - {{- end }} -{{- end -}} diff --git a/sources/airflow/helm/airflow/charts/redis/values-production.yaml b/sources/airflow/helm/airflow/charts/redis/values-production.yaml deleted file mode 100644 index c141c641..00000000 --- a/sources/airflow/helm/airflow/charts/redis/values-production.yaml +++ /dev/null @@ -1,525 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName - -## Bitnami Redis image version -## ref: https://hub.docker.com/r/bitnami/redis/tags/ -## -image: - registry: docker.io - repository: bitnami/redis - ## Bitnami Redis image tag - ## ref: https://github.com/bitnami/bitnami-docker-redis#supported-tags-and-respective-dockerfile-links - ## - tag: 4.0.14 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - -## Redis pod Security Context -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Cluster settings -cluster: - enabled: true - slaveCount: 3 - -## Use redis sentinel in the redis pod. This will disable the master and slave services and -## create one redis service with ports to the sentinel and the redis instances -sentinel: - enabled: false - ## Bitnami Redis Sentintel image version - ## ref: https://hub.docker.com/r/bitnami/redis-sentinel/tags/ - ## - image: - registry: docker.io - repository: bitnami/redis-sentinel - ## Bitnami Redis image tag - ## ref: https://github.com/bitnami/bitnami-docker-redis-sentinel#supported-tags-and-respective-dockerfile-links - ## - tag: 4.0.14 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - masterSet: mymaster - initialCheckTimeout: 5 - quorum: 2 - downAfterMilliseconds: 60000 - failoverTimeout: 18000 - parallelSyncs: 1 - port: 26379 - ## Configure extra options for Redis Sentinel liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) - ## - livenessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - ## Redis Sentinel resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - ## Redis Sentinel Service properties - service: - ## Redis Sentinel Service type - type: ClusterIP - sentinelPort: 26379 - redisPort: 6379 - - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # sentinelNodePort: - # redisNodePort: - - ## Provide any additional annotations which may be required. This can be used to - ## set the LoadBalancer service type to internal only. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - annotations: {} - loadBalancerIP: - -networkPolicy: - ## Specifies whether a NetworkPolicy should be created - ## - enabled: true - - ## The Policy model to apply. When set to false, only pods with the correct - ## client label will have network access to the port Redis is listening - ## on. When true, Redis will accept connections from any source - ## (with the correct destination port). - ## - # allowExternal: true - -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the fullname template - name: - -rbac: - ## Specifies whether RBAC resources should be created - ## - create: false - - role: - ## Rules to create. It follows the role specification - # rules: - # - apiGroups: - # - extensions - # resources: - # - podsecuritypolicies - # verbs: - # - use - # resourceNames: - # - gce.unprivileged - rules: [] - - -## Use password authentication -usePassword: true -## Redis password (both master and slave) -## Defaults to a random 10-character alphanumeric string if not set and usePassword is true -## ref: https://github.com/bitnami/bitnami-docker-redis#setting-the-server-password-on-first-run -## -password: -## Use existing secret (ignores previous password) -# existingSecret: - -## Mount secrets as files instead of environment variables -usePasswordFile: false - -## Persist data to a persistent volume -persistence: {} - ## A manually managed Persistent Volume and Claim - ## Requires persistence.enabled: true - ## If defined, PVC must be created manually before volume will be bound - # existingClaim: - -# Redis port -redisPort: 6379 - -## -## Redis Master parameters -## -master: - ## Redis command arguments - ## - ## Can be used to specify command line arguments, for example: - ## - command: "/run.sh" - ## Redis additional command line flags - ## - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: - ## - "--maxmemory-policy volatile-ttl" - ## - "--repl-backlog-size 1024mb" - extraFlags: [] - ## Comma-separated list of Redis commands to disable - ## - ## Can be used to disable Redis commands for security reasons. - ## Commands will be completely disabled by renaming each to an empty string. - ## ref: https://redis.io/topics/security#disabling-of-specific-commands - ## - disableCommands: - - FLUSHDB - - FLUSHALL - - ## Redis Master additional pod labels and annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - podLabels: {} - podAnnotations: {} - - ## Redis Master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - ## Configure extra options for Redis Master liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) - ## - livenessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - - ## Redis Master Node selectors and tolerations for pod assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature - ## - # nodeSelector: {"beta.kubernetes.io/arch": "amd64"} - # tolerations: [] - ## Redis Master pod/node affinity/anti-affinity - ## - affinity: {} - - ## Redis Master Service properties - service: - ## Redis Master Service type - type: ClusterIP - port: 6379 - - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - - ## Provide any additional annotations which may be required. This can be used to - ## set the LoadBalancer service type to internal only. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - annotations: {} - loadBalancerIP: - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - enabled: true - ## The path the volume will be mounted at, useful when using different - ## Redis images. - path: /data - ## The subdirectory of the volume to mount to, useful in dev environments - ## and one PV for multiple services. - subPath: "" - ## redis data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - accessModes: - - ReadWriteOnce - size: 8Gi - - ## Update strategy, can be set to RollingUpdate or onDelete by default. - ## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets - statefulset: - updateStrategy: RollingUpdate - ## Partition update strategy - ## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions - # rollingUpdatePartition: - - ## Redis Master pod priorityClassName - # priorityClassName: {} - - -## -## Redis Slave properties -## Note: service.type is a mandatory parameter -## The rest of the parameters are either optional or, if undefined, will inherit those declared in Redis Master -## -slave: - ## Slave Service properties - service: - ## Redis Slave Service type - type: ClusterIP - ## Redis port - port: 6379 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - - ## Provide any additional annotations which may be required. This can be used to - ## set the LoadBalancer service type to internal only. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - annotations: {} - loadBalancerIP: - - ## Redis slave port - port: 6379 - - ## Can be used to specify command line arguments, for example: - ## - command: "/run.sh" - ## Redis extra flags - extraFlags: [] - ## List of Redis commands to disable - disableCommands: - - FLUSHDB - - FLUSHALL - - ## Redis Slave pod/node affinity/anti-affinity - ## - affinity: {} - - ## Configure extra options for Redis Slave liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) - ## - livenessProbe: - enabled: true - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - failureThreshold: 5 - - ## Redis slave Resource - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - enabled: true - ## The path the volume will be mounted at, useful when using different - ## Redis images. - path: /data - ## The subdirectory of the volume to mount to, useful in dev environments - ## and one PV for multiple services. - subPath: "" - ## redis data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - accessModes: - - ReadWriteOnce - size: 8Gi - - ## Update strategy, can be set to RollingUpdate or onDelete by default. - ## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets - statefulset: - updateStrategy: RollingUpdate - ## Partition update strategy - ## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions - # rollingUpdatePartition: - - ## Redis slave selectors and tolerations for pod assignment - # nodeSelector: {"beta.kubernetes.io/arch": "amd64"} - # tolerations: [] - - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - ## Redis slave pod Annotation and Labels - podLabels: {} - podAnnotations: {} - - ## Redis slave pod priorityClassName - # priorityClassName: {} - -## Prometheus Exporter / Metrics -## -metrics: - enabled: true - - image: - registry: docker.io - repository: oliver006/redis_exporter - tag: v0.31.0 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - service: - type: ClusterIP - ## Use serviceLoadBalancerIP to request a specific static IP, - ## otherwise leave blank - # loadBalancerIP: - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9121" - - ## Metrics exporter resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - # resources: {} - - ## Extra arguments for Metrics exporter, for example: - ## extraArgs: - ## check-keys: myKey,myOtherKey - # extraArgs: {} - - ## Metrics exporter labels and tolerations for pod assignment - # nodeSelector: {"beta.kubernetes.io/arch": "amd64"} - # tolerations: [] - - ## Metrics exporter pod Annotation and Labels - # podAnnotations: {} - # podLabels: {} - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/helm/charts/tree/master/stable/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - - ## Metrics exporter pod priorityClassName - # priorityClassName: {} - -## -## Init containers parameters: -## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: latest - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - -## Redis config file -## ref: https://redis.io/topics/config -## -configmap: |- - # maxmemory-policy volatile-lru - -## Sysctl InitContainer -## used to perform sysctl operation to modify Kernel settings (needed sometimes to avoid warnings) -sysctlImage: - enabled: false - command: [] - registry: docker.io - repository: bitnami/minideb - tag: latest - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - mountHostSys: false - resources: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m diff --git a/sources/airflow/helm/airflow/charts/redis/values.yaml b/sources/airflow/helm/airflow/charts/redis/values.yaml deleted file mode 100644 index 95eb562e..00000000 --- a/sources/airflow/helm/airflow/charts/redis/values.yaml +++ /dev/null @@ -1,523 +0,0 @@ -## Global Docker image parameters -## Please, note that this will override the image parameters, including dependencies, configured to use the global value -## Current available global Docker image parameters: imageRegistry and imagePullSecrets -## -# global: -# imageRegistry: myRegistryName -# imagePullSecrets: -# - myRegistryKeySecretName - -## Bitnami Redis image version -## ref: https://hub.docker.com/r/bitnami/redis/tags/ -## -image: - registry: docker.io - repository: bitnami/redis - ## Bitnami Redis image tag - ## ref: https://github.com/bitnami/bitnami-docker-redis#supported-tags-and-respective-dockerfile-links - ## - tag: 4.0.14 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - -## Cluster settings -cluster: - enabled: true - slaveCount: 2 - -## Use redis sentinel in the redis pod. This will disable the master and slave services and -## create one redis service with ports to the sentinel and the redis instances -sentinel: - enabled: false - ## Bitnami Redis Sentintel image version - ## ref: https://hub.docker.com/r/bitnami/redis-sentinel/tags/ - ## - image: - registry: docker.io - repository: bitnami/redis-sentinel - ## Bitnami Redis image tag - ## ref: https://github.com/bitnami/bitnami-docker-redis-sentinel#supported-tags-and-respective-dockerfile-links - ## - tag: 4.0.14 - ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' - ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images - ## - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - masterSet: mymaster - initialCheckTimeout: 5 - quorum: 2 - downAfterMilliseconds: 60000 - failoverTimeout: 18000 - parallelSyncs: 1 - port: 26379 - ## Configure extra options for Redis Sentinel liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) - ## - livenessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - ## Redis Sentinel resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - ## Redis Sentinel Service properties - service: - ## Redis Sentinel Service type - type: ClusterIP - sentinelPort: 26379 - redisPort: 6379 - - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # sentinelNodePort: - # redisNodePort: - - ## Provide any additional annotations which may be required. This can be used to - ## set the LoadBalancer service type to internal only. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - annotations: {} - loadBalancerIP: - -networkPolicy: - ## Specifies whether a NetworkPolicy should be created - ## - enabled: false - - ## The Policy model to apply. When set to false, only pods with the correct - ## client label will have network access to the port Redis is listening - ## on. When true, Redis will accept connections from any source - ## (with the correct destination port). - ## - # allowExternal: true - -serviceAccount: - ## Specifies whether a ServiceAccount should be created - ## - create: false - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the fullname template - name: - -rbac: - ## Specifies whether RBAC resources should be created - ## - create: false - - role: - ## Rules to create. It follows the role specification - # rules: - # - apiGroups: - # - extensions - # resources: - # - podsecuritypolicies - # verbs: - # - use - # resourceNames: - # - gce.unprivileged - rules: [] - -## Redis pod Security Context -securityContext: - enabled: true - fsGroup: 1001 - runAsUser: 1001 - -## Use password authentication -usePassword: true -## Redis password (both master and slave) -## Defaults to a random 10-character alphanumeric string if not set and usePassword is true -## ref: https://github.com/bitnami/bitnami-docker-redis#setting-the-server-password-on-first-run -## -password: -## Use existing secret (ignores previous password) -# existingSecret: - -## Mount secrets as files instead of environment variables -usePasswordFile: false - -## Persist data to a persistent volume (Redis Master) -persistence: {} - ## A manually managed Persistent Volume and Claim - ## Requires persistence.enabled: true - ## If defined, PVC must be created manually before volume will be bound - # existingClaim: - -# Redis port -redisPort: 6379 - -## -## Redis Master parameters -## -master: - ## Redis command arguments - ## - ## Can be used to specify command line arguments, for example: - ## - command: "/run.sh" - ## Redis additional command line flags - ## - ## Can be used to specify command line flags, for example: - ## - ## extraFlags: - ## - "--maxmemory-policy volatile-ttl" - ## - "--repl-backlog-size 1024mb" - extraFlags: [] - ## Comma-separated list of Redis commands to disable - ## - ## Can be used to disable Redis commands for security reasons. - ## Commands will be completely disabled by renaming each to an empty string. - ## ref: https://redis.io/topics/security#disabling-of-specific-commands - ## - disableCommands: - - FLUSHDB - - FLUSHALL - - ## Redis Master additional pod labels and annotations - ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ - podLabels: {} - podAnnotations: {} - - ## Redis Master resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - ## Configure extra options for Redis Master liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) - ## - livenessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - - ## Redis Master Node selectors and tolerations for pod assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature - ## - # nodeSelector: {"beta.kubernetes.io/arch": "amd64"} - # tolerations: [] - ## Redis Master pod/node affinity/anti-affinity - ## - affinity: {} - - ## Redis Master Service properties - service: - ## Redis Master Service type - type: ClusterIP - port: 6379 - - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - - ## Provide any additional annotations which may be required. This can be used to - ## set the LoadBalancer service type to internal only. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - annotations: {} - loadBalancerIP: - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - enabled: true - ## The path the volume will be mounted at, useful when using different - ## Redis images. - path: /data - ## The subdirectory of the volume to mount to, useful in dev environments - ## and one PV for multiple services. - subPath: "" - ## redis data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - accessModes: - - ReadWriteOnce - size: 8Gi - - ## Update strategy, can be set to RollingUpdate or onDelete by default. - ## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets - statefulset: - updateStrategy: RollingUpdate - ## Partition update strategy - ## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions - # rollingUpdatePartition: - - ## Redis Master pod priorityClassName - # priorityClassName: {} - - -## -## Redis Slave properties -## Note: service.type is a mandatory parameter -## The rest of the parameters are either optional or, if undefined, will inherit those declared in Redis Master -## -slave: - ## Slave Service properties - service: - ## Redis Slave Service type - type: ClusterIP - ## Redis port - port: 6379 - ## Specify the nodePort value for the LoadBalancer and NodePort service types. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - ## - # nodePort: - - ## Provide any additional annotations which may be required. This can be used to - ## set the LoadBalancer service type to internal only. - ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer - ## - annotations: {} - loadBalancerIP: - - ## Redis slave port - port: 6379 - ## Can be used to specify command line arguments, for example: - ## - command: "/run.sh" - ## Redis extra flags - extraFlags: [] - ## List of Redis commands to disable - disableCommands: - - FLUSHDB - - FLUSHALL - - ## Redis Slave pod/node affinity/anti-affinity - ## - affinity: {} - - ## Configure extra options for Redis Slave liveness and readiness probes - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) - ## - livenessProbe: - enabled: true - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - enabled: true - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 10 - successThreshold: 1 - failureThreshold: 5 - - ## Redis slave Resource - # resources: - # requests: - # memory: 256Mi - # cpu: 100m - - ## Redis slave selectors and tolerations for pod assignment - # nodeSelector: {"beta.kubernetes.io/arch": "amd64"} - # tolerations: [] - - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - ## Redis slave pod Annotation and Labels - podLabels: {} - podAnnotations: {} - - ## Redis slave pod priorityClassName - # priorityClassName: {} - - ## Enable persistence using Persistent Volume Claims - ## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - persistence: - enabled: true - ## The path the volume will be mounted at, useful when using different - ## Redis images. - path: /data - ## The subdirectory of the volume to mount to, useful in dev environments - ## and one PV for multiple services. - subPath: "" - ## redis data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - accessModes: - - ReadWriteOnce - size: 8Gi - - ## Update strategy, can be set to RollingUpdate or onDelete by default. - ## https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets - statefulset: - updateStrategy: RollingUpdate - ## Partition update strategy - ## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions - # rollingUpdatePartition: - -## Prometheus Exporter / Metrics -## -metrics: - enabled: false - - image: - registry: docker.io - repository: oliver006/redis_exporter - tag: v0.31.0 - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - - service: - type: ClusterIP - ## Use serviceLoadBalancerIP to request a specific static IP, - ## otherwise leave blank - # loadBalancerIP: - annotations: - prometheus.io/scrape: "true" - prometheus.io/port: "9121" - - ## Metrics exporter resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - # resources: {} - - ## Extra arguments for Metrics exporter, for example: - ## extraArgs: - ## check-keys: myKey,myOtherKey - # extraArgs: {} - - ## Metrics exporter labels and tolerations for pod assignment - # nodeSelector: {"beta.kubernetes.io/arch": "amd64"} - # tolerations: [] - - ## Metrics exporter pod Annotation and Labels - # podAnnotations: {} - # podLabels: {} - - # Enable this if you're using https://github.com/coreos/prometheus-operator - serviceMonitor: - enabled: false - ## Specify a namespace if needed - # namespace: monitoring - # fallback to the prometheus default unless specified - # interval: 10s - ## Defaults to what's used if you follow CoreOS [Prometheus Install Instructions](https://github.com/helm/charts/tree/master/stable/prometheus-operator#tldr) - ## [Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#prometheus-operator-1) - ## [Kube Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - - ## Metrics exporter pod priorityClassName - # priorityClassName: {} - -## -## Init containers parameters: -## volumePermissions: Change the owner of the persist volume mountpoint to RunAsUser:fsGroup -## -volumePermissions: - enabled: false - image: - registry: docker.io - repository: bitnami/minideb - tag: latest - pullPolicy: IfNotPresent - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - resources: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m - -## Redis config file -## ref: https://redis.io/topics/config -## -configmap: |- - # maxmemory-policy volatile-lru - -## Sysctl InitContainer -## used to perform sysctl operation to modify Kernel settings (needed sometimes to avoid warnings) -sysctlImage: - enabled: false - command: [] - registry: docker.io - repository: bitnami/minideb - tag: latest - pullPolicy: Always - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistryKeySecretName - mountHostSys: false - resources: {} - # resources: - # requests: - # memory: 128Mi - # cpu: 100m diff --git a/sources/airflow/helm/airflow/examples/minikube-values.yaml b/sources/airflow/helm/airflow/examples/minikube-values.yaml deleted file mode 100644 index 8911bbec..00000000 --- a/sources/airflow/helm/airflow/examples/minikube-values.yaml +++ /dev/null @@ -1,24 +0,0 @@ -airflow: - image: - repository: puckel/docker-airflow - tag: 1.10.2 - pullPolicy: IfNotPresent - service: - type: NodePort - webReplicas: 1 - config: - AIRFLOW__CORE__LOGGING_LEVEL: DEBUG - AIRFLOW__CORE__LOAD_EXAMPLES: True - - variables: '{ "environment": "dev" }' - pools: '{ "example": { "description": "This is an example of a pool", "slots": 2 } }' - -workers: - replicas: 1 - celery: - instances: 1 - -persistence: - enabled: true - accessMode: ReadWriteOnce - size: 1Gi diff --git a/sources/airflow/helm/airflow/requirements.lock b/sources/airflow/helm/airflow/requirements.lock deleted file mode 100644 index fe05c3d6..00000000 --- a/sources/airflow/helm/airflow/requirements.lock +++ /dev/null @@ -1,9 +0,0 @@ -dependencies: -- name: postgresql - repository: https://kubernetes-charts.storage.googleapis.com/ - version: 0.13.1 -- name: redis - repository: https://kubernetes-charts.storage.googleapis.com/ - version: 7.0.0 -digest: sha256:b69868c9f0a2f73e76764c7aef0e738d77c4af2010d0d2b808fa82bedd239389 -generated: "2019-05-23T17:08:16.898581+07:00" diff --git a/sources/airflow/helm/airflow/requirements.yaml b/sources/airflow/helm/airflow/requirements.yaml deleted file mode 100644 index f9683d14..00000000 --- a/sources/airflow/helm/airflow/requirements.yaml +++ /dev/null @@ -1,9 +0,0 @@ -dependencies: -- name: postgresql - version: 0.13.1 - repository: https://kubernetes-charts.storage.googleapis.com/ - condition: postgresql.enabled -- name: redis - version: 7.0.0 - repository: https://kubernetes-charts.storage.googleapis.com/ - condition: redis.enabled diff --git a/sources/airflow/helm/airflow/templates/NOTES.txt b/sources/airflow/helm/airflow/templates/NOTES.txt deleted file mode 100644 index 5cbf031e..00000000 --- a/sources/airflow/helm/airflow/templates/NOTES.txt +++ /dev/null @@ -1,30 +0,0 @@ -Congratulations. You have just deployed Apache Airflow - -{{- if .Values.ingress.enabled }} -URL to Airflow and Flower: - - - Web UI: http://{{ .Values.ingress.web.host }}{{ .Values.ingress.web.path }}/ - - Flower: http://{{ .Values.ingress.flower.host }}{{ .Values.ingress.flower.path }}/ - -{{- else if contains "NodePort" .Values.airflow.service.type }} - -1. Get the Airflow URL by running these commands: - - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "airflow.fullname" . }})-web - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT/ - - {{- else if contains "LoadBalancer" .Values.airflow.service.type }} - - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of the service by running 'kubectl get svc -w {{ template "airflow.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "airflow.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP/ - - {{- else if contains "ClusterIP" .Values.airflow.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "component=web,app={{ template "airflow.name" . }}" -o jsonpath="{.items[0].metadata.name}") - echo http://127.0.0.1:8080 - kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 8080:8080 - -2. Open Airflow in your web browser -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/_helpers.tpl b/sources/airflow/helm/airflow/templates/_helpers.tpl deleted file mode 100644 index b253a1e0..00000000 --- a/sources/airflow/helm/airflow/templates/_helpers.tpl +++ /dev/null @@ -1,119 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "airflow.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "airflow.fullname" -}} -{{- printf "%s" .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "airflow.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "airflow.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "airflow.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Create a default fully qualified postgresql name or use the `postgresHost` value if defined. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "airflow.postgresql.fullname" -}} -{{- if .Values.postgresql.postgresHost }} - {{- .Values.postgresql.postgresHost -}} -{{- else }} - {{- $name := default "postgresql" .Values.postgresql.nameOverride -}} - {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} - - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -NOTE: This is copied from the redis sub-chart and modified slightly: -*/}} -{{- define "airflow.redis.fullname" -}} -{{- if .Values.redis.fullnameOverride -}} - {{- .Values.redis.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} - {{- $name := default "redis" .Values.redis.nameOverride -}} - {{- if contains $name .Release.Name -}} - {{- .Release.Name | trunc 63 | trimSuffix "-" -}} - {{- else -}} - {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} - {{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a default fully qualified redis cluster name or use the `redisHost` value if defined -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "airflow.redis.host" -}} -{{- if .Values.redis.redisHost }} - {{- .Values.redis.redisHost -}} -{{- else }} - {{- $name := default "redis" .Values.redis.nameOverride -}} - {{- printf "%s-%s-master" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} - -{{/* -Create a random string if the supplied key does not exist -*/}} -{{- define "airflow.defaultsecret" -}} -{{- if . -}} -{{- . | b64enc | quote -}} -{{- else -}} -{{- randAlphaNum 10 | b64enc | quote -}} -{{- end -}} -{{- end -}} - -{{/* -Create a set of environment variables to be mounted in web, scheduler, and woker pods. -For the database passwords, we actually use the secretes created by the postgres and redis sub-charts. -Note that the environment variables themselves are determined by the puckel/docker-airflow image. -See script/entrypoint.sh in that repo for more info. -The key names for postgres and redis are fixed, which is consistent with the subcharts. -*/}} -{{- define "airflow.mapenvsecrets" }} - - name: POSTGRES_USER - value: {{ default "postgres" .Values.postgresql.postgresUser | quote }} - {{- if or .Values.postgresql.existingSecret .Values.postgresql.enabled }} - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: {{ default (include "airflow.postgresql.fullname" .) .Values.postgresql.existingSecret }} - key: {{ .Values.postgresql.existingSecretKey }} - {{- end }} - {{- if or .Values.redis.existingSecret .Values.redis.enabled }} - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: {{ default (include "airflow.redis.fullname" .) .Values.redis.existingSecret }} - key: {{ .Values.redis.existingSecretKey }} - {{- end }} - {{- if .Values.airflow.extraEnv }} -{{ toYaml .Values.airflow.extraEnv | indent 2 }} - {{- end }} -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/configmap-env.yaml b/sources/airflow/helm/airflow/templates/configmap-env.yaml deleted file mode 100644 index e37d16eb..00000000 --- a/sources/airflow/helm/airflow/templates/configmap-env.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: "{{ template "airflow.fullname" . }}-env" - labels: - app: {{ template "airflow.name" . }} - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - ## Force UTC timezone - TZ: Etc/UTC - ## Postgres DB configuration - POSTGRES_HOST: "{{ template "airflow.postgresql.fullname" . }}" - POSTGRES_PORT: "{{ .Values.postgresql.service.port }}" - POSTGRES_DB: "{{ .Values.postgresql.postgresDatabase }}" - {{- if eq .Values.airflow.executor "Celery" }} - ## Redis DB configuration - REDIS_HOST: "{{ template "airflow.redis.host" . }}" - REDIS_PORT: "{{ .Values.redis.master.port }}" - AIRFLOW__CELERY__FLOWER_URL_PREFIX: "{{ .Values.flower.urlPrefix }}" - AIRFLOW__CELERY__WORKER_CONCURRENCY: "{{ .Values.workers.celery.instances }}" - ## Flower PORT - FLOWER_PORT: "5555" - # For backwards compat with AF < 1.10, CELERY_CONCURRENCY got renamed to WORKER_CONCURRENCY - AIRFLOW__CELERY__CELERY_CONCURRENCY: "{{ .Values.workers.celery.instances }}" - {{- end }} - # Configure puckel's docker-airflow entrypoint - EXECUTOR: "{{ .Values.airflow.executor }}" - FERNET_KEY: "{{ .Values.airflow.fernetKey }}" - DO_WAIT_INITDB: "false" - ## Custom Airflow settings - AIRFLOW__CORE__DONOT_PICKLE: "{{ .Values.dags.doNotPickle }}" - AIRFLOW__CORE__DAGS_FOLDER: "{{ .Values.dags.path }}" - AIRFLOW__CORE__BASE_LOG_FOLDER: "{{ .Values.logs.path }}" - AIRFLOW__CORE__DAG_PROCESSOR_MANAGER_LOG_LOCATION: "{{ printf "%s/%s" .Values.logs.path "dag_processor_manager/dag_processor_manager.log" }}" - AIRFLOW__SCHEDULER__CHILD_PROCESS_LOG_DIRECTORY: "{{ printf "%s/%s" .Values.logs.path "scheduler" }}" - AIRFLOW__WEBSERVER__BASE_URL: "{{ .Values.web.baseUrl }}" - # Disabling XCom pickling for forward compatibility - AIRFLOW__CORE__ENABLE_XCOM_PICKLING: "false" - # Note: changing `Values.airflow.config` won't change the configmap checksum and so won't make - # the pods to restart - {{- range $setting, $option := .Values.airflow.config }} - {{ $setting }}: "{{ $option }}" - {{- end }} diff --git a/sources/airflow/helm/airflow/templates/configmap-git-clone.yaml b/sources/airflow/helm/airflow/templates/configmap-git-clone.yaml deleted file mode 100644 index 6af10e08..00000000 --- a/sources/airflow/helm/airflow/templates/configmap-git-clone.yaml +++ /dev/null @@ -1,47 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "airflow.fullname" . }}-git-clone - labels: - app: {{ template "airflow.name" . }} - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - git-clone.sh: | - #!/bin/sh -e - REPO=$1 - REF=$2 - DIR=$3 - REPO_HOST=$4 - PRIVATE_KEY=$5 - {{- if .Values.dags.git.secret }} - mkdir -p ~/.ssh/ - cp -rL /keys/* ~/.ssh/ - chmod 600 ~/.ssh/* - echo -e "HOST $REPO_HOST\n IdentityFile ~/.ssh/$PRIVATE_KEY" > ~/.ssh/config - {{- end }} - # Init Containers will re-run on Pod restart. Remove the directory's contents - # and reprovision when this happens. - if [ -d "$DIR" ]; then - rm -rf $( find $DIR -mindepth 1 ) - fi - git clone $REPO $DIR - cd $DIR - git reset --hard $REF - git-sync.sh: | - #!/bin/sh -e - REPO=$1 - REF=$2 - DIR=$3 - REPO_HOST=$4 - PRIVATE_KEY=$5 - SYNC_TIME=$6 - {{- if .Values.dags.git.secret }} - mkdir -p ~/.ssh/ - cp -rL /keys/* ~/.ssh/ - chmod 600 ~/.ssh/* - echo -e "HOST $REPO_HOST\n IdentityFile ~/.ssh/$PRIVATE_KEY" > ~/.ssh/config - {{- end }} - cd $DIR - while true; do git pull; date; sleep $SYNC_TIME; done diff --git a/sources/airflow/helm/airflow/templates/configmap-scripts.yaml b/sources/airflow/helm/airflow/templates/configmap-scripts.yaml deleted file mode 100644 index 63398b76..00000000 --- a/sources/airflow/helm/airflow/templates/configmap-scripts.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "airflow.fullname" . }}-scripts - labels: - app: {{ template "airflow.name" . }} - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - install-requirements.sh: | - #!/bin/sh -e - if [ ! -d {{ .Values.dags.path }} ]; then - echo "No folder {{ .Values.dags.path }}" - exit 0 - fi - cd {{ .Values.dags.path }} - if [ -f requirements.txt ]; then - pip install --user -r requirements.txt - else - exit 0 - fi - stop-worker.sh: | - #!/bin/sh -e - celery -b $AIRFLOW__CELERY__BROKER_URL -d celery@$HOSTNAME control cancel_consumer default - - # wait 10 second before checking the status of the worker - sleep 10 - - while (( $(celery -b $AIRFLOW__CELERY__BROKER_URL inspect active --json | python -c "import sys, json; print(len(json.load(sys.stdin)['celery@$HOSTNAME']))") > 0 )); do - sleep 60 - done \ No newline at end of file diff --git a/sources/airflow/helm/airflow/templates/configmap-variables-pools.yaml b/sources/airflow/helm/airflow/templates/configmap-variables-pools.yaml deleted file mode 100644 index a8eb7adf..00000000 --- a/sources/airflow/helm/airflow/templates/configmap-variables-pools.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if or .Values.airflow.variables .Values.airflow.pools }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "airflow.fullname" . }}-variables-pools - labels: - app: {{ template "airflow.name" . }} - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{- if or .Values.airflow.variables }} - variables.json: | - {{ .Values.airflow.variables }} -{{- end }} -{{- if or .Values.airflow.pools }} - pools.json: | - {{ .Values.airflow.pools }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/sources/airflow/helm/airflow/templates/deployments-flower.yaml b/sources/airflow/helm/airflow/templates/deployments-flower.yaml deleted file mode 100644 index 393be735..00000000 --- a/sources/airflow/helm/airflow/templates/deployments-flower.yaml +++ /dev/null @@ -1,83 +0,0 @@ -{{- if .Values.workers.enabled -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "airflow.fullname" . }}-flower - labels: - app: {{ template "airflow.name" . }} - component: flower - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- with .Values.flower.labels }} -{{ toYaml . | indent 4 }} - {{- end }} - {{- with .Values.flower.annotations }} - annotations: -{{ toYaml . | indent 4 }} - {{- end }} -spec: - replicas: 1 - minReadySeconds: 10 - strategy: - type: RollingUpdate - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - selector: - matchLabels: - app: {{ template "airflow.name" . }} - component: flower - release: {{ .Release.Name }} - template: - metadata: - annotations: - checksum/config-env: {{ include (print $.Template.BasePath "/configmap-env.yaml") . | sha256sum }} - labels: - app: {{ template "airflow.name" . }} - component: flower - release: {{ .Release.Name }} - spec: - {{- if .Values.airflow.image.pullSecret }} - imagePullSecrets: - - name: {{ .Values.airflow.image.pullSecret }} - {{- end }} - restartPolicy: Always - {{- if .Values.flower.nodeSelector }} - nodeSelector: -{{ toYaml .Values.flower.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.flower.affinity }} - affinity: -{{ toYaml .Values.flower.affinity | indent 8 }} - {{- end }} - {{- if .Values.flower.tolerations }} - tolerations: -{{ toYaml .Values.flower.tolerations | indent 8 }} - {{- end }} - containers: - - name: {{ .Chart.Name }}-flower - image: {{ .Values.airflow.image.repository }}:{{ .Values.airflow.image.tag }} - imagePullPolicy: {{ .Values.airflow.image.pullPolicy }} - envFrom: - - configMapRef: - name: "{{ template "airflow.fullname" . }}-env" - env: - {{- include "airflow.mapenvsecrets" . | indent 10 }} - ports: - - name: flower - containerPort: 5555 - protocol: TCP - args: ["flower"] - livenessProbe: - httpGet: - path: "{{ .Values.ingress.flower.livenessPath }}/" - port: flower - initialDelaySeconds: 60 - periodSeconds: 60 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - resources: -{{ toYaml .Values.flower.resources | indent 12 }} -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/deployments-scheduler.yaml b/sources/airflow/helm/airflow/templates/deployments-scheduler.yaml deleted file mode 100644 index 27766397..00000000 --- a/sources/airflow/helm/airflow/templates/deployments-scheduler.yaml +++ /dev/null @@ -1,282 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "airflow.fullname" . }}-scheduler - labels: - app: {{ template "airflow.name" . }} - component: scheduler - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- with .Values.scheduler.labels }} -{{ toYaml . | indent 4 }} - {{- end }} - {{- with .Values.scheduler.annotations }} - annotations: -{{ toYaml . | indent 4 }} - {{- end }} -spec: - replicas: 1 - strategy: - # Kill the scheduler as soon as possible. It will restart quickly with all the workers, - # minimizing the time they are not synchronized. - type: RollingUpdate - rollingUpdate: - maxSurge: 0 - maxUnavailable: 100% - selector: - matchLabels: - app: {{ template "airflow.name" . }} - component: scheduler - release: {{ .Release.Name }} - template: - metadata: - annotations: - checksum/config-env: {{ include (print $.Template.BasePath "/configmap-env.yaml") . | sha256sum }} - checksum/config-git-clone: {{ include (print $.Template.BasePath "/configmap-git-clone.yaml") . | sha256sum }} - checksum/config-scripts: {{ include (print $.Template.BasePath "/configmap-scripts.yaml") . | sha256sum }} - checksum/config-variables-pools: {{ include (print $.Template.BasePath "/configmap-variables-pools.yaml") . | sha256sum }} - checksum/secret-connections: {{ include (print $.Template.BasePath "/secret-connections.yaml") . | sha256sum }} - {{- if and ( .Values.dags.git.url ) ( .Values.dags.git.ref ) }} - checksum/dags-git-ref: {{ .Values.dags.git.ref }} - {{- end }} -{{- if .Values.airflow.podAnnotations }} -{{ toYaml .Values.airflow.podAnnotations | indent 8 }} -{{- end }} - labels: - app: {{ template "airflow.name" . }} - component: scheduler - release: {{ .Release.Name }} - spec: - {{- if .Values.airflow.image.pullSecret }} - imagePullSecrets: - - name: {{ .Values.airflow.image.pullSecret }} - {{- end }} - restartPolicy: Always - {{- if .Values.scheduler.nodeSelector }} - nodeSelector: -{{ toYaml .Values.scheduler.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.scheduler.affinity }} - affinity: -{{ toYaml .Values.scheduler.affinity | indent 8 }} - {{- end }} - {{- if .Values.scheduler.tolerations }} - tolerations: -{{ toYaml .Values.scheduler.tolerations | indent 8 }} - {{- end }} - serviceAccountName: {{ template "airflow.serviceAccountName" . }} - {{- if .Values.dags.initContainer.enabled }} - initContainers: - - name: git-clone - image: {{ .Values.dags.initContainer.image.repository }}:{{ .Values.dags.initContainer.image.tag }} # Any image with git will do - imagePullPolicy: {{ .Values.dags.initContainer.image.pullPolicy }} - envFrom: - - configMapRef: - name: "{{ template "airflow.fullname" . }}-env" - env: - {{- include "airflow.mapenvsecrets" . | indent 10 }} - command: - - /usr/local/git/git-clone.sh - args: - - "{{ .Values.dags.git.url }}" - - "{{ .Values.dags.git.ref }}" - - "/dags" - - "{{ .Values.dags.git.repoHost}}" - - "{{ .Values.dags.git.privateKeyName }}" - volumeMounts: - - name: git-clone - mountPath: /usr/local/git - - name: dags-data - mountPath: /dags - {{- if .Values.dags.git.secret }} - - name: git-clone-secret - mountPath: /keys - {{- end }} - {{- end }} -{{- if and ( .Values.airflow.extraInitContainers ) ( .Values.dags.initContainer.enabled ) }} -{{ toYaml .Values.airflow.extraInitContainers | indent 8 }} -{{- else if and ( .Values.airflow.extraInitContainers ) ( not .Values.dags.initContainer.enabled ) }} - initContainers: -{{ toYaml .Values.airflow.extraInitContainers | indent 8 }} -{{- end }} - containers: - {{- if .Values.dags.git.gitSync.enabled }} - - name: git-sync - image: {{ .Values.dags.git.gitSync.image.repository }}:{{ .Values.dags.git.gitSync.image.tag }} # Any image with git will do - imagePullPolicy: {{ .Values.dags.git.gitSync.image.pullPolicy }} - envFrom: - - configMapRef: - name: "{{ template "airflow.fullname" . }}-env" - env: - {{- include "airflow.mapenvsecrets" . | indent 10 }} - command: - - /usr/local/git/git-sync.sh - args: - - "{{ .Values.dags.git.url }}" - - "{{ .Values.dags.git.ref }}" - - "/dags" - - "{{ .Values.dags.git.repoHost}}" - - "{{ .Values.dags.git.privateKeyName }}" - - "{{ .Values.dags.git.gitSync.refreshTime }}" - volumeMounts: - - name: git-clone - mountPath: /usr/local/git - - name: dags-data - mountPath: /dags - {{- if .Values.dags.git.secret }} - - name: git-clone-secret - mountPath: /keys - {{- end }} - {{- end }} - - name: {{ .Chart.Name }}-scheduler - image: {{ .Values.airflow.image.repository }}:{{ .Values.airflow.image.tag }} - imagePullPolicy: {{ .Values.airflow.image.pullPolicy}} - envFrom: - - configMapRef: - name: "{{ template "airflow.fullname" . }}-env" - env: - {{- include "airflow.mapenvsecrets" . | indent 10 }} - resources: -{{ toYaml .Values.scheduler.resources | indent 12 }} - volumeMounts: - - name: scripts - mountPath: /usr/local/scripts - {{- if .Values.persistence.enabled }} - - name: dags-data - mountPath: {{ .Values.dags.path }} - subPath: {{ .Values.persistence.subPath | default "" }} - {{- else if .Values.dags.initContainer.enabled }} - - name: dags-data - mountPath: {{ .Values.dags.path }} - {{- end }} - {{- if .Values.logsPersistence.enabled }} - - name: logs-data - mountPath: {{ .Values.logs.path }} - subPath: {{ .Values.logsPersistence.subPath | default "" }} - {{- end }} - {{- if .Values.airflow.connections }} - - name: connections - mountPath: /usr/local/connections - {{- end}} - {{- if or .Values.airflow.variables .Values.airflow.pools }} - - name: variables-pools - mountPath: /usr/local/variables-pools/ - {{- end}} - {{- range .Values.airflow.extraConfigmapMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - readOnly: {{ .readOnly }} - {{ if .subPath }} - subPath: {{ .subPath }} - {{ end }} - {{- end }} -{{- if .Values.airflow.extraVolumeMounts }} -{{ toYaml .Values.airflow.extraVolumeMounts | indent 12 }} -{{- end }} - args: - - "bash" - - "-c" - {{- if and ( .Values.dags.initContainer.enabled ) ( .Values.dags.initContainer.installRequirements ) }} - - > - echo 'waiting 10s...' && - sleep 10 && - echo 'installing requirements...' && - mkdir -p /usr/local/airflow/.local/bin && - export PATH=/usr/local/airflow/.local/bin:$PATH && - /usr/local/scripts/install-requirements.sh && - {{- if .Values.airflow.initdb }} - echo "executing initdb" && - airflow initdb && - {{- end }} - {{- if .Values.airflow.connections }} - echo "adding connections" && - /usr/local/connections/add-connections.sh && - {{- end }} - {{- if .Values.airflow.variables }} - echo "adding variables" && - airflow variables -i /usr/local/variables-pools/variables.json && - {{- end }} - {{- if .Values.airflow.pools }} - echo "adding pools" && - airflow pool -i /usr/local/variables-pools/pools.json && - {{- end }} - echo "executing scheduler" && - airflow scheduler -n {{ .Values.airflow.schedulerNumRuns }} - {{- else }} - - > - echo 'waiting 10s...' && - sleep 10 && - mkdir -p /usr/local/airflow/.local/bin && - export PATH=/usr/local/airflow/.local/bin:$PATH && - {{- if .Values.airflow.initdb }} - echo "executing initdb" && - airflow initdb && - {{- end }} - {{- if .Values.airflow.connections }} - echo "adding connections" && - /usr/local/connections/add-connections.sh && - {{- end }} - {{- if .Values.airflow.variables }} - echo "adding variables" && - airflow variables -i /usr/local/variables-pools/variables.json && - {{- end }} - {{- if .Values.airflow.pools }} - echo "adding pools" && - airflow pool -i /usr/local/variables-pools/pools.json && - {{- end }} - echo "executing scheduler" && - airflow scheduler -n {{ .Values.airflow.schedulerNumRuns }} - {{- end }} -{{- if .Values.airflow.extraContainers }} -{{ toYaml .Values.airflow.extraContainers | indent 8 }} -{{- end }} - volumes: - - name: scripts - configMap: - name: {{ template "airflow.fullname" . }}-scripts - defaultMode: 0755 - - name: dags-data - {{- if .Values.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim | default (include "airflow.fullname" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.logsPersistence.enabled }} - - name: logs-data - persistentVolumeClaim: - claimName: {{ .Values.logsPersistence.existingClaim | default (printf "%s-logs" (include "airflow.fullname" . | trunc 58 )) }} - {{- end }} - {{- if .Values.dags.initContainer.enabled }} - - name: git-clone - configMap: - name: {{ template "airflow.fullname" . }}-git-clone - defaultMode: 0755 - {{- if .Values.dags.git.secret }} - - name: git-clone-secret - secret: - secretName: {{ .Values.dags.git.secret }} - defaultMode: 0700 - {{- end }} - {{- end }} - {{- if .Values.airflow.connections }} - - name: connections - secret: - secretName: {{ template "airflow.fullname" . }}-connections - defaultMode: 0755 - {{- end }} - {{- if or .Values.airflow.variables .Values.airflow.pools }} - - name: variables-pools - configMap: - name: {{ template "airflow.fullname" . }}-variables-pools - defaultMode: 0755 - {{- end }} - {{- range .Values.airflow.extraConfigmapMounts }} - - name: {{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} -{{- if .Values.airflow.extraVolumes }} -{{ toYaml .Values.airflow.extraVolumes | indent 8 }} -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/deployments-web.yaml b/sources/airflow/helm/airflow/templates/deployments-web.yaml deleted file mode 100644 index e4d0aa91..00000000 --- a/sources/airflow/helm/airflow/templates/deployments-web.yaml +++ /dev/null @@ -1,260 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "airflow.fullname" . }}-web - labels: - app: {{ template "airflow.name" . }} - component: web - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- with .Values.web.labels }} -{{ toYaml . | indent 4 }} - {{- end }} - {{- with .Values.web.annotations }} - annotations: -{{ toYaml . | indent 4 }} - {{- end }} -spec: - replicas: {{ .Values.airflow.webReplicas }} - minReadySeconds: {{ .Values.web.minReadySeconds }} - strategy: - # Smooth rolling update of the Web UI - type: RollingUpdate - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - selector: - matchLabels: - app: {{ template "airflow.name" . }} - component: web - release: {{ .Release.Name }} - template: - metadata: - annotations: - checksum/config-env: {{ include (print $.Template.BasePath "/configmap-env.yaml") . | sha256sum }} - checksum/config-git-clone: {{ include (print $.Template.BasePath "/configmap-git-clone.yaml") . | sha256sum }} - checksum/config-scripts: {{ include (print $.Template.BasePath "/configmap-scripts.yaml") . | sha256sum }} - {{- if and ( .Values.dags.git.url ) ( .Values.dags.git.ref ) }} - checksum/dags-git-ref: {{ .Values.dags.git.ref }} - {{- end }} -{{- if .Values.airflow.podAnnotations }} -{{ toYaml .Values.airflow.podAnnotations | indent 8 }} -{{- end }} - labels: - app: {{ template "airflow.name" . }} - component: web - release: {{ .Release.Name }} - spec: - {{- if .Values.airflow.image.pullSecret }} - imagePullSecrets: - - name: {{ .Values.airflow.image.pullSecret }} - {{- end }} - restartPolicy: Always - {{- if .Values.web.nodeSelector }} - nodeSelector: -{{ toYaml .Values.web.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.web.affinity }} - affinity: -{{ toYaml .Values.web.affinity | indent 8 }} - {{- end }} - {{- if .Values.web.tolerations }} - tolerations: -{{ toYaml .Values.web.tolerations | indent 8 }} - {{- end }} - {{- if .Values.dags.initContainer.enabled }} - initContainers: - - name: git-clone - image: {{ .Values.dags.initContainer.image.repository }}:{{ .Values.dags.initContainer.image.tag }} # Any image with git will do - imagePullPolicy: {{ .Values.dags.initContainer.image.pullPolicy }} - envFrom: - - configMapRef: - name: "{{ template "airflow.fullname" . }}-env" - env: - {{- include "airflow.mapenvsecrets" . | indent 10 }} - command: - - /usr/local/git/git-clone.sh - args: - - "{{ .Values.dags.git.url }}" - - "{{ .Values.dags.git.ref }}" - - "/dags" - - "{{ .Values.dags.git.repoHost}}" - - "{{ .Values.dags.git.privateKeyName }}" - volumeMounts: - - name: git-clone - mountPath: /usr/local/git - - name: dags-data - mountPath: /dags - {{- if .Values.dags.git.secret }} - - name: git-clone-secret - mountPath: /keys - {{- end }} - {{- end }} - containers: - {{- if .Values.dags.git.gitSync.enabled }} - - name: git-sync - image: {{ .Values.dags.git.gitSync.image.repository }}:{{ .Values.dags.git.gitSync.image.tag }} # Any image with git will do - imagePullPolicy: {{ .Values.dags.git.gitSync.image.pullPolicy }} - envFrom: - - configMapRef: - name: "{{ template "airflow.fullname" . }}-env" - env: - {{- include "airflow.mapenvsecrets" . | indent 10 }} - command: - - /usr/local/git/git-sync.sh - args: - - "{{ .Values.dags.git.url }}" - - "{{ .Values.dags.git.ref }}" - - "/dags" - - "{{ .Values.dags.git.repoHost}}" - - "{{ .Values.dags.git.privateKeyName }}" - - "{{ .Values.dags.git.gitSync.refreshTime }}" - volumeMounts: - - name: git-clone - mountPath: /usr/local/git - - name: dags-data - mountPath: /dags - {{- if .Values.dags.git.secret }} - - name: git-clone-secret - mountPath: /keys - {{- end }} - {{- end }} - - name: {{ .Chart.Name }}-web - image: {{ .Values.airflow.image.repository }}:{{ .Values.airflow.image.tag }} - imagePullPolicy: {{ .Values.airflow.image.pullPolicy}} - ports: - - name: web - containerPort: 8080 - protocol: TCP - envFrom: - - configMapRef: - name: "{{ template "airflow.fullname" . }}-env" - env: - {{- include "airflow.mapenvsecrets" . | indent 10 }} - resources: -{{ toYaml .Values.web.resources | indent 12 }} - volumeMounts: - - name: scripts - mountPath: /usr/local/scripts - {{- $secretsDir := .Values.web.secretsDir -}} - {{- range .Values.web.secrets }} - - name: {{ . }}-volume - readOnly: true - mountPath: {{ $secretsDir }}/{{ . }} - {{- end }} - {{- if .Values.persistence.enabled }} - - name: dags-data - mountPath: {{ .Values.dags.path }} - subPath: {{ .Values.persistence.subPath | default "" }} - {{- else if .Values.dags.initContainer.enabled }} - - name: dags-data - mountPath: {{ .Values.dags.path }} - {{- end }} - {{- if .Values.logsPersistence.enabled }} - - name: logs-data - mountPath: {{ .Values.logs.path }} - subPath: {{ .Values.logsPersistence.subPath | default "" }} - {{- end }} - {{- range .Values.airflow.extraConfigmapMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - readOnly: {{ .readOnly }} - {{ if .subPath }} - subPath: {{ .subPath }} - {{ end }} - {{- end }} -{{- if .Values.airflow.extraVolumeMounts }} -{{ toYaml .Values.airflow.extraVolumeMounts | indent 12 }} -{{- end }} - args: - - "bash" - - "-c" - {{- if and ( .Values.dags.initContainer.enabled ) ( .Values.dags.initContainer.installRequirements ) }} - - > - echo 'waiting {{ .Values.web.initialStartupDelay }}s...' && - sleep {{ .Values.web.initialStartupDelay }} && - echo 'installing requirements...' && - mkdir -p /usr/local/airflow/.local/bin && - export PATH=/usr/local/airflow/.local/bin:$PATH && - /usr/local/scripts/install-requirements.sh && - echo 'executing webserver...' && - airflow webserver - {{- else }} - - > - echo 'waiting {{ .Values.web.initialStartupDelay }}s...' && - sleep {{ .Values.web.initialStartupDelay }} && - mkdir -p /usr/local/airflow/.local/bin && - export PATH=/usr/local/airflow/.local/bin:$PATH && - echo 'executing webserver...' && - airflow webserver - {{- end }} - livenessProbe: - httpGet: - {{- if .Values.ingress.web.livenessPath }} - path: "{{ .Values.ingress.web.livenessPath }}" - {{- else }} - path: "{{ .Values.ingress.web.path }}/health" - {{- end }} - port: web - ## Keep 6 minutes the delay to allow clean wait of postgres and redis containers - initialDelaySeconds: {{ .Values.web.initialDelaySeconds }} - periodSeconds: {{ .Values.web.livenessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.web.livenessProbe.timeoutSeconds }} - successThreshold: {{ .Values.web.livenessProbe.successThreshold }} - failureThreshold: {{ .Values.web.livenessProbe.failureThreshold }} - - readinessProbe: - httpGet: - path: "{{ .Values.ingress.web.path }}/health" - port: web - initialDelaySeconds: {{ .Values.web.initialDelaySeconds }} - periodSeconds: {{ .Values.web.readinessProbe.periodSeconds }} - timeoutSeconds: {{ .Values.web.readinessProbe.timeoutSeconds }} - successThreshold: {{ .Values.web.readinessProbe.successThreshold }} - failureThreshold: {{ .Values.web.readinessProbe.failureThreshold }} -{{- if .Values.airflow.extraContainers }} -{{ toYaml .Values.airflow.extraContainers | indent 8 }} -{{- end }} - volumes: - - name: scripts - configMap: - name: {{ template "airflow.fullname" . }}-scripts - defaultMode: 0755 - {{- range .Values.web.secrets }} - - name: {{ . }}-volume - secret: - secretName: {{ . }} - {{- end }} - - name: dags-data - {{- if .Values.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim | default (include "airflow.fullname" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.logsPersistence.enabled }} - - name: logs-data - persistentVolumeClaim: - claimName: {{ .Values.logsPersistence.existingClaim | default (printf "%s-logs" (include "airflow.fullname" . | trunc 58 )) }} - {{- end }} - {{- if .Values.dags.initContainer.enabled }} - - name: git-clone - configMap: - name: {{ template "airflow.fullname" . }}-git-clone - defaultMode: 0755 - {{- if .Values.dags.git.secret }} - - name: git-clone-secret - secret: - secretName: {{ .Values.dags.git.secret }} - defaultMode: 0700 - {{- end }} - {{- end }} - {{- range .Values.airflow.extraConfigmapMounts }} - - name: {{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} -{{- if .Values.airflow.extraVolumes }} -{{ toYaml .Values.airflow.extraVolumes | indent 8 }} -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/extra-manifests.yaml b/sources/airflow/helm/airflow/templates/extra-manifests.yaml deleted file mode 100644 index 0f015756..00000000 --- a/sources/airflow/helm/airflow/templates/extra-manifests.yaml +++ /dev/null @@ -1,4 +0,0 @@ -{{- range .Values.extraManifests }} ---- -{{ tpl (toYaml .) $ }} -{{- end }} \ No newline at end of file diff --git a/sources/airflow/helm/airflow/templates/ingress-flower.yaml b/sources/airflow/helm/airflow/templates/ingress-flower.yaml deleted file mode 100644 index c5f0e27f..00000000 --- a/sources/airflow/helm/airflow/templates/ingress-flower.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- if and (.Values.workers.enabled) (.Values.ingress.enabled) -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ template "airflow.fullname" . }}-flower - labels: - app: {{ template "airflow.name" . }} - component: flower - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" - annotations: - {{ range $key, $value := .Values.ingress.flower.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: -{{- if .Values.ingress.flower.tls.enabled }} - tls: - - hosts: - - {{ .Values.ingress.flower.host }} - secretName: {{ .Values.ingress.flower.tls.secretName }} -{{- end }} - rules: - - http: - paths: - - path: {{ .Values.ingress.flower.path }} - backend: - serviceName: {{ template "airflow.fullname" . }}-flower - servicePort: flower - host: {{ .Values.ingress.flower.host }} -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/ingress-web.yaml b/sources/airflow/helm/airflow/templates/ingress-web.yaml deleted file mode 100644 index 4d4a5a6a..00000000 --- a/sources/airflow/helm/airflow/templates/ingress-web.yaml +++ /dev/null @@ -1,43 +0,0 @@ -{{- if .Values.ingress.enabled -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ template "airflow.fullname" . }}-web - labels: - app: {{ template "airflow.name" . }} - component: web - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" - annotations: - {{ range $key, $value := .Values.ingress.web.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: -{{- if .Values.ingress.web.tls.enabled }} - tls: - - hosts: - - {{ .Values.ingress.web.host }} - secretName: {{ .Values.ingress.web.tls.secretName }} -{{- end }} - rules: - - http: - paths: - {{- range .Values.ingress.web.precedingPaths }} - - path: {{ .path }} - backend: - serviceName: {{ .serviceName }} - servicePort: {{ .servicePort }} - {{- end }} - - path: {{ .Values.ingress.web.path }} - backend: - serviceName: {{ template "airflow.fullname" . }}-web - servicePort: web - {{- range .Values.ingress.web.succeedingPaths }} - - path: {{ .path }} - backend: - serviceName: {{ .serviceName }} - servicePort: {{ .servicePort }} - {{- end }} - host: {{ .Values.ingress.web.host }} -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/poddisruptionbudget.yaml b/sources/airflow/helm/airflow/templates/poddisruptionbudget.yaml deleted file mode 100644 index 9b2755bc..00000000 --- a/sources/airflow/helm/airflow/templates/poddisruptionbudget.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.airflow.podDisruptionBudgetEnabled }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "airflow.fullname" . }}-pdb - labels: - app: {{ template "airflow.name" . }} - component: scheduler - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - selector: - matchLabels: - app: {{ template "airflow.name" . }} - component: scheduler - release: {{ .Release.Name }} -{{ toYaml .Values.airflow.podDisruptionBudget | indent 2 }} -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/prometheus-rule.yaml b/sources/airflow/helm/airflow/templates/prometheus-rule.yaml deleted file mode 100644 index 7ba9c19b..00000000 --- a/sources/airflow/helm/airflow/templates/prometheus-rule.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.prometheusRule.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: PrometheusRule -metadata: - name: {{ template "airflow.fullname" . }} - labels: - app: {{ template "airflow.name" . }} - chart: {{ template "airflow.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - {{- if .Values.prometheusRule.additionalLabels }} -{{ toYaml .Values.prometheusRule.additionalLabels | indent 4 }} - {{- end }} -spec: - groups: -{{ toYaml .Values.prometheusRule.groups | indent 4 }} -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/pvc-logs.yaml b/sources/airflow/helm/airflow/templates/pvc-logs.yaml deleted file mode 100644 index 24248d9c..00000000 --- a/sources/airflow/helm/airflow/templates/pvc-logs.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if and .Values.logsPersistence.enabled (not .Values.logsPersistence.existingClaim) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ printf "%s-logs" (include "airflow.fullname" . | trunc 58)}} - labels: - app: {{ template "airflow.fullname" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -spec: - accessModes: - - {{ .Values.logsPersistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.logsPersistence.size | quote }} -{{- if .Values.logsPersistence.storageClass }} -{{- if (eq "-" .Values.logsPersistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.logsPersistence.storageClass }}" -{{- end }} -{{- end }} -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/pvc.yaml b/sources/airflow/helm/airflow/templates/pvc.yaml deleted file mode 100644 index f13a2a40..00000000 --- a/sources/airflow/helm/airflow/templates/pvc.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ template "airflow.fullname" . }} - labels: - app: {{ template "airflow.fullname" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -spec: - accessModes: - - {{ .Values.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} -{{- if .Values.persistence.storageClass }} -{{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" -{{- end }} -{{- end }} -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/role-binding.yaml b/sources/airflow/helm/airflow/templates/role-binding.yaml deleted file mode 100644 index 654f429c..00000000 --- a/sources/airflow/helm/airflow/templates/role-binding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{ if .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: {{ template "airflow.fullname" . }} - labels: - app: {{ template "airflow.name" . }} - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "airflow.fullname" . }} -subjects: -- kind: ServiceAccount - name: {{ template "airflow.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -{{ end }} \ No newline at end of file diff --git a/sources/airflow/helm/airflow/templates/role.yaml b/sources/airflow/helm/airflow/templates/role.yaml deleted file mode 100644 index a1b67146..00000000 --- a/sources/airflow/helm/airflow/templates/role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{ if .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: {{ template "airflow.fullname" . }} - labels: - app: {{ template "airflow.name" . }} - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -rules: -- apiGroups: [""] - resources: - - pods - verbs: ["create", "get", "delete", "list", "watch"] -- apiGroups: [""] - resources: - - "pods/log" - verbs: ["get", "list"] -- apiGroups: [""] - resources: - - "pods/exec" - verbs: ["create", "get"] -{{ end }} \ No newline at end of file diff --git a/sources/airflow/helm/airflow/templates/secret-connections.yaml b/sources/airflow/helm/airflow/templates/secret-connections.yaml deleted file mode 100644 index 34c35ecc..00000000 --- a/sources/airflow/helm/airflow/templates/secret-connections.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- define "connections.script" }} - #!/bin/sh -e - {{- range .Values.airflow.connections }} - airflow connections --add --conn_type {{ .type }} --conn_id {{ .id }} - {{- if .uri }} --conn_uri {{ .uri | quote }} {{ end -}} - {{- if .host }} --conn_host {{ .host | quote }} {{ end -}} - {{- if .login }} --conn_login {{ .login | quote }} {{ end -}} - {{- if .password }} --conn_password {{ .password | quote }} {{ end -}} - {{- if .schema }} --conn_schema {{ .schema | quote }} {{ end -}} - {{- if .port }} --conn_port {{ .port }} {{ end -}} - {{- if .extra }} --conn_extra {{ .extra | quote }} {{ end -}} - {{- end }} -{{- end }} -{{- if .Values.airflow.connections }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "airflow.fullname" . }}-connections - labels: - app: {{ template "airflow.fullname" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -type: Opaque -data: - add-connections.sh: {{ include "connections.script" . | b64enc }} -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/service-account.yaml b/sources/airflow/helm/airflow/templates/service-account.yaml deleted file mode 100644 index 0f6022e6..00000000 --- a/sources/airflow/helm/airflow/templates/service-account.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{ if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "airflow.serviceAccountName" . }} - labels: - app: {{ template "airflow.name" . }} - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{ end }} \ No newline at end of file diff --git a/sources/airflow/helm/airflow/templates/service-flower.yaml b/sources/airflow/helm/airflow/templates/service-flower.yaml deleted file mode 100644 index a39edab3..00000000 --- a/sources/airflow/helm/airflow/templates/service-flower.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.workers.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ template "airflow.fullname" . }}-flower - labels: - app: {{ template "airflow.name" . }} - component: flower - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - annotations: - {{- if .Values.flower.service.annotations }} -{{ toYaml .Values.flower.service.annotations | trim | indent 4 }} - {{- end }} -spec: - type: {{ .Values.flower.service.type | default "ClusterIP" }} - selector: - app: {{ template "airflow.name" . }} - component: flower - release: {{ .Release.Name }} - ports: - - name: flower - protocol: TCP - port: {{ .Values.flower.service.externalPort | default 5555 }} - targetPort: 5555 -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/service-web.yaml b/sources/airflow/helm/airflow/templates/service-web.yaml deleted file mode 100644 index 0a2151a8..00000000 --- a/sources/airflow/helm/airflow/templates/service-web.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "airflow.fullname" . }}-web - labels: - app: {{ template "airflow.name" . }} - component: web - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - annotations: - {{- if .Values.airflow.service.annotations }} -{{ toYaml .Values.airflow.service.annotations | trim | indent 4 }} - {{- end }} -spec: - type: {{ .Values.airflow.service.type }} - selector: - app: {{ template "airflow.name" . }} - component: web - release: {{ .Release.Name }} - sessionAffinity: {{ .Values.airflow.service.sessionAffinity }} - sessionAffinityConfig: -{{- if .Values.airflow.service.sessionAffinityConfig }} -{{ toYaml .Values.airflow.service.sessionAffinityConfig | indent 4 }} -{{- end }} - ports: - - name: web - protocol: TCP - port: {{ .Values.airflow.service.externalPort | default 8080 }} - {{- if (and (eq .Values.airflow.service.type "NodePort") (not (empty .Values.airflow.service.nodePort.http))) }} - nodePort: {{ .Values.airflow.service.nodePort.http }} - {{- end }} - targetPort: 8080 diff --git a/sources/airflow/helm/airflow/templates/service-worker.yaml b/sources/airflow/helm/airflow/templates/service-worker.yaml deleted file mode 100644 index 02c7a728..00000000 --- a/sources/airflow/helm/airflow/templates/service-worker.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.workers.enabled -}} -# Headless service for stable DNS entries of StatefulSet members. -apiVersion: v1 -kind: Service -metadata: - name: {{ template "airflow.fullname" . }}-worker - labels: - app: {{ template "airflow.name" . }} - component: worker - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - ports: - - name: worker - protocol: TCP - port: 8793 - clusterIP: None - selector: - app: {{ template "airflow.name" . }} - component: worker -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/servicemonitor.yaml b/sources/airflow/helm/airflow/templates/servicemonitor.yaml deleted file mode 100644 index 37c43b3b..00000000 --- a/sources/airflow/helm/airflow/templates/servicemonitor.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.serviceMonitor.enabled }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "airflow.fullname" . }} - labels: - app: {{ template "airflow.name" . }} - component: worker - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- range $key, $value := .Values.serviceMonitor.selector }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - selector: - matchLabels: - app: {{ template "airflow.name" . }} - component: web - release: {{ .Release.Name }} - endpoints: - - port: web - path: {{ .Values.serviceMonitor.path }} - interval: {{ .Values.serviceMonitor.interval }} -{{- end }} diff --git a/sources/airflow/helm/airflow/templates/statefulsets-workers.yaml b/sources/airflow/helm/airflow/templates/statefulsets-workers.yaml deleted file mode 100644 index abab5f89..00000000 --- a/sources/airflow/helm/airflow/templates/statefulsets-workers.yaml +++ /dev/null @@ -1,250 +0,0 @@ -{{- if .Values.workers.enabled -}} -## Workers are not in deployment, but in StatefulSet, to allow each worker expose a mini-server -## that only serve logs, that will be used by the web server. - -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "airflow.fullname" . }}-worker - labels: - app: {{ template "airflow.name" . }} - component: worker - chart: {{ template "airflow.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- with .Values.workers.labels }} -{{ toYaml . | indent 4 }} - {{- end }} - {{- with .Values.workers.annotations }} - annotations: -{{ toYaml . | indent 4 }} - {{- end }} -spec: - serviceName: "{{ template "airflow.fullname" . }}-worker" - updateStrategy: - ## Kill the workers as soon as possible, the scheduler will restart the failed job later - type: RollingUpdate - ## Use experimental burst mode for faster StatefulSet scaling - ## https://github.com/kubernetes/kubernetes/commit/c2c5051adf096ffd48bf1dcf5b11cb47e464ecdd - podManagementPolicy: Parallel - replicas: {{ .Values.workers.replicas }} - selector: - matchLabels: - app: {{ template "airflow.name" . }} - component: worker - release: {{ .Release.Name }} - template: - metadata: - annotations: - checksum/config-env: {{ include (print $.Template.BasePath "/configmap-env.yaml") . | sha256sum }} - checksum/config-git-clone: {{ include (print $.Template.BasePath "/configmap-git-clone.yaml") . | sha256sum }} - checksum/config-scripts: {{ include (print $.Template.BasePath "/configmap-scripts.yaml") . | sha256sum }} -{{- if .Values.airflow.podAnnotations }} -{{ toYaml .Values.airflow.podAnnotations | indent 8 }} -{{- end }} -{{- if .Values.workers.podAnnotations }} -{{ toYaml .Values.workers.podAnnotations | indent 8 }} -{{- end }} - labels: - app: {{ template "airflow.name" . }} - component: worker - release: {{ .Release.Name }} - spec: - {{- if .Values.airflow.image.pullSecret }} - imagePullSecrets: - - name: {{ .Values.airflow.image.pullSecret }} - {{- end }} - restartPolicy: Always - terminationGracePeriodSeconds: {{ .Values.workers.terminationPeriod }} - serviceAccountName: {{ template "airflow.serviceAccountName" . }} - {{- if .Values.workers.nodeSelector }} - nodeSelector: -{{ toYaml .Values.workers.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.workers.affinity }} - affinity: -{{ toYaml .Values.workers.affinity | indent 8 }} - {{- end }} - {{- if .Values.workers.tolerations }} - tolerations: -{{ toYaml .Values.workers.tolerations | indent 8 }} - {{- end }} - - {{- if .Values.dags.initContainer.enabled }} - initContainers: - - name: git-clone - image: {{ .Values.dags.initContainer.image.repository }}:{{ .Values.dags.initContainer.image.tag }} # Any image with git will do - imagePullPolicy: {{ .Values.dags.initContainer.image.pullPolicy }} - envFrom: - - configMapRef: - name: "{{ template "airflow.fullname" . }}-env" - env: - {{- include "airflow.mapenvsecrets" . | indent 10 }} - command: - - /usr/local/git/git-clone.sh - args: - - "{{ .Values.dags.git.url }}" - - "{{ .Values.dags.git.ref }}" - - "/dags" - - "{{ .Values.dags.git.repoHost}}" - - "{{ .Values.dags.git.privateKeyName }}" - volumeMounts: - - name: git-clone - mountPath: /usr/local/git - - name: dags-data - mountPath: /dags - {{- if .Values.dags.git.secret }} - - name: git-clone-secret - mountPath: /keys - {{- end }} - {{- end }} - containers: - {{- if .Values.dags.git.gitSync.enabled }} - - name: git-sync - image: {{ .Values.dags.git.gitSync.image.repository }}:{{ .Values.dags.git.gitSync.image.tag }} # Any image with git will do - imagePullPolicy: {{ .Values.dags.git.gitSync.image.pullPolicy }} - envFrom: - - configMapRef: - name: "{{ template "airflow.fullname" . }}-env" - env: - {{- include "airflow.mapenvsecrets" . | indent 10 }} - command: - - /usr/local/git/git-sync.sh - args: - - "{{ .Values.dags.git.url }}" - - "{{ .Values.dags.git.ref }}" - - "/dags" - - "{{ .Values.dags.git.repoHost}}" - - "{{ .Values.dags.git.privateKeyName }}" - - "{{ .Values.dags.git.gitSync.refreshTime }}" - volumeMounts: - - name: git-clone - mountPath: /usr/local/git - - name: dags-data - mountPath: /dags - {{- if .Values.dags.git.secret }} - - name: git-clone-secret - mountPath: /keys - {{- end }} - {{- end }} - - name: {{ .Chart.Name }}-worker - imagePullPolicy: {{ .Values.airflow.image.pullPolicy }} - image: "{{ .Values.airflow.image.repository }}:{{ .Values.airflow.image.tag }}" - {{- if and (eq .Values.airflow.executor "Celery") (.Values.workers.celery.gracefullTermination)}} - lifecycle: - preStop: - exec: - command: ["/entrypoint.sh","/usr/local/scripts/stop-worker.sh"] - {{- end}} - envFrom: - - configMapRef: - name: "{{ template "airflow.fullname" . }}-env" - env: - {{- include "airflow.mapenvsecrets" . | indent 10 }} - volumeMounts: - - name: scripts - mountPath: /usr/local/scripts - {{- $secretsDir := .Values.workers.secretsDir -}} - {{- range .Values.workers.secrets }} - - name: {{ . }}-volume - readOnly: true - mountPath: {{ $secretsDir }}/{{ . }} - {{- end }} - {{- if .Values.persistence.enabled }} - - name: dags-data - mountPath: {{ .Values.dags.path }} - subPath: {{ .Values.persistence.subPath | default "" }} - {{- else if .Values.dags.initContainer.enabled }} - - name: dags-data - mountPath: {{ .Values.dags.path }} - {{- end }} - {{- if .Values.logsPersistence.enabled }} - - name: logs-data - mountPath: {{ .Values.logs.path }} - subPath: {{ .Values.logsPersistence.subPath | default "" }} - {{- end }} - {{- range .Values.airflow.extraConfigmapMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - readOnly: {{ .readOnly }} - {{ if .subPath }} - subPath: {{ .subPath }} - {{ end }} - {{- end }} -{{- if .Values.airflow.extraVolumeMounts }} -{{ toYaml .Values.airflow.extraVolumeMounts | indent 12 }} -{{- end }} - args: - - "bash" - - "-c" - {{- if and ( .Values.dags.initContainer.enabled ) ( .Values.dags.initContainer.installRequirements ) }} - - > - echo 'waiting 60s...' && - sleep 60 && - echo 'installing requirements...' && - mkdir -p /usr/local/airflow/.local/bin && - export PATH=/usr/local/airflow/.local/bin:$PATH && - /usr/local/scripts/install-requirements.sh && - echo 'executing worker...' && - airflow worker - {{- else }} - - > - echo 'waiting 60s...' && - sleep 60 && - mkdir -p /usr/local/airflow/.local/bin && - export PATH=/usr/local/airflow/.local/bin:$PATH && - echo 'executing worker...' && - airflow worker - {{- end }} - ports: - - name: wlog - containerPort: 8793 - protocol: TCP - resources: -{{ toYaml .Values.workers.resources | indent 12 }} -{{- if .Values.airflow.extraContainers }} -{{ toYaml .Values.airflow.extraContainers | indent 8 }} -{{- end }} - volumes: - - name: scripts - configMap: - name: {{ template "airflow.fullname" . }}-scripts - defaultMode: 0755 - {{- range .Values.workers.secrets }} - - name: {{ . }}-volume - secret: - secretName: {{ . }} - {{- end }} - - name: dags-data - {{- if .Values.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim | default (include "airflow.fullname" .) }} - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.logsPersistence.enabled }} - - name: logs-data - persistentVolumeClaim: - claimName: {{ .Values.logsPersistence.existingClaim | default (printf "%s-logs" (include "airflow.fullname" . | trunc 58 )) }} - {{- end }} - {{- if .Values.dags.initContainer.enabled }} - - name: git-clone - configMap: - name: {{ template "airflow.fullname" . }}-git-clone - defaultMode: 0755 - {{- if .Values.dags.git.secret }} - - name: git-clone-secret - secret: - secretName: {{ .Values.dags.git.secret }} - defaultMode: 0700 - {{- end }} - {{- end }} - {{- range .Values.airflow.extraConfigmapMounts }} - - name: {{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} -{{- if .Values.airflow.extraVolumes }} -{{ toYaml .Values.airflow.extraVolumes | indent 8 }} -{{- end }} -{{- end }} diff --git a/sources/airflow/helm/airflow/values.yaml b/sources/airflow/helm/airflow/values.yaml deleted file mode 100644 index b8543a68..00000000 --- a/sources/airflow/helm/airflow/values.yaml +++ /dev/null @@ -1,714 +0,0 @@ -# Duplicate this file and put your customization here - -## -## common settings and setting for the webserver -airflow: - extraConfigmapMounts: [] - # - name: extra-metadata - # mountPath: /opt/metadata - # configMap: airflow-metadata - # readOnly: true - # - # Example of configmap mount with subPath - # - name: extra-metadata - # mountPath: /opt/metadata/file.yaml - # configMap: airflow-metadata - # readOnly: true - # subPath: file.yaml - - - ## - ## Extra environment variables to mount in the web, scheduler, and worker pods: - extraEnv: - # - name: AIRFLOW__CORE__FERNET_KEY - # valueFrom: - # secretKeyRef: - # name: airflow - # key: fernet_key - # - name: AIRFLOW__LDAP__BIND_PASSWORD - # valueFrom: - # secretKeyRef: - # name: ldap - # key: password - - - ## - ## You will need to define your fernet key: - ## Generate fernetKey with: - ## python -c "from cryptography.fernet import Fernet; FERNET_KEY = Fernet.generate_key().decode(); print(FERNET_KEY)" - ## fernetKey: ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD - fernetKey: "" - service: - annotations: {} - sessionAffinity: "None" - sessionAffinityConfig: {} - type: ClusterIP - externalPort: 8080 - nodePort: - http: - ## - ## The executor to use. - ## - executor: Celery - ## - ## set the max number of retries during container initialization - initRetryLoop: - ## - ## base image for webserver/scheduler/workers - ## Note: If you want to use airflow HEAD (2.0dev), use the following image: - # image - # repository: stibbons31/docker-airflow-dev - # tag: 2.0dev - ## Airflow 2.0 allows changing the value ingress.web.path and ingress.flower.path (see bellow). - ## In version < 2.0, changing these paths won't have any effect. - image: - ## - ## docker-airflow image - repository: puckel/docker-airflow - ## - ## image tag - tag: 1.10.4 - ## - ## Image pull policy - ## values: Always or IfNotPresent - pullPolicy: IfNotPresent - ## - ## image pull secret for private images - pullSecret: - ## - ## Set schedulerNumRuns to control how the scheduler behaves: - ## -1 will let him looping indefinitively but it will never update the DAG - ## 1 will have the scheduler quit after each refresh, but kubernetes will restart it. - ## - ## A long running scheduler process, at least with the CeleryExecutor, ends up not scheduling - ## some tasks. We still don’t know the exact cause, unfortunately. Airflow has a built-in - ## workaround in the form of the `num_runs` flag. - ## Airflow runs with num_runs set to 5. - ## - ## If set to a value != -1, you will see your scheduler regularly restart. This is its normal - ## behavior under these conditions. - schedulerNumRuns: "-1" - ## - ## Set schedulerDoPickle to toggle whether to have the scheduler - ## attempt to pickle the DAG object to send over to the workers, - ## instead of letting workers run their version of the code. - ## See the Airflow documentation for the --do_pickle argument: https://airflow.apache.org/cli.html#scheduler - schedulerDoPickle: true - ## - ## Number of replicas for web server. - webReplicas: 1 - ## - ## Custom airflow configuration environment variables - ## Use this to override any airflow setting settings defining environment variables in the - ## following form: AIRFLOW__
__. - ## See the Airflow documentation: https://airflow.readthedocs.io/en/stable/howto/set-config.html?highlight=setting-configuration - ## Example: - ## config: - ## AIRFLOW__CORE__EXPOSE_CONFIG: "True" - ## HTTP_PROXY: "http://proxy.mycompany.com:123" - config: {} - ## - ## Configure pod disruption budget for the scheduler - podDisruptionBudgetEnabled: true - podDisruptionBudget: - maxUnavailable: 1 - ## Add custom connections - ## Use this to add Airflow connections for operators you use - ## For each connection - the id and type have to be defined. - ## All the other parameters are optional - ## Connections will be created with a script that is stored - ## in a K8s secret and mounted into the scheduler container - ## Example: - ## connections: - ## - id: my_aws - ## type: aws - ## extra: '{"aws_access_key_id": "**********", "aws_secret_access_key": "***", "region_name":"eu-central-1"}' - connections: [] - - ## Add airflow variables - ## This should be a json string with your variables in it - ## Examples: - ## variables: '{ "environment": "dev" }' - variables: {} - - ## Add airflow ppols - ## This should be a json string with your pools in it - ## Examples: - ## pools: '{ "example": { "description": "This is an example of a pool", "slots": 2 } }' - pools: {} - - ## - ## Annotations for the Scheduler, Worker and Web pods - podAnnotations: {} - ## Example: - ## iam.amazonaws.com/role: airflow-Role - - extraInitContainers: [] - ## Additional init containers to run before the Scheduler pods. - ## for example, be used to run a sidecar that chown Logs storage . - # - name: volume-mount-hack - # image: busybox - # command: ["sh", "-c", "chown -R 1000:1000 logs"] - # volumeMounts: - # - mountPath: /usr/local/airflow/logs - # name: logs-data - - extraContainers: [] - ## Additional containers to run alongside the Scheduler, Worker and Web pods - ## This could, for example, be used to run a sidecar that syncs DAGs from object storage. - # - name: s3-sync - # image: my-user/s3sync:latest - # volumeMounts: - # - name: synchronised-dags - # mountPath: /dags - extraVolumeMounts: [] - ## Additional volumeMounts to the main containers in the Scheduler, Worker and Web pods. - # - name: synchronised-dags - # mountPath: /usr/local/airflow/dags - extraVolumes: [] - ## Additional volumes for the Scheduler, Worker and Web pods. - # - name: synchronised-dags - # emptyDir: {} - - ## - ## Run initdb when the scheduler starts. - initdb: true - - -scheduler: - resources: {} - # limits: - # cpu: "1000m" - # memory: "1Gi" - # requests: - # cpu: "500m" - # memory: "512Mi" - ## - ## Labels for the scheduler deployment - labels: {} - ## - ## Annotations for the scheduler deployment - annotations: {} - - ## Support Node, affinity and tolerations for scheduler pod assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature - nodeSelector: {} - affinity: {} - tolerations: [] - -flower: - ## - ## Set AIRFLOW__CELERY__FLOWER_URL_PREFIX - ## Prefix should match Ingress configuration ingress.flower.path - urlPrefix: "" - resources: {} - # limits: - # cpu: "100m" - # memory: "128Mi" - # requests: - # cpu: "100m" - # memory: "128Mi" - ## - ## Labels for the flower deployment - labels: {} - ## - ## Annotations for the flower deployment - annotations: {} - service: - annotations: {} - type: ClusterIP - externalPort: 5555 - - ## Support Node, affinity and tolerations for flower pod assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature - nodeSelector: {} - affinity: {} - tolerations: [] - -web: - ## - ## Set AIRFLOW__WEBSERVER__BASE_URL - ## Path should match Ingress configuration - baseUrl: "http://localhost:8080" - resources: {} - # limits: - # cpu: "300m" - # memory: "1Gi" - # requests: - # cpu: "100m" - # memory: "512Mi" - ## - ## Labels for the web deployment - labels: {} - ## - ## Annotations for the web deployment - annotations: {} - initialStartupDelay: "60" - initialDelaySeconds: "360" - minReadySeconds: 120 - readinessProbe: - periodSeconds: 60 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - livenessProbe: - periodSeconds: 60 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - - - ## Support Node, affinity and tolerations for web pod assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature - nodeSelector: {} - affinity: {} - tolerations: [] - ## - ## Directory in which to mount secrets on webserver nodes. - secretsDir: /var/airflow/secrets - ## - ## Secrets which will be mounted as a file at `secretsDir/`. - secrets: [] - -## -## Workers configuration -workers: - enabled: true - ## - ## Number of workers pod to launch - replicas: 1 - ## - ## Gracefull termination period - terminationPeriod: 30 - ## - ## Custom resource configuration - resources: {} - # limits: - # cpu: "1" - # memory: "2G" - # requests: - # cpu: "0.5" - # memory: "512Mi" - ## - ## Labels for the Worker statefulSet - labels: {} - ## - ## Annotations for the Worker statefulSet - annotations: {} - ## - ## Annotations for the Worker pods - podAnnotations: {} - ## Example: - ## iam.amazonaws.com/role: airflow-Role - ## - ## Celery worker configuration - celery: - ## - ## number of parallel celery tasks per worker - instances: 1 - ## - ## Gracefull termination of workers - ## Wait for the worker to finish the current task within the gracefull period - gracefullTermination: false - - ## - ## Directory in which to mount secrets on worker nodes. - secretsDir: /var/airflow/secrets - ## - ## Secrets which will be mounted as a file at `secretsDir/`. - secrets: [] - - ## Support Node, affinity and tolerations for worker pod assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature - nodeSelector: {} - affinity: {} - tolerations: [] - -## -## Ingress configuration -ingress: - ## - ## enable ingress - ## Note: If you want to change url prefix for web ui or flower even if you do not use ingress, - ## you can change web.baseUrl and flower.urlPrefix - enabled: false - ## - ## Configure the Ingress webserver endpoint - web: - ## NOTE: This requires an airflow version > 1.9.x - ## For the moment (March 2018) this is **not** available on official package, you will have - ## to use an image where airflow has been updated to its current HEAD. - ## You can use the following one: - ## stibbons31/docker-airflow-dev:2.0dev - ## - ## if path is '/airflow': - ## - UI will be accessible at 'http://mycompany.com/airflow/admin' - ## - Healthcheck is at 'http://mycompany.com/airflow/health' - ## - api is at 'http://mycompany.com/airflow/api' - ## NOTE: do NOT keep trailing slash. For root configuration, set and empty string - path: "" - ## - ## Ingress hostname for the webserver - host: "" - ## - ## Annotations for the webserver - ## Airflow webserver handles relative path completely, just let your load balancer give the HTTP - ## header like the requested URL (no special configuration neeed) - annotations: {} - ## - ## Example for Traefik: - # traefik.frontend.rule.type: PathPrefix - # kubernetes.io/ingress.class: traefik - ## - ## Configure the web liveness path. - ## Defaults to the templated value `{{ ingress.web.path }}/health` - livenessPath: - tls: - ## Set to "true" to enable TLS termination at the ingress - enabled: false - ## If enabled, set "secretName" to the secret containing the TLS private key and certificate - ## Example: - ## secretName: example-com-crt - precedingPaths: - ## Different http paths to add to the ingress before the default path - ## Example: - ## - path: "/*" - ## serviceName: "ssl-redirect" - ## servicePort: "use-annotation" - succeedingPaths: - ## Different http paths to add to the ingress after the default path - ## Example: - ## - path: "/*" - ## serviceName: "ssl-redirect" - ## servicePort: "use-annotation" - - ## - ## Configure the flower Ingress endpoint - flower: - ## - ## If flower is '/airflow/flower': - ## - Flower UI is at 'http://mycompany.com/airflow/flower' - ## NOTE: you need to have a reverse proxy/load balancer able to do URL rewrite in order to have - ## flower mounted on other path than root. Flower only does half the job in url prefixing: it - ## only generates the right URL/relative paths in the **returned HTML files**, but expects the - ## request to have been be at the root. - ## That's why we need a reverse proxy/load balancer that is able to strip the path - ## NOTE: do NOT keep trailing slash. For root configuration, set and empty string - path: "" - ## - ## Configure the liveness path. Keep to "/" for Flower >= jan 2018. - ## For previous version, enter the same path than in the 'path' key - ## NOTE: keep the trailing slash. - livenessPath: / - ## - ## hostname for flower - host: "" - ## - ## Annotation for the Flower endpoint - ## - ## ==== SKIP THE FOLLOWING BLOCK IF YOU HAVE FLOWER > JANUARY 2018 ============================= - ## Please note their is a small difference between the way Airflow Web server and Flower handles - ## URL prefixes in HTTP requests: - ## Flower wants HTTP header to behave like there was no URL prefix, and but still generates - ## the right URL in html pages thanks to its `--url-prefix` parameter - ## - ## Extracted from the Flower documentation: - ## (https://github.com/mher/flower/blob/master/docs/config.rst#url_prefix) - ## - ## To access Flower on http://example.com/flower run it with: - ## flower --url-prefix=/flower - ## - ## Use the following nginx configuration: - ## server { - ## listen 80; - ## server_name example.com; - ## - ## location /flower/ { - ## rewrite ^/flower/(.*)$ /$1 break; - ## proxy_pass http://example.com:5555; - ## proxy_set_header Host $host; - ## } - ## } - ## ==== IF YOU HAVE FLOWER > JANUARY 2018, NO MORE NEED TO STRIP THE PREFIX ==================== - annotations: {} - ## - ## NOTE: it is important here to have your reverse proxy strip the path/rewrite the URL - ## Example for Traefik: - # traefik.frontend.rule.type: PathPrefix ## Flower >= Jan 2018 - # traefik.frontend.rule.type: PathPrefixStrip ## Flower < Jan 2018 - # kubernetes.io/ingress.class: traefik - tls: - ## Set to "true" to enable TLS termination at the ingress - enabled: false - ## If enabled, set "secretName" to the secret containing the TLS private key and certificate - ## Example: - ## secretName: example-com-crt - - -## -## Storage configuration for DAGs -persistence: - ## - ## enable persistance storage - enabled: false - ## - ## Existing claim to use - # existingClaim: nil - ## Existing claim's subPath to use, e.g. "dags" (optional) - # subPath: "" - ## - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - # storageClass: default - accessMode: ReadWriteOnce - ## - ## Persistant storage size request - size: 1Gi - -## -## Storage configuration for logs -logsPersistence: - ## - ## enable persistance storage - enabled: false - ## - ## Existing claim to use - # existingClaim: nil - ## Existing claim's subPath to use, e.g. "logs" (optional) - # subPath: "" - ## - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - ## A configuration for shared log storage requires a `storageClass` that - ## supports the `ReadWriteMany` accessMode, such as NFS or AWS EFS. - # storageClass: default - accessMode: ReadWriteOnce - ## - ## Persistant storage size request - size: 1Gi - -## -## Configure DAGs deployment and update -dags: - ## - ## mount path for persistent volume. - ## Note that this location is referred to in airflow.cfg, so if you change it, you must update airflow.cfg accordingly. - path: /usr/local/airflow/dags - ## - ## Set to True to prevent pickling DAGs from scheduler to workers - doNotPickle: false - ## - ## Configure Git repository to fetch DAGs - git: - ## - ## url to clone the git repository - url: - ## - ## branch name, tag or sha1 to reset to - ref: master - ## pre-created secret with key, key.pub and known_hosts file for private repos - secret: "" - ## The host of the repo so for example if a github repo put github.com (Only need if using ssh not https git sync) - repoHost: "" - ## The name of the private key in your git sync secret (Only need if using ssh not https git sync) - privateKeyName: "" - gitSync: - ## Turns on the side car container - enabled: false - ## Image for the side car container - image: - ## docker-airflow image - repository: alpine/git - ## image tag - tag: 1.0.7 - ## Image pull policy - ## values: Always or IfNotPresent - pullPolicy: IfNotPresent - ## The amount of time in seconds to git pull dags - refreshTime: - initContainer: - ## Fetch the source code when the pods starts - enabled: false - ## Image for the init container (any image with git will do) - image: - ## docker-airflow image - repository: alpine/git - ## image tag - tag: 1.0.7 - ## Image pull policy - ## values: Always or IfNotPresent - pullPolicy: IfNotPresent - ## install requirements.txt dependencies automatically - installRequirements: true - -## -## Configure logs -logs: - path: /usr/local/airflow/logs - -## -## Enable RBAC -rbac: - ## - ## Specifies whether RBAC resources should be created - create: true - -## -## Create or use ServiceAccount -serviceAccount: - ## - ## Specifies whether a ServiceAccount should be created - create: true - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the fullname template - name: - - -## -## Configuration values for the postgresql dependency. -## ref: https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md -postgresql: - ## - ## Use the PostgreSQL chart dependency. - ## Set to false if bringing your own PostgreSQL. - enabled: true - - ## - ## The name of an existing secret that contains the postgres password. - existingSecret: - - ## Name of the key containing the secret. - existingSecretKey: postgres-password - - ## - ## If you are bringing your own PostgreSQL, you should set postgresHost and - ## also probably service.port, postgresUser, postgresPassword, and postgresDatabase - ## postgresHost: - ## - ## PostgreSQL port - service: - port: 5432 - ## PostgreSQL User to create. - postgresUser: postgres - ## - ## PostgreSQL Password for the new user. - ## If not set, a random 10 characters password will be used. - postgresPassword: airflow - ## - ## PostgreSQL Database to create. - postgresDatabase: airflow - ## - ## Persistent Volume Storage configuration. - ## ref: https://kubernetes.io/docs/user-guide/persistent-volumes - persistence: - ## - ## Enable PostgreSQL persistence using Persistent Volume Claims. - enabled: true - ## - ## Persistant class - # storageClass: classname - ## - ## Access mode: - accessMode: ReadWriteOnce - - -## Configuration values for the Redis dependency. -## ref: https://github.com/kubernetes/charts/blob/master/stable/redis/README.md -redis: - ## - ## Use the redis chart dependency. - ## Set to false if bringing your own redis. - enabled: true - - ## - ## The name of an existing secret that contains the redis password. - existingSecret: - - ## Name of the key containing the secret. - existingSecretKey: redis-password - - ## - ## If you are bringing your own redis, you can set the host in redisHost. - ## redisHost: - ## - ## Redis password - ## - password: airflow - ## - ## Master configuration - master: - ## - ## Image configuration - # image: - ## - ## docker registry secret names (list) - # pullSecrets: nil - ## - ## Configure persistance - persistence: - ## - ## Use a PVC to persist data. - enabled: false - ## - ## Persistant class - # storageClass: classname - ## - ## Access mode: - accessMode: ReadWriteOnce - ## - ## Disable cluster management by default. - cluster: - enabled: false - -# Enable this if you're using https://github.com/coreos/prometheus-operator -# Don't forget you need to install something like https://github.com/epoch8/airflow-exporter in your airflow docker container -serviceMonitor: - enabled: false - interval: "30s" - path: /admin/metrics - ## [Kube Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -# Enable this if you're using https://github.com/coreos/prometheus-operator -prometheusRule: - - enabled: false - ## Namespace in which the prometheus rule is created - # namespace: monitoring - ## Define individual alerting rules as required - ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#rulegroup - ## https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/ - groups: {} - - ## Used to pass Labels that are used by the Prometheus installed in your cluster to select Prometheus Rules to work with - ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec - additionalLabels: {} - -extraManifests: [] -## -## Example: -## - apiVersion: cloud.google.com/v1beta1 -## kind: BackendConfig -## metadata: -## name: "{{ .Release.Name }}-test" -## spec: -## securityPolicy: -## name: "gcp-cloud-armor-policy-test" diff --git a/sources/airflow/helm/output/airflow/charts/postgresql/templates/configmap.yaml b/sources/airflow/helm/output/airflow/charts/postgresql/templates/configmap.yaml deleted file mode 100644 index 60b004ff..00000000 --- a/sources/airflow/helm/output/airflow/charts/postgresql/templates/configmap.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -# Source: airflow/charts/postgresql/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: airflow-postgresql - labels: - app: postgresql - chart: postgresql-0.13.1 - release: airflow - heritage: Tiller -data: \ No newline at end of file diff --git a/sources/airflow/helm/output/airflow/charts/postgresql/templates/deployment.yaml b/sources/airflow/helm/output/airflow/charts/postgresql/templates/deployment.yaml deleted file mode 100644 index 884ef2ca..00000000 --- a/sources/airflow/helm/output/airflow/charts/postgresql/templates/deployment.yaml +++ /dev/null @@ -1,81 +0,0 @@ ---- -# Source: airflow/charts/postgresql/templates/deployment.yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: airflow-postgresql - labels: - app: postgresql - chart: postgresql-0.13.1 - release: airflow - heritage: Tiller -spec: - template: - selector: - matchLabels: - app: postgresql - release: airflow - template: - metadata: - labels: - app: postgresql - release: airflow - spec: - containers: - - name: airflow-postgresql - image: "postgres:9.6.2" - imagePullPolicy: "" - args: - env: - - name: POSTGRES_USER - value: "postgres" - # Required for pg_isready in the health probes. - - name: PGUSER - value: "postgres" - - name: POSTGRES_DB - value: "airflow" - - name: POSTGRES_INITDB_ARGS - value: "" - - name: PGDATA - value: /var/lib/postgresql/data/pgdata - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: airflow-postgresql - key: postgres-password - - name: POD_IP - valueFrom: { fieldRef: { fieldPath: status.podIP } } - ports: - - name: postgresql - containerPort: 5432 - livenessProbe: - exec: - command: - - sh - - -c - - exec pg_isready --host $POD_IP - initialDelaySeconds: 120 - timeoutSeconds: 5 - failureThreshold: 6 - readinessProbe: - exec: - command: - - sh - - -c - - exec pg_isready --host $POD_IP - initialDelaySeconds: 5 - timeoutSeconds: 3 - periodSeconds: 5 - resources: - requests: - cpu: 100m - memory: 256Mi - - volumeMounts: - - name: data - mountPath: /var/lib/postgresql/data/pgdata - subPath: postgresql-db - volumes: - - name: data - persistentVolumeClaim: - claimName: airflow-postgresql diff --git a/sources/airflow/helm/output/airflow/charts/postgresql/templates/pvc.yaml b/sources/airflow/helm/output/airflow/charts/postgresql/templates/pvc.yaml deleted file mode 100644 index 19e061e4..00000000 --- a/sources/airflow/helm/output/airflow/charts/postgresql/templates/pvc.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# Source: airflow/charts/postgresql/templates/pvc.yaml -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: airflow-postgresql - labels: - app: postgresql - chart: postgresql-0.13.1 - release: airflow - heritage: Tiller -spec: - accessModes: - - "ReadWriteOnce" - resources: - requests: - storage: "8Gi" \ No newline at end of file diff --git a/sources/airflow/helm/output/airflow/charts/postgresql/templates/secrets.yaml b/sources/airflow/helm/output/airflow/charts/postgresql/templates/secrets.yaml deleted file mode 100644 index 97423483..00000000 --- a/sources/airflow/helm/output/airflow/charts/postgresql/templates/secrets.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# Source: airflow/charts/postgresql/templates/secrets.yaml - -apiVersion: v1 -kind: Secret -metadata: - name: airflow-postgresql - labels: - app: postgresql - chart: postgresql-0.13.1 - release: airflow - heritage: Tiller -type: Opaque -data: - - postgres-password: "YWlyZmxvdw==" - diff --git a/sources/airflow/helm/output/airflow/charts/postgresql/templates/svc.yaml b/sources/airflow/helm/output/airflow/charts/postgresql/templates/svc.yaml deleted file mode 100644 index 6ab78f3e..00000000 --- a/sources/airflow/helm/output/airflow/charts/postgresql/templates/svc.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# Source: airflow/charts/postgresql/templates/svc.yaml -apiVersion: v1 -kind: Service -metadata: - name: airflow-postgresql - labels: - app: postgresql - chart: postgresql-0.13.1 - release: airflow - heritage: Tiller -spec: - type: ClusterIP - ports: - - name: postgresql - port: 5432 - targetPort: postgresql - selector: - app: postgresql - release: airflow diff --git a/sources/airflow/helm/output/airflow/charts/redis/templates/configmap.yaml b/sources/airflow/helm/output/airflow/charts/redis/templates/configmap.yaml deleted file mode 100644 index f094127b..00000000 --- a/sources/airflow/helm/output/airflow/charts/redis/templates/configmap.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# Source: airflow/charts/redis/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: redis - chart: redis-7.0.0 - heritage: Tiller - release: airflow - name: airflow-redis -data: - redis.conf: |- - # User-supplied configuration: - # maxmemory-policy volatile-lru - master.conf: |- - dir /data - rename-command FLUSHDB "" - rename-command FLUSHALL "" - replica.conf: |- - dir /data - slave-read-only yes - rename-command FLUSHDB "" - rename-command FLUSHALL "" diff --git a/sources/airflow/helm/output/airflow/charts/redis/templates/headless-svc.yaml b/sources/airflow/helm/output/airflow/charts/redis/templates/headless-svc.yaml deleted file mode 100644 index 93f8e24b..00000000 --- a/sources/airflow/helm/output/airflow/charts/redis/templates/headless-svc.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# Source: airflow/charts/redis/templates/headless-svc.yaml -apiVersion: v1 -kind: Service -metadata: - name: airflow-redis-headless - labels: - app: redis - chart: redis-7.0.0 - release: "airflow" - heritage: "Tiller" -spec: - type: ClusterIP - clusterIP: None - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis - release: "airflow" diff --git a/sources/airflow/helm/output/airflow/charts/redis/templates/health-configmap.yaml b/sources/airflow/helm/output/airflow/charts/redis/templates/health-configmap.yaml deleted file mode 100644 index b5997109..00000000 --- a/sources/airflow/helm/output/airflow/charts/redis/templates/health-configmap.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -# Source: airflow/charts/redis/templates/health-configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: redis - chart: redis-7.0.0 - heritage: Tiller - release: airflow - name: airflow-redis-health -data: - ping_local.sh: |- - response=$( - timeout -s 9 $1 \ - redis-cli \ - -a $REDIS_PASSWORD \ - -h localhost \ - -p $REDIS_PORT \ - ping - ) - if [ "$response" != "PONG" ]; then - echo "$response" - exit 1 - fi - ping_master.sh: |- - response=$( - timeout -s 9 $1 \ - redis-cli \ - -a $REDIS_MASTER_PASSWORD \ - -h $REDIS_MASTER_HOST \ - -p $REDIS_MASTER_PORT_NUMBER \ - ping - ) - if [ "$response" != "PONG" ]; then - echo "$response" - exit 1 - fi - ping_local_and_master.sh: |- - script_dir="$(dirname "$0")" - exit_status=0 - "$script_dir/ping_local.sh" $1 || exit_status=$? - "$script_dir/ping_master.sh" $1 || exit_status=$? - exit $exit_status diff --git a/sources/airflow/helm/output/airflow/charts/redis/templates/redis-master-statefulset.yaml b/sources/airflow/helm/output/airflow/charts/redis/templates/redis-master-statefulset.yaml deleted file mode 100644 index 7e58ea4d..00000000 --- a/sources/airflow/helm/output/airflow/charts/redis/templates/redis-master-statefulset.yaml +++ /dev/null @@ -1,120 +0,0 @@ ---- -# Source: airflow/charts/redis/templates/redis-master-statefulset.yaml -apiVersion: apps/v1beta2 -kind: StatefulSet -metadata: - name: airflow-redis-master - labels: - app: redis - chart: redis-7.0.0 - release: "airflow" - heritage: "Tiller" -spec: - selector: - matchLabels: - release: "airflow" - role: master - app: redis - serviceName: airflow-redis-headless - template: - metadata: - labels: - release: "airflow" - chart: redis-7.0.0 - role: master - app: redis - annotations: - checksum/health: 2d53c88b5ad7b8d1bbf8ea00e1dcd89ad94969f6e6dcd9b933432c68d0dfb76a - checksum/configmap: 57a1d4e31afee73efee964ffc41e4c69e595ae2674090c8833969831b74e8dc4 - checksum/secret: 37892e30085da2d057c1e14fc2e266816dcd9a15a8249b24ca2846ced7ba36e0 - spec: - securityContext: - fsGroup: 1001 - serviceAccountName: "default" - containers: - - name: airflow-redis - image: "docker.io/bitnami/redis:4.0.14" - imagePullPolicy: "Always" - securityContext: - runAsUser: 1001 - command: - - /bin/bash - - -c - - | - if [[ -n $REDIS_PASSWORD_FILE ]]; then - password_aux=`cat ${REDIS_PASSWORD_FILE}` - export REDIS_PASSWORD=$password_aux - fi - if [[ ! -f /opt/bitnami/redis/etc/master.conf ]];then - cp /opt/bitnami/redis/mounted-etc/master.conf /opt/bitnami/redis/etc/master.conf - fi - if [[ ! -f /opt/bitnami/redis/etc/redis.conf ]];then - cp /opt/bitnami/redis/mounted-etc/redis.conf /opt/bitnami/redis/etc/redis.conf - fi - ARGS=("--port" "${REDIS_PORT}") - ARGS+=("--requirepass" "${REDIS_PASSWORD}") - ARGS+=("--include" "/opt/bitnami/redis/etc/redis.conf") - ARGS+=("--include" "/opt/bitnami/redis/etc/master.conf") - /run.sh ${ARGS[@]} - env: - - name: REDIS_REPLICATION_MODE - value: master - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: airflow-redis - key: redis-password - - name: REDIS_PORT - value: "6379" - ports: - - name: redis - containerPort: 6379 - livenessProbe: - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - exec: - command: - - sh - - -c - - /health/ping_local.sh 5 - readinessProbe: - initialDelaySeconds: 5 - periodSeconds: 5 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - exec: - command: - - sh - - -c - - /health/ping_local.sh 5 - resources: - null - - volumeMounts: - - name: health - mountPath: /health - - name: redis-data - mountPath: /data - subPath: - - name: config - mountPath: /opt/bitnami/redis/mounted-etc - - name: redis-tmp-conf - mountPath: /opt/bitnami/redis/etc/ - volumes: - - name: health - configMap: - name: airflow-redis-health - defaultMode: 0755 - - name: config - configMap: - name: airflow-redis - - name: "redis-data" - emptyDir: {} - - name: redis-tmp-conf - emptyDir: {} - updateStrategy: - type: RollingUpdate diff --git a/sources/airflow/helm/output/airflow/charts/redis/templates/redis-master-svc.yaml b/sources/airflow/helm/output/airflow/charts/redis/templates/redis-master-svc.yaml deleted file mode 100644 index 4b507178..00000000 --- a/sources/airflow/helm/output/airflow/charts/redis/templates/redis-master-svc.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Source: airflow/charts/redis/templates/redis-master-svc.yaml - -apiVersion: v1 -kind: Service -metadata: - name: airflow-redis-master - labels: - app: redis - chart: redis-7.0.0 - release: "airflow" - heritage: "Tiller" -spec: - type: ClusterIP - ports: - - name: redis - port: 6379 - targetPort: redis - selector: - app: redis - release: "airflow" - role: master diff --git a/sources/airflow/helm/output/airflow/charts/redis/templates/secret.yaml b/sources/airflow/helm/output/airflow/charts/redis/templates/secret.yaml deleted file mode 100644 index 055ec94e..00000000 --- a/sources/airflow/helm/output/airflow/charts/redis/templates/secret.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -# Source: airflow/charts/redis/templates/secret.yaml -apiVersion: v1 -kind: Secret -metadata: - name: airflow-redis - labels: - app: redis - chart: redis-7.0.0 - release: "airflow" - heritage: "Tiller" -type: Opaque -data: - redis-password: "YWlyZmxvdw==" \ No newline at end of file diff --git a/sources/airflow/helm/output/airflow/templates/configmap-env.yaml b/sources/airflow/helm/output/airflow/templates/configmap-env.yaml deleted file mode 100644 index a1b2fad9..00000000 --- a/sources/airflow/helm/output/airflow/templates/configmap-env.yaml +++ /dev/null @@ -1,42 +0,0 @@ ---- -# Source: airflow/templates/configmap-env.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: "airflow-env" - labels: - app: airflow - chart: airflow-5.2.0 - release: airflow - heritage: Tiller -data: - ## Force UTC timezone - TZ: Etc/UTC - ## Postgres DB configuration - POSTGRES_HOST: "airflow-postgresql" - POSTGRES_PORT: "5432" - POSTGRES_DB: "airflow" - ## Redis DB configuration - REDIS_HOST: "airflow-redis-master" - REDIS_PORT: "" - AIRFLOW__CELERY__FLOWER_URL_PREFIX: "" - AIRFLOW__CELERY__WORKER_CONCURRENCY: "1" - ## Flower PORT - FLOWER_PORT: "5555" - # For backwards compat with AF < 1.10, CELERY_CONCURRENCY got renamed to WORKER_CONCURRENCY - AIRFLOW__CELERY__CELERY_CONCURRENCY: "1" - # Configure puckel's docker-airflow entrypoint - EXECUTOR: "Celery" - FERNET_KEY: "" - DO_WAIT_INITDB: "false" - ## Custom Airflow settings - AIRFLOW__CORE__DONOT_PICKLE: "false" - AIRFLOW__CORE__DAGS_FOLDER: "/usr/local/airflow/dags" - AIRFLOW__CORE__BASE_LOG_FOLDER: "/usr/local/airflow/logs" - AIRFLOW__CORE__DAG_PROCESSOR_MANAGER_LOG_LOCATION: "/usr/local/airflow/logs/dag_processor_manager/dag_processor_manager.log" - AIRFLOW__SCHEDULER__CHILD_PROCESS_LOG_DIRECTORY: "/usr/local/airflow/logs/scheduler" - AIRFLOW__WEBSERVER__BASE_URL: "http://localhost:8080" - # Disabling XCom pickling for forward compatibility - AIRFLOW__CORE__ENABLE_XCOM_PICKLING: "false" - # Note: changing `Values.airflow.config` won't change the configmap checksum and so won't make - # the pods to restart diff --git a/sources/airflow/helm/output/airflow/templates/configmap-git-clone.yaml b/sources/airflow/helm/output/airflow/templates/configmap-git-clone.yaml deleted file mode 100644 index 6a13b553..00000000 --- a/sources/airflow/helm/output/airflow/templates/configmap-git-clone.yaml +++ /dev/null @@ -1,37 +0,0 @@ ---- -# Source: airflow/templates/configmap-git-clone.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: airflow-git-clone - labels: - app: airflow - chart: airflow-5.2.0 - release: airflow - heritage: Tiller -data: - git-clone.sh: | - #!/bin/sh -e - REPO=$1 - REF=$2 - DIR=$3 - REPO_HOST=$4 - PRIVATE_KEY=$5 - # Init Containers will re-run on Pod restart. Remove the directory's contents - # and reprovision when this happens. - if [ -d "$DIR" ]; then - rm -rf $( find $DIR -mindepth 1 ) - fi - git clone $REPO $DIR - cd $DIR - git reset --hard $REF - git-sync.sh: | - #!/bin/sh -e - REPO=$1 - REF=$2 - DIR=$3 - REPO_HOST=$4 - PRIVATE_KEY=$5 - SYNC_TIME=$6 - cd $DIR - while true; do git pull; date; sleep $SYNC_TIME; done diff --git a/sources/airflow/helm/output/airflow/templates/configmap-scripts.yaml b/sources/airflow/helm/output/airflow/templates/configmap-scripts.yaml deleted file mode 100644 index 6bb742d2..00000000 --- a/sources/airflow/helm/output/airflow/templates/configmap-scripts.yaml +++ /dev/null @@ -1,34 +0,0 @@ ---- -# Source: airflow/templates/configmap-scripts.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: airflow-scripts - labels: - app: airflow - chart: airflow-5.2.0 - release: airflow - heritage: Tiller -data: - install-requirements.sh: | - #!/bin/sh -e - if [ ! -d /usr/local/airflow/dags ]; then - echo "No folder /usr/local/airflow/dags" - exit 0 - fi - cd /usr/local/airflow/dags - if [ -f requirements.txt ]; then - pip install --user -r requirements.txt - else - exit 0 - fi - stop-worker.sh: | - #!/bin/sh -e - celery -b $AIRFLOW__CELERY__BROKER_URL -d celery@$HOSTNAME control cancel_consumer default - - # wait 10 second before checking the status of the worker - sleep 10 - - while (( $(celery -b $AIRFLOW__CELERY__BROKER_URL inspect active --json | python -c "import sys, json; print(len(json.load(sys.stdin)['celery@$HOSTNAME']))") > 0 )); do - sleep 60 - done \ No newline at end of file diff --git a/sources/airflow/helm/output/airflow/templates/deployments-flower.yaml b/sources/airflow/helm/output/airflow/templates/deployments-flower.yaml deleted file mode 100644 index 2755899f..00000000 --- a/sources/airflow/helm/output/airflow/templates/deployments-flower.yaml +++ /dev/null @@ -1,72 +0,0 @@ ---- -# Source: airflow/templates/deployments-flower.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: airflow-flower - labels: - app: airflow - component: flower - chart: airflow-5.2.0 - release: airflow - heritage: Tiller -spec: - replicas: 1 - minReadySeconds: 10 - strategy: - type: RollingUpdate - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - selector: - matchLabels: - app: airflow - component: flower - release: airflow - template: - metadata: - annotations: - checksum/config-env: 4ee020624b4c4e6c7e5b7a1e9161839eaeb06c462968cd4c3e1066cdef5eaeca - labels: - app: airflow - component: flower - release: airflow - spec: - restartPolicy: Always - containers: - - name: airflow-flower - image: puckel/docker-airflow:1.10.4 - imagePullPolicy: IfNotPresent - envFrom: - - configMapRef: - name: "airflow-env" - env: - - name: POSTGRES_USER - value: "postgres" - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: airflow-postgresql - key: postgres-password - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: airflow-redis - key: redis-password - ports: - - name: flower - containerPort: 5555 - protocol: TCP - args: ["flower"] - livenessProbe: - httpGet: - path: "//" - port: flower - initialDelaySeconds: 60 - periodSeconds: 60 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - resources: - {} - diff --git a/sources/airflow/helm/output/airflow/templates/deployments-scheduler.yaml b/sources/airflow/helm/output/airflow/templates/deployments-scheduler.yaml deleted file mode 100644 index 6aa47b3e..00000000 --- a/sources/airflow/helm/output/airflow/templates/deployments-scheduler.yaml +++ /dev/null @@ -1,86 +0,0 @@ ---- -# Source: airflow/templates/deployments-scheduler.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: airflow-scheduler - labels: - app: airflow - component: scheduler - chart: airflow-5.2.0 - release: airflow - heritage: Tiller -spec: - replicas: 1 - strategy: - # Kill the scheduler as soon as possible. It will restart quickly with all the workers, - # minimizing the time they are not synchronized. - type: RollingUpdate - rollingUpdate: - maxSurge: 0 - maxUnavailable: 100% - selector: - matchLabels: - app: airflow - component: scheduler - release: airflow - template: - metadata: - annotations: - checksum/config-env: 4ee020624b4c4e6c7e5b7a1e9161839eaeb06c462968cd4c3e1066cdef5eaeca - checksum/config-git-clone: f1ccca4494c87cfd3b6a582326f8b995ffb3c65bf4ed4341c188de9e98dd9ae5 - checksum/config-scripts: c286309579b6482ec7922f5bf3d1c509aecd617e8ea9c9a305af610658a21dc0 - checksum/config-variables-pools: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - checksum/secret-connections: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b - labels: - app: airflow - component: scheduler - release: airflow - spec: - restartPolicy: Always - serviceAccountName: airflow - containers: - - name: airflow-scheduler - image: puckel/docker-airflow:1.10.4 - imagePullPolicy: IfNotPresent - envFrom: - - configMapRef: - name: "airflow-env" - env: - - name: POSTGRES_USER - value: "postgres" - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: airflow-postgresql - key: postgres-password - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: airflow-redis - key: redis-password - resources: - {} - - volumeMounts: - - name: scripts - mountPath: /usr/local/scripts - args: - - "bash" - - "-c" - - > - echo 'waiting 10s...' && - sleep 10 && - mkdir -p /usr/local/airflow/.local/bin && - export PATH=/usr/local/airflow/.local/bin:$PATH && - echo "executing initdb" && - airflow initdb && - echo "executing scheduler" && - airflow scheduler -n -1 - volumes: - - name: scripts - configMap: - name: airflow-scripts - defaultMode: 0755 - - name: dags-data - emptyDir: {} diff --git a/sources/airflow/helm/output/airflow/templates/deployments-web.yaml b/sources/airflow/helm/output/airflow/templates/deployments-web.yaml deleted file mode 100644 index 5d9779c1..00000000 --- a/sources/airflow/helm/output/airflow/templates/deployments-web.yaml +++ /dev/null @@ -1,105 +0,0 @@ ---- -# Source: airflow/templates/deployments-web.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: airflow-web - labels: - app: airflow - component: web - chart: airflow-5.2.0 - release: airflow - heritage: Tiller -spec: - replicas: 1 - minReadySeconds: 120 - strategy: - # Smooth rolling update of the Web UI - type: RollingUpdate - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - selector: - matchLabels: - app: airflow - component: web - release: airflow - template: - metadata: - annotations: - checksum/config-env: 4ee020624b4c4e6c7e5b7a1e9161839eaeb06c462968cd4c3e1066cdef5eaeca - checksum/config-git-clone: f1ccca4494c87cfd3b6a582326f8b995ffb3c65bf4ed4341c188de9e98dd9ae5 - checksum/config-scripts: c286309579b6482ec7922f5bf3d1c509aecd617e8ea9c9a305af610658a21dc0 - labels: - app: airflow - component: web - release: airflow - spec: - restartPolicy: Always - containers: - - name: airflow-web - image: puckel/docker-airflow:1.10.4 - imagePullPolicy: IfNotPresent - ports: - - name: web - containerPort: 8080 - protocol: TCP - envFrom: - - configMapRef: - name: "airflow-env" - env: - - name: POSTGRES_USER - value: "postgres" - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: airflow-postgresql - key: postgres-password - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: airflow-redis - key: redis-password - resources: - {} - - volumeMounts: - - name: scripts - mountPath: /usr/local/scripts - args: - - "bash" - - "-c" - - > - echo 'waiting 60s...' && - sleep 60 && - mkdir -p /usr/local/airflow/.local/bin && - export PATH=/usr/local/airflow/.local/bin:$PATH && - echo 'executing webserver...' && - airflow webserver - # livenessProbe: - # httpGet: - # path: "/health" - # port: web - # ## Keep 6 minutes the delay to allow clean wait of postgres and redis containers - # initialDelaySeconds: 360 - # periodSeconds: 60 - # timeoutSeconds: 1 - # successThreshold: 1 - # failureThreshold: 5 - - # readinessProbe: - # httpGet: - # path: "/health" - # port: web - # initialDelaySeconds: 360 - # periodSeconds: 60 - # timeoutSeconds: 1 - # successThreshold: 1 - # failureThreshold: 5 - volumes: - - name: scripts - configMap: - name: airflow-scripts - defaultMode: 0755 - - name: dags-data - emptyDir: {} diff --git a/sources/airflow/helm/output/airflow/templates/poddisruptionbudget.yaml b/sources/airflow/helm/output/airflow/templates/poddisruptionbudget.yaml deleted file mode 100644 index a64718f8..00000000 --- a/sources/airflow/helm/output/airflow/templates/poddisruptionbudget.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# Source: airflow/templates/poddisruptionbudget.yaml - -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: airflow-pdb - labels: - app: airflow - component: scheduler - chart: airflow-5.2.0 - release: airflow - heritage: Tiller -spec: - selector: - matchLabels: - app: airflow - component: scheduler - release: airflow - maxUnavailable: 1 - diff --git a/sources/airflow/helm/output/airflow/templates/role-binding.yaml b/sources/airflow/helm/output/airflow/templates/role-binding.yaml deleted file mode 100644 index 05a8961a..00000000 --- a/sources/airflow/helm/output/airflow/templates/role-binding.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# Source: airflow/templates/role-binding.yaml - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: airflow - labels: - app: airflow - chart: airflow-5.2.0 - release: airflow - heritage: Tiller -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: airflow -subjects: -- kind: ServiceAccount - name: airflow - namespace: airflow diff --git a/sources/airflow/helm/output/airflow/templates/role.yaml b/sources/airflow/helm/output/airflow/templates/role.yaml deleted file mode 100644 index 3fb93ea2..00000000 --- a/sources/airflow/helm/output/airflow/templates/role.yaml +++ /dev/null @@ -1,25 +0,0 @@ ---- -# Source: airflow/templates/role.yaml - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: airflow - labels: - app: airflow - chart: airflow-5.2.0 - release: airflow - heritage: Tiller -rules: -- apiGroups: [""] - resources: - - pods - verbs: ["create", "get", "delete", "list", "watch"] -- apiGroups: [""] - resources: - - "pods/log" - verbs: ["get", "list"] -- apiGroups: [""] - resources: - - "pods/exec" - verbs: ["create", "get"] diff --git a/sources/airflow/helm/output/airflow/templates/service-account.yaml b/sources/airflow/helm/output/airflow/templates/service-account.yaml deleted file mode 100644 index cd760d6d..00000000 --- a/sources/airflow/helm/output/airflow/templates/service-account.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -# Source: airflow/templates/service-account.yaml - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: airflow - labels: - app: airflow - chart: airflow-5.2.0 - release: airflow - heritage: Tiller diff --git a/sources/airflow/helm/output/airflow/templates/service-flower.yaml b/sources/airflow/helm/output/airflow/templates/service-flower.yaml deleted file mode 100644 index e80a4cdb..00000000 --- a/sources/airflow/helm/output/airflow/templates/service-flower.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# Source: airflow/templates/service-flower.yaml -apiVersion: v1 -kind: Service -metadata: - name: airflow-flower - labels: - app: airflow - component: flower - chart: airflow-5.2.0 - release: airflow - heritage: Tiller - annotations: -spec: - type: ClusterIP - selector: - app: airflow - component: flower - release: airflow - ports: - - name: flower - protocol: TCP - port: 5555 - targetPort: 5555 diff --git a/sources/airflow/helm/output/airflow/templates/service-web.yaml b/sources/airflow/helm/output/airflow/templates/service-web.yaml deleted file mode 100644 index 2ad6d309..00000000 --- a/sources/airflow/helm/output/airflow/templates/service-web.yaml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# Source: airflow/templates/service-web.yaml -apiVersion: v1 -kind: Service -metadata: - name: airflow-web - labels: - app: airflow - component: web - chart: airflow-5.2.0 - release: airflow - heritage: Tiller - annotations: -spec: - type: ClusterIP - selector: - app: airflow - component: web - release: airflow - sessionAffinity: None - sessionAffinityConfig: - ports: - - name: web - protocol: TCP - port: 8080 - targetPort: 8080 diff --git a/sources/airflow/helm/output/airflow/templates/service-worker.yaml b/sources/airflow/helm/output/airflow/templates/service-worker.yaml deleted file mode 100644 index ea17c125..00000000 --- a/sources/airflow/helm/output/airflow/templates/service-worker.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# Source: airflow/templates/service-worker.yaml -# Headless service for stable DNS entries of StatefulSet members. -apiVersion: v1 -kind: Service -metadata: - name: airflow-worker - labels: - app: airflow - component: worker - chart: airflow-5.2.0 - release: airflow - heritage: Tiller -spec: - ports: - - name: worker - protocol: TCP - port: 8793 - clusterIP: None - selector: - app: airflow - component: worker diff --git a/sources/airflow/helm/output/airflow/templates/statefulsets-workers.yaml b/sources/airflow/helm/output/airflow/templates/statefulsets-workers.yaml deleted file mode 100644 index e533b8d9..00000000 --- a/sources/airflow/helm/output/airflow/templates/statefulsets-workers.yaml +++ /dev/null @@ -1,90 +0,0 @@ ---- -# Source: airflow/templates/statefulsets-workers.yaml -## Workers are not in deployment, but in StatefulSet, to allow each worker expose a mini-server -## that only serve logs, that will be used by the web server. - -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: airflow-worker - labels: - app: airflow - component: worker - chart: airflow-5.2.0 - release: airflow - heritage: Tiller -spec: - serviceName: "airflow-worker" - updateStrategy: - ## Kill the workers as soon as possible, the scheduler will restart the failed job later - type: RollingUpdate - ## Use experimental burst mode for faster StatefulSet scaling - ## https://github.com/kubernetes/kubernetes/commit/c2c5051adf096ffd48bf1dcf5b11cb47e464ecdd - podManagementPolicy: Parallel - replicas: 1 - selector: - matchLabels: - app: airflow - component: worker - release: airflow - template: - metadata: - annotations: - checksum/config-env: 4ee020624b4c4e6c7e5b7a1e9161839eaeb06c462968cd4c3e1066cdef5eaeca - checksum/config-git-clone: f1ccca4494c87cfd3b6a582326f8b995ffb3c65bf4ed4341c188de9e98dd9ae5 - checksum/config-scripts: c286309579b6482ec7922f5bf3d1c509aecd617e8ea9c9a305af610658a21dc0 - labels: - app: airflow - component: worker - release: airflow - spec: - restartPolicy: Always - terminationGracePeriodSeconds: 30 - serviceAccountName: airflow - containers: - - name: airflow-worker - imagePullPolicy: IfNotPresent - image: "puckel/docker-airflow:1.10.4" - envFrom: - - configMapRef: - name: "airflow-env" - env: - - name: POSTGRES_USER - value: "postgres" - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: airflow-postgresql - key: postgres-password - - name: REDIS_PASSWORD - valueFrom: - secretKeyRef: - name: airflow-redis - key: redis-password - volumeMounts: - - name: scripts - mountPath: /usr/local/scripts - args: - - "bash" - - "-c" - - > - echo 'waiting 60s...' && - sleep 60 && - mkdir -p /usr/local/airflow/.local/bin && - export PATH=/usr/local/airflow/.local/bin:$PATH && - echo 'executing worker...' && - airflow worker - ports: - - name: wlog - containerPort: 8793 - protocol: TCP - resources: - {} - - volumes: - - name: scripts - configMap: - name: airflow-scripts - defaultMode: 0755 - - name: dags-data - emptyDir: {} diff --git a/sources/airflow/helm/values.yaml b/sources/airflow/helm/values.yaml deleted file mode 100644 index b8543a68..00000000 --- a/sources/airflow/helm/values.yaml +++ /dev/null @@ -1,714 +0,0 @@ -# Duplicate this file and put your customization here - -## -## common settings and setting for the webserver -airflow: - extraConfigmapMounts: [] - # - name: extra-metadata - # mountPath: /opt/metadata - # configMap: airflow-metadata - # readOnly: true - # - # Example of configmap mount with subPath - # - name: extra-metadata - # mountPath: /opt/metadata/file.yaml - # configMap: airflow-metadata - # readOnly: true - # subPath: file.yaml - - - ## - ## Extra environment variables to mount in the web, scheduler, and worker pods: - extraEnv: - # - name: AIRFLOW__CORE__FERNET_KEY - # valueFrom: - # secretKeyRef: - # name: airflow - # key: fernet_key - # - name: AIRFLOW__LDAP__BIND_PASSWORD - # valueFrom: - # secretKeyRef: - # name: ldap - # key: password - - - ## - ## You will need to define your fernet key: - ## Generate fernetKey with: - ## python -c "from cryptography.fernet import Fernet; FERNET_KEY = Fernet.generate_key().decode(); print(FERNET_KEY)" - ## fernetKey: ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD - fernetKey: "" - service: - annotations: {} - sessionAffinity: "None" - sessionAffinityConfig: {} - type: ClusterIP - externalPort: 8080 - nodePort: - http: - ## - ## The executor to use. - ## - executor: Celery - ## - ## set the max number of retries during container initialization - initRetryLoop: - ## - ## base image for webserver/scheduler/workers - ## Note: If you want to use airflow HEAD (2.0dev), use the following image: - # image - # repository: stibbons31/docker-airflow-dev - # tag: 2.0dev - ## Airflow 2.0 allows changing the value ingress.web.path and ingress.flower.path (see bellow). - ## In version < 2.0, changing these paths won't have any effect. - image: - ## - ## docker-airflow image - repository: puckel/docker-airflow - ## - ## image tag - tag: 1.10.4 - ## - ## Image pull policy - ## values: Always or IfNotPresent - pullPolicy: IfNotPresent - ## - ## image pull secret for private images - pullSecret: - ## - ## Set schedulerNumRuns to control how the scheduler behaves: - ## -1 will let him looping indefinitively but it will never update the DAG - ## 1 will have the scheduler quit after each refresh, but kubernetes will restart it. - ## - ## A long running scheduler process, at least with the CeleryExecutor, ends up not scheduling - ## some tasks. We still don’t know the exact cause, unfortunately. Airflow has a built-in - ## workaround in the form of the `num_runs` flag. - ## Airflow runs with num_runs set to 5. - ## - ## If set to a value != -1, you will see your scheduler regularly restart. This is its normal - ## behavior under these conditions. - schedulerNumRuns: "-1" - ## - ## Set schedulerDoPickle to toggle whether to have the scheduler - ## attempt to pickle the DAG object to send over to the workers, - ## instead of letting workers run their version of the code. - ## See the Airflow documentation for the --do_pickle argument: https://airflow.apache.org/cli.html#scheduler - schedulerDoPickle: true - ## - ## Number of replicas for web server. - webReplicas: 1 - ## - ## Custom airflow configuration environment variables - ## Use this to override any airflow setting settings defining environment variables in the - ## following form: AIRFLOW__
__. - ## See the Airflow documentation: https://airflow.readthedocs.io/en/stable/howto/set-config.html?highlight=setting-configuration - ## Example: - ## config: - ## AIRFLOW__CORE__EXPOSE_CONFIG: "True" - ## HTTP_PROXY: "http://proxy.mycompany.com:123" - config: {} - ## - ## Configure pod disruption budget for the scheduler - podDisruptionBudgetEnabled: true - podDisruptionBudget: - maxUnavailable: 1 - ## Add custom connections - ## Use this to add Airflow connections for operators you use - ## For each connection - the id and type have to be defined. - ## All the other parameters are optional - ## Connections will be created with a script that is stored - ## in a K8s secret and mounted into the scheduler container - ## Example: - ## connections: - ## - id: my_aws - ## type: aws - ## extra: '{"aws_access_key_id": "**********", "aws_secret_access_key": "***", "region_name":"eu-central-1"}' - connections: [] - - ## Add airflow variables - ## This should be a json string with your variables in it - ## Examples: - ## variables: '{ "environment": "dev" }' - variables: {} - - ## Add airflow ppols - ## This should be a json string with your pools in it - ## Examples: - ## pools: '{ "example": { "description": "This is an example of a pool", "slots": 2 } }' - pools: {} - - ## - ## Annotations for the Scheduler, Worker and Web pods - podAnnotations: {} - ## Example: - ## iam.amazonaws.com/role: airflow-Role - - extraInitContainers: [] - ## Additional init containers to run before the Scheduler pods. - ## for example, be used to run a sidecar that chown Logs storage . - # - name: volume-mount-hack - # image: busybox - # command: ["sh", "-c", "chown -R 1000:1000 logs"] - # volumeMounts: - # - mountPath: /usr/local/airflow/logs - # name: logs-data - - extraContainers: [] - ## Additional containers to run alongside the Scheduler, Worker and Web pods - ## This could, for example, be used to run a sidecar that syncs DAGs from object storage. - # - name: s3-sync - # image: my-user/s3sync:latest - # volumeMounts: - # - name: synchronised-dags - # mountPath: /dags - extraVolumeMounts: [] - ## Additional volumeMounts to the main containers in the Scheduler, Worker and Web pods. - # - name: synchronised-dags - # mountPath: /usr/local/airflow/dags - extraVolumes: [] - ## Additional volumes for the Scheduler, Worker and Web pods. - # - name: synchronised-dags - # emptyDir: {} - - ## - ## Run initdb when the scheduler starts. - initdb: true - - -scheduler: - resources: {} - # limits: - # cpu: "1000m" - # memory: "1Gi" - # requests: - # cpu: "500m" - # memory: "512Mi" - ## - ## Labels for the scheduler deployment - labels: {} - ## - ## Annotations for the scheduler deployment - annotations: {} - - ## Support Node, affinity and tolerations for scheduler pod assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature - nodeSelector: {} - affinity: {} - tolerations: [] - -flower: - ## - ## Set AIRFLOW__CELERY__FLOWER_URL_PREFIX - ## Prefix should match Ingress configuration ingress.flower.path - urlPrefix: "" - resources: {} - # limits: - # cpu: "100m" - # memory: "128Mi" - # requests: - # cpu: "100m" - # memory: "128Mi" - ## - ## Labels for the flower deployment - labels: {} - ## - ## Annotations for the flower deployment - annotations: {} - service: - annotations: {} - type: ClusterIP - externalPort: 5555 - - ## Support Node, affinity and tolerations for flower pod assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature - nodeSelector: {} - affinity: {} - tolerations: [] - -web: - ## - ## Set AIRFLOW__WEBSERVER__BASE_URL - ## Path should match Ingress configuration - baseUrl: "http://localhost:8080" - resources: {} - # limits: - # cpu: "300m" - # memory: "1Gi" - # requests: - # cpu: "100m" - # memory: "512Mi" - ## - ## Labels for the web deployment - labels: {} - ## - ## Annotations for the web deployment - annotations: {} - initialStartupDelay: "60" - initialDelaySeconds: "360" - minReadySeconds: 120 - readinessProbe: - periodSeconds: 60 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - livenessProbe: - periodSeconds: 60 - timeoutSeconds: 1 - successThreshold: 1 - failureThreshold: 5 - - - ## Support Node, affinity and tolerations for web pod assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature - nodeSelector: {} - affinity: {} - tolerations: [] - ## - ## Directory in which to mount secrets on webserver nodes. - secretsDir: /var/airflow/secrets - ## - ## Secrets which will be mounted as a file at `secretsDir/`. - secrets: [] - -## -## Workers configuration -workers: - enabled: true - ## - ## Number of workers pod to launch - replicas: 1 - ## - ## Gracefull termination period - terminationPeriod: 30 - ## - ## Custom resource configuration - resources: {} - # limits: - # cpu: "1" - # memory: "2G" - # requests: - # cpu: "0.5" - # memory: "512Mi" - ## - ## Labels for the Worker statefulSet - labels: {} - ## - ## Annotations for the Worker statefulSet - annotations: {} - ## - ## Annotations for the Worker pods - podAnnotations: {} - ## Example: - ## iam.amazonaws.com/role: airflow-Role - ## - ## Celery worker configuration - celery: - ## - ## number of parallel celery tasks per worker - instances: 1 - ## - ## Gracefull termination of workers - ## Wait for the worker to finish the current task within the gracefull period - gracefullTermination: false - - ## - ## Directory in which to mount secrets on worker nodes. - secretsDir: /var/airflow/secrets - ## - ## Secrets which will be mounted as a file at `secretsDir/`. - secrets: [] - - ## Support Node, affinity and tolerations for worker pod assignment - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity - ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature - nodeSelector: {} - affinity: {} - tolerations: [] - -## -## Ingress configuration -ingress: - ## - ## enable ingress - ## Note: If you want to change url prefix for web ui or flower even if you do not use ingress, - ## you can change web.baseUrl and flower.urlPrefix - enabled: false - ## - ## Configure the Ingress webserver endpoint - web: - ## NOTE: This requires an airflow version > 1.9.x - ## For the moment (March 2018) this is **not** available on official package, you will have - ## to use an image where airflow has been updated to its current HEAD. - ## You can use the following one: - ## stibbons31/docker-airflow-dev:2.0dev - ## - ## if path is '/airflow': - ## - UI will be accessible at 'http://mycompany.com/airflow/admin' - ## - Healthcheck is at 'http://mycompany.com/airflow/health' - ## - api is at 'http://mycompany.com/airflow/api' - ## NOTE: do NOT keep trailing slash. For root configuration, set and empty string - path: "" - ## - ## Ingress hostname for the webserver - host: "" - ## - ## Annotations for the webserver - ## Airflow webserver handles relative path completely, just let your load balancer give the HTTP - ## header like the requested URL (no special configuration neeed) - annotations: {} - ## - ## Example for Traefik: - # traefik.frontend.rule.type: PathPrefix - # kubernetes.io/ingress.class: traefik - ## - ## Configure the web liveness path. - ## Defaults to the templated value `{{ ingress.web.path }}/health` - livenessPath: - tls: - ## Set to "true" to enable TLS termination at the ingress - enabled: false - ## If enabled, set "secretName" to the secret containing the TLS private key and certificate - ## Example: - ## secretName: example-com-crt - precedingPaths: - ## Different http paths to add to the ingress before the default path - ## Example: - ## - path: "/*" - ## serviceName: "ssl-redirect" - ## servicePort: "use-annotation" - succeedingPaths: - ## Different http paths to add to the ingress after the default path - ## Example: - ## - path: "/*" - ## serviceName: "ssl-redirect" - ## servicePort: "use-annotation" - - ## - ## Configure the flower Ingress endpoint - flower: - ## - ## If flower is '/airflow/flower': - ## - Flower UI is at 'http://mycompany.com/airflow/flower' - ## NOTE: you need to have a reverse proxy/load balancer able to do URL rewrite in order to have - ## flower mounted on other path than root. Flower only does half the job in url prefixing: it - ## only generates the right URL/relative paths in the **returned HTML files**, but expects the - ## request to have been be at the root. - ## That's why we need a reverse proxy/load balancer that is able to strip the path - ## NOTE: do NOT keep trailing slash. For root configuration, set and empty string - path: "" - ## - ## Configure the liveness path. Keep to "/" for Flower >= jan 2018. - ## For previous version, enter the same path than in the 'path' key - ## NOTE: keep the trailing slash. - livenessPath: / - ## - ## hostname for flower - host: "" - ## - ## Annotation for the Flower endpoint - ## - ## ==== SKIP THE FOLLOWING BLOCK IF YOU HAVE FLOWER > JANUARY 2018 ============================= - ## Please note their is a small difference between the way Airflow Web server and Flower handles - ## URL prefixes in HTTP requests: - ## Flower wants HTTP header to behave like there was no URL prefix, and but still generates - ## the right URL in html pages thanks to its `--url-prefix` parameter - ## - ## Extracted from the Flower documentation: - ## (https://github.com/mher/flower/blob/master/docs/config.rst#url_prefix) - ## - ## To access Flower on http://example.com/flower run it with: - ## flower --url-prefix=/flower - ## - ## Use the following nginx configuration: - ## server { - ## listen 80; - ## server_name example.com; - ## - ## location /flower/ { - ## rewrite ^/flower/(.*)$ /$1 break; - ## proxy_pass http://example.com:5555; - ## proxy_set_header Host $host; - ## } - ## } - ## ==== IF YOU HAVE FLOWER > JANUARY 2018, NO MORE NEED TO STRIP THE PREFIX ==================== - annotations: {} - ## - ## NOTE: it is important here to have your reverse proxy strip the path/rewrite the URL - ## Example for Traefik: - # traefik.frontend.rule.type: PathPrefix ## Flower >= Jan 2018 - # traefik.frontend.rule.type: PathPrefixStrip ## Flower < Jan 2018 - # kubernetes.io/ingress.class: traefik - tls: - ## Set to "true" to enable TLS termination at the ingress - enabled: false - ## If enabled, set "secretName" to the secret containing the TLS private key and certificate - ## Example: - ## secretName: example-com-crt - - -## -## Storage configuration for DAGs -persistence: - ## - ## enable persistance storage - enabled: false - ## - ## Existing claim to use - # existingClaim: nil - ## Existing claim's subPath to use, e.g. "dags" (optional) - # subPath: "" - ## - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - # storageClass: default - accessMode: ReadWriteOnce - ## - ## Persistant storage size request - size: 1Gi - -## -## Storage configuration for logs -logsPersistence: - ## - ## enable persistance storage - enabled: false - ## - ## Existing claim to use - # existingClaim: nil - ## Existing claim's subPath to use, e.g. "logs" (optional) - # subPath: "" - ## - ## Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - ## A configuration for shared log storage requires a `storageClass` that - ## supports the `ReadWriteMany` accessMode, such as NFS or AWS EFS. - # storageClass: default - accessMode: ReadWriteOnce - ## - ## Persistant storage size request - size: 1Gi - -## -## Configure DAGs deployment and update -dags: - ## - ## mount path for persistent volume. - ## Note that this location is referred to in airflow.cfg, so if you change it, you must update airflow.cfg accordingly. - path: /usr/local/airflow/dags - ## - ## Set to True to prevent pickling DAGs from scheduler to workers - doNotPickle: false - ## - ## Configure Git repository to fetch DAGs - git: - ## - ## url to clone the git repository - url: - ## - ## branch name, tag or sha1 to reset to - ref: master - ## pre-created secret with key, key.pub and known_hosts file for private repos - secret: "" - ## The host of the repo so for example if a github repo put github.com (Only need if using ssh not https git sync) - repoHost: "" - ## The name of the private key in your git sync secret (Only need if using ssh not https git sync) - privateKeyName: "" - gitSync: - ## Turns on the side car container - enabled: false - ## Image for the side car container - image: - ## docker-airflow image - repository: alpine/git - ## image tag - tag: 1.0.7 - ## Image pull policy - ## values: Always or IfNotPresent - pullPolicy: IfNotPresent - ## The amount of time in seconds to git pull dags - refreshTime: - initContainer: - ## Fetch the source code when the pods starts - enabled: false - ## Image for the init container (any image with git will do) - image: - ## docker-airflow image - repository: alpine/git - ## image tag - tag: 1.0.7 - ## Image pull policy - ## values: Always or IfNotPresent - pullPolicy: IfNotPresent - ## install requirements.txt dependencies automatically - installRequirements: true - -## -## Configure logs -logs: - path: /usr/local/airflow/logs - -## -## Enable RBAC -rbac: - ## - ## Specifies whether RBAC resources should be created - create: true - -## -## Create or use ServiceAccount -serviceAccount: - ## - ## Specifies whether a ServiceAccount should be created - create: true - ## The name of the ServiceAccount to use. - ## If not set and create is true, a name is generated using the fullname template - name: - - -## -## Configuration values for the postgresql dependency. -## ref: https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md -postgresql: - ## - ## Use the PostgreSQL chart dependency. - ## Set to false if bringing your own PostgreSQL. - enabled: true - - ## - ## The name of an existing secret that contains the postgres password. - existingSecret: - - ## Name of the key containing the secret. - existingSecretKey: postgres-password - - ## - ## If you are bringing your own PostgreSQL, you should set postgresHost and - ## also probably service.port, postgresUser, postgresPassword, and postgresDatabase - ## postgresHost: - ## - ## PostgreSQL port - service: - port: 5432 - ## PostgreSQL User to create. - postgresUser: postgres - ## - ## PostgreSQL Password for the new user. - ## If not set, a random 10 characters password will be used. - postgresPassword: airflow - ## - ## PostgreSQL Database to create. - postgresDatabase: airflow - ## - ## Persistent Volume Storage configuration. - ## ref: https://kubernetes.io/docs/user-guide/persistent-volumes - persistence: - ## - ## Enable PostgreSQL persistence using Persistent Volume Claims. - enabled: true - ## - ## Persistant class - # storageClass: classname - ## - ## Access mode: - accessMode: ReadWriteOnce - - -## Configuration values for the Redis dependency. -## ref: https://github.com/kubernetes/charts/blob/master/stable/redis/README.md -redis: - ## - ## Use the redis chart dependency. - ## Set to false if bringing your own redis. - enabled: true - - ## - ## The name of an existing secret that contains the redis password. - existingSecret: - - ## Name of the key containing the secret. - existingSecretKey: redis-password - - ## - ## If you are bringing your own redis, you can set the host in redisHost. - ## redisHost: - ## - ## Redis password - ## - password: airflow - ## - ## Master configuration - master: - ## - ## Image configuration - # image: - ## - ## docker registry secret names (list) - # pullSecrets: nil - ## - ## Configure persistance - persistence: - ## - ## Use a PVC to persist data. - enabled: false - ## - ## Persistant class - # storageClass: classname - ## - ## Access mode: - accessMode: ReadWriteOnce - ## - ## Disable cluster management by default. - cluster: - enabled: false - -# Enable this if you're using https://github.com/coreos/prometheus-operator -# Don't forget you need to install something like https://github.com/epoch8/airflow-exporter in your airflow docker container -serviceMonitor: - enabled: false - interval: "30s" - path: /admin/metrics - ## [Kube Prometheus Selector Label](https://github.com/helm/charts/tree/master/stable/prometheus-operator#exporters) - selector: - prometheus: kube-prometheus - -# Enable this if you're using https://github.com/coreos/prometheus-operator -prometheusRule: - - enabled: false - ## Namespace in which the prometheus rule is created - # namespace: monitoring - ## Define individual alerting rules as required - ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#rulegroup - ## https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/ - groups: {} - - ## Used to pass Labels that are used by the Prometheus installed in your cluster to select Prometheus Rules to work with - ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#prometheusspec - additionalLabels: {} - -extraManifests: [] -## -## Example: -## - apiVersion: cloud.google.com/v1beta1 -## kind: BackendConfig -## metadata: -## name: "{{ .Release.Name }}-test" -## spec: -## securityPolicy: -## name: "gcp-cloud-armor-policy-test" diff --git a/sources/airflow/ingress.yaml b/sources/airflow/ingress.yaml deleted file mode 100644 index 8a92a625..00000000 --- a/sources/airflow/ingress.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: airflow - labels: - app.kubernetes.io/name: airflow - app.kubernetes.io/component: web -spec: - rules: - - host: airflow.codeformuenster.org - http: - paths: - - path: / - backend: - serviceName: airflow-web - servicePort: 8080 - tls: - - hosts: - - airflow.codeformuenster.org - secretName: airflow-ingress-cert - ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Certificate -metadata: - name: airflow-ingress - labels: - app.kubernetes.io/name: airflow - app.kubernetes.io/component: web -spec: - secretName: airflow-ingress-cert - commonName: airflow.codeformuenster.org - issuerRef: - kind: ClusterIssuer - name: letsencrypt diff --git a/sources/airflow/kustomization.yaml b/sources/airflow/kustomization.yaml deleted file mode 100644 index 15278bdc..00000000 --- a/sources/airflow/kustomization.yaml +++ /dev/null @@ -1,62 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: airflow -commonLabels: - app.kubernetes.io/part-of: airflow - -resources: -# postgres -- ./helm/output/airflow/charts/postgresql/templates/configmap.yaml -- ./helm/output/airflow/charts/postgresql/templates/deployment.yaml -- ./helm/output/airflow/charts/postgresql/templates/pvc.yaml -- ./helm/output/airflow/charts/postgresql/templates/secrets.yaml -- ./helm/output/airflow/charts/postgresql/templates/svc.yaml - -# redis -- ./helm/output/airflow/charts/redis/templates/configmap.yaml -- ./helm/output/airflow/charts/redis/templates/headless-svc.yaml -- ./helm/output/airflow/charts/redis/templates/health-configmap.yaml -- ./helm/output/airflow/charts/redis/templates/redis-master-statefulset.yaml -- ./helm/output/airflow/charts/redis/templates/redis-master-svc.yaml -- ./helm/output/airflow/charts/redis/templates/secret.yaml - - -# airflow -- ./helm/output/airflow/templates/configmap-env.yaml -- ./helm/output/airflow/templates/configmap-git-clone.yaml -- ./helm/output/airflow/templates/configmap-scripts.yaml -- ./helm/output/airflow/templates/deployments-flower.yaml -- ./helm/output/airflow/templates/deployments-scheduler.yaml -- ./helm/output/airflow/templates/deployments-web.yaml -- ./helm/output/airflow/templates/poddisruptionbudget.yaml -- ./helm/output/airflow/templates/role-binding.yaml -- ./helm/output/airflow/templates/role.yaml -- ./helm/output/airflow/templates/service-account.yaml -- ./helm/output/airflow/templates/service-flower.yaml -- ./helm/output/airflow/templates/service-web.yaml -- ./helm/output/airflow/templates/service-worker.yaml -- ./helm/output/airflow/templates/statefulsets-workers.yaml -- ./ingress.yaml - -images: -# - name: docker.elastic.co/elasticsearch/elasticsearch-oss -# newName: codeformuenster/elasticsearch-oss-plugins -# newTag: "7.2.0-testing1" - -# patchesStrategicMerge: -# - ./patches.yaml - -configMapGenerator: -# - name: elasticsearch-master-config -# behavior: replace -# files: -# - elasticsearch.yml=./config.yaml - -# secretGenerator: -# - name: certificates-transport -# files: -# - root-ca.pem=./certs/root-ca.pem -# - node.pem=./certs/node.pem -# - node-key.pem=./certs/node-key.pem - diff --git a/sources/cert-manager/README.md b/sources/cert-manager/README.md deleted file mode 100644 index 497be318..00000000 --- a/sources/cert-manager/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# cert-manager - - -```bash -# from upstream -rm ./base/cert-manager.yaml - -curl -sfSL https://github.com/jetstack/cert-manager/releases/download/v0.9.0/cert-manager.yaml \ - -o ./base/cert-manager.yaml - -# remove RoleBinding cert-manager-webhook:webhook-authentication-reader -# because of kustomization problem with multiple namespaces. -# apply that separately - -# build manifests to verify -kubectl kustomize ./overlay - -# apply to cluster -# namespace needs special label -cat << EOF | kubectl apply -f - -apiVersion: v1 -kind: Namespace -metadata: - name: cert-manager - labels: - certmanager.k8s.io/disable-validation: "true" -EOF -kubectl apply -f ./webhook-rolebinding.yaml -kubectl apply -k ./overlay -``` - - -## on error - -Maybe kubectl-apply doesn't work, then delete deployments and retry: - -```bash -kubectl -n cert-manager delete deployments cert-manager-cainjector -kubectl -n cert-manager delete deployments cert-manager-webhook -kubectl -n cert-manager delete deployments cert-manager - -kubectl apply -f ./webhook-rolebinding.yaml -kubectl apply -k ./overlay -``` \ No newline at end of file diff --git a/sources/cert-manager/base/cert-manager.yaml b/sources/cert-manager/base/cert-manager.yaml deleted file mode 100644 index e149bcb7..00000000 --- a/sources/cert-manager/base/cert-manager.yaml +++ /dev/null @@ -1,2378 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - labels: - controller-tools.k8s.io: "1.0" - name: certificates.certmanager.k8s.io -spec: - additionalPrinterColumns: - - JSONPath: .status.conditions[?(@.type=="Ready")].status - name: Ready - type: string - - JSONPath: .spec.secretName - name: Secret - type: string - - JSONPath: .spec.issuerRef.name - name: Issuer - priority: 1 - type: string - - JSONPath: .status.conditions[?(@.type=="Ready")].message - name: Status - priority: 1 - type: string - - JSONPath: .metadata.creationTimestamp - description: 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. - name: Age - type: date - group: certmanager.k8s.io - names: - kind: Certificate - plural: certificates - shortNames: - - cert - - certs - scope: Namespaced - validation: - openAPIV3Schema: - properties: - apiVersion: - description: '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/api-conventions.md#resources' - type: string - kind: - description: '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/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - acme: - description: ACME contains configuration specific to ACME Certificates. - Notably, this contains details on how the domain names listed on this - Certificate resource should be 'solved', i.e. mapping HTTP01 and DNS01 - providers to DNS names. - properties: - config: - items: - properties: - domains: - description: Domains is the list of domains that this SolverConfig - applies to. - items: - type: string - type: array - required: - - domains - type: object - type: array - required: - - config - type: object - commonName: - description: CommonName is a common name to be used on the Certificate. - If no CommonName is given, then the first entry in DNSNames is used - as the CommonName. The CommonName should have a length of 64 characters - or fewer to avoid generating invalid CSRs; in order to have longer - domain names, set the CommonName (or first DNSNames entry) to have - 64 characters or fewer, and then add the longer domain name to DNSNames. - type: string - dnsNames: - description: DNSNames is a list of subject alt names to be used on the - Certificate. If no CommonName is given, then the first entry in DNSNames - is used as the CommonName and must have a length of 64 characters - or fewer. - items: - type: string - type: array - duration: - description: Certificate default Duration - type: string - ipAddresses: - description: IPAddresses is a list of IP addresses to be used on the - Certificate - items: - type: string - type: array - isCA: - description: IsCA will mark this Certificate as valid for signing. This - implies that the 'signing' usage is set - type: boolean - issuerRef: - description: IssuerRef is a reference to the issuer for this certificate. - If the 'kind' field is not set, or set to 'Issuer', an Issuer resource - with the given name in the same namespace as the Certificate will - be used. If the 'kind' field is set to 'ClusterIssuer', a ClusterIssuer - with the provided name will be used. The 'name' field in this stanza - is required at all times. - properties: - group: - type: string - kind: - type: string - name: - type: string - required: - - name - type: object - keyAlgorithm: - description: KeyAlgorithm is the private key algorithm of the corresponding - private key for this certificate. If provided, allowed values are - either "rsa" or "ecdsa" If KeyAlgorithm is specified and KeySize is - not provided, key size of 256 will be used for "ecdsa" key algorithm - and key size of 2048 will be used for "rsa" key algorithm. - enum: - - rsa - - ecdsa - type: string - keyEncoding: - description: KeyEncoding is the private key cryptography standards (PKCS) - for this certificate's private key to be encoded in. If provided, - allowed values are "pkcs1" and "pkcs8" standing for PKCS#1 and PKCS#8, - respectively. If KeyEncoding is not specified, then PKCS#1 will be - used by default. - type: string - keySize: - description: KeySize is the key bit size of the corresponding private - key for this certificate. If provided, value must be between 2048 - and 8192 inclusive when KeyAlgorithm is empty or is set to "rsa", - and value must be one of (256, 384, 521) when KeyAlgorithm is set - to "ecdsa". - format: int64 - type: integer - organization: - description: Organization is the organization to be used on the Certificate - items: - type: string - type: array - renewBefore: - description: Certificate renew before expiration duration - type: string - secretName: - description: SecretName is the name of the secret resource to store - this secret in - type: string - required: - - secretName - - issuerRef - type: object - status: - properties: - conditions: - items: - properties: - lastTransitionTime: - description: LastTransitionTime is the timestamp corresponding - to the last status change of this condition. - format: date-time - type: string - message: - description: Message is a human readable description of the details - of the last transition, complementing reason. - type: string - reason: - description: Reason is a brief machine readable explanation for - the condition's last transition. - type: string - status: - description: Status of the condition, one of ('True', 'False', - 'Unknown'). - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of the condition, currently ('Ready'). - type: string - required: - - type - - status - type: object - type: array - lastFailureTime: - format: date-time - type: string - notAfter: - description: The expiration time of the certificate stored in the secret - named by this resource in spec.secretName. - format: date-time - type: string - type: object - version: v1alpha1 -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - labels: - controller-tools.k8s.io: "1.0" - name: certificaterequests.certmanager.k8s.io -spec: - additionalPrinterColumns: - - JSONPath: .status.conditions[?(@.type=="Ready")].status - name: Ready - type: string - - JSONPath: .spec.issuerRef.name - name: Issuer - priority: 1 - type: string - - JSONPath: .status.conditions[?(@.type=="Ready")].message - name: Status - priority: 1 - type: string - - JSONPath: .metadata.creationTimestamp - description: 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. - name: Age - type: date - group: certmanager.k8s.io - names: - kind: CertificateRequest - plural: certificaterequests - shortNames: - - cr - - crs - scope: Namespaced - validation: - openAPIV3Schema: - properties: - apiVersion: - description: '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/api-conventions.md#resources' - type: string - kind: - description: '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/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - csr: - description: Byte slice containing the PEM encoded CertificateSigningRequest - format: byte - type: string - duration: - description: Requested certificate default Duration - type: string - isCA: - description: IsCA will mark the resulting certificate as valid for signing. - This implies that the 'signing' usage is set - type: boolean - issuerRef: - description: IssuerRef is a reference to the issuer for this CertificateRequest. If - the 'kind' field is not set, or set to 'Issuer', an Issuer resource - with the given name in the same namespace as the CertificateRequest - will be used. If the 'kind' field is set to 'ClusterIssuer', a ClusterIssuer - with the provided name will be used. The 'name' field in this stanza - is required at all times. The group field refers to the API group - of the issuer which defaults to 'certmanager.k8s.io' if empty. - properties: - group: - type: string - kind: - type: string - name: - type: string - required: - - name - type: object - required: - - issuerRef - type: object - status: - properties: - ca: - description: Byte slice containing the PEM encoded certificate authority - of the signed certificate. - format: byte - type: string - certificate: - description: Byte slice containing a PEM encoded signed certificate - resulting from the given certificate signing request. - format: byte - type: string - conditions: - items: - properties: - lastTransitionTime: - description: LastTransitionTime is the timestamp corresponding - to the last status change of this condition. - format: date-time - type: string - message: - description: Message is a human readable description of the details - of the last transition, complementing reason. - type: string - reason: - description: Reason is a brief machine readable explanation for - the condition's last transition. - type: string - status: - description: Status of the condition, one of ('True', 'False', - 'Unknown'). - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of the condition, currently ('Ready'). - type: string - required: - - type - - status - type: object - type: array - type: object - version: v1alpha1 -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - labels: - controller-tools.k8s.io: "1.0" - name: challenges.certmanager.k8s.io -spec: - additionalPrinterColumns: - - JSONPath: .status.state - name: State - type: string - - JSONPath: .spec.dnsName - name: Domain - type: string - - JSONPath: .status.reason - name: Reason - priority: 1 - type: string - - JSONPath: .metadata.creationTimestamp - description: 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. - name: Age - type: date - group: certmanager.k8s.io - names: - kind: Challenge - plural: challenges - scope: Namespaced - validation: - openAPIV3Schema: - properties: - apiVersion: - description: '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/api-conventions.md#resources' - type: string - kind: - description: '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/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - authzURL: - description: AuthzURL is the URL to the ACME Authorization resource - that this challenge is a part of. - type: string - config: - description: 'Config specifies the solver configuration for this challenge. - Only **one** of ''config'' or ''solver'' may be specified, and if - both are specified then no action will be performed on the Challenge - resource. DEPRECATED: the ''solver'' field should be specified instead' - type: object - dnsName: - description: DNSName is the identifier that this challenge is for, e.g. - example.com. - type: string - issuerRef: - description: IssuerRef references a properly configured ACME-type Issuer - which should be used to create this Challenge. If the Issuer does - not exist, processing will be retried. If the Issuer is not an 'ACME' - Issuer, an error will be returned and the Challenge will be marked - as failed. - properties: - group: - type: string - kind: - type: string - name: - type: string - required: - - name - type: object - key: - description: Key is the ACME challenge key for this challenge - type: string - solver: - description: Solver contains the domain solving configuration that should - be used to solve this challenge resource. Only **one** of 'config' - or 'solver' may be specified, and if both are specified then no action - will be performed on the Challenge resource. - properties: - selector: - description: Selector selects a set of DNSNames on the Certificate - resource that should be solved using this challenge solver. - properties: - dnsNames: - description: List of DNSNames that this solver will be used - to solve. If specified and a match is found, a dnsNames selector - will take precedence over a dnsZones selector. If multiple - solvers match with the same dnsNames value, the solver with - the most matching labels in matchLabels will be selected. - If neither has more matches, the solver defined earlier in - the list will be selected. - items: - type: string - type: array - dnsZones: - description: List of DNSZones that this solver will be used - to solve. The most specific DNS zone match specified here - will take precedence over other DNS zone matches, so a solver - specifying sys.example.com will be selected over one specifying - example.com for the domain www.sys.example.com. If multiple - solvers match with the same dnsZones value, the solver with - the most matching labels in matchLabels will be selected. - If neither has more matches, the solver defined earlier in - the list will be selected. - items: - type: string - type: array - matchLabels: - description: A label selector that is used to refine the set - of certificate's that this challenge solver will apply to. - type: object - type: object - type: object - token: - description: Token is the ACME challenge token for this challenge. - type: string - type: - description: Type is the type of ACME challenge this resource represents, - e.g. "dns01" or "http01" - type: string - url: - description: URL is the URL of the ACME Challenge resource for this - challenge. This can be used to lookup details about the status of - this challenge. - type: string - wildcard: - description: Wildcard will be true if this challenge is for a wildcard - identifier, for example '*.example.com' - type: boolean - required: - - authzURL - - type - - url - - dnsName - - token - - key - - wildcard - - issuerRef - type: object - status: - properties: - presented: - description: Presented will be set to true if the challenge values for - this challenge are currently 'presented'. This *does not* imply the - self check is passing. Only that the values have been 'submitted' - for the appropriate challenge mechanism (i.e. the DNS01 TXT record - has been presented, or the HTTP01 configuration has been configured). - type: boolean - processing: - description: Processing is used to denote whether this challenge should - be processed or not. This field will only be set to true by the 'scheduling' - component. It will only be set to false by the 'challenges' controller, - after the challenge has reached a final state or timed out. If this - field is set to false, the challenge controller will not take any - more action. - type: boolean - reason: - description: Reason contains human readable information on why the Challenge - is in the current state. - type: string - state: - description: State contains the current 'state' of the challenge. If - not set, the state of the challenge is unknown. - enum: - - "" - - valid - - ready - - pending - - processing - - invalid - - expired - - errored - type: string - required: - - processing - - presented - - reason - type: object - required: - - metadata - - spec - - status - version: v1alpha1 -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - labels: - controller-tools.k8s.io: "1.0" - name: clusterissuers.certmanager.k8s.io -spec: - group: certmanager.k8s.io - names: - kind: ClusterIssuer - plural: clusterissuers - scope: Cluster - validation: - openAPIV3Schema: - properties: - apiVersion: - description: '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/api-conventions.md#resources' - type: string - kind: - description: '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/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - acme: - properties: - email: - description: Email is the email for this account - type: string - privateKeySecretRef: - description: PrivateKey is the name of a secret containing the private - key for this user account. - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - server: - description: Server is the ACME server URL - type: string - skipTLSVerify: - description: If true, skip verifying the ACME server TLS certificate - type: boolean - solvers: - description: Solvers is a list of challenge solvers that will be - used to solve ACME challenges for the matching domains. - items: - properties: - selector: - description: Selector selects a set of DNSNames on the Certificate - resource that should be solved using this challenge solver. - properties: - dnsNames: - description: List of DNSNames that this solver will be - used to solve. If specified and a match is found, a - dnsNames selector will take precedence over a dnsZones - selector. If multiple solvers match with the same dnsNames - value, the solver with the most matching labels in matchLabels - will be selected. If neither has more matches, the solver - defined earlier in the list will be selected. - items: - type: string - type: array - dnsZones: - description: List of DNSZones that this solver will be - used to solve. The most specific DNS zone match specified - here will take precedence over other DNS zone matches, - so a solver specifying sys.example.com will be selected - over one specifying example.com for the domain www.sys.example.com. - If multiple solvers match with the same dnsZones value, - the solver with the most matching labels in matchLabels - will be selected. If neither has more matches, the solver - defined earlier in the list will be selected. - items: - type: string - type: array - matchLabels: - description: A label selector that is used to refine the - set of certificate's that this challenge solver will - apply to. - type: object - type: object - type: object - type: array - required: - - server - - privateKeySecretRef - type: object - ca: - properties: - secretName: - description: SecretName is the name of the secret used to sign Certificates - issued by this Issuer. - type: string - required: - - secretName - type: object - selfSigned: - type: object - vault: - properties: - auth: - description: Vault authentication - properties: - appRole: - description: This Secret contains a AppRole and Secret - properties: - path: - description: Where the authentication path is mounted in - Vault. - type: string - roleId: - type: string - secretRef: - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - required: - - path - - roleId - - secretRef - type: object - tokenSecretRef: - description: This Secret contains the Vault token key - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - type: object - caBundle: - description: Base64 encoded CA bundle to validate Vault server certificate. - Only used if the Server URL is using HTTPS protocol. This parameter - is ignored for plain HTTP protocol connection. If not set the - system root certificates are used to validate the TLS connection. - format: byte - type: string - path: - description: Vault URL path to the certificate role - type: string - server: - description: Server is the vault connection address - type: string - required: - - auth - - server - - path - type: object - venafi: - properties: - cloud: - description: Cloud specifies the Venafi cloud configuration settings. - Only one of TPP or Cloud may be specified. - properties: - apiTokenSecretRef: - description: APITokenSecretRef is a secret key selector for - the Venafi Cloud API token. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - url: - description: URL is the base URL for Venafi Cloud - type: string - required: - - url - - apiTokenSecretRef - type: object - tpp: - description: TPP specifies Trust Protection Platform configuration - settings. Only one of TPP or Cloud may be specified. - properties: - caBundle: - description: CABundle is a PEM encoded TLS certifiate to use - to verify connections to the TPP instance. If specified, system - roots will not be used and the issuing CA for the TPP instance - must be verifiable using the provided root. If not specified, - the connection will be verified using the cert-manager system - root certificates. - format: byte - type: string - credentialsRef: - description: CredentialsRef is a reference to a Secret containing - the username and password for the TPP server. The secret must - contain two keys, 'username' and 'password'. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - url: - description: URL is the base URL for the Venafi TPP instance - type: string - required: - - url - - credentialsRef - type: object - zone: - description: Zone is the Venafi Policy Zone to use for this issuer. - All requests made to the Venafi platform will be restricted by - the named zone policy. This field is required. - type: string - required: - - zone - type: object - type: object - status: - properties: - acme: - properties: - lastRegisteredEmail: - description: LastRegisteredEmail is the email associated with the - latest registered ACME account, in order to track changes made - to registered account associated with the Issuer - type: string - uri: - description: URI is the unique account identifier, which can also - be used to retrieve account details from the CA - type: string - type: object - conditions: - items: - properties: - lastTransitionTime: - description: LastTransitionTime is the timestamp corresponding - to the last status change of this condition. - format: date-time - type: string - message: - description: Message is a human readable description of the details - of the last transition, complementing reason. - type: string - reason: - description: Reason is a brief machine readable explanation for - the condition's last transition. - type: string - status: - description: Status of the condition, one of ('True', 'False', - 'Unknown'). - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of the condition, currently ('Ready'). - type: string - required: - - type - - status - type: object - type: array - type: object - version: v1alpha1 -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - labels: - controller-tools.k8s.io: "1.0" - name: issuers.certmanager.k8s.io -spec: - group: certmanager.k8s.io - names: - kind: Issuer - plural: issuers - scope: Namespaced - validation: - openAPIV3Schema: - properties: - apiVersion: - description: '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/api-conventions.md#resources' - type: string - kind: - description: '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/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - acme: - properties: - email: - description: Email is the email for this account - type: string - privateKeySecretRef: - description: PrivateKey is the name of a secret containing the private - key for this user account. - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - server: - description: Server is the ACME server URL - type: string - skipTLSVerify: - description: If true, skip verifying the ACME server TLS certificate - type: boolean - solvers: - description: Solvers is a list of challenge solvers that will be - used to solve ACME challenges for the matching domains. - items: - properties: - selector: - description: Selector selects a set of DNSNames on the Certificate - resource that should be solved using this challenge solver. - properties: - dnsNames: - description: List of DNSNames that this solver will be - used to solve. If specified and a match is found, a - dnsNames selector will take precedence over a dnsZones - selector. If multiple solvers match with the same dnsNames - value, the solver with the most matching labels in matchLabels - will be selected. If neither has more matches, the solver - defined earlier in the list will be selected. - items: - type: string - type: array - dnsZones: - description: List of DNSZones that this solver will be - used to solve. The most specific DNS zone match specified - here will take precedence over other DNS zone matches, - so a solver specifying sys.example.com will be selected - over one specifying example.com for the domain www.sys.example.com. - If multiple solvers match with the same dnsZones value, - the solver with the most matching labels in matchLabels - will be selected. If neither has more matches, the solver - defined earlier in the list will be selected. - items: - type: string - type: array - matchLabels: - description: A label selector that is used to refine the - set of certificate's that this challenge solver will - apply to. - type: object - type: object - type: object - type: array - required: - - server - - privateKeySecretRef - type: object - ca: - properties: - secretName: - description: SecretName is the name of the secret used to sign Certificates - issued by this Issuer. - type: string - required: - - secretName - type: object - selfSigned: - type: object - vault: - properties: - auth: - description: Vault authentication - properties: - appRole: - description: This Secret contains a AppRole and Secret - properties: - path: - description: Where the authentication path is mounted in - Vault. - type: string - roleId: - type: string - secretRef: - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - required: - - path - - roleId - - secretRef - type: object - tokenSecretRef: - description: This Secret contains the Vault token key - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - type: object - caBundle: - description: Base64 encoded CA bundle to validate Vault server certificate. - Only used if the Server URL is using HTTPS protocol. This parameter - is ignored for plain HTTP protocol connection. If not set the - system root certificates are used to validate the TLS connection. - format: byte - type: string - path: - description: Vault URL path to the certificate role - type: string - server: - description: Server is the vault connection address - type: string - required: - - auth - - server - - path - type: object - venafi: - properties: - cloud: - description: Cloud specifies the Venafi cloud configuration settings. - Only one of TPP or Cloud may be specified. - properties: - apiTokenSecretRef: - description: APITokenSecretRef is a secret key selector for - the Venafi Cloud API token. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - url: - description: URL is the base URL for Venafi Cloud - type: string - required: - - url - - apiTokenSecretRef - type: object - tpp: - description: TPP specifies Trust Protection Platform configuration - settings. Only one of TPP or Cloud may be specified. - properties: - caBundle: - description: CABundle is a PEM encoded TLS certifiate to use - to verify connections to the TPP instance. If specified, system - roots will not be used and the issuing CA for the TPP instance - must be verifiable using the provided root. If not specified, - the connection will be verified using the cert-manager system - root certificates. - format: byte - type: string - credentialsRef: - description: CredentialsRef is a reference to a Secret containing - the username and password for the TPP server. The secret must - contain two keys, 'username' and 'password'. - properties: - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - required: - - name - type: object - url: - description: URL is the base URL for the Venafi TPP instance - type: string - required: - - url - - credentialsRef - type: object - zone: - description: Zone is the Venafi Policy Zone to use for this issuer. - All requests made to the Venafi platform will be restricted by - the named zone policy. This field is required. - type: string - required: - - zone - type: object - type: object - status: - properties: - acme: - properties: - lastRegisteredEmail: - description: LastRegisteredEmail is the email associated with the - latest registered ACME account, in order to track changes made - to registered account associated with the Issuer - type: string - uri: - description: URI is the unique account identifier, which can also - be used to retrieve account details from the CA - type: string - type: object - conditions: - items: - properties: - lastTransitionTime: - description: LastTransitionTime is the timestamp corresponding - to the last status change of this condition. - format: date-time - type: string - message: - description: Message is a human readable description of the details - of the last transition, complementing reason. - type: string - reason: - description: Reason is a brief machine readable explanation for - the condition's last transition. - type: string - status: - description: Status of the condition, one of ('True', 'False', - 'Unknown'). - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of the condition, currently ('Ready'). - type: string - required: - - type - - status - type: object - type: array - type: object - version: v1alpha1 -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - creationTimestamp: null - labels: - controller-tools.k8s.io: "1.0" - name: orders.certmanager.k8s.io -spec: - additionalPrinterColumns: - - JSONPath: .status.state - name: State - type: string - - JSONPath: .spec.issuerRef.name - name: Issuer - priority: 1 - type: string - - JSONPath: .status.reason - name: Reason - priority: 1 - type: string - - JSONPath: .metadata.creationTimestamp - description: 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. - name: Age - type: date - group: certmanager.k8s.io - names: - kind: Order - plural: orders - scope: Namespaced - validation: - openAPIV3Schema: - properties: - apiVersion: - description: '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/api-conventions.md#resources' - type: string - kind: - description: '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/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - commonName: - description: CommonName is the common name as specified on the DER encoded - CSR. If CommonName is not specified, the first DNSName specified will - be used as the CommonName. At least one of CommonName or a DNSNames - must be set. This field must match the corresponding field on the - DER encoded CSR. - type: string - config: - description: 'Config specifies a mapping from DNS identifiers to how - those identifiers should be solved when performing ACME challenges. - A config entry must exist for each domain listed in DNSNames and CommonName. - Only **one** of ''config'' or ''solvers'' may be specified, and if - both are specified then no action will be performed on the Order resource. This - field will be removed when support for solver config specified on - the Certificate under certificate.spec.acme has been removed. DEPRECATED: - this field will be removed in future. Solver configuration must instead - be provided on ACME Issuer resources.' - items: - properties: - domains: - description: Domains is the list of domains that this SolverConfig - applies to. - items: - type: string - type: array - required: - - domains - type: object - type: array - csr: - description: Certificate signing request bytes in DER encoding. This - will be used when finalizing the order. This field must be set on - the order. - format: byte - type: string - dnsNames: - description: DNSNames is a list of DNS names that should be included - as part of the Order validation process. If CommonName is not specified, - the first DNSName specified will be used as the CommonName. At least - one of CommonName or a DNSNames must be set. This field must match - the corresponding field on the DER encoded CSR. - items: - type: string - type: array - issuerRef: - description: IssuerRef references a properly configured ACME-type Issuer - which should be used to create this Order. If the Issuer does not - exist, processing will be retried. If the Issuer is not an 'ACME' - Issuer, an error will be returned and the Order will be marked as - failed. - properties: - group: - type: string - kind: - type: string - name: - type: string - required: - - name - type: object - required: - - csr - - issuerRef - type: object - status: - properties: - certificate: - description: Certificate is a copy of the PEM encoded certificate for - this Order. This field will be populated after the order has been - successfully finalized with the ACME server, and the order has transitioned - to the 'valid' state. - format: byte - type: string - challenges: - description: Challenges is a list of ChallengeSpecs for Challenges that - must be created in order to complete this Order. - items: - properties: - authzURL: - description: AuthzURL is the URL to the ACME Authorization resource - that this challenge is a part of. - type: string - config: - description: 'Config specifies the solver configuration for this - challenge. Only **one** of ''config'' or ''solver'' may be specified, - and if both are specified then no action will be performed on - the Challenge resource. DEPRECATED: the ''solver'' field should - be specified instead' - type: object - dnsName: - description: DNSName is the identifier that this challenge is - for, e.g. example.com. - type: string - issuerRef: - description: IssuerRef references a properly configured ACME-type - Issuer which should be used to create this Challenge. If the - Issuer does not exist, processing will be retried. If the Issuer - is not an 'ACME' Issuer, an error will be returned and the Challenge - will be marked as failed. - properties: - group: - type: string - kind: - type: string - name: - type: string - required: - - name - type: object - key: - description: Key is the ACME challenge key for this challenge - type: string - solver: - description: Solver contains the domain solving configuration - that should be used to solve this challenge resource. Only **one** - of 'config' or 'solver' may be specified, and if both are specified - then no action will be performed on the Challenge resource. - properties: - selector: - description: Selector selects a set of DNSNames on the Certificate - resource that should be solved using this challenge solver. - properties: - dnsNames: - description: List of DNSNames that this solver will be - used to solve. If specified and a match is found, a - dnsNames selector will take precedence over a dnsZones - selector. If multiple solvers match with the same dnsNames - value, the solver with the most matching labels in matchLabels - will be selected. If neither has more matches, the solver - defined earlier in the list will be selected. - items: - type: string - type: array - dnsZones: - description: List of DNSZones that this solver will be - used to solve. The most specific DNS zone match specified - here will take precedence over other DNS zone matches, - so a solver specifying sys.example.com will be selected - over one specifying example.com for the domain www.sys.example.com. - If multiple solvers match with the same dnsZones value, - the solver with the most matching labels in matchLabels - will be selected. If neither has more matches, the solver - defined earlier in the list will be selected. - items: - type: string - type: array - matchLabels: - description: A label selector that is used to refine the - set of certificate's that this challenge solver will - apply to. - type: object - type: object - type: object - token: - description: Token is the ACME challenge token for this challenge. - type: string - type: - description: Type is the type of ACME challenge this resource - represents, e.g. "dns01" or "http01" - type: string - url: - description: URL is the URL of the ACME Challenge resource for - this challenge. This can be used to lookup details about the - status of this challenge. - type: string - wildcard: - description: Wildcard will be true if this challenge is for a - wildcard identifier, for example '*.example.com' - type: boolean - required: - - authzURL - - type - - url - - dnsName - - token - - key - - wildcard - - issuerRef - type: object - type: array - failureTime: - description: FailureTime stores the time that this order failed. This - is used to influence garbage collection and back-off. - format: date-time - type: string - finalizeURL: - description: FinalizeURL of the Order. This is used to obtain certificates - for this order once it has been completed. - type: string - reason: - description: Reason optionally provides more information about a why - the order is in the current state. - type: string - state: - description: State contains the current state of this Order resource. - States 'success' and 'expired' are 'final' - enum: - - "" - - valid - - ready - - pending - - processing - - invalid - - expired - - errored - type: string - url: - description: URL of the Order. This will initially be empty when the - resource is first created. The Order controller will populate this - field when the Order is first processed. This field will be immutable - after it is initially set. - type: string - type: object - required: - - metadata - - spec - - status - version: v1alpha1 -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] ---- -apiVersion: v1 -kind: Namespace -metadata: - name: cert-manager - labels: - certmanager.k8s.io/disable-validation: "true" - ---- ---- -# Source: cert-manager/charts/cainjector/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: cert-manager-cainjector - namespace: "cert-manager" - labels: - app: cainjector - app.kubernetes.io/name: cainjector - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cainjector-v0.9.0 - ---- -# Source: cert-manager/charts/webhook/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: cert-manager-webhook - namespace: "cert-manager" - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 - ---- -# Source: cert-manager/templates/serviceaccount.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: cert-manager - namespace: "cert-manager" - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 - ---- -# Source: cert-manager/charts/cainjector/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: cert-manager-cainjector - labels: - app: cainjector - app.kubernetes.io/name: cainjector - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cainjector-v0.9.0 -rules: - - apiGroups: ["certmanager.k8s.io"] - resources: ["certificates"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["configmaps", "events"] - verbs: ["get", "create", "update", "patch"] - - apiGroups: ["admissionregistration.k8s.io"] - resources: ["validatingwebhookconfigurations", "mutatingwebhookconfigurations"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["apiregistration.k8s.io"] - resources: ["apiservices"] - verbs: ["get", "list", "watch", "update"] - - apiGroups: ["apiextensions.k8s.io"] - resources: ["customresourcedefinitions"] - verbs: ["get", "list", "watch", "update"] ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: cert-manager-cainjector - labels: - app: cainjector - app.kubernetes.io/name: cainjector - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cainjector-v0.9.0 -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cert-manager-cainjector -subjects: - - name: cert-manager-cainjector - namespace: "cert-manager" - kind: ServiceAccount ---- -# Source: cert-manager/templates/rbac.yaml -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: cert-manager-leaderelection - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -rules: - # Used for leader election by the controller - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "create", "update", "patch"] - ---- - -# Issuer controller role -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: cert-manager-controller-issuers - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -rules: - - apiGroups: ["certmanager.k8s.io"] - resources: ["issuers", "issuers/status"] - verbs: ["update"] - - apiGroups: ["certmanager.k8s.io"] - resources: ["issuers"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch", "create", "update", "delete"] - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - ---- - -# ClusterIssuer controller role -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: cert-manager-controller-clusterissuers - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -rules: - - apiGroups: ["certmanager.k8s.io"] - resources: ["clusterissuers", "clusterissuers/status"] - verbs: ["update"] - - apiGroups: ["certmanager.k8s.io"] - resources: ["clusterissuers"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch", "create", "update", "delete"] - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - ---- - -# Certificates controller role -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: cert-manager-controller-certificates - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -rules: - - apiGroups: ["certmanager.k8s.io"] - resources: ["certificates", "certificates/status", "certificaterequests", "certificaterequests/status"] - verbs: ["update"] - - apiGroups: ["certmanager.k8s.io"] - resources: ["certificates", "certificaterequests", "clusterissuers", "issuers", "orders"] - verbs: ["get", "list", "watch"] - # We require these rules to support users with the OwnerReferencesPermissionEnforcement - # admission controller enabled: - # https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement - - apiGroups: ["certmanager.k8s.io"] - resources: ["certificates/finalizers"] - verbs: ["update"] - - apiGroups: ["certmanager.k8s.io"] - resources: ["orders"] - verbs: ["create", "delete"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch", "create", "update", "delete"] - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - ---- - -# Orders controller role -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: cert-manager-controller-orders - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -rules: - - apiGroups: ["certmanager.k8s.io"] - resources: ["orders", "orders/status"] - verbs: ["update"] - - apiGroups: ["certmanager.k8s.io"] - resources: ["orders", "clusterissuers", "issuers", "challenges"] - verbs: ["get", "list", "watch"] - - apiGroups: ["certmanager.k8s.io"] - resources: ["challenges"] - verbs: ["create", "delete"] - # We require these rules to support users with the OwnerReferencesPermissionEnforcement - # admission controller enabled: - # https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement - - apiGroups: ["certmanager.k8s.io"] - resources: ["orders/finalizers"] - verbs: ["update"] - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch"] - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - ---- - -# Challenges controller role -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: cert-manager-controller-challenges - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -rules: - # Use to update challenge resource status - - apiGroups: ["certmanager.k8s.io"] - resources: ["challenges", "challenges/status"] - verbs: ["update"] - # Used to watch challenges, issuer and clusterissuer resources - - apiGroups: ["certmanager.k8s.io"] - resources: ["challenges", "issuers", "clusterissuers"] - verbs: ["get", "list", "watch"] - # Need to be able to retrieve ACME account private key to complete challenges - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch"] - # Used to create events - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - # HTTP01 rules - - apiGroups: [""] - resources: ["pods", "services"] - verbs: ["get", "list", "watch", "create", "delete"] - - apiGroups: ["extensions"] - resources: ["ingresses"] - verbs: ["get", "list", "watch", "create", "delete", "update"] - # We require these rules to support users with the OwnerReferencesPermissionEnforcement - # admission controller enabled: - # https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement - - apiGroups: ["certmanager.k8s.io"] - resources: ["challenges/finalizers"] - verbs: ["update"] - # DNS01 rules (duplicated above) - - apiGroups: [""] - resources: ["secrets"] - verbs: ["get", "list", "watch"] - ---- - -# ingress-shim controller role -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: cert-manager-controller-ingress-shim - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -rules: - - apiGroups: ["certmanager.k8s.io"] - resources: ["certificates", "certificaterequests"] - verbs: ["create", "update", "delete"] - - apiGroups: ["certmanager.k8s.io"] - resources: ["certificates", "certificaterequests", "issuers", "clusterissuers"] - verbs: ["get", "list", "watch"] - - apiGroups: ["extensions"] - resources: ["ingresses"] - verbs: ["get", "list", "watch"] - # We require these rules to support users with the OwnerReferencesPermissionEnforcement - # admission controller enabled: - # https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#ownerreferencespermissionenforcement - - apiGroups: ["extensions"] - resources: ["ingresses/finalizers"] - verbs: ["update"] - - apiGroups: [""] - resources: ["events"] - verbs: ["create", "patch"] - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: cert-manager-leaderelection - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cert-manager-leaderelection -subjects: - - name: cert-manager - namespace: "cert-manager" - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: cert-manager-controller-issuers - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cert-manager-controller-issuers -subjects: - - name: cert-manager - namespace: "cert-manager" - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: cert-manager-controller-clusterissuers - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cert-manager-controller-clusterissuers -subjects: - - name: cert-manager - namespace: "cert-manager" - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: cert-manager-controller-certificates - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cert-manager-controller-certificates -subjects: - - name: cert-manager - namespace: "cert-manager" - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: cert-manager-controller-orders - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cert-manager-controller-orders -subjects: - - name: cert-manager - namespace: "cert-manager" - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: cert-manager-controller-challenges - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cert-manager-controller-challenges -subjects: - - name: cert-manager - namespace: "cert-manager" - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: cert-manager-controller-ingress-shim - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cert-manager-controller-ingress-shim -subjects: - - name: cert-manager - namespace: "cert-manager" - kind: ServiceAccount - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: cert-manager-view - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 - rbac.authorization.k8s.io/aggregate-to-view: "true" - rbac.authorization.k8s.io/aggregate-to-edit: "true" - rbac.authorization.k8s.io/aggregate-to-admin: "true" -rules: - - apiGroups: ["certmanager.k8s.io"] - resources: ["certificates", "certificaterequests", "issuers"] - verbs: ["get", "list", "watch"] - ---- - -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: cert-manager-edit - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 - rbac.authorization.k8s.io/aggregate-to-edit: "true" - rbac.authorization.k8s.io/aggregate-to-admin: "true" -rules: - - apiGroups: ["certmanager.k8s.io"] - resources: ["certificates", "certificaterequests", "issuers"] - verbs: ["create", "delete", "deletecollection", "patch", "update"] - ---- -# Source: cert-manager/charts/webhook/templates/rbac.yaml -### Webhook ### ---- -# apiserver gets the auth-delegator role to delegate auth decisions to -# the core apiserver -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: cert-manager-webhook:auth-delegator - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:auth-delegator -subjects: -- apiGroup: "" - kind: ServiceAccount - name: cert-manager-webhook - namespace: cert-manager - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: cert-manager-webhook:webhook-requester - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 -rules: -- apiGroups: - - admission.certmanager.k8s.io - resources: - - certificates - - certificaterequests - - issuers - - clusterissuers - verbs: - - create - ---- -# Source: cert-manager/charts/webhook/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: cert-manager-webhook - namespace: "cert-manager" - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 -spec: - type: ClusterIP - ports: - - name: https - port: 443 - targetPort: 6443 - selector: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - ---- -# Source: cert-manager/charts/cainjector/templates/deployment.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: cert-manager-cainjector - namespace: "cert-manager" - labels: - app: cainjector - app.kubernetes.io/name: cainjector - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cainjector-v0.9.0 -spec: - replicas: 1 - selector: - matchLabels: - app: cainjector - app.kubernetes.io/name: cainjector - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - template: - metadata: - labels: - app: cainjector - app.kubernetes.io/name: cainjector - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cainjector-v0.9.0 - annotations: - spec: - serviceAccountName: cert-manager-cainjector - containers: - - name: cainjector - image: "quay.io/jetstack/cert-manager-cainjector:v0.9.0" - imagePullPolicy: IfNotPresent - args: - - --v=2 - - --leader-election-namespace=$(POD_NAMESPACE) - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - resources: - {} - - ---- -# Source: cert-manager/charts/webhook/templates/deployment.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: cert-manager-webhook - namespace: "cert-manager" - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 -spec: - replicas: 1 - selector: - matchLabels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - template: - metadata: - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 - annotations: - spec: - serviceAccountName: cert-manager-webhook - containers: - - name: webhook - image: "quay.io/jetstack/cert-manager-webhook:v0.9.0" - imagePullPolicy: IfNotPresent - args: - - --v=2 - - --secure-port=6443 - - --tls-cert-file=/certs/tls.crt - - --tls-private-key-file=/certs/tls.key - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - resources: - {} - - volumeMounts: - - name: certs - mountPath: /certs - volumes: - - name: certs - secret: - secretName: cert-manager-webhook-webhook-tls - ---- -# Source: cert-manager/templates/deployment.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: cert-manager - namespace: "cert-manager" - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 -spec: - replicas: 1 - selector: - matchLabels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - template: - metadata: - labels: - app: cert-manager - app.kubernetes.io/name: cert-manager - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: cert-manager-v0.9.0 - annotations: - prometheus.io/path: "/metrics" - prometheus.io/scrape: 'true' - prometheus.io/port: '9402' - spec: - serviceAccountName: cert-manager - containers: - - name: cert-manager - image: "quay.io/jetstack/cert-manager-controller:v0.9.0" - imagePullPolicy: IfNotPresent - args: - - --v=2 - - --cluster-resource-namespace=$(POD_NAMESPACE) - - --leader-election-namespace=$(POD_NAMESPACE) - ports: - - containerPort: 9402 - env: - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - resources: - requests: - cpu: 10m - memory: 32Mi - - ---- -# Source: cert-manager/charts/webhook/templates/apiservice.yaml -apiVersion: apiregistration.k8s.io/v1beta1 -kind: APIService -metadata: - name: v1beta1.admission.certmanager.k8s.io - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 - annotations: - certmanager.k8s.io/inject-ca-from: "cert-manager/cert-manager-webhook-webhook-tls" -spec: - group: admission.certmanager.k8s.io - groupPriorityMinimum: 1000 - versionPriority: 15 - service: - name: cert-manager-webhook - namespace: "cert-manager" - version: v1beta1 - ---- -# Source: cert-manager/charts/webhook/templates/pki.yaml ---- -# Create a selfsigned Issuer, in order to create a root CA certificate for -# signing webhook serving certificates -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Issuer -metadata: - name: cert-manager-webhook-selfsign - namespace: "cert-manager" - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 -spec: - selfSigned: {} - ---- - -# Generate a CA Certificate used to sign certificates for the webhook -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Certificate -metadata: - name: cert-manager-webhook-ca - namespace: "cert-manager" - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 -spec: - secretName: cert-manager-webhook-ca - duration: 43800h # 5y - issuerRef: - name: cert-manager-webhook-selfsign - commonName: "ca.webhook.cert-manager" - isCA: true - ---- - -# Create an Issuer that uses the above generated CA certificate to issue certs -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Issuer -metadata: - name: cert-manager-webhook-ca - namespace: "cert-manager" - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 -spec: - ca: - secretName: cert-manager-webhook-ca - ---- - -# Finally, generate a serving certificate for the webhook to use -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Certificate -metadata: - name: cert-manager-webhook-webhook-tls - namespace: "cert-manager" - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 -spec: - secretName: cert-manager-webhook-webhook-tls - duration: 8760h # 1y - issuerRef: - name: cert-manager-webhook-ca - dnsNames: - - cert-manager-webhook - - cert-manager-webhook.cert-manager - - cert-manager-webhook.cert-manager.svc - ---- -# Source: cert-manager/templates/servicemonitor.yaml - - ---- -# Source: cert-manager/charts/webhook/templates/validating-webhook.yaml -apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingWebhookConfiguration -metadata: - name: cert-manager-webhook - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 - annotations: - certmanager.k8s.io/inject-apiserver-ca: "true" -webhooks: - - name: certificates.admission.certmanager.k8s.io - namespaceSelector: - matchExpressions: - - key: "certmanager.k8s.io/disable-validation" - operator: "NotIn" - values: - - "true" - - key: "name" - operator: "NotIn" - values: - - cert-manager - rules: - - apiGroups: - - "certmanager.k8s.io" - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - certificates - failurePolicy: Fail - clientConfig: - service: - name: kubernetes - namespace: default - path: /apis/admission.certmanager.k8s.io/v1beta1/certificates - - name: issuers.admission.certmanager.k8s.io - namespaceSelector: - matchExpressions: - - key: "certmanager.k8s.io/disable-validation" - operator: "NotIn" - values: - - "true" - - key: "name" - operator: "NotIn" - values: - - cert-manager - rules: - - apiGroups: - - "certmanager.k8s.io" - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - issuers - failurePolicy: Fail - clientConfig: - service: - name: kubernetes - namespace: default - path: /apis/admission.certmanager.k8s.io/v1beta1/issuers - - name: clusterissuers.admission.certmanager.k8s.io - namespaceSelector: - matchExpressions: - - key: "certmanager.k8s.io/disable-validation" - operator: "NotIn" - values: - - "true" - - key: "name" - operator: "NotIn" - values: - - cert-manager - rules: - - apiGroups: - - "certmanager.k8s.io" - apiVersions: - - v1alpha1 - operations: - - CREATE - - UPDATE - resources: - - clusterissuers - failurePolicy: Fail - clientConfig: - service: - name: kubernetes - namespace: default - path: /apis/admission.certmanager.k8s.io/v1beta1/clusterissuers - diff --git a/sources/cert-manager/base/kustomization.yaml b/sources/cert-manager/base/kustomization.yaml deleted file mode 100644 index b7bec110..00000000 --- a/sources/cert-manager/base/kustomization.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: cert-manager -commonLabels: - app.kubernetes.io/part-of: cert-manager - -resources: -- ./cert-manager.yaml -- ./servicemonitor.yaml \ No newline at end of file diff --git a/sources/cert-manager/base/servicemonitor.yaml b/sources/cert-manager/base/servicemonitor.yaml deleted file mode 100644 index 053285b9..00000000 --- a/sources/cert-manager/base/servicemonitor.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: cert-manager - namespace: cert-manager - labels: - app: cert-manager - release: cert-manager -spec: - type: ClusterIP - ports: - - name: metrics - port: 9402 - targetPort: 9402 - selector: - app: cert-manager - app.kubernetes.io/name: cert-manager - ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: cert-manager - namespace: cert-manager -spec: - endpoints: - - port: metrics - # interval: 30s - # honorLabels: true - namespaceSelector: - matchNames: - - cert-manager - selector: - matchLabels: - app: cert-manager - app.kubernetes.io/name: cert-manager \ No newline at end of file diff --git a/sources/cert-manager/overlay/cluster-issuer.yaml b/sources/cert-manager/overlay/cluster-issuer.yaml deleted file mode 100644 index 31b32371..00000000 --- a/sources/cert-manager/overlay/cluster-issuer.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: certmanager.k8s.io/v1alpha1 -kind: ClusterIssuer -metadata: - name: letsencrypt -spec: - acme: - email: admin@codeformuenster.org - server: https://acme-v02.api.letsencrypt.org/directory - privateKeySecretRef: - name: cfm-issuer-account-key - - # Configure the challenge solvers. - solvers: - # An empty selector will 'match' all Certificate resources that - # reference this Issuer. - - selector: {} - http01: - ingress: - class: nginx diff --git a/sources/cert-manager/webhook-rolebinding.yaml b/sources/cert-manager/webhook-rolebinding.yaml deleted file mode 100644 index 69d2018a..00000000 --- a/sources/cert-manager/webhook-rolebinding.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# apiserver gets the ability to read authentication. This allows it to -# read the specific configmap that has the requestheader-* entries to -# api agg -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: cert-manager-webhook:webhook-authentication-reader - namespace: kube-system - labels: - app: webhook - app.kubernetes.io/name: webhook - app.kubernetes.io/instance: cert-manager - app.kubernetes.io/managed-by: Tiller - helm.sh/chart: webhook-v0.9.0 -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: extension-apiserver-authentication-reader -subjects: -- apiGroup: "" - kind: ServiceAccount - name: cert-manager-webhook - namespace: cert-manager diff --git a/sources/crashes/README.md b/sources/crashes/README.md deleted file mode 100644 index b5217a9e..00000000 --- a/sources/crashes/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# crashes - -```bash -# build manifests to verify -kustomize build . - -# apply to cluster -kubectl create namespace crashes -kustomize build . | kubectl apply -f - -``` diff --git a/sources/crashes/kustomization.yaml b/sources/crashes/kustomization.yaml deleted file mode 100644 index 5e13005e..00000000 --- a/sources/crashes/kustomization.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -commonLabels: - app.kubernetes.io/part-of: crashes - -resources: -- ./postgis.yaml -- ./shiny.yaml - -images: -- name: quay.io/codeformuenster/crashes-shiny - newTag: v6.7.2 -- name: quay.io/codeformuenster/verkehrsunfaelle - newTag: 2019-11-15 - -# inventory: -# type: ConfigMap -# configMap: -# name: prune-crashes -# # namespace: crashes diff --git a/sources/crashes/postgis.yaml b/sources/crashes/postgis.yaml deleted file mode 100644 index 3996b779..00000000 --- a/sources/crashes/postgis.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: postgis - labels: - app.kubernetes.io/name: postgis - app.kubernetes.io/component: database -spec: - ports: - - name: postgres - port: 5432 - protocol: TCP - selector: - app.kubernetes.io/name: postgis - app.kubernetes.io/component: database - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: postgis - labels: - app.kubernetes.io/name: postgis - app.kubernetes.io/component: database -spec: - selector: - matchLabels: - app.kubernetes.io/name: postgis - app.kubernetes.io/component: database - replicas: 1 - strategy: - type: Recreate - template: - metadata: - labels: - app.kubernetes.io/name: postgis - app.kubernetes.io/component: database - spec: - terminationGracePeriodSeconds: 10 - containers: - - name: postgis - image: quay.io/codeformuenster/verkehrsunfaelle:2019-06-06 - ports: - - name: postgres - containerPort: 5432 - resources: - requests: - memory: "512Mi" - cpu: "100m" - # limits: - # cpu: "5000m" diff --git a/sources/digitrans/README.md b/sources/digitrans/README.md deleted file mode 100644 index f4b13bd4..00000000 --- a/sources/digitrans/README.md +++ /dev/null @@ -1,98 +0,0 @@ -# digitrans - -see: -- https://digitransit.fi/en/ -- https://github.com/verschwoerhaus/digitransit-kubernetes - - -```bash -kubectl create namespace digitrans -kustomize build . | kubectl apply -f - -``` - - - -## Docker images: - -**digitransit-proxy-vsh** -https://hub.docker.com/r/verschwoerhaus/digitransit-proxy-vsh -https://github.com/verschwoerhaus/digitransit-proxy/blob/vsh/Dockerfile - -https://github.com/HSLdevcom/digitransit-proxy/compare/master...verschwoerhaus:vsh - -```conf -common.conf - location /geocoding/v1/ { - proxy_pass http://photon-pelias-adapter:8080/; - - location /routing/v1/routers/vsh { - proxy_pass http://opentripplanner-vsh:8080/; - - location /routing-data/v2/vsh { - proxy_pass http://opentripplanner-data-con-vsh:8080/; - include cors.conf; - ; add_header 'Access-Control-Allow-Origin' '*'; - ; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - ; add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; - - location /ui/v1/vsh/ { - proxy_pass http://digitransit-ui-vsh:8080; - - location /map/v1/ { - proxy_pass http://hsl-map-server:8080; - proxy_cache tiles; - ; what? - - location /graphiql/ { - proxy_pass http://graphiql:8080; -``` - -```conf -external.conf - # swu gtfs: http://gtfs.swu.de/daten/SWU.zip - location /out/gtfs.swu.de/ { - proxy_pass http://gtfs.swu.de; - ; what? -``` - -```conf -nginx.conf - http { - server { - server_name api.digitransit.im.verschwoerhaus.de - ""; - - server { - server_name digitransit.im.verschwoerhaus.de; - - location = /sw.js { - proxy_pass http://digitransit-ui-vsh:8080; - - location / { - proxy_pass http://digitransit-ui-vsh:8080; - -``` - -**digitransit-ui** -https://hub.docker.com/r/verschwoerhaus/digitransit-ui -https://github.com/verschwoerhaus/digitransit-ui/blob/ulm/Dockerfile - -**graphiql** -https://hub.docker.com/r/verschwoerhaus/graphiql -https://github.com/HSLdevcom/graphiql-deployment/blob/master/Dockerfile - -**hsl-map-server** -https://hub.docker.com/r/verschwoerhaus/hsl-map-server -https://github.com/verschwoerhaus/hsl-map-server/blob/ulm/Dockerfile - -**opentripplanner-data-container-vsh** -https://hub.docker.com/r/verschwoerhaus/opentripplanner-data-container-vsh -https://github.com/verschwoerhaus/OpenTripPlanner-data-container/blob/ulm/Dockerfile - -**opentripplanner** -https://hub.docker.com/r/hsldevcom/opentripplanner -https://github.com/HSLdevcom/OpenTripPlanner/blob/master/Dockerfile - -**photon-pelias-adapter** -https://hub.docker.com/r/stadtulm/photon-pelias-adapter -https://github.com/stadtulm/photon-pelias-adapter diff --git a/sources/digitrans/digitransit-proxy.yaml b/sources/digitrans/digitransit-proxy.yaml deleted file mode 100644 index 8a39394f..00000000 --- a/sources/digitrans/digitransit-proxy.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: digitransit-proxy -spec: - selector: - app: digitransit-proxy - ports: - - name: http - protocol: TCP - port: 80 - targetPort: 8080 - externalIPs: - - 192.168.10.8 -# FIXME! ingress - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: digitransit-proxy - labels: - app: digitransit-proxy -spec: - replicas: 1 - selector: - matchLabels: - app: digitransit-proxy - template: - metadata: - labels: - app: digitransit-proxy - spec: - containers: - - name: digitransit-proxy - image: verschwoerhaus/digitransit-proxy-vsh:01671d2 - imagePullPolicy: "Always" - ports: - - containerPort: 8080 \ No newline at end of file diff --git a/sources/digitrans/digitransit-ui.yaml b/sources/digitrans/digitransit-ui.yaml deleted file mode 100644 index 81da6281..00000000 --- a/sources/digitrans/digitransit-ui.yaml +++ /dev/null @@ -1,48 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: digitransit-ui-vsh -spec: - selector: - app: digitransit-ui - ports: - - name: http - protocol: TCP - port: 8080 - targetPort: 8080 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: digitransit-ui - labels: - app: digitransit-ui -spec: - replicas: 1 - selector: - matchLabels: - app: digitransit-ui - template: - metadata: - labels: - app: digitransit-ui - spec: - containers: - - name: digitransit-ui - image: verschwoerhaus/digitransit-ui:1172406 - imagePullPolicy: "Always" - ports: - - containerPort: 8080 - env: - - name: CONFIG - value: vsh - - name: OTP_URL - value: "https://api.digitransit.im.verschwoerhaus.de/routing/v1/routers/vsh/" - - name: GEOCODING_BASE_URL - value: "https://api.digitransit.im.verschwoerhaus.de/geocoding/v1" - #- name: LOCATIONIQ_API_KEY - # valueFrom: - # secretKeyRef: - # name: digitransit-ui - # key: LOCATIONIQ_API_KEY \ No newline at end of file diff --git a/sources/digitrans/graphiql.yaml b/sources/digitrans/graphiql.yaml deleted file mode 100644 index aa2458f9..00000000 --- a/sources/digitrans/graphiql.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: graphiql -spec: - selector: - app: graphiql - ports: - - name: http - protocol: TCP - port: 8080 - targetPort: 8080 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: graphiql - labels: - app: graphiql -spec: - replicas: 1 - selector: - matchLabels: - app: graphiql - template: - metadata: - labels: - app: graphiql - spec: - containers: - - name: graphiql - image: verschwoerhaus/graphiql:2019-10-30 - imagePullPolicy: "Always" - ports: - - containerPort: 8080 - env: - - name: URL_PREFIX - value: https://api.digitransit.im.verschwoerhaus.de \ No newline at end of file diff --git a/sources/digitrans/hsl-map-server.yaml b/sources/digitrans/hsl-map-server.yaml deleted file mode 100644 index 3955f2b6..00000000 --- a/sources/digitrans/hsl-map-server.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: hsl-map-server -spec: - selector: - app: hsl-map-server - ports: - - name: http - protocol: TCP - port: 8080 - targetPort: 8080 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: hsl-map-server - labels: - app: hsl-map-server -spec: - replicas: 1 - selector: - matchLabels: - app: hsl-map-server - template: - metadata: - labels: - app: hsl-map-server - spec: - containers: - - name: hsl-map-server - image: verschwoerhaus/hsl-map-server:b4adf23 - imagePullPolicy: "Always" - ports: - - containerPort: 8080 - env: - - name: OTP_URL - value: opentripplanner-vsh:8080/otp/routers/vsh/index/graphql \ No newline at end of file diff --git a/sources/digitrans/ingress.yaml b/sources/digitrans/ingress.yaml deleted file mode 100644 index 44abc7dc..00000000 --- a/sources/digitrans/ingress.yaml +++ /dev/null @@ -1,84 +0,0 @@ ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: digitrans -spec: - rules: - - host: digitrans.codeformuenster.org - http: - paths: - - path: / - backend: - serviceName: digitransit-ui-vsh - servicePort: 8080 - tls: - - hosts: - - digitrans.codeformuenster.org - - api.digitrans.codeformuenster.org - secretName: digitrans-ingress-cert - ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: digitrans-api -spec: - rules: - - host: api.digitrans.codeformuenster.org - http: - paths: - # # Health check - # location / { - # root /opt/nginx/www; - # index index.html; - # } - - path: /geocoding/v1 - backend: - serviceName: photon-pelias-adapter - servicePort: 8080 - - path: /routing/v1/routers/vsh - backend: - serviceName: opentripplanner-vsh - servicePort: 8080 - - path: /routing-data/v2/vsh - backend: - serviceName: opentripplanner-data-con-vsh - servicePort: 8080 - # include cors.conf; - # ; add_header 'Access-Control-Allow-Origin' '*'; - # ; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - # ; add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; - - path: /ui/v1/vsh - backend: - serviceName: digitransit-ui-vsh - servicePort: 8080 - - path: /map/v1 - backend: - serviceName: hsl-map-server - servicePort: 8080 - # proxy_cache tiles; - - path: /graphiql - backend: - serviceName: graphiql - servicePort: 8080 - tls: - - hosts: - - digitrans.codeformuenster.org - - api.digitrans.codeformuenster.org - secretName: digitrans-ingress-cert - ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Certificate -metadata: - name: digitrans-ingress -spec: - secretName: digitrans-ingress-cert - # commonName: digitrans.codeformuenster.org - dnsNames: - - digitrans.codeformuenster.org - - api.digitrans.codeformuenster.org - issuerRef: - kind: ClusterIssuer - name: letsencrypt diff --git a/sources/digitrans/kustomization.yaml b/sources/digitrans/kustomization.yaml deleted file mode 100644 index 171d907f..00000000 --- a/sources/digitrans/kustomization.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: digitrans -commonLabels: - app.kubernetes.io/part-of: digitrans - -resources: -- ./digitransit-proxy.yaml -- ./digitransit-ui.yaml -- ./graphiql.yaml -- ./hsl-map-server.yaml -- ./opentripplanner.yaml -- ./photon-pelias.yaml -- ./ingress.yaml - -# patches: -# - ./controller-configmap-patches.yaml - - -images: -- name: verschwoerhaus/digitransit-proxy-vsh - newTag: 01671d2 -- name: verschwoerhaus/digitransit-ui - newTag: "1172406" -- name: verschwoerhaus/graphiql - newTag: 2019-10-30 -- name: verschwoerhaus/hsl-map-server - newTag: b4adf23 -- name: verschwoerhaus/opentripplanner-data-container-vsh - newTag: 2019-10-28-latest -- name: hsldevcom/opentripplanner - newTag: a0c7971f62251a3a1070652a3895c628557e1b62 -- name: stadtulm/photon-pelias-adapter - newTag: 5903fc0 diff --git a/sources/digitrans/opentripplanner.yaml b/sources/digitrans/opentripplanner.yaml deleted file mode 100644 index c4de65b8..00000000 --- a/sources/digitrans/opentripplanner.yaml +++ /dev/null @@ -1,80 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: opentripplanner-data-con-vsh -spec: - selector: - app: opentripplanner-data-container-vsh - ports: - - name: http - protocol: TCP - port: 8080 - targetPort: 8080 - ---- -apiVersion: v1 -kind: Service -metadata: - name: opentripplanner-vsh -spec: - selector: - app: opentripplanner - ports: - - name: http - protocol: TCP - port: 8080 - targetPort: 8080 - - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: opentripplanner-data-container-vsh - labels: - app: opentripplanner-data-container-vsh -spec: - replicas: 1 - selector: - matchLabels: - app: opentripplanner-data-container-vsh - template: - metadata: - labels: - app: opentripplanner-data-container-vsh - spec: - containers: - - name: opentripplanner-data-container-vsh - image: verschwoerhaus/opentripplanner-data-container-vsh:2019-10-28-latest - imagePullPolicy: "Always" - ports: - - containerPort: 8080 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: opentripplanner - labels: - app: opentripplanner -spec: - replicas: 1 - selector: - matchLabels: - app: opentripplanner - template: - metadata: - labels: - app: opentripplanner - spec: - containers: - - name: opentripplanner - image: hsldevcom/opentripplanner:a0c7971f62251a3a1070652a3895c628557e1b62 - imagePullPolicy: "Always" - ports: - - containerPort: 8080 - env: - - name: ROUTER_NAME - value: vsh - - name: ROUTER_DATA_CONTAINER_URL - value: http://opentripplanner-data-con-vsh:8080 \ No newline at end of file diff --git a/sources/digitrans/photon-pelias.yaml b/sources/digitrans/photon-pelias.yaml deleted file mode 100644 index 6d4b9256..00000000 --- a/sources/digitrans/photon-pelias.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: photon-pelias-adapter -spec: - selector: - app: photon-pelias-adapter - ports: - - name: http - protocol: TCP - port: 8080 - targetPort: 8080 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: photon-pelias-adapter - labels: - app: photon-pelias-adapter -spec: - replicas: 1 - selector: - matchLabels: - app: photon-pelias-adapter - template: - metadata: - labels: - app: photon-pelias-adapter - spec: - containers: - - name: photon-pelias-adapter - image: stadtulm/photon-pelias-adapter:5903fc0 - imagePullPolicy: "Always" - ports: - - containerPort: 8080 - env: - - name: PHOTON_URL - value: https://api.mfdz.de/photon/ \ No newline at end of file diff --git a/sources/digitransit/README.md b/sources/digitransit/README.md deleted file mode 100644 index 826e3cf5..00000000 --- a/sources/digitransit/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Digitrans - -see: -- https://digitransit.fi/en/ -- https://github.com/verschwoerhaus/digitransit-kubernetes -- https://digitransit.fi/en/services/ - -- https://github.com/HSLdevcom/digitransit-kubernetes-deploy/blob/master/roles/aks-apply/files/prod/graphiql-prod.yml - -```bash -kubectl create namespace digitransit -kustomize build . | kubectl apply -f - -``` - -## Configuring Realtime - -http://docs.opentripplanner.org/en/latest/Configuration/#real-time-data - diff --git a/sources/digitransit/configs/digitransit/config.cfm.js b/sources/digitransit/configs/digitransit/config.cfm.js deleted file mode 100644 index aed6ba84..00000000 --- a/sources/digitransit/configs/digitransit/config.cfm.js +++ /dev/null @@ -1,248 +0,0 @@ -/* eslint-disable */ -import configMerger from '../util/configMerger'; - -const CONFIG = 'cfm'; -const APP_TITLE = 'Digitransit'; -const APP_DESCRIPTION = 'Digitransit'; - -const API_URL = 'https://api.digitransit.codeformuenster.org'; -const MAP_URL = 'https://maps.wikimedia.org/osm-intl/'; -const GEOCODING_BASE_URL = 'https://pelias.locationiq.org/v1'; -const LOCATIONIQ_API_KEY = process.env.LOCATIONIQ_API_KEY; - -const walttiConfig = require('./waltti').default; - -const minLat = 51.4807; -const maxLat = 52.4711; -const minLon = 6.3863; -const maxLon = 8.3180; - -export default configMerger(walttiConfig, { - CONFIG, - - URL: { - OTP: 'https://api.digitransit.codeformuenster.org/routing/v1/routers/cfm/', - MAP: { - default: MAP_URL, - }, - STOP_MAP: `${API_URL}/map/v1/stop-map/`, - CITYBIKE_MAP: `${API_URL}/map/v1/citybike-map/`, - // FIXME api-key via url - PELIAS: `${GEOCODING_BASE_URL}/search${LOCATIONIQ_API_KEY ? '?api_key=' + LOCATIONIQ_API_KEY : ''}`, - PELIAS_REVERSE_GEOCODER: `${GEOCODING_BASE_URL}/reverse${LOCATIONIQ_API_KEY ? '?api_key=' + LOCATIONIQ_API_KEY : ''}`, - }, - - appBarLink: { name: 'cfm', href: 'https://codeformuenster.org/' }, - - colors: { - primary: '$livi-blue', - }, - -// socialMedia: { -// title: APP_TITLE, -// description: APP_DESCRIPTION, -// }, - - socialMedia: { - title: APP_TITLE, - description: APP_DESCRIPTION, - - image: { - url: '/img/hsl-social-share.png', - width: 400, - height: 400, - }, - - twitter: { - card: 'summary', - site: '@codeformuenster', - }, - }, - - title: APP_TITLE, - - textLogo: true, - - - availableLanguages: ['de', 'en'], - defaultLanguage: 'de', - // This timezone data will expire on 31.12.2020 - // https://momentjs.com/timezone/docs/#/data-formats/packed-format/ - // timezoneData: - // 'Europe/Helsinki|EET EEST|-20 -30|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 ' + - // 'WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5', - timezoneData: 'Europe/Berlin|CET CEST CEMT|-10 -20 -30|01010101010101210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 kL0 Nc0 m10 WM0 1ao0 1cp0 dX0 jz0 Dd0 1io0 17c0 1fA0 1a00 1ehA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e5', - - mainMenu: { - // Whether to show the left menu toggle button at all - show: true, - showDisruptions: true, - showLoginCreateAccount: true, - showOffCanvasList: true, - }, - - // mainMenu: { - // // Whether to show the left menu toggle button at all - // show: true, - // showDisruptions: false, - // showLoginCreateAccount: false, - // showOffCanvasList: true, - // }, - - feedIds: ['STWMS'], - - realTime: { - STWMS: { - active: true, - gtfsrt: true, - credentials: { username: 'user', password: 'userpass' }, - mqtt: 'wss://mosquitto.digitransit.codeformuenster.org/mqtt', - routeSelector (routePageProps) { - const route = routePageProps.route.gtfsId.split(':'); - return route[1]; - }, - mqttTopicResolver: ( - route, - direction, - tripStartTime, - headsign, // eslint-disable-line no-unused-vars - feedId, // eslint-disable-line no-unused-vars - tripId, // eslint-disable-line no-unused-vars - geoHash, // eslint-disable-line no-unused-vars - ) => { - // console.log('resolver', { route, direction, tripStartTime, headsign, feedId, tripId, geoHash }); - return ( - `/gtfsrt/vp/${feedId}/+/+/+/${ - route - }/${ - direction - }/+/${ - tripStartTime - }/#` - ); - }, - }, - }, - - cityBike: { - showCityBikes: true, - networks: {} - }, - - streetModes: { - bicycle: { - availableForSelection: true, - defaultValue: false, - icon: 'biking', - }, - - car_park: { - availableForSelection: true, - defaultValue: false, - icon: 'car-withoutBox', - }, - - car: { - availableForSelection: false, - defaultValue: false, - icon: 'car_park-withoutBox', - }, - }, - - searchParams: { - 'boundary.rect.min_lat': minLat, - 'boundary.rect.max_lat': maxLat, - 'boundary.rect.min_lon': minLon, - 'boundary.rect.max_lon': maxLon, - }, - - areaPolygon: [ - [minLon, minLat], - [minLon, maxLat], - [maxLon, maxLat], - [maxLon, minLat], - ], - - defaultEndpoint: { - address: 'Domplatz', - lat: 51.9625, - lon: 7.626, - }, - - defaultOrigins: [ - { - icon: 'icon-icon_star', - label: 'Bült', - lat: 51.9635, - lon: 7.6314 - }, { - icon: 'icon-icon_rail', - label: 'Hauptbahnhof', - lat: 51.9568, - lon: 7.63415 - }, { - icon: 'icon-icon_star', - label: 'Coesfelder Kreuz', - lat: 51.9649, - lon: 7.6 - }, - ], - - showAllBusses: true, - showVehiclesOnStopPage: true, - showRouteInformation: true, - - map: { - useRetinaTiles: true, - tileSize: 256, - zoomOffset: 0, - }, - - footer: { - content: [ - { label: `cfm ${walttiConfig.YEAR}` }, - {}, - { - name: 'footer-feedback', - nameEn: 'Submit feedback', - href: 'https://github.com/codeformuenster/digitransit-ui/issues', - icon: 'icon-icon_speech-bubble', - }, - // { - // name: 'about-this-service', - // nameEn: 'About this service', - // route: '/tietoja-palvelusta', - // icon: 'icon-icon_info', - // }, - ], - }, - - aboutThisService: { - fi: [ - { - header: 'Tietoja palvelusta', - paragraphs: [ - 'Tämän palvelun tarjoaa Cfm reittisuunnittelua varten Cfm alueella. Palvelu kattaa joukkoliikenteen, kävelyn, pyöräilyn ja yksityisautoilun rajatuilta osin. Palvelu perustuu Digitransit-palvelualustaan.', - ], - }, - ], - - sv: [ - { - header: 'Om tjänsten', - paragraphs: [ - 'Den här tjänsten erbjuds av Cfm för reseplanering inom Cfm region. Reseplaneraren täcker med vissa begränsningar kollektivtrafik, promenad, cykling samt privatbilism. Tjänsten baserar sig på Digitransit-plattformen.', - ], - }, - ], - - en: [ - { - header: 'About this service', - paragraphs: [ - 'This service is provided by Cfm for route planning in Cfm region. The service covers public transport, walking, cycling, and some private car use. Service is built on Digitransit platform.', - ], - }, - ], - }, -}); diff --git a/sources/digitransit/configs/digitransit/config.default.js b/sources/digitransit/configs/digitransit/config.default.js deleted file mode 100644 index 57f09c7b..00000000 --- a/sources/digitransit/configs/digitransit/config.default.js +++ /dev/null @@ -1,776 +0,0 @@ -/* eslint-disable prefer-template */ -import safeJsonParse from '../util/safeJsonParser'; - -const CONFIG = process.env.CONFIG || 'default'; -const API_URL = process.env.API_URL || 'https://dev-api.digitransit.fi'; -const GEOCODING_BASE_URL = `${API_URL}/geocoding/v1`; -const MAP_URL = - process.env.MAP_URL || 'https://digitransit-dev-cdn-origin.azureedge.net'; -const APP_PATH = process.env.APP_CONTEXT || ''; -const { SENTRY_DSN } = process.env; -const PORT = process.env.PORT || 8080; -const APP_DESCRIPTION = 'Digitransit journey planning UI'; -const OTP_TIMEOUT = process.env.OTP_TIMEOUT || 12000; -const YEAR = 1900 + new Date().getYear(); -const realtime = require('./realtimeUtils').default; - -const REALTIME_PATCH = safeJsonParse(process.env.REALTIME_PATCH) || {}; - -export default { - SENTRY_DSN, - PORT, - CONFIG, - OTPTimeout: OTP_TIMEOUT, - URL: { - API_URL, - ASSET_URL: process.env.ASSET_URL, - MAP_URL, - OTP: process.env.OTP_URL || `${API_URL}/routing/v1/routers/finland/`, - MAP: { - default: `${MAP_URL}/map/v1/hsl-map/`, - sv: `${MAP_URL}/map/v1/hsl-map-sv/`, - }, - STOP_MAP: `${MAP_URL}/map/v1/finland-stop-map/`, - CITYBIKE_MAP: `${MAP_URL}/map/v1/finland-citybike-map/`, - FONT: - 'https://fonts.googleapis.com/css?family=Lato:300,400,900%7CPT+Sans+Narrow:400,700', - PELIAS: `${process.env.GEOCODING_BASE_URL || GEOCODING_BASE_URL}/search`, - PELIAS_REVERSE_GEOCODER: `${process.env.GEOCODING_BASE_URL || - GEOCODING_BASE_URL}/reverse`, - PELIAS_PLACE: `${process.env.GEOCODING_BASE_URL || - GEOCODING_BASE_URL}/place`, - ROUTE_TIMETABLES: { - HSL: `${API_URL}/timetables/v1/hsl/routes/`, - tampere: 'http://joukkoliikenne.tampere.fi/media/aikataulut/', - }, - STOP_TIMETABLES: { - HSL: `${API_URL}/timetables/v1/hsl/stops/`, - tampere: 'https://www.tampere.fi/ekstrat/ptdata/pdf/', - }, - }, - - APP_PATH: `${APP_PATH}`, - title: 'Reittihaku', - - textLogo: false, - // Navbar logo - logo: 'default/digitransit-logo.png', - - contactName: { - sv: 'Digitransit', - fi: 'Digitransit', - default: "Digitransit's", - }, - - // Default labels for manifest creation - name: 'Digitransit beta', - shortName: 'Digitransit', - - searchParams: {}, - feedIds: [], - - realTime: realtime, - realTimePatch: REALTIME_PATCH, - - // Google Tag Manager id - GTMid: 'GTM-PZV2S2V', - - /* - * by default search endpoints from all but gtfs sources, correct gtfs source - * figured based on feedIds config variable - */ - searchSources: ['oa', 'osm', 'nlsfi'], - - search: { - suggestions: { - useTransportIcons: false, - }, - usePeliasStops: false, - mapPeliasModality: false, - peliasMapping: {}, - peliasLayer: null, - peliasLocalization: null, - minimalRegexp: new RegExp('.{2,}'), - }, - - nearbyRoutes: { - radius: 10000, - bucketSize: 1000, - }, - - defaultSettings: { - accessibilityOption: 0, - bikeSpeed: 5, - minTransferTime: 120, - optimize: 'QUICK', - preferredRoutes: [], - ticketTypes: null, - transferPenalty: 0, - unpreferredRoutes: [], - walkBoardCost: 600, - walkReluctance: 2, - walkSpeed: 1.2, - }, - - /** - * These are used for dropdown selection of values to override the default - * settings. This means that values ought to be relative to the current default. - * If not, the selection may not make any sense. - */ - defaultOptions: { - walkBoardCost: { - least: 3600, - less: 1200, - more: 360, - most: 120, - }, - walkReluctance: { - least: 5, - less: 3, - more: 1, - most: 0.2, - }, - }, - - quickOptions: { - public_transport: { - availableOptionSets: [ - 'least-transfers', - 'least-walking', - 'public-transport-with-bicycle', - 'saved-settings', - ], - }, - walk: { - availableOptionSets: ['prefer-walking-routes', 'saved-settings'], - }, - bicycle: { - availableOptionSets: [ - 'least-elevation-changes', - 'prefer-greenways', - 'saved-settings', - ], - }, - car_park: { - availableOptionSets: [ - 'least-transfers', - 'least-walking', - 'saved-settings', - ], - }, - }, - - maxWalkDistance: 10000, - maxBikingDistance: 100000, - itineraryFiltering: 1.5, // drops 66% worse routes - useUnpreferredRoutesPenalty: 1200, // adds 10 minute (weight) penalty to routes that are unpreferred - availableLanguages: ['fi', 'sv', 'en', 'fr', 'nb', 'de'], - defaultLanguage: 'en', - // This timezone data will expire on 31.12.2020 - timezoneData: - 'Europe/Helsinki|EET EEST|-20 -30|01010101010101010101010|1BWp0 1qM0 WM0 1qM0 ' + - 'WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5', - - mainMenu: { - // Whether to show the left menu toggle button at all - show: true, - showDisruptions: true, - showLoginCreateAccount: true, - showOffCanvasList: true, - }, - - itinerary: { - // How long vehicle should be late in order to mark it delayed. Measured in seconds. - delayThreshold: 180, - // Wait time to show "wait leg"? e.g. 180 means over 3 minutes are shown as wait time. - // Measured in seconds. - waitThreshold: 180, - enableFeedback: false, - - timeNavigation: { - enableButtonArrows: false, - }, - - showZoneLimits: false, - }, - - nearestStopDistance: { - maxShownDistance: 5000, - }, - - map: { - useRetinaTiles: true, - tileSize: 512, - zoomOffset: -1, - minZoom: 1, - maxZoom: 18, - controls: { - zoom: { - // available controls positions: 'topleft', 'topright', 'bottomleft, 'bottomright' - position: 'bottomleft', - }, - scale: { - position: 'bottomright', - }, - }, - genericMarker: { - // Do not render name markers at zoom levels below this value - nameMarkerMinZoom: 18, - - popup: { - offset: [106, 16], - maxWidth: 250, - minWidth: 250, - }, - }, - - line: { - halo: { - weight: 7, - thinWeight: 4, - }, - - leg: { - weight: 5, - thinWeight: 2, - }, - - passiveColor: '#758993', - }, - - useModeIconsInNonTileLayer: false, - }, - - stopCard: { - header: { - showDescription: true, - showStopCode: true, - showDistance: true, - showZone: false, - }, - }, - - autoSuggest: { - // Let Pelias suggest based on current user location - locationAware: true, - }, - - cityBike: { - // Config for map features. NOTE: availability for routing is controlled by - // transportModes.citybike.availableForSelection - showStationId: true, - cityBikeMinZoom: 14, - cityBikeSmallIconZoom: 14, - // When should bikeshare availability be rendered in orange rather than green - fewAvailableCount: 3, - networks: {}, - }, - - // Lowest level for stops and terminals are rendered - stopsMinZoom: 13, - // Highest level when stops and terminals are still rendered as small markers - stopsSmallMaxZoom: 14, - // Highest level when terminals are still rendered instead of individual stops - terminalStopsMaxZoom: 17, - terminalStopsMinZoom: 12, - terminalNamesZoom: 16, - stopsIconSize: { - small: 8, - selected: 28, - default: 18, - }, - - appBarLink: { name: 'Digitransit', href: 'https://www.digitransit.fi/' }, - - colors: { - primary: '#00AFFF', - }, - - sprites: 'assets/svg-sprite.default.svg', - - disruption: { - showInfoButton: true, - }, - - agency: { - show: true, - }, - - socialMedia: { - title: 'Digitransit', - description: APP_DESCRIPTION, - locale: 'en_US', - - image: { - url: '/img/default-social-share.png', - width: 2400, - height: 1260, - }, - - twitter: { - card: 'summary_large_image', - site: '@hsldevcom', - }, - }, - - meta: { - description: APP_DESCRIPTION, - keywords: 'digitransit', - }, - - // Ticket information feature toggle - showTicketInformation: false, - ticketInformation: { - // This is the name of the primary agency operating in the area. - // It is used when a ticket price cannot be shown to the user, indicating - // that the primary agency is not responsible for ticketing. - /* - primaryAgencyName: ..., - */ - // UTM parameters (per agency) that should be appended to the agency's - // fareUrl when the fareUrl link is shown in the UI. - /* - trackingParameters: { - "agencyGtfsId": { - utm_campaign: ..., - utm_content: ..., - utm_medium: ..., - utm_source: ..., - } - }, - */ - }, - - useTicketIcons: false, - showRouteInformation: false, - - modeToOTP: { - bus: 'BUS', - tram: 'TRAM', - rail: 'RAIL', - subway: 'SUBWAY', - citybike: 'BICYCLE_RENT', - airplane: 'AIRPLANE', - ferry: 'FERRY', - walk: 'WALK', - bicycle: 'BICYCLE', - car: 'CAR', - car_park: 'CAR_PARK', - public_transport: 'WALK', - }, - - // Control what transport modes that should be possible to select in the UI - // and whether the transport mode is used in trip planning by default. - transportModes: { - bus: { - availableForSelection: true, - defaultValue: true, - }, - - tram: { - availableForSelection: true, - defaultValue: true, - }, - - rail: { - availableForSelection: true, - defaultValue: true, - }, - - subway: { - availableForSelection: true, - defaultValue: true, - }, - - airplane: { - availableForSelection: true, - defaultValue: true, - }, - - ferry: { - availableForSelection: true, - defaultValue: true, - }, - - citybike: { - availableForSelection: false, // TODO: Turn off in autumn - defaultValue: false, // always false - }, - }, - - streetModes: { - public_transport: { - availableForSelection: true, - defaultValue: true, - exclusive: false, - icon: 'bus-withoutBox', - }, - - walk: { - availableForSelection: true, - defaultValue: false, - exclusive: true, - icon: 'walk', - }, - - bicycle: { - availableForSelection: true, - defaultValue: false, - exclusive: true, - icon: 'bicycle-withoutBox', - }, - - car: { - availableForSelection: true, - defaultValue: false, - exclusive: true, - icon: 'car-withoutBox', - }, - - car_park: { - availableForSelection: false, - defaultValue: false, - exclusive: false, - icon: 'car_park-withoutBox', - }, - }, - - accessibilityOptions: [ - { - messageId: 'accessibility-nolimit', - displayName: 'Ei rajoitusta', - value: '0', - }, - { - messageId: 'accessibility-limited', - displayName: 'Liikun pyörätuolilla', - value: '1', - }, - ], - - moment: { - relativeTimeThreshold: { - seconds: 55, - minutes: 59, - hours: 23, - days: 26, - months: 11, - }, - }, - - customizeSearch: { - walkReluctance: { - available: true, - }, - - walkBoardCost: { - available: true, - }, - - transferMargin: { - available: true, - }, - - walkingSpeed: { - available: true, - }, - - ticketOptions: { - available: true, - }, - - accessibility: { - available: true, - }, - transferpenalty: { - available: true, - }, - }, - - areaPolygon: [ - [18.776, 60.3316], - [18.9625, 60.7385], - [19.8615, 60.8957], - [20.4145, 61.1942], - [20.4349, 61.9592], - [19.7853, 63.2157], - [20.4727, 63.6319], - [21.6353, 63.8559], - [23.4626, 64.7794], - [23.7244, 65.3008], - [23.6873, 65.8569], - [23.2069, 66.2701], - [23.4627, 66.8344], - [22.9291, 67.4662], - [23.0459, 67.9229], - [20.5459, 68.7605], - [20.0996, 69.14], - [21.426, 69.4835], - [21.9928, 69.4009], - [22.9226, 68.8678], - [23.8108, 69.0145], - [24.6903, 68.8614], - [25.2262, 69.0596], - [25.4029, 69.7235], - [26.066, 70.0559], - [28.2123, 70.2496], - [29.5813, 69.7854], - [29.8467, 69.49], - [28.9502, 68.515], - [30.4855, 67.6952], - [29.4962, 66.9232], - [30.5219, 65.8728], - [30.1543, 64.9646], - [30.9641, 64.1321], - [30.572, 63.7098], - [31.5491, 63.3309], - [31.9773, 62.9304], - [31.576, 62.426], - [27.739, 60.1117], - [26.0945, 59.8015], - [22.4235, 59.3342], - [20.2983, 59.2763], - [19.3719, 59.6858], - [18.7454, 60.1305], - [18.776, 60.3316], - ], - - // Minimun distance between from and to locations in meters. User is noticed - // if distance is less than this. - minDistanceBetweenFromAndTo: 20, - - // If certain mode(s) only exist in limited number of areas, listing the areas as a list of polygons for - // selected mode key will remove the mode(s) from queries if no coordinates in the query are within the polygon(s). - // This reduces complexity in finding routes for the query. - modePolygons: {}, - - footer: { - content: [ - { label: `© HSL, Traficom ${YEAR}` }, - {}, - { - name: 'footer-feedback', - nameEn: 'Submit feedback', - href: 'https://github.com/HSLdevcom/digitransit-ui/issues', - icon: 'icon-icon_speech-bubble', - }, - { - name: 'about-this-service', - nameEn: 'About this service', - route: '/tietoja-palvelusta', - icon: 'icon-icon_info', - }, - ], - }, - - // Default origin endpoint to use when user is outside of area - defaultEndpoint: { - address: 'Helsinki-Vantaan Lentoasema', - lat: 60.317429, - lon: 24.9690395, - }, - defaultOrigins: [ - { - icon: 'icon-icon_airplane', - label: 'Helsinki-Vantaan lentoasema', - lat: 60.317429, - lon: 24.9690395, - }, - { - icon: 'icon-icon_ferry', - label: 'Turun satama', - lat: 60.436363, - lon: 22.220002, - }, - { - icon: 'icon-icon_airplane', - label: 'Rovaniemen lentoasema', - lat: 66.557326, - lon: 25.828135, - }, - ], - - availableRouteTimetables: {}, - - routeTimetableUrlResolver: {}, - - aboutThisService: { - fi: [ - { - header: 'Tietoja palvelusta', - paragraphs: [ - 'Palvelu kattaa joukkoliikenteen, kävelyn, pyöräilyn ja yksityisautoilun rajatuilta osin. Palvelu perustuu Digitransit-palvelualustaan.', - ], - }, - { - header: 'Digitransit-palvelualusta', - paragraphs: [ - 'Digitransit-palvelualusta on HSL:n ja Traficomin kehittämä avoimen lähdekoodin reititystuote.', - ], - }, - { - header: 'Tietolähteet', - paragraphs: [ - 'Kartat, tiedot kaduista, rakennuksista, pysäkkien sijainnista ynnä muusta tarjoaa © OpenStreetMap contributors. Osoitetiedot tuodaan Väestörekisterikeskuksen rakennustietorekisteristä. Joukkoliikenteen reitit ja aikataulut ladataan Traficomin valtakunnallisesta joukkoliikenteen tietokannasta.', - ], - }, - ], - - sv: [ - { - header: 'Om tjänsten', - paragraphs: [ - 'Reseplaneraren täcker med vissa begränsningar kollektivtrafik, promenad, cykling samt privatbilism. Tjänsten baserar sig på Digitransit-plattformen.', - ], - }, - { - header: 'Digitransit-plattformen', - paragraphs: [ - 'Digitransit-plattformen är en öppen programvara utvecklad av HRT och Traficom.', - ], - }, - { - header: 'Datakällor', - paragraphs: [ - 'Kartor, gator, byggnader, hållplatser och dylik information erbjuds av © OpenStreetMap contributors. Addressinformation hämtas från BRC:s byggnadsinformationsregister. Kollektivtrafikens rutter och tidtabeller hämtas från Traficoms landsomfattande kollektivtrafiksdatabas.', - ], - }, - ], - - en: [ - { - header: 'About this service', - paragraphs: [ - 'The service covers public transport, walking, cycling, and some private car use. Service is built on Digitransit platform.', - ], - }, - { - header: 'Digitransit platform', - paragraphs: [ - 'The Digitransit service platform is an open source routing platform developed by HSL and Traficom.', - ], - }, - { - header: 'Data sources', - paragraphs: [ - "Maps, streets, buildings, stop locations etc. are provided by © OpenStreetMap contributors. Address data is retrieved from the Building and Dwelling Register of the Finnish Population Register Center. Public transport routes and timetables are downloaded from Traficom's national public transit database.", - ], - }, - ], - nb: {}, - fr: {}, - de: {}, - }, - - staticMessages: [], - - staticIEMessage: [ - { - id: '3', - priority: -1, - shouldTrigger: true, - content: { - fi: [ - { - type: 'text', - content: - 'Palvelu ei tue käyttämääsi selainta. Päivitä selainohjelmasi tai lataa uusi selain oheisista linkeistä.\n', - }, - { - type: 'a', - content: 'Google Chrome', - href: 'https://www.google.com/chrome/', - }, - { - type: 'a', - content: 'Firefox', - href: 'https://www.mozilla.org/fi/firefox/new/', - }, - { - type: 'a', - content: 'Microsoft Edge', - href: 'https://www.microsoft.com/en-us/windows/microsoft-edge', - }, - ], - en: [ - { - type: 'text', - content: - 'The service does not support the browser you are using. Update your browser or download a new browser using the links below.\n', - }, - { - type: 'a', - content: 'Google Chrome', - href: 'https://www.google.com/chrome/', - }, - { - type: 'a', - content: 'Firefox', - href: 'https://www.mozilla.org/fi/firefox/new/', - }, - { - type: 'a', - content: 'Microsoft Edge', - href: 'https://www.microsoft.com/en-us/windows/microsoft-edge', - }, - ], - sv: [ - { - type: 'text', - content: - 'Tjänsten stöder inte den webbläsare som du har i bruk. Uppdatera din webbläsare eller ladda ner en ny webbläsare via nedanstående länk.\n', - }, - { - type: 'a', - content: 'Google Chrome', - href: 'https://www.google.com/chrome/', - }, - { - type: 'a', - content: 'Firefox', - href: 'https://www.mozilla.org/sv-SE/firefox/new/', - }, - { - type: 'a', - content: 'Microsoft Edge', - href: 'https://www.microsoft.com/en-us/windows/microsoft-edge', - }, - ], - }, - }, - ], - themeMap: { - hsl: 'reittiopas', - turku: '(turku|foli)', - lappeenranta: 'lappeenranta', - joensuu: 'joensuu', - oulu: 'oulu', - hameenlinna: 'hameenlinna', - matka: 'matka', - cfm: 'cfm', - salo: 'salo', - rovaniemi: 'rovaniemi', - kouvola: 'kouvola', - tampere: 'tampere', - mikkeli: 'mikkeli', - kotka: 'kotka', - jyvaskyla: 'jyvaskyla', - lahti: 'lahti', - kuopio: 'kuopio', - }, - - minutesToDepartureLimit: 9, - - imperialEnabled: false, - // this flag when true enables imperial measurements 'feet/miles system' - - showAllBusses: false, - showVehiclesOnStopPage: false, - mapLayers: { - featureMapping: { - ticketSales: {}, - }, - }, - - timetables: {}, -}; diff --git a/sources/digitransit/configs/digitransit/theme-cfm-main.scss b/sources/digitransit/configs/digitransit/theme-cfm-main.scss deleted file mode 100644 index c8dfef40..00000000 --- a/sources/digitransit/configs/digitransit/theme-cfm-main.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import 'theme'; -@import '../../main'; diff --git a/sources/digitransit/configs/digitransit/theme-cfm.scss b/sources/digitransit/configs/digitransit/theme-cfm.scss deleted file mode 100644 index 883a0b31..00000000 --- a/sources/digitransit/configs/digitransit/theme-cfm.scss +++ /dev/null @@ -1,17 +0,0 @@ -@import '../../base/waltti'; - -/* main theme colors */ -$primary-color: $livi-blue; -$secondary-color: darken($primary-color, 20%); -$hilight-color: $primary-color; -$action-color: $primary-color; -$bus-color: $primary-color; -$viewpoint-marker-color: $primary-color; -$current-location-color: $primary-color; - -$standalone-btn-color: $primary-color; -$link-color: $primary-color; - -/* Component palette */ -$desktop-title-color: $primary-color; -$desktop-title-arrow-icon-color: $secondary-color; diff --git a/sources/digitransit/configs/mosquitto/mosquitto.conf b/sources/digitransit/configs/mosquitto/mosquitto.conf deleted file mode 100644 index 9019b9de..00000000 --- a/sources/digitransit/configs/mosquitto/mosquitto.conf +++ /dev/null @@ -1,9 +0,0 @@ -listener 9001 -protocol websockets -listener 1883 -protocol mqtt - -log_dest stdout - -# debug, error, warning, notice, information, subscribe, unsubscribe, websockets, none, all -log_type debug \ No newline at end of file diff --git a/sources/digitransit/configs/opentripplanner/debug-logback.xml b/sources/digitransit/configs/opentripplanner/debug-logback.xml deleted file mode 100644 index 94093034..00000000 --- a/sources/digitransit/configs/opentripplanner/debug-logback.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - %d{HH:mm:ss.SSS} %level \(%F:%L\) %msg%n - - - - - WARN - - - - - - routerPath - . - - - - ${routerPath}/taggedStops.log - false - - false - - - %msg%n - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sources/digitransit/configs/opentripplanner/router-config.json b/sources/digitransit/configs/opentripplanner/router-config.json deleted file mode 100644 index b7b16ee9..00000000 --- a/sources/digitransit/configs/opentripplanner/router-config.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "routingDefaults": { - "walkSpeed": 1.3, - "transferSlack": 120, - "maxTransfers": 4, - "waitReluctance": 0.95, - "waitAtBeginningFactor": 0.7, - "walkReluctance": 1.75, - "stairsReluctance": 1.65, - "walkBoardCost": 540, - "itineraryFiltering": 1 - }, - "updaters": [ - { - "type": "stop-time-updater", - "sourceType": "gtfs-http", - "url": "https://swms-busradar-gtfs-realtime.codeformuenster.org/feed", - "feedId": "STWMS", - "fuzzyTripMatching": true, - "frequencySec": 20 - }, { - "id": "leihleeze-bike-rental", - "type": "bike-rental", - "sourceType": "gbfs", - "url": "https://buchen.leihleeze.de/gbfs", - "network": "leihleeze", - "frequencySec": 20 - } - ] -} \ No newline at end of file diff --git a/sources/digitransit/digitransit.yaml b/sources/digitransit/digitransit.yaml deleted file mode 100644 index 247c93ae..00000000 --- a/sources/digitransit/digitransit.yaml +++ /dev/null @@ -1,89 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: digitransit -spec: - selector: - app: digitransit - ports: - - name: http - protocol: TCP - port: 8080 - targetPort: 8080 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: digitransit - labels: - app: digitransit -spec: - # replicas: 8 - # strategy: - # type: RollingUpdate - # rollingUpdate: - # maxSurge: 25% - # maxUnavailable: 0 - selector: - matchLabels: - app: digitransit - template: - metadata: - labels: - app: digitransit - spec: - containers: - - name: digitransit - image: codeformuenster/digitransit-ui - # command: ["yarn", "run", "start"] - command: ["/usr/local/bin/node", "server/server"] - ports: - - containerPort: 8080 - env: - - name: CONFIG - value: cfm - - name: LOCATIONIQ_API_KEY - valueFrom: - secretKeyRef: - name: locationiq - key: access-token - # readinessProbe: - # httpGet: - # path: / - # port: 8080 - # periodSeconds: 5 - # timeoutSeconds: 10 - # failureThreshold: 2 - # livenessProbe: - # httpGet: - # path: / - # port: 8080 - # initialDelaySeconds: 150 - # periodSeconds: 10 - # timeoutSeconds: 10 - # failureThreshold: 10 - # resources: - # requests: - # memory: "1536Mi" - # cpu: 600m - # limits: - # memory: "1536Mi" - # cpu: 2000m - volumeMounts: - - name: digitransit-cfm-config - mountPath: /opt/digitransit-ui/app/configurations/config.cfm.js - subPath: config.cfm.js - - name: digitransit-cfm-config - mountPath: /opt/digitransit-ui/app/configurations/config.default.js - subPath: config.default.js - - name: digitransit-cfm-config - mountPath: /opt/digitransit-ui/sass/themes/cfm/main.scss - subPath: main.scss - - name: digitransit-cfm-config - mountPath: /opt/digitransit-ui/sass/themes/cfm/_theme.scss - subPath: _theme.scss - volumes: - - name: digitransit-cfm-config - configMap: - name: digitransit-cfm diff --git a/sources/digitransit/graphiql.yaml b/sources/digitransit/graphiql.yaml deleted file mode 100644 index 6743c38c..00000000 --- a/sources/digitransit/graphiql.yaml +++ /dev/null @@ -1,62 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: graphiql -spec: - selector: - app: graphiql - ports: - - name: http - protocol: TCP - port: 8080 - targetPort: 8080 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: graphiql - labels: - app: graphiql -spec: - replicas: 1 - selector: - matchLabels: - app: graphiql - template: - metadata: - labels: - app: graphiql - spec: - containers: - - name: graphiql - image: codeformuenster/digitransit-graphiql - ports: - - containerPort: 8080 - # env: - # - name: URL_PREFIX - # # ${URL_PREFIX}/routing/v1/routers/${router}/index/graphql - # value: https://api.digitransit.codeformuenster.org - # # https://api.digitransit.codeformuenster.org/graphiql/cfm - readinessProbe: - periodSeconds: 10 - timeoutSeconds: 10 - failureThreshold: 2 - httpGet: - port: 8080 - path: "/graphiql/cfm" - livenessProbe: - initialDelaySeconds: 60 - periodSeconds: 60 - timeoutSeconds: 10 - failureThreshold: 2 - httpGet: - port: 8080 - path: "/graphiql/cfm" - resources: - requests: - memory: "64Mi" - cpu: "200m" - limits: - memory: "64Mi" - cpu: "1000m" \ No newline at end of file diff --git a/sources/digitransit/gtfsrt-mqtt.yaml b/sources/digitransit/gtfsrt-mqtt.yaml deleted file mode 100644 index 2ec99fe8..00000000 --- a/sources/digitransit/gtfsrt-mqtt.yaml +++ /dev/null @@ -1,38 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: gtfsrt-mqtt - labels: - app: gtfsrt-mqtt -spec: - selector: - matchLabels: - app: gtfsrt-mqtt - template: - metadata: - labels: - app: gtfsrt-mqtt - spec: - containers: - - name: gtfsrt-mqtt - image: hsldevcom/gtfsrthttp2mqtt - # https://github.com/HSLdevcom/gtfsrthttp2mqtt#configuration - env: - - name: MQTT_BROKER_URL - value: mosquitto - - name: FEED_TYPE - value: vp - - name: FEED_NAME - value: STWMS - - name: FEED_URL - value: https://swms-busradar-gtfs-realtime.codeformuenster.org/feed - # value: http://swms-busradar-gtfs-realtime-fileserver.swms-busradar-gtfs-realtime.svc/feed - - name: OTP_URL - value: https://api.digitransit.codeformuenster.org/routing/v1/routers/cfm/index/graphql - # value: http://digitransit/routing/v1/routers/cfm/index/graphql - - name: USERNAME - value: user - - name: PASSWORD - value: userpass - - name: INTERVAL - value: "20" diff --git a/sources/digitransit/hsl-map-server.yaml b/sources/digitransit/hsl-map-server.yaml deleted file mode 100644 index 6c2df69a..00000000 --- a/sources/digitransit/hsl-map-server.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: hsl-map-server -spec: - selector: - app: hsl-map-server - ports: - - name: http - protocol: TCP - port: 8080 - targetPort: 8080 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: hsl-map-server - labels: - app: hsl-map-server -spec: - selector: - matchLabels: - app: hsl-map-server - template: - metadata: - labels: - app: hsl-map-server - spec: - containers: - - name: hsl-map-server - image: verschwoerhaus/hsl-map-server - ports: - - containerPort: 8080 - env: - - name: OTP_URL - value: opentripplanner:8080/otp/routers/cfm/index/graphql \ No newline at end of file diff --git a/sources/digitransit/ingress.yaml b/sources/digitransit/ingress.yaml deleted file mode 100644 index 39ed9fb7..00000000 --- a/sources/digitransit/ingress.yaml +++ /dev/null @@ -1,127 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: digitransit -spec: - rules: - - host: digitransit.codeformuenster.org - http: - paths: - - path: / - backend: - serviceName: digitransit - servicePort: 8080 - tls: - - secretName: digitransit-ingress-cert - hosts: - - digitransit.codeformuenster.org - - api.digitransit.codeformuenster.org - ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: digitransit-api -spec: - rules: - - host: api.digitransit.codeformuenster.org - http: - paths: - - path: /map/v1 - backend: - serviceName: hsl-map-server - servicePort: 8080 - - path: /graphiql - backend: - serviceName: graphiql - servicePort: 8080 - tls: - - secretName: digitransit-ingress-cert - hosts: - - digitransit.codeformuenster.org - - api.digitransit.codeformuenster.org - ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: digitransit-api-geocoding - annotations: - nginx.ingress.kubernetes.io/rewrite-target: /v1/$2 -spec: - rules: - - host: api.digitransit.codeformuenster.org - http: - paths: - - path: /geocoding/v1(/|$)(.*) - backend: - serviceName: photon-pelias-adapter - servicePort: 8080 - tls: - - secretName: digitransit-ingress-cert - hosts: - - digitransit.codeformuenster.org - - api.digitransit.codeformuenster.org - ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: digitransit-api-routing - annotations: - nginx.ingress.kubernetes.io/rewrite-target: /otp/$2 - nginx.ingress.kubernetes.io/enable-cors: "true" - # nginx.ingress.kubernetes.io/cors-allow-methods: "GET, POST, OPTIONS" - nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,OTPTimeout,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range" - # nginx.ingress.kubernetes.io/cors-allow-origin: "*" -spec: - rules: - - host: api.digitransit.codeformuenster.org - http: - paths: - - path: /routing/v1(/|$)(.*) - # - path: /routing/v1/(.*) - backend: - serviceName: opentripplanner - servicePort: 8080 - tls: - - secretName: digitransit-ingress-cert - hosts: - - digitransit.codeformuenster.org - - api.digitransit.codeformuenster.org - ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: digitransit-mosquitto -spec: - rules: - - host: mosquitto.digitransit.codeformuenster.org - http: - paths: - - path: / - backend: - serviceName: mosquitto - servicePort: 9001 - tls: - - secretName: digitransit-ingress-cert - hosts: - # - digitransit.codeformuenster.org - # - api.digitransit.codeformuenster.org - - mosquitto.digitransit.codeformuenster.org - ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Certificate -metadata: - name: digitransit-ingress -spec: - secretName: digitransit-ingress-cert - dnsNames: - - digitransit.codeformuenster.org - - api.digitransit.codeformuenster.org - - mosquitto.digitransit.codeformuenster.org - issuerRef: - kind: ClusterIssuer - name: letsencrypt diff --git a/sources/digitransit/kustomization.yaml b/sources/digitransit/kustomization.yaml deleted file mode 100644 index be95725a..00000000 --- a/sources/digitransit/kustomization.yaml +++ /dev/null @@ -1,60 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: digitransit -commonLabels: - app.kubernetes.io/part-of: digitransit - -# for example settings see https://github.com/HSLdevcom/digitransit-kubernetes-deploy/tree/master/roles/aks-apply/files/prod -resources: -- ./digitransit.yaml -- ./graphiql.yaml -- ./hsl-map-server.yaml -- ./opentripplanner.yaml -- ./photon-pelias.yaml -- ./ingress.yaml -- ./mosquitto.yaml -- ./gtfsrt-mqtt.yaml - -images: -- name: codeformuenster/digitransit-ui - newTag: master-test3 -- name: codeformuenster/digitransit-graphiql - newTag: master@sha256:1bf841ff6012008e827b73c3354edb5576f6cfecf8534ca62a380e800bf278b6 -- name: verschwoerhaus/hsl-map-server - newTag: b4adf23 -- name: codeformuenster/opentripplanner-graph - newTag: 0.1.1 -# - name: codeformuenster/opentripplanner-cfm -# newTag: 2019-11-18 -- name: stadtulm/photon-pelias-adapter - newTag: 5903fc0 -- name: eclipse-mosquitto - newTag: 1.6.7 -- name: hsldevcom/gtfsrthttp2mqtt - newTag: ci-14c182ec2bf04a5ba965100781ca5aedb230238d - - -secretGenerator: -- name: locationiq - behavior: create - envs: - - ./secrets/locationiq.env - -configMapGenerator: -- name: digitransit-cfm - behavior: create - files: - - config.cfm.js=./configs/digitransit/config.cfm.js - - config.default.js=./configs/digitransit/config.default.js - - main.scss=./configs/digitransit/theme-cfm-main.scss - - _theme.scss=./configs/digitransit/theme-cfm.scss -- name: router-config - behavior: create - files: - - router-config.json=./configs/opentripplanner/router-config.json - - debug-logback.xml=./configs/opentripplanner/debug-logback.xml -- name: mosquitto - behavior: create - files: - - mosquitto.conf=./configs/mosquitto/mosquitto.conf \ No newline at end of file diff --git a/sources/digitransit/mosquitto.yaml b/sources/digitransit/mosquitto.yaml deleted file mode 100644 index 814999a4..00000000 --- a/sources/digitransit/mosquitto.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: mosquitto -spec: - selector: - app: mosquitto - ports: - - name: mqtt - protocol: TCP - port: 1883 - # targetPort: 1883 - - name: websockets - protocol: TCP - port: 9001 - # targetPort: 9001 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: mosquitto - labels: - app: mosquitto -spec: - selector: - matchLabels: - app: mosquitto - template: - metadata: - labels: - app: mosquitto - spec: - containers: - - name: mosquitto - image: eclipse-mosquitto - ports: - - name: mqtt - containerPort: 1883 - - name: websockets - containerPort: 9001 - volumeMounts: - - name: mosquitto-conf - mountPath: /mosquitto/config/mosquitto.conf - subPath: mosquitto.conf - volumes: - - name: mosquitto-conf - configMap: - name: mosquitto diff --git a/sources/digitransit/opentripplanner.yaml b/sources/digitransit/opentripplanner.yaml deleted file mode 100644 index a0190e34..00000000 --- a/sources/digitransit/opentripplanner.yaml +++ /dev/null @@ -1,94 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: opentripplanner -spec: - selector: - app: opentripplanner - ports: - - name: http - protocol: TCP - port: 8080 - targetPort: 8080 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: opentripplanner - labels: - app: opentripplanner -spec: - # replicas: 5 - # strategy: - # type: RollingUpdate - # rollingUpdate: - # maxSurge: 25% - # maxUnavailable: 0 - selector: - matchLabels: - app: opentripplanner - template: - metadata: - labels: - app: opentripplanner - spec: - containers: - - name: opentripplanner - image: codeformuenster/opentripplanner-graph - # image: codeformuenster/opentripplanner-cfm - command: ["java", - "-Duser.timezone=Europe/Berlin", - # "-Dlogback.configurationFile=/opt/opentripplanner/debug-logback.xml", - "-jar", "/opt/opentripplanner/otp-shaded.jar", - "--server", - "--basePath", "./", - "--graphs", "./graphs", - # "--basePath", "/var/otp", - # "--graphs", "/var/otp/graphs", - "--router", "cfm"] - - # --cache # pv? - # The directory under which to cache OSM and NED tiles. Default is - # BASE_PATH/cache. - - # env: - # - name: JAVA_OPTS - # value: "-Xms8G -Xmx8G" - - ports: - - containerPort: 8080 - # readinessProbe: - # periodSeconds: 10 - # timeoutSeconds: 15 - # failureThreshold: 2 - # httpGet: - # port: 8080 - # path: "/otp/routers/finland/" - # securityContext: - # allowPrivilegeEscalation: false - # resources: - # requests: - # memory: 11216Mi - # cpu: "6000m" - # limits: - # memory: 11216Mi - # cpu: "7000m" - volumeMounts: - - name: config - mountPath: /opt/opentripplanner/graphs/cfm/router-config.json - # mountPath: /var/otp/graphs/cfm/router-config.json - subPath: router-config.json - - name: config - mountPath: /opt/opentripplanner/debug-logback.xml - subPath: debug-logback.xml - volumes: - - name: config - configMap: - name: router-config - - # FIXME add readiness probe for: - # 22:40:06.192 INFO (NetworkListener.java:755) Started listener bound to [0.0.0.0:8080] - # 22:40:06.227 INFO (NetworkListener.java:755) Started listener bound to [0.0.0.0:8081] - # 22:40:06.231 INFO (HttpServer.java:300) [HttpServer] Started. - # 22:40:06.232 INFO (GrizzlyServer.java:154) Grizzly server running. diff --git a/sources/digitransit/photon-pelias.yaml b/sources/digitransit/photon-pelias.yaml deleted file mode 100644 index ebf2ffe7..00000000 --- a/sources/digitransit/photon-pelias.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: photon-pelias-adapter -spec: - selector: - app: photon-pelias-adapter - ports: - - name: http - protocol: TCP - port: 8080 - targetPort: 8080 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: photon-pelias-adapter - labels: - app: photon-pelias-adapter -spec: - # replicas: 1 - selector: - matchLabels: - app: photon-pelias-adapter - template: - metadata: - labels: - app: photon-pelias-adapter - spec: - containers: - - name: photon-pelias-adapter - image: stadtulm/photon-pelias-adapter - ports: - - containerPort: 8080 - env: - - name: PHOTON_URL - value: https://api.mfdz.de/photon/ - # FIXME \ No newline at end of file diff --git a/sources/digitransit/secrets/locationiq.env b/sources/digitransit/secrets/locationiq.env deleted file mode 100644 index 925a9a2c..00000000 --- a/sources/digitransit/secrets/locationiq.env +++ /dev/null @@ -1,2 +0,0 @@ -# https://my.locationiq.com/dashboard/accesstokens/view -access-token= \ No newline at end of file diff --git a/sources/event-scraper-test2/README.md b/sources/event-scraper-test2/README.md deleted file mode 100644 index 31171526..00000000 --- a/sources/event-scraper-test2/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# event-scraper-flow-test2 - -```bash -kustomize build . | kubectl apply -f - -``` - -```bash -curl --request POST https://workflow.codeformuenster.org/testing1 -# request successfully processed⏎ - -curl --request POST https://workflow.codeformuenster.org/events-v0 \ - --header "Content-Type: application/json" \ - --data '{"message":"[events-v0] this is my second webhook -- 123"}' -# request successfully processed⏎ - -curl --request POST https://workflow.codeformuenster.org/example \ - --header "Content-Type: application/json" \ - --data '{"message":"[test] this is my second webhook -- 123"}' -# request successfully processed⏎ -``` - -See: https://workflow.codeformuenster.org/workflows diff --git a/sources/event-scraper-test2/controller-configmap-patches.yaml b/sources/event-scraper-test2/controller-configmap-patches.yaml deleted file mode 100644 index d7e6a298..00000000 --- a/sources/event-scraper-test2/controller-configmap-patches.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: gateway-controller-configmap -data: - config: | - instanceID: argo-events - namespace: event-scraper-flow-test2 - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: sensor-controller-configmap -data: - config: | - instanceID: argo-events - namespace: event-scraper-flow-test2 - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app.kubernetes.io/part-of: argo - name: workflow-controller-configmap -data: - config: | - namespace: event-scraper-flow-test2 - executorImage: argoproj/argoexec:v2.4.3 - - # https://github.com/argoproj/argo/issues/970#issuecomment-485036572 - # > PNS (Process Namespace Sharing) - # > + secure. cannot escape privileges of service account - # > + artifact collection can be collected from base image layer - # > + scalable - process polling is done over procfs and not kubelet/k8s API - # > - processes will no longer run with pid 1 - # > - artifact collection from base image may fail for containers which complete too fast - # > - cannot capture artifact directories from base image layer which has a volume mounted under it - # > - immature - containerRuntimeExecutor: pns - - # https://github.com/argoproj/argo/issues/1711 - # Parallelism ? - - artifactRepository: - s3: - bucket: workflow - keyPrefix: artifacts - endpoint: minio:9000 - insecure: true - accessKeySecret: - name: minio - key: access-key - secretKeySecret: - name: minio - key: secret-key diff --git a/sources/event-scraper-test2/kustom-config.yaml b/sources/event-scraper-test2/kustom-config.yaml deleted file mode 100644 index 69341689..00000000 --- a/sources/event-scraper-test2/kustom-config.yaml +++ /dev/null @@ -1,41 +0,0 @@ -images: -- kind: Gateway - path: spec/template/spec/containers/image - -nameReference: -- kind: ConfigMap - fieldSpecs: - - kind: Gateway - path: spec/eventSource - -# - kind: Secret -# fieldSpecs: -# - kind: ConfigMap -# path: data/ - - -# nameReference: -# # Configure named references to Secret objects to be updated by Transformers and Generators - e.g. namePrefix, secretGenerator, etc -# - kind: Secret -# version: v1 -# fieldSpecs: -# # v1.Pods that reference a Secret in spec.volumes.secret.secretName will have it updated -# - path: spec/volumes/secret/secretName -# version: v1 -# kind: Pod -# # v1.Pods that reference a Secret in spec.containers.env.valueFrom.secretKeyRef.name will have it updated -# - path: spec/containers/env/valueFrom/secretKeyRef/name -# version: v1 -# kind: Pod - - -# nameReference: -# - kind: Bee -# fieldSpecs: -# - path: spec/beeRef/name -# kind: MyKind -# - kind: Secret -# fieldSpecs: -# - path: spec/secretRef/name -# kind: MyKind - diff --git a/sources/event-scraper-test2/kustomization.yaml b/sources/event-scraper-test2/kustomization.yaml deleted file mode 100644 index 37a13b72..00000000 --- a/sources/event-scraper-test2/kustomization.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: event-scraper-flow-test2 -commonLabels: - app.kubernetes.io/part-of: argo - -resources: -# argo workflow -- github.com/argoproj/argo//manifests/namespace-install?ref=v2.4.2 -# - github.com/codeformuenster/kustomized//minio?ref=5bac644696662fc2e6d9dd2b281d8362cc0cfeb8 -- ./minio - -# argo events -- github.com/argoproj/argo-events//hack/k8s/manifests?ref=v0.10 -- ./webhook-gateway.yaml -- ./workflow-ingress.yaml -- ./workflows - -patches: -- ./controller-configmap-patches.yaml -# - ./minio - -images: -- name: argoproj/argoui - newTag: v2.4.2 -- name: argoproj/workflow-controller - newTag: v2.4.2 -- name: argoproj/gateway-controller - newTag: v0.10 -- name: argoproj/sensor-controller - newTag: v0.10 -- name: argoproj/gateway-client - newTag: v0.10 -- name: argoproj/webhook-gateway - newTag: v0.10 -- name: minio/minio - newTag: RELEASE.2019-10-12T01-39-57Z - - -# crds: -# - - -configurations: -- ./kustom-config.yaml diff --git a/sources/event-scraper-test2/minio/kustomization.yaml b/sources/event-scraper-test2/minio/kustomization.yaml deleted file mode 100644 index f5b14a37..00000000 --- a/sources/event-scraper-test2/minio/kustomization.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- github.com/codeformuenster/kustomized//minio?ref=5bac644696662fc2e6d9dd2b281d8362cc0cfeb8 -- ./minio-ingress.yaml - -generatorOptions: - disableNameSuffixHash: true - annotations: - kustomize.generated.resource: somevalue - -secretGenerator: -- name: minio - behavior: replace - envs: - - ./secrets/minio.env diff --git a/sources/event-scraper-test2/minio/minio-ingress.yaml b/sources/event-scraper-test2/minio/minio-ingress.yaml deleted file mode 100644 index f141558a..00000000 --- a/sources/event-scraper-test2/minio/minio-ingress.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: minio-workflow - labels: - app.kubernetes.io/name: minio - app.kubernetes.io/component: s3 -spec: - rules: - - host: minio-workflow.codeformuenster.org - http: - paths: - - path: / - backend: - serviceName: minio - servicePort: 9000 - tls: - - hosts: - - minio-workflow.codeformuenster.org - secretName: minio-workflow-ingress-cert - ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Certificate -metadata: - name: minio-workflow-ingress - labels: - app.kubernetes.io/name: minio - app.kubernetes.io/component: s3 -spec: - secretName: minio-workflow-ingress-cert - commonName: minio-workflow.codeformuenster.org - issuerRef: - kind: ClusterIssuer - name: letsencrypt diff --git a/sources/event-scraper-test2/webhook-gateway.yaml b/sources/event-scraper-test2/webhook-gateway.yaml deleted file mode 100644 index 917b4ac8..00000000 --- a/sources/event-scraper-test2/webhook-gateway.yaml +++ /dev/null @@ -1,56 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Gateway -metadata: - name: webhook-gateway - labels: - # gateway controller with instanceId "argo-events" will process this gateway - gateways.argoproj.io/gateway-controller-instanceid: argo-events - # gateway controller will use this label to match with it's own version - # do not remove - argo-events-gateway-version: v0.10 -spec: - type: "webhook" - eventSource: "webhook-event-source" - processorPort: "9330" - eventProtocol: - type: "HTTP" - http: - port: "9300" - template: - metadata: - name: "webhook-gateway-http" - labels: - gateway-name: "webhook-gateway" - spec: - containers: - - name: "gateway-client" - image: "argoproj/gateway-client" - command: ["/bin/gateway-client"] - - name: "webhook-events" - image: "argoproj/webhook-gateway" - command: ["/bin/webhook-gateway"] - serviceAccountName: "argo-events-sa" - service: - metadata: - name: webhook-gateway-svc - spec: - selector: - gateway-name: "webhook-gateway" - ports: - - name: example - port: 12000 - targetPort: 12000 - - name: events-v0 - port: 13000 - targetPort: 13000 - - name: testing1 - port: 12002 - targetPort: 12002 - - # What is this? - watchers: - sensors: - - name: "webhook-sensor" - - name: "events-v0" - - name: "testing1" - diff --git a/sources/event-scraper-test2/workflow-ingress.yaml b/sources/event-scraper-test2/workflow-ingress.yaml deleted file mode 100644 index b1a34c00..00000000 --- a/sources/event-scraper-test2/workflow-ingress.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: workflow - labels: - app.kubernetes.io/name: workflow - app.kubernetes.io/component: api -spec: - rules: - - host: workflow.codeformuenster.org - http: - paths: - # argo-ui - - path: / - backend: - serviceName: argo-ui - servicePort: 80 - - # for sensor/webhook-sensor and configmap/webhook-event-source - - path: /example - backend: - serviceName: webhook-gateway-svc - servicePort: 12000 - - path: /events-v0 - backend: - serviceName: webhook-gateway-svc - servicePort: 13000 - - path: /testing1 - backend: - serviceName: webhook-gateway-svc - servicePort: 12002 - tls: - - hosts: - - workflow.codeformuenster.org - secretName: workflow-ingress-cert - ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Certificate -metadata: - name: workflow-ingress - labels: - app.kubernetes.io/name: workflow - app.kubernetes.io/component: api -spec: - secretName: workflow-ingress-cert - commonName: workflow.codeformuenster.org - issuerRef: - kind: ClusterIssuer - name: letsencrypt diff --git a/sources/event-scraper-test2/workflows/events-v0/endpoint.yaml b/sources/event-scraper-test2/workflows/events-v0/endpoint.yaml deleted file mode 100644 index 5d67b4e9..00000000 --- a/sources/event-scraper-test2/workflows/events-v0/endpoint.yaml +++ /dev/null @@ -1,3 +0,0 @@ -port: "13000" -endpoint: "/events-v0" -method: "POST" diff --git a/sources/event-scraper-test2/workflows/events-v0/sensor.yaml b/sources/event-scraper-test2/workflows/events-v0/sensor.yaml deleted file mode 100644 index 6ec37e0f..00000000 --- a/sources/event-scraper-test2/workflows/events-v0/sensor.yaml +++ /dev/null @@ -1,162 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Sensor -metadata: - name: events-v0-sensor - labels: - sensors.argoproj.io/sensor-controller-instanceid: argo-events - # sensor controller will use this label to match with it's own version - # do not remove - argo-events-sensor-version: v0.10 -spec: - template: - spec: - containers: - - name: "sensor" - image: "argoproj/sensor:v0.10" - serviceAccountName: argo-events-sa - dependencies: - - name: "webhook-gateway:events-v0" - eventProtocol: - type: "HTTP" - http: - port: "9300" - triggers: - # - template: - # name: webhook-workflow-trigger - # group: argoproj.io - # version: v1alpha1 - # kind: Workflow - # source: - # inline: | - # apiVersion: argoproj.io/v1alpha1 - # kind: Workflow - # metadata: - # generateName: events-v0- - # spec: - # entrypoint: whalesay - # arguments: - # parameters: - # - name: message - # # this is the value that should be overridden - # value: hello world - # templates: - # - name: whalesay - # inputs: - # parameters: - # - name: message - # container: - # image: docker/whalesay:latest - # command: [cowsay] - # args: ["events-0 {{inputs.parameters.message}}"] - - - template: - name: webhook-workflow-trigger - group: argoproj.io - version: v1alpha1 - kind: Workflow - source: - # inline: | - resource: - apiVersion: argoproj.io/v1alpha1 - kind: Workflow - metadata: - generateName: event-v0- - spec: - # entrypoint: diamond - entrypoint: coinflip - - arguments: - parameters: - - name: message - # this is the value that should be overridden - value: hello world - - templates: - # **dag** https://github.com/argoproj/argo/blob/master/examples/dag-daemon-task.yaml - - # - name: diamond - # dag: - # tasks: - # # - name: schema-org-convert - # # template: schema-org-convert - # # arguments: - # # parameters: - # # - name: message - # # value: "{{steps.generate.outputs.result}}" - # - name: hash-id - # # dependencies: [schema-org-convert] - # template: hash-id - # arguments: - # parameters: [{name: message, value: B}] - # # - name: geocode - # # dependencies: [A] - # # template: echo - # # arguments: - # # parameters: [{name: message, value: C}] - # - name: whalesay - # dependencies: [hash-id] - # template: whalesay - # arguments: - # parameters: [{name: message, value: "{{tasks.hash-id.outputs.result}}"}] - - - name: coinflip - steps: - # - - name: flip-coin - # template: flip-coin - - - name: generate - template: hash-id - # when: "{{steps.flip-coin.outputs.result}} == heads" - - - name: whalesay-step - # template: whalesay - template: print-message - - # when: "{{steps.flip-coin.outputs.result}} == tails" - # dependencies: [hash-id] - arguments: - parameters: - - name: message - value: "{{steps.generate.outputs.result}}" - - # - name: schema-org-convert - - - name: hash-id - script: - image: python:alpine3.8 - command: [python] - source: | - import random - import json - i = random.randint(1, 100) - print(i) - # outputs: - # - name: hello-param - # valueFrom: - # path: /tmp/hello_world.txt - - # - name: geocode - - - name: whalesay - inputs: - parameters: - - name: message - container: - image: docker/whalesay:latest - command: [cowsay] - # args: ["[event-0] {{inputs.parameters.message}}"] - args: ["{{inputs.parameters.message}}"] - - # - name: store-if-new - - - name: print-message - inputs: - parameters: - - name: message - container: - image: alpine:latest - command: [sh, -c] - args: ["echo result was: {{inputs.parameters.message}}"] - - resourceParameters: - - src: - event: "webhook-gateway:events-v0" - dest: spec.arguments.parameters.0.value diff --git a/sources/event-scraper-test2/workflows/example/endpoint.yaml b/sources/event-scraper-test2/workflows/example/endpoint.yaml deleted file mode 100644 index a167d02a..00000000 --- a/sources/event-scraper-test2/workflows/example/endpoint.yaml +++ /dev/null @@ -1,3 +0,0 @@ -port: "12000" -endpoint: "/example" -method: "POST" diff --git a/sources/event-scraper-test2/workflows/example/sensor.yaml b/sources/event-scraper-test2/workflows/example/sensor.yaml deleted file mode 100644 index 3fa9ec37..00000000 --- a/sources/event-scraper-test2/workflows/example/sensor.yaml +++ /dev/null @@ -1,57 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Sensor -metadata: - # name: webhook-sensor - name: example-sensor - labels: - sensors.argoproj.io/sensor-controller-instanceid: argo-events - # sensor controller will use this label to match with it's own version - # do not remove - argo-events-sensor-version: v0.10 -spec: - template: - spec: - containers: - - name: "sensor" - image: "argoproj/sensor:v0.10" - serviceAccountName: argo-events-sa - dependencies: - - name: "webhook-gateway:example" - eventProtocol: - type: "HTTP" - http: - port: "9300" - triggers: - - template: - name: webhook-workflow-trigger - group: argoproj.io - version: v1alpha1 - kind: Workflow - source: - # inline: | - source: - apiVersion: argoproj.io/v1alpha1 - kind: Workflow - metadata: - # generateName: webhook- - generateName: example- - spec: - entrypoint: whalesay - arguments: - parameters: - - name: message - # this is the value that should be overridden - value: hello world - templates: - - name: whalesay - inputs: - parameters: - - name: message - container: - image: docker/whalesay:latest - command: [cowsay] - args: ["{{inputs.parameters.message}}"] - resourceParameters: - - src: - event: "webhook-gateway:example" - dest: spec.arguments.parameters.0.value diff --git a/sources/event-scraper-test2/workflows/kustomization.yaml b/sources/event-scraper-test2/workflows/kustomization.yaml deleted file mode 100644 index 86524e3d..00000000 --- a/sources/event-scraper-test2/workflows/kustomization.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - - -# when adding a new workflow check -# - configmap "webhook-event-source" -# - gateway "webhook-gateway" spec.service.spec.ports -# - ingress "workflow" spec.rules[].http.paths[] -# check for errors `kubectl -n event-scraper-flow-test2 logs -f deployments/gateway-controller` - -resources: -- ./events-v0/sensor.yaml -- ./example/sensor.yaml -- ./testing1/sensor.yaml - -generatorOptions: - labels: - # needed by "webhook-event-source" - argo-events-event-source-version: v0.10 - -configMapGenerator: -- name: webhook-event-source - behavior: create - files: - - events-v0=./events-v0/endpoint.yaml - - example=./example/endpoint.yaml - - testing1=./testing1/endpoint.yaml diff --git a/sources/event-scraper-test2/workflows/testing1/endpoint.yaml b/sources/event-scraper-test2/workflows/testing1/endpoint.yaml deleted file mode 100644 index e3541db8..00000000 --- a/sources/event-scraper-test2/workflows/testing1/endpoint.yaml +++ /dev/null @@ -1,3 +0,0 @@ -port: "12002" -endpoint: "/testing1" -method: "POST" diff --git a/sources/event-scraper-test2/workflows/testing1/sensor.yaml b/sources/event-scraper-test2/workflows/testing1/sensor.yaml deleted file mode 100644 index d43eb9b8..00000000 --- a/sources/event-scraper-test2/workflows/testing1/sensor.yaml +++ /dev/null @@ -1,75 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Sensor -metadata: - name: testing1-sensor - labels: - sensors.argoproj.io/sensor-controller-instanceid: argo-events - # sensor controller will use this label to match with it's own version - # do not remove - argo-events-sensor-version: v0.10 -spec: - template: - spec: - containers: - - name: "sensor" - image: "argoproj/sensor:v0.10" - serviceAccountName: argo-events-sa - dependencies: - - name: "webhook-gateway:testing1" - eventProtocol: - type: "HTTP" - http: - port: "9300" - triggers: - - template: - name: webhook-workflow-trigger - group: argoproj.io - version: v1alpha1 - kind: Workflow - source: - # script templates provide a way to run arbitary snippets of code - # in any language, to produce a output "result" via the standard out - # of the template. Results can then be referenced using the variable, - # {{steps..outputs.result}}, and used as parameter to other - # templates, and in 'when', and 'withParam' clauses. - # This example demonstrates the use of a python script to - # generate a random number which is printed in the next step. - apiVersion: argoproj.io/v1alpha1 - kind: Workflow - metadata: - generateName: scripts-python- - spec: - entrypoint: python-script-example - templates: - - name: python-script-example - steps: - - - name: generate - template: gen-random-int - - - name: print - template: print-message - arguments: - parameters: - - name: message - value: "{{steps.generate.outputs.result}}" - - - name: gen-random-int - script: - image: python:alpine3.6 - command: [python] - source: | - import random - i = random.randint(1, 100) - print(i) - - name: print-message - inputs: - parameters: - - name: message - container: - image: alpine:latest - command: [sh, -c] - args: ["echo result was: {{inputs.parameters.message}}"] - - # resourceParameters: - # - src: - # event: "webhook-gateway:events-v0" - # dest: spec.arguments.parameters.0.value diff --git a/sources/ingress-nginx/README.md b/sources/ingress-nginx/README.md deleted file mode 100644 index 662acc45..00000000 --- a/sources/ingress-nginx/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# ingress-nginx - -*FIXME* -- Use json for logs https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md#log-format-upstream - - Adjust Loki - - create metrics for TLS versions that connect, see next -- Add TLSv3 https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md#ssl-protocols -- maybe use-proxy-protocol? https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md#use-proxy-protocol -- use-geoip2? - -https://github.com/kubernetes/ingress-nginx/pull/4055 -and https://kubectl.docs.kubernetes.io/pages/app_management/secrets_and_configmaps.html -check: -```yaml -configMapGenerator: -- name: nginx-configuration - behavior: merge - literals: - - use-http2="false" - - ssl-protocols="TLSv1 TLSv1.1 TLSv1.2" - - worker-shutdown-timeout="13s" - # etc -``` -also in general: -```yaml -# kustomization.yaml -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -configMapGenerator: -- name: my-application-properties - files: - - application.properties -``` - - -```bash -# refresh from upstream -rm -r ./base ; mkdir -p ./base - -curl -L https://github.com/kubernetes/ingress-nginx/archive/master.tar.gz \ - | tar -xz --directory ./base --strip-components=2 \ - ingress-nginx-master/deploy/cloud-generic \ - ingress-nginx-master/deploy/cluster-wide \ - ingress-nginx-master/deploy/grafana/dashboards - -# place manifests in local directory -rm -r ../../manifests/ingress-nginx ; mkdir -p ../../manifests/ingress-nginx -kubectl kustomize ./overlay > ../../manifests/ingress-nginx/kustomized.yaml - -kubectl create namespace ingress-nginx -kubectl apply -f ../../manifests/ingress-nginx - -``` - -In Grafana import dashboard https://grafana.com/dashboards/9614 diff --git a/sources/ingress-nginx/base/cloud-generic/deployment.yaml b/sources/ingress-nginx/base/cloud-generic/deployment.yaml deleted file mode 100644 index 71de9202..00000000 --- a/sources/ingress-nginx/base/cloud-generic/deployment.yaml +++ /dev/null @@ -1,65 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx-ingress-controller -spec: - replicas: 1 - template: - metadata: - annotations: - prometheus.io/port: "10254" - prometheus.io/scrape: "true" - spec: - serviceAccountName: nginx-ingress-serviceaccount - containers: - - name: nginx-ingress-controller - image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.24.1 - args: - - /nginx-ingress-controller - - --configmap=$(POD_NAMESPACE)/$(NGINX_CONFIGMAP_NAME) - - --tcp-services-configmap=$(POD_NAMESPACE)/$(TCP_CONFIGMAP_NAME) - - --udp-services-configmap=$(POD_NAMESPACE)/$(UDP_CONFIGMAP_NAME) - - --publish-service=$(POD_NAMESPACE)/$(SERVICE_NAME) - - --annotations-prefix=nginx.ingress.kubernetes.io - securityContext: - allowPrivilegeEscalation: true - capabilities: - drop: - - ALL - add: - - NET_BIND_SERVICE - # www-data -> 33 - runAsUser: 33 - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - ports: - - name: http - containerPort: 80 - - name: https - containerPort: 443 - livenessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: 10254 - scheme: HTTP - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 10 - readinessProbe: - failureThreshold: 3 - httpGet: - path: /healthz - port: 10254 - scheme: HTTP - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 10 diff --git a/sources/ingress-nginx/base/cloud-generic/kustomization.yaml b/sources/ingress-nginx/base/cloud-generic/kustomization.yaml deleted file mode 100644 index c2b03ddb..00000000 --- a/sources/ingress-nginx/base/cloud-generic/kustomization.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -namespace: ingress-nginx -commonLabels: - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx -resources: -- deployment.yaml -- role-binding.yaml -- role.yaml -- service-account.yaml -- service.yaml -images: -- name: quay.io/kubernetes-ingress-controller/nginx-ingress-controller - newTag: 0.24.1 -vars: -- fieldref: - fieldPath: metadata.name - name: NGINX_CONFIGMAP_NAME - objref: - apiVersion: v1 - kind: ConfigMap - name: nginx-configuration -- fieldref: - fieldPath: metadata.name - name: TCP_CONFIGMAP_NAME - objref: - apiVersion: v1 - kind: ConfigMap - name: tcp-services -- fieldref: - fieldPath: metadata.name - name: UDP_CONFIGMAP_NAME - objref: - apiVersion: v1 - kind: ConfigMap - name: udp-services -- fieldref: - fieldPath: metadata.name - name: SERVICE_NAME - objref: - apiVersion: v1 - kind: Service - name: ingress-nginx -configMapGenerator: -- name: nginx-configuration -- name: tcp-services -- name: udp-services -generatorOptions: - disableNameSuffixHash: true diff --git a/sources/ingress-nginx/base/cloud-generic/role-binding.yaml b/sources/ingress-nginx/base/cloud-generic/role-binding.yaml deleted file mode 100644 index 228588e6..00000000 --- a/sources/ingress-nginx/base/cloud-generic/role-binding.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: nginx-ingress-role-nisa-binding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: nginx-ingress-role -subjects: - - kind: ServiceAccount - name: nginx-ingress-serviceaccount diff --git a/sources/ingress-nginx/base/cloud-generic/role.yaml b/sources/ingress-nginx/base/cloud-generic/role.yaml deleted file mode 100644 index 936b63d7..00000000 --- a/sources/ingress-nginx/base/cloud-generic/role.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: nginx-ingress-role -rules: - - apiGroups: - - "" - resources: - - configmaps - - pods - - secrets - - namespaces - verbs: - - get - - apiGroups: - - "" - resources: - - configmaps - resourceNames: - # Defaults to "-" - # Here: "-" - # This has to be adapted if you change either parameter - # when launching the nginx-ingress-controller. - - "ingress-controller-leader-nginx" - verbs: - - get - - update - - apiGroups: - - "" - resources: - - configmaps - verbs: - - create - - apiGroups: - - "" - resources: - - endpoints - verbs: - - get diff --git a/sources/ingress-nginx/base/cloud-generic/service-account.yaml b/sources/ingress-nginx/base/cloud-generic/service-account.yaml deleted file mode 100644 index a52fb8ac..00000000 --- a/sources/ingress-nginx/base/cloud-generic/service-account.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: nginx-ingress-serviceaccount diff --git a/sources/ingress-nginx/base/cloud-generic/service.yaml b/sources/ingress-nginx/base/cloud-generic/service.yaml deleted file mode 100644 index 3a3a3e2a..00000000 --- a/sources/ingress-nginx/base/cloud-generic/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ingress-nginx -spec: - externalTrafficPolicy: Local - type: LoadBalancer - ports: - - name: http - port: 80 - targetPort: http - - name: https - port: 443 - targetPort: https diff --git a/sources/ingress-nginx/base/cluster-wide/cluster-role-binding.yaml b/sources/ingress-nginx/base/cluster-wide/cluster-role-binding.yaml deleted file mode 100644 index 7293fb37..00000000 --- a/sources/ingress-nginx/base/cluster-wide/cluster-role-binding.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: nginx-ingress-clusterrole-nisa-binding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: nginx-ingress-clusterrole -subjects: - - kind: ServiceAccount - name: nginx-ingress-serviceaccount diff --git a/sources/ingress-nginx/base/cluster-wide/cluster-role.yaml b/sources/ingress-nginx/base/cluster-wide/cluster-role.yaml deleted file mode 100644 index 9e5d39ca..00000000 --- a/sources/ingress-nginx/base/cluster-wide/cluster-role.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: nginx-ingress-clusterrole -rules: - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - nodes - - pods - - secrets - verbs: - - list - - watch - - apiGroups: - - "" - resources: - - nodes - verbs: - - get - - apiGroups: - - "" - resources: - - services - verbs: - - get - - list - - watch - - apiGroups: - - "extensions" - resources: - - ingresses - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - "extensions" - resources: - - ingresses/status - verbs: - - update diff --git a/sources/ingress-nginx/base/cluster-wide/kustomization.yaml b/sources/ingress-nginx/base/cluster-wide/kustomization.yaml deleted file mode 100644 index aeef6ed6..00000000 --- a/sources/ingress-nginx/base/cluster-wide/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -commonLabels: - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx -resources: -- cluster-role.yaml -- cluster-role-binding.yaml diff --git a/sources/ingress-nginx/base/grafana/dashboards/README.md b/sources/ingress-nginx/base/grafana/dashboards/README.md deleted file mode 100644 index bfb428df..00000000 --- a/sources/ingress-nginx/base/grafana/dashboards/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Grafana Dashboards -Ingress-nginx supports a rich collection of prometheus metrics. If you have prometheus and grafana installed on your cluster then prometheus will already be scraping this data due to the `scrape` annotation on the deployment. - -This folder contains a dashboard that you can import: - -![Dashboard](screenshot.png) - -## Features - - - Ability to filter by Namespace, Controller Class and Controller - - Visibility of Request Volume, connections, success rates, config reloads and configs out of sync. - - Network IO pressure, memory and CPU use - - Ingress P50, P95 and P99 percentile response times with IN/OUT throughput - - SSL certificate expiry - - Annotational overlays to show when config reloads happened - -## Requirements - - - **Grafana v5.2.0** (or newer) diff --git a/sources/ingress-nginx/base/grafana/dashboards/nginx.json b/sources/ingress-nginx/base/grafana/dashboards/nginx.json deleted file mode 100644 index 35b2c4d3..00000000 --- a/sources/ingress-nginx/base/grafana/dashboards/nginx.json +++ /dev/null @@ -1,1453 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "5.2.1" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "singlestat", - "name": "Singlestat", - "version": "5.0.0" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - }, - { - "datasource": "${DS_PROMETHEUS}", - "enable": true, - "expr": "sum(changes(nginx_ingress_controller_config_last_reload_successful_timestamp_seconds{instance!=\"unknown\",controller_class=~\"$controller_class\",namespace=~\"$namespace\"}[30s])) by (controller_class)", - "hide": false, - "iconColor": "rgba(255, 96, 96, 1)", - "limit": 100, - "name": "Config Reloads", - "showIn": 0, - "step": "30s", - "tagKeys": "controller_class", - "tags": [], - "titleFormat": "Config Reloaded", - "type": "tags" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "iteration": 1534359654832, - "links": [], - "panels": [ - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "${DS_PROMETHEUS}", - "format": "ops", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 20, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "round(sum(irate(nginx_ingress_controller_requests{controller_pod=~\"$controller\",controller_class=~\"$controller_class\",namespace=~\"$namespace\"}[2m])), 0.001)", - "format": "time_series", - "intervalFactor": 1, - "refId": "A", - "step": 4 - } - ], - "thresholds": "", - "title": "Controller Request Volume", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "${DS_PROMETHEUS}", - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 82, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(avg_over_time(nginx_ingress_controller_nginx_process_connections{controller_pod=~\"$controller\",controller_class=~\"$controller_class\",controller_namespace=~\"$namespace\"}[2m]))", - "format": "time_series", - "instant": false, - "intervalFactor": 1, - "refId": "A", - "step": 4 - } - ], - "thresholds": "", - "title": "Controller Connections", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "${DS_PROMETHEUS}", - "format": "percentunit", - "gauge": { - "maxValue": 100, - "minValue": 80, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": false - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 21, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(rate(nginx_ingress_controller_requests{controller_pod=~\"$controller\",controller_class=~\"$controller_class\",namespace=~\"$namespace\",status!~\"[4-5].*\"}[2m])) / sum(rate(nginx_ingress_controller_requests{controller_pod=~\"$controller\",controller_class=~\"$controller_class\",namespace=~\"$namespace\"}[2m]))", - "format": "time_series", - "intervalFactor": 1, - "refId": "A", - "step": 4 - } - ], - "thresholds": "95, 99, 99.5", - "title": "Controller Success Rate (non-4|5xx responses)", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 0, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 0 - }, - "id": 81, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "avg(nginx_ingress_controller_success{controller_pod=~\"$controller\",controller_class=~\"$controller_class\",controller_namespace=~\"$namespace\"})", - "format": "time_series", - "instant": true, - "intervalFactor": 1, - "refId": "A", - "step": 4 - } - ], - "thresholds": "", - "title": "Config Reloads", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 0, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 21, - "y": 0 - }, - "id": 83, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": true, - "lineColor": "rgb(31, 120, 193)", - "show": true - }, - "tableColumn": "", - "targets": [ - { - "expr": "count(nginx_ingress_controller_config_last_reload_successful{controller_pod=~\"$controller\",controller_namespace=~\"$namespace\"} == 0)", - "format": "time_series", - "instant": true, - "intervalFactor": 1, - "refId": "A", - "step": 4 - } - ], - "thresholds": "", - "title": "Last Config Failed", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "avg" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 3 - }, - "height": "200px", - "id": 86, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "hideZero": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 300, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "repeat": null, - "repeatDirection": "h", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "round(sum(irate(nginx_ingress_controller_requests{controller_pod=~\"$controller\",controller_class=~\"$controller_class\",controller_namespace=~\"$namespace\",ingress=~\"$ingress\"}[2m])) by (ingress), 0.001)", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{ ingress }}", - "metric": "network", - "refId": "A", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Ingress Request Volume", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "reqps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { - "max - istio-proxy": "#890f02", - "max - master": "#bf1b00", - "max - prometheus": "#bf1b00" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": false, - "error": false, - "fill": 0, - "grid": {}, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 3 - }, - "id": 87, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": true, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 300, - "sort": "avg", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(rate(nginx_ingress_controller_requests{controller_pod=~\"$controller\",controller_class=~\"$controller_class\",namespace=~\"$namespace\",ingress=~\"$ingress\",status!~\"[4-5].*\"}[2m])) by (ingress) / sum(rate(nginx_ingress_controller_requests{controller_pod=~\"$controller\",controller_class=~\"$controller_class\",namespace=~\"$namespace\",ingress=~\"$ingress\"}[2m])) by (ingress)", - "format": "time_series", - "instant": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ ingress }}", - "metric": "container_memory_usage:sort_desc", - "refId": "A", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Ingress Success Rate (non-4|5xx responses)", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 1, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percentunit", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": {}, - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 10 - }, - "height": "200px", - "id": 32, - "isNew": true, - "legend": { - "alignAsTable": false, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": false, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum (irate (nginx_ingress_controller_request_size_sum{controller_pod=~\"$controller\",controller_class=~\"$controller_class\",controller_namespace=~\"$namespace\"}[2m]))", - "format": "time_series", - "instant": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "Received", - "metric": "network", - "refId": "A", - "step": 10 - }, - { - "expr": "- sum (irate (nginx_ingress_controller_response_size_sum{controller_pod=~\"$controller\",controller_class=~\"$controller_class\",controller_namespace=~\"$namespace\"}[2m]))", - "format": "time_series", - "hide": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "Sent", - "metric": "network", - "refId": "B", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Network I/O pressure", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { - "max - istio-proxy": "#890f02", - "max - master": "#bf1b00", - "max - prometheus": "#bf1b00" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": false, - "error": false, - "fill": 0, - "grid": {}, - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 10 - }, - "id": 77, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": false, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "avg(nginx_ingress_controller_nginx_process_resident_memory_bytes{controller_pod=~\"$controller\",controller_class=~\"$controller_class\",controller_namespace=~\"$namespace\"}) ", - "format": "time_series", - "instant": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "nginx", - "metric": "container_memory_usage:sort_desc", - "refId": "A", - "step": 10 - } - ], - "thresholds": [], - "timeFrom": null, - "timeShift": null, - "title": "Average Memory Usage", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": { - "max - istio-proxy": "#890f02", - "max - master": "#bf1b00" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 3, - "editable": false, - "error": false, - "fill": 0, - "grid": {}, - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 10 - }, - "height": "", - "id": 79, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": false, - "sort": null, - "sortDesc": null, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum (rate (nginx_ingress_controller_nginx_process_cpu_seconds_total{controller_pod=~\"$controller\",controller_class=~\"$controller_class\",controller_namespace=~\"$namespace\"}[2m])) ", - "format": "time_series", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "nginx", - "metric": "container_cpu", - "refId": "A", - "step": 10 - } - ], - "thresholds": [ - { - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Average CPU Usage", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "label": "cores", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "columns": [], - "datasource": "${DS_PROMETHEUS}", - "fontSize": "100%", - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 16 - }, - "hideTimeOverride": false, - "id": 75, - "links": [], - "pageSize": 7, - "repeat": null, - "repeatDirection": "h", - "scroll": true, - "showHeader": true, - "sort": { - "col": 1, - "desc": true - }, - "styles": [ - { - "alias": "Ingress", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "ingress", - "preserveFormat": false, - "sanitize": false, - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "alias": "Requests", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Value #A", - "thresholds": [ - "" - ], - "type": "number", - "unit": "ops" - }, - { - "alias": "Errors", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Value #B", - "thresholds": [], - "type": "number", - "unit": "ops" - }, - { - "alias": "P50 Latency", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "link": false, - "pattern": "Value #C", - "thresholds": [], - "type": "number", - "unit": "dtdurations" - }, - { - "alias": "P90 Latency", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "pattern": "Value #D", - "thresholds": [], - "type": "number", - "unit": "dtdurations" - }, - { - "alias": "P99 Latency", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "pattern": "Value #E", - "thresholds": [], - "type": "number", - "unit": "dtdurations" - }, - { - "alias": "IN", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Value #F", - "thresholds": [ - "" - ], - "type": "number", - "unit": "Bps" - }, - { - "alias": "", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "pattern": "Time", - "thresholds": [], - "type": "hidden", - "unit": "short" - }, - { - "alias": "OUT", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value #G", - "thresholds": [], - "type": "number", - "unit": "Bps" - } - ], - "targets": [ - { - "expr": "histogram_quantile(0.50, sum(rate(nginx_ingress_controller_request_duration_seconds_bucket{ingress!=\"\",controller_pod=~\"$controller\",controller_class=~\"$controller_class\",controller_namespace=~\"$namespace\",ingress=~\"$ingress\"}[2m])) by (le, ingress))", - "format": "table", - "hide": false, - "instant": true, - "intervalFactor": 1, - "legendFormat": "{{ ingress }}", - "refId": "C" - }, - { - "expr": "histogram_quantile(0.90, sum(rate(nginx_ingress_controller_request_duration_seconds_bucket{ingress!=\"\",controller_pod=~\"$controller\",controller_class=~\"$controller_class\",controller_namespace=~\"$namespace\",ingress=~\"$ingress\"}[2m])) by (le, ingress))", - "format": "table", - "hide": false, - "instant": true, - "intervalFactor": 1, - "legendFormat": "{{ ingress }}", - "refId": "D" - }, - { - "expr": "histogram_quantile(0.99, sum(rate(nginx_ingress_controller_request_duration_seconds_bucket{ingress!=\"\",controller_pod=~\"$controller\",controller_class=~\"$controller_class\",controller_namespace=~\"$namespace\",ingress=~\"$ingress\"}[2m])) by (le, ingress))", - "format": "table", - "hide": false, - "instant": true, - "intervalFactor": 1, - "legendFormat": "{{ destination_service }}", - "refId": "E" - }, - { - "expr": "sum(irate(nginx_ingress_controller_request_size_sum{ingress!=\"\",controller_pod=~\"$controller\",controller_class=~\"$controller_class\",controller_namespace=~\"$namespace\",ingress=~\"$ingress\"}[2m])) by (ingress)", - "format": "table", - "hide": false, - "instant": true, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{ ingress }}", - "refId": "F" - }, - { - "expr": "sum(irate(nginx_ingress_controller_response_size_sum{ingress!=\"\",controller_pod=~\"$controller\",controller_class=~\"$controller_class\",controller_namespace=~\"$namespace\",ingress=~\"$ingress\"}[2m])) by (ingress)", - "format": "table", - "instant": true, - "intervalFactor": 1, - "legendFormat": "{{ ingress }}", - "refId": "G" - } - ], - "timeFrom": null, - "title": "Ingress Percentile Response Times and Transfer Rates", - "transform": "table", - "transparent": false, - "type": "table" - }, - { - "columns": [ - { - "text": "Current", - "value": "current" - } - ], - "datasource": "${DS_PROMETHEUS}", - "fontSize": "100%", - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 24 - }, - "height": "1024", - "id": 85, - "links": [], - "pageSize": 7, - "scroll": true, - "showHeader": true, - "sort": { - "col": 1, - "desc": false - }, - "styles": [ - { - "alias": "Time", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "date" - }, - { - "alias": "TTL", - "colorMode": "cell", - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 0, - "pattern": "Current", - "thresholds": [ - "0", - "691200" - ], - "type": "number", - "unit": "s" - }, - { - "alias": "", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "decimals": 2, - "pattern": "/.*/", - "thresholds": [], - "type": "number", - "unit": "short" - } - ], - "targets": [ - { - "expr": "avg(nginx_ingress_controller_ssl_expire_time_seconds{kubernetes_pod_name=~\"$controller\",namespace=~\"$namespace\",ingress=~\"$ingress\"}) by (host) - time()", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{ host }}", - "metric": "gke_letsencrypt_cert_expiration", - "refId": "A", - "step": 1 - } - ], - "title": "Ingress Certificate Expiry", - "transform": "timeseries_aggregations", - "type": "table" - } - ], - "refresh": "5s", - "schemaVersion": 16, - "style": "dark", - "tags": [ - "nginx" - ], - "templating": { - "list": [ - { - "allValue": ".*", - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": "${DS_PROMETHEUS}", - "hide": 0, - "includeAll": true, - "label": "Namespace", - "multi": false, - "name": "namespace", - "options": [], - "query": "label_values(nginx_ingress_controller_config_hash, controller_namespace)", - "refresh": 1, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": "${DS_PROMETHEUS}", - "hide": 0, - "includeAll": true, - "label": "Controller Class", - "multi": false, - "name": "controller_class", - "options": [], - "query": "label_values(nginx_ingress_controller_config_hash{namespace=~\"$namespace\"}, controller_class) ", - "refresh": 1, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": { - "text": "All", - "value": "$__all" - }, - "datasource": "${DS_PROMETHEUS}", - "hide": 0, - "includeAll": true, - "label": "Controller", - "multi": false, - "name": "controller", - "options": [], - "query": "label_values(nginx_ingress_controller_config_hash{namespace=~\"$namespace\",controller_class=~\"$controller_class\"}, controller_pod) ", - "refresh": 1, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": { - "tags": [], - "text": "All", - "value": "$__all" - }, - "datasource": "${DS_PROMETHEUS}", - "hide": 0, - "includeAll": true, - "label": "Ingress", - "multi": false, - "name": "ingress", - "options": [], - "query": "label_values(nginx_ingress_controller_requests{namespace=~\"$namespace\",controller_class=~\"$controller_class\",controller=~\"$controller\"}, ingress) ", - "refresh": 1, - "regex": "", - "sort": 2, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "2m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "browser", - "title": "NGINX Ingress controller", - "uid": "nginx", - "version": 1 -} diff --git a/sources/ingress-nginx/base/grafana/dashboards/screenshot.png b/sources/ingress-nginx/base/grafana/dashboards/screenshot.png deleted file mode 100644 index bc5ad3b1..00000000 Binary files a/sources/ingress-nginx/base/grafana/dashboards/screenshot.png and /dev/null differ diff --git a/sources/ingress-nginx/overlay/hostNetwork-patch.yaml b/sources/ingress-nginx/overlay/hostNetwork-patch.yaml deleted file mode 100644 index 030e7f0e..00000000 --- a/sources/ingress-nginx/overlay/hostNetwork-patch.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx-ingress-controller -spec: - template: - spec: - hostNetwork: true \ No newline at end of file diff --git a/sources/ingress-nginx/overlay/kustomization.yaml b/sources/ingress-nginx/overlay/kustomization.yaml deleted file mode 100644 index 54180424..00000000 --- a/sources/ingress-nginx/overlay/kustomization.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: ingress-nginx -commonLabels: - # app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx - -bases: -- ../base/cloud-generic -- ../base/cluster-wide - -resources: -- ./servicemonitor.yaml - -patchesStrategicMerge: -- ./hostNetwork-patch.yaml -- ./replicas-patch.yaml -- ./podAntiAffinity-patch.yaml -- ./servicemonitor-patches.yaml - -# replicas: -# - name: nginx-ingress-controller -# count: 3 - -# FIXME add prometheus-servicemonitor \ No newline at end of file diff --git a/sources/ingress-nginx/overlay/podAntiAffinity-patch.yaml b/sources/ingress-nginx/overlay/podAntiAffinity-patch.yaml deleted file mode 100644 index 5fe86a24..00000000 --- a/sources/ingress-nginx/overlay/podAntiAffinity-patch.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx-ingress-controller -spec: - template: - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app.kubernetes.io/name - operator: In - values: - - ingress-nginx - topologyKey: "kubernetes.io/hostname" \ No newline at end of file diff --git a/sources/ingress-nginx/overlay/replicas-patch.yaml b/sources/ingress-nginx/overlay/replicas-patch.yaml deleted file mode 100644 index 70a0a179..00000000 --- a/sources/ingress-nginx/overlay/replicas-patch.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx-ingress-controller -spec: - replicas: 3 \ No newline at end of file diff --git a/sources/ingress-nginx/overlay/servicemonitor-patches.yaml b/sources/ingress-nginx/overlay/servicemonitor-patches.yaml deleted file mode 100644 index 00d3b2cb..00000000 --- a/sources/ingress-nginx/overlay/servicemonitor-patches.yaml +++ /dev/null @@ -1,27 +0,0 @@ -kind: Service -apiVersion: v1 -metadata: - name: ingress-nginx -spec: - ports: - - name: metrics - port: 10254 - targetPort: metrics - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx-ingress-controller -spec: - template: - metadata: - annotations: - prometheus.io/port: null - prometheus.io/scrape: null - spec: - containers: - - name: nginx-ingress-controller - ports: - - name: metrics - containerPort: 10254 diff --git a/sources/ingress-nginx/overlay/servicemonitor.yaml b/sources/ingress-nginx/overlay/servicemonitor.yaml deleted file mode 100644 index 9c2e1a82..00000000 --- a/sources/ingress-nginx/overlay/servicemonitor.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: ingress-nginx - namespace: ingress-nginx -spec: - endpoints: - - port: metrics - interval: 30s - # honorLabels: true - namespaceSelector: - matchNames: - - ingress-nginx - selector: - matchLabels: - app.kubernetes.io/name: ingress-nginx - app.kubernetes.io/part-of: ingress-nginx diff --git a/sources/keycloak/README.md b/sources/keycloak/README.md deleted file mode 100644 index 4588d0ca..00000000 --- a/sources/keycloak/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# keycloak - -```bash -# check manifests -kubectl kustomize . - -# push to cluster -kubectl apply -k . -``` - - -## FIXME -- create of fetch secret from file on keybasefs - https://github.com/kubernetes-sigs/kustomize/blob/master/examples/secretGeneratorPlugin.md#secret-values-from-anywhere diff --git a/sources/keycloak/keycloak-ingress-patch.yaml b/sources/keycloak/keycloak-ingress-patch.yaml deleted file mode 100644 index 8f4792c4..00000000 --- a/sources/keycloak/keycloak-ingress-patch.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: keycloak - # annotations: - # FIXME add something for cookie size, keycloak.. in ../base -spec: - rules: - - host: keycloak.codeformuenster.org - http: - paths: - - backend: - serviceName: keycloak - servicePort: http - tls: - - secretName: keycloak-tls - hosts: - - keycloak.codeformuenster.org - ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Certificate -metadata: - name: keycloak-tls -spec: - commonName: keycloak.codeformuenster.org diff --git a/sources/keycloak/kustomization.yaml b/sources/keycloak/kustomization.yaml deleted file mode 100644 index f84c7559..00000000 --- a/sources/keycloak/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: keycloak -commonLabels: - app.kubernetes.io/part-of: keycloak - -bases: -- github.com/codeformuenster/kustomized//keycloak - -secretGenerator: -- name: keycloak-admin-user - env: ./secrets/keycloak-password-secret -- name: postgres - env: ./secrets/postgres-password-secret - -patchesStrategicMerge: -- ./keycloak-ingress-patch.yaml diff --git a/sources/kinto/README.md b/sources/kinto/README.md deleted file mode 100644 index 6a3b1b56..00000000 --- a/sources/kinto/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Kustomized Kinto - -``` -kubectl kustomize ./overlay-cfm -``` - -## Kustomized Kinto for Verkehrsunfaelle - - -``` -kubectl kustomize ./verkehrsunfaelle -``` diff --git a/sources/kinto/base/0-namespace.yaml b/sources/kinto/base/0-namespace.yaml deleted file mode 100644 index 8d1f79c4..00000000 --- a/sources/kinto/base/0-namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: kinto diff --git a/sources/kinto/base/elasticsearch.yaml b/sources/kinto/base/elasticsearch.yaml deleted file mode 100644 index ccb2746d..00000000 --- a/sources/kinto/base/elasticsearch.yaml +++ /dev/null @@ -1,246 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: elasticsearch - namespace: kinto - labels: - app.kubernetes.io/name: elasticsearch - app.kubernetes.io/component: searchengine -spec: - ports: - - name: api - port: 9200 - targetPort: 9200 - selector: - app.kubernetes.io/name: elasticsearch - app.kubernetes.io/component: searchengine - ---- -apiVersion: v1 -kind: Service -metadata: - name: elasticsearch-cluster - namespace: kinto - labels: - app.kubernetes.io/name: elasticsearch - app.kubernetes.io/component: searchengine - # annotations: - # service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" -spec: - type: ClusterIP - clusterIP: None - ports: - - port: 9300 - # protocol: TCP - targetPort: 9300 - publishNotReadyAddresses: true - selector: - app.kubernetes.io/name: elasticsearch - app.kubernetes.io/component: searchengine - # sessionAffinity: None - - -# elasticsearch.yml: -# discovery.zen: -# minimum_master_nodes: ${NODE_QUORUM} -# ping.unicast.hosts: elasticsearch-cluster - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: elasticsearch - namespace: kinto - labels: - app.kubernetes.io/name: elasticsearch - app.kubernetes.io/component: searchengine -data: - elasticsearch.yml: | - cluster.name: full-stack-cluster - node.name: node-1 - path.data: /usr/share/elasticsearch/data - http: - host: 0.0.0.0 - port: 9200 - bootstrap.memory_lock: true - transport.host: 127.0.0.1 - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: elasticsearch - namespace: kinto - labels: - app.kubernetes.io/name: elasticsearch - app.kubernetes.io/component: searchengine -spec: - replicas: 1 - selector: - matchLabels: - labels: - app.kubernetes.io/name: elasticsearch - app.kubernetes.io/component: searchengine - strategy: - type: Recreate - template: - metadata: - labels: - app.kubernetes.io/name: elasticsearch - app.kubernetes.io/component: searchengine - spec: - # affinity: - # nodeAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # nodeSelectorTerms: - # - matchExpressions: - # - key: affinity/elasticsearch - # operator: In - # values: - # - "true" - # serviceAccountName: elasticsearch - # initContainers: - # - name: set-vm-max-map-count - # image: busybox - # imagePullPolicy: IfNotPresent - # command: ['sysctl', '-w', 'vm.max_map_count=262144'] - # securityContext: - # privileged: true - # - name: volume-mount-hack - # image: busybox - # command: ["sh", "-c", "chown -R 1000:100 /usr/share/elasticsearch/data"] - # volumeMounts: - # - name: data - # mountPath: /usr/share/elasticsearch/data - containers: - - name: elasticsearch - image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.7.0 - # env: - # - name: ES_JAVA_OPTS - # value: -Xms1024m -Xmx1024m - # # ES_MEM_LIMIT=2g - # # ES_JVM_HEAP=1024m - ports: - - containerPort: 9200 - - containerPort: 9300 - # FIXME port 9300 for cluster? - # resources: - # limits: - # # memory: "2147483648" - # memory: 3Gi - volumeMounts: - - name: config - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml - subPath: elasticsearch.yml - - name: data - mountPath: /usr/share/elasticsearch/data - # Allow non-root user to access PersistentVolume - securityContext: - fsGroup: 1000 - restartPolicy: Always - volumes: - - name: config - configMap: - name: elasticsearch - - name: data - persistentVolumeClaim: - claimName: elasticsearch - # - name: data - # hostPath: - # path: /srv/elasticsearch-data2 - # - name: data - # emptyDir: {} - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: elasticsearch - namespace: kinto -spec: - storageClassName: FIXME - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10G - -# --- -# apiVersion: rbac.authorization.k8s.io/v1beta1 -# kind: ClusterRole -# metadata: -# name: elasticsearch -# namespace: kinto -# labels: -# app: kinto -# component: elasticsearch -# rules: -# - apiGroups: -# - extensions -# resources: -# - podsecuritypolicies -# resourceNames: -# - elasticsearch -# verbs: -# - use - -# --- -# kind: ClusterRoleBinding -# apiVersion: rbac.authorization.k8s.io/v1beta1 -# metadata: -# name: elasticsearch -# namespace: kinto -# labels: -# app: kinto -# component: elasticsearch -# subjects: -# - kind: ServiceAccount -# name: elasticsearch -# namespace: kinto -# roleRef: -# kind: ClusterRole -# name: elasticsearch -# apiGroup: rbac.authorization.k8s.io - -# --- -# apiVersion: v1 -# kind: ServiceAccount -# metadata: -# name: elasticsearch -# namespace: kinto -# labels: -# app: kinto -# component: elasticsearch - -# --- -# apiVersion: extensions/v1beta1 -# kind: PodSecurityPolicy -# metadata: -# name: elasticsearch -# namespace: kinto -# labels: -# app: kinto -# component: elasticsearch -# spec: -# fsGroup: -# rule: RunAsAny -# privileged: true -# #^ FIXME still needed? -# runAsUser: -# rule: RunAsAny -# seLinux: -# rule: RunAsAny -# allowedCapabilities: -# - 'IPC_LOCK' -# - 'SYS_RESOURCE' -# supplementalGroups: -# rule: RunAsAny -# volumes: -# - '*' -# hostPID: true -# hostIPC: true -# hostNetwork: true -# hostPorts: -# - min: 1 -# max: 65536 diff --git a/sources/kinto/base/kinto.yaml b/sources/kinto/base/kinto.yaml deleted file mode 100644 index 172b4325..00000000 --- a/sources/kinto/base/kinto.yaml +++ /dev/null @@ -1,172 +0,0 @@ -# app.kubernetes.io/name: mysql -# app.kubernetes.io/instance: wordpress-abcxzy -# app.kubernetes.io/version: "5.7.21" -# app.kubernetes.io/component: database -# app.kubernetes.io/part-of: wordpress -# app.kubernetes.io/managed-by: helm - ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: kinto - labels: - app.kubernetes.io/name: kinto - app.kubernetes.io/component: datastore - annotations: - certmanager.k8s.io/cluster-issuer: letsencrypt - kubernetes.io/tls-acme: "true" - nginx.ingress.kubernetes.io/from-to-www-redirect: "true" - # nginx.ingress.kubernetes.io/rewrite-target: "/" -spec: - rules: - - host: FIXME - http: - paths: - - path: / - backend: - serviceName: kinto - servicePort: api - tls: - - hosts: - - FIXME - secretName: kinto-tls - ---- -apiVersion: v1 -kind: Service -metadata: - name: kinto - labels: - app.kubernetes.io/name: kinto - app.kubernetes.io/component: datastore -spec: - ports: - - name: api - port: 8888 - targetPort: api - selector: - app.kubernetes.io/name: kinto - ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: kinto - labels: - app.kubernetes.io/name: kinto - app.kubernetes.io/component: datastore -spec: - template: - metadata: - labels: - app.kubernetes.io/name: kinto - app.kubernetes.io/component: datastore - spec: - containers: - - name: kinto - # image: kinto/kinto-server:13.1.0 - image: kinto/kinto-server:13.0.1 - ports: - - name: api - containerPort: 8888 - volumeMounts: - - name: config - mountPath: /etc/kinto - volumes: - - name: config - configMap: - name: kinto - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: kinto - namespace: kinto - labels: - app.kubernetes.io/name: kinto - app.kubernetes.io/component: datastore -data: - kinto.ini: | - # from: https://github.com/Kinto/kinto/blob/master/kinto/config/kinto.tpl - # see also: https://kinto.readthedocs.io/en/latest/configuration/settings.html - - [server:main] - use = egg:waitress#main - host = 0.0.0.0 - port = %(http_port)s - - [app:main] - use = egg:kinto - - kinto.includes = kinto.plugins.default_bucket - kinto.plugins.admin - kinto.plugins.openid - kinto.plugins.accounts - kinto_elasticsearch - - kinto.elasticsearch.hosts = elasticsearch:9200 - kinto.elasticsearch.index_prefix = kinto - - kinto.storage_backend = kinto.core.storage.postgresql - kinto.storage_url = postgres://kinto:kinto@postgres/kinto - - kinto.permission_backend = kinto.core.permission.postgresql - kinto.permission_url = postgres://kinto:kinto@postgres/kinto - - kinto.experimental_collection_schema_validation = True - - # # kinto.userid_hmac_secret = {secret} - # multiauth.policies = account - - # multiauth.policy.account.use = kinto.plugins.accounts.authentication.AccountsAuthenticationPolicy - # # multiauth.policy.account.use = kinto.plugins.accounts.AccountsPolicy - - # multiauth.policies = oidc - # multiauth.policy.oidc.use = kinto.plugins.openid.OpenIDConnectPolicy - # multiauth.policy.oidc.issuer = https://accounts.oidc.com - # multiauth.policy.oidc.client_id = 42XXXX365001.apps.oidcusercontent.com - # multiauth.policy.oidc.client_secret = UAlL-054uyh5in4b6u8jhg5o3hnj - # multiauth.policy.oidc.userid_field = email - - - # Allow anyone to create accounts. - kinto.account_create_principals = system.Everyone - # Set user 'account:admin' as the administrator. - kinto.account_write_principals = account:admin - # Allow administrators to create buckets - kinto.bucket_create_principals = account:admin - - - # https://kinto.readthedocs.io/en/stable/configuration/settings.html#standard-logging - [loggers] - keys = root - - [handlers] - keys = console - - [formatters] - keys = generic - # keys = color - # keys = json - - [logger_root] - level = DEBUG - handlers = console - - [handler_console] - class = StreamHandler - args = (sys.stdout,) - level = NOTSET - formatter = generic - - [formatter_generic] - format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s - datefmt = %H:%M:%S - - [formatter_color] - class = logging_color_formatter.ColorFormatter - - [formatter_json] - class = kinto.core.JsonLogFormatter diff --git a/sources/kinto/base/kustomization.yaml b/sources/kinto/base/kustomization.yaml deleted file mode 100644 index 02b1b3b1..00000000 --- a/sources/kinto/base/kustomization.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: kinto - -# https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/ -commonLabels: - app.kubernetes.io/part-of: kinto-stack - -resources: -# - 0-namespace.yaml -# - cluster-role-oidc-mapping.yaml -- kinto.yaml -- postgres.yaml -# - elasticsearch.yaml -# - realm.yaml diff --git a/sources/kinto/base/postgres.yaml b/sources/kinto/base/postgres.yaml deleted file mode 100644 index eb6aae50..00000000 --- a/sources/kinto/base/postgres.yaml +++ /dev/null @@ -1,71 +0,0 @@ -# based on https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/master/deploy/single/all-in-one-postgres.yaml ---- -apiVersion: v1 -kind: Service -metadata: - name: postgres - labels: - app.kubernetes.io/name: postgres - app.kubernetes.io/component: database -spec: - ports: - - name: pgql - port: 5432 - targetPort: 5432 - protocol: TCP - selector: - app.kubernetes.io/name: postgres - app.kubernetes.io/component: database - ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: postgres - labels: - app.kubernetes.io/name: postgres - app.kubernetes.io/component: database -spec: - serviceName: "postgres" - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: postgres - app.kubernetes.io/component: database - template: - metadata: - labels: - app.kubernetes.io/name: postgres - app.kubernetes.io/component: database - spec: - containers: - - name: postgres - image: postgres:11 - volumeMounts: - - name: data - mountPath: /var/lib/postgresql/data - subPath: pgdata - env: - - name: POSTGRES_USER - value: kinto - # FIXME create random password in secret on commandline - - name: POSTGRES_PASSWORD - value: kinto - - name: POSTGRES_DB - value: kinto - - name: PGDATA - value: /var/lib/postgresql/data/pgdata - ports: - - containerPort: 5432 - # No pre-stop hook is required, a SIGTERM plus some time is all that's - # needed for graceful shutdown of a node. - terminationGracePeriodSeconds: 60 - volumeClaimTemplates: - - metadata: - name: data - spec: - accessModes: - - "ReadWriteOnce" - resources: - requests: - storage: 5Gi diff --git a/sources/kinto/overlay-cfm/kinto-config_patch.yaml b/sources/kinto/overlay-cfm/kinto-config_patch.yaml deleted file mode 100644 index fe2c1144..00000000 --- a/sources/kinto/overlay-cfm/kinto-config_patch.yaml +++ /dev/null @@ -1,91 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: kinto - namespace: kinto - labels: - app.kubernetes.io/name: kinto - app.kubernetes.io/component: datastore -data: - kinto.ini: | - # from: https://github.com/Kinto/kinto/blob/master/kinto/config/kinto.tpl - # see also: https://kinto.readthedocs.io/en/latest/configuration/settings.html - - [server:main] - use = egg:waitress#main - host = 0.0.0.0 - port = %(http_port)s - - [app:main] - use = egg:kinto - - kinto.includes = kinto.plugins.default_bucket - kinto.plugins.admin - kinto.plugins.openid - kinto.plugins.accounts - # kinto_elasticsearch - - # kinto.elasticsearch.hosts = elasticsearch:9200 - # kinto.elasticsearch.index_prefix = kinto - - kinto.storage_backend = kinto.core.storage.postgresql - kinto.storage_url = postgres://kinto:kinto@postgres/kinto - - kinto.permission_backend = kinto.core.permission.postgresql - kinto.permission_url = postgres://kinto:kinto@postgres/kinto - - kinto.experimental_collection_schema_validation = True - - # # kinto.userid_hmac_secret = {secret} - # multiauth.policies = account - - multiauth.policy.account.use = kinto.plugins.accounts.authentication.AccountsAuthenticationPolicy - # # multiauth.policy.account.use = kinto.plugins.accounts.AccountsPolicy - - # multiauth.policies = oidc - # multiauth.policy.oidc.use = kinto.plugins.openid.OpenIDConnectPolicy - # multiauth.policy.oidc.issuer = https://accounts.oidc.com - # multiauth.policy.oidc.client_id = 42XXXX365001.apps.oidcusercontent.com - # multiauth.policy.oidc.client_secret = UAlL-054uyh5in4b6u8jhg5o3hnj - # multiauth.policy.oidc.userid_field = email - - - # Allow anyone to create accounts. - kinto.account_create_principals = system.Everyone - # Set user 'account:admin' as the administrator. - kinto.account_write_principals = account:admin - # Allow administrators to create buckets - kinto.bucket_create_principals = account:admin - - - # https://kinto.readthedocs.io/en/stable/configuration/settings.html#standard-logging - [loggers] - keys = root - - [handlers] - keys = console - - [formatters] - keys = generic - # keys = color - # keys = json - - [logger_root] - level = DEBUG - handlers = console - - [handler_console] - class = StreamHandler - args = (sys.stdout,) - level = NOTSET - formatter = generic - - [formatter_generic] - format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s - datefmt = %H:%M:%S - - [formatter_color] - class = logging_color_formatter.ColorFormatter - - [formatter_json] - class = kinto.core.JsonLogFormatter diff --git a/sources/kinto/overlay-cfm/kinto-ingress_patch.yaml b/sources/kinto/overlay-cfm/kinto-ingress_patch.yaml deleted file mode 100644 index 6178b27c..00000000 --- a/sources/kinto/overlay-cfm/kinto-ingress_patch.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: kinto - labels: - app.kubernetes.io/name: kinto - app.kubernetes.io/component: datastore - annotations: - certmanager.k8s.io/cluster-issuer: letsencrypt - kubernetes.io/tls-acme: "true" - nginx.ingress.kubernetes.io/from-to-www-redirect: "true" - # nginx.ingress.kubernetes.io/rewrite-target: "/" -spec: - rules: - - host: kinto-test.codeformuenster.org - http: - paths: - - path: / - backend: - serviceName: kinto - servicePort: api - tls: - - hosts: - - kinto-test.codeformuenster.org - secretName: kinto-tls diff --git a/sources/kinto/overlay-cfm/kustomization.yaml b/sources/kinto/overlay-cfm/kustomization.yaml deleted file mode 100644 index eae1e3d4..00000000 --- a/sources/kinto/overlay-cfm/kustomization.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: kinto-test - -bases: -- ../base -resources: -- namespace.yaml -patchesStrategicMerge: -- kinto-config_patch.yaml -- kinto-ingress_patch.yaml -# - postgresql-secret_patch.yaml -- postgres-volume_patch.yaml diff --git a/sources/kinto/overlay-cfm/namespace.yaml b/sources/kinto/overlay-cfm/namespace.yaml deleted file mode 100644 index 4e1383e9..00000000 --- a/sources/kinto/overlay-cfm/namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: kinto-test diff --git a/sources/kinto/overlay-cfm/postgres-volume_patch.yaml b/sources/kinto/overlay-cfm/postgres-volume_patch.yaml deleted file mode 100644 index 263a8040..00000000 --- a/sources/kinto/overlay-cfm/postgres-volume_patch.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: postgres - labels: - app.kubernetes.io/name: postgres - app.kubernetes.io/component: database -spec: - volumeClaimTemplates: - - metadata: - name: data - spec: - accessModes: - - "ReadWriteOnce" - resources: - requests: - storage: 5Gi - storageClassName: high-performance-high-resilience diff --git a/sources/kinto/verkehrsunfaelle/editor-data-helpers.yaml b/sources/kinto/verkehrsunfaelle/editor-data-helpers.yaml deleted file mode 100644 index c862b384..00000000 --- a/sources/kinto/verkehrsunfaelle/editor-data-helpers.yaml +++ /dev/null @@ -1,66 +0,0 @@ ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: editor-data-helpers - labels: - app.kubernetes.io/name: editor-data-helpers - annotations: - certmanager.k8s.io/cluster-issuer: letsencrypt - kubernetes.io/tls-acme: "true" - nginx.ingress.kubernetes.io/from-to-www-redirect: "true" - nginx.ingress.kubernetes.io/rewrite-target: /$1 -spec: - rules: - - host: editor-data-helpers-verkehrsunfaelle.codeformuenster.org - http: - paths: - - path: /(.*) - backend: - serviceName: editor-data-helpers - servicePort: hooks - tls: - - hosts: - - editor-data-helpers-verkehrsunfaelle.codeformuenster.org - secretName: editor-data-helpers-tls - ---- -apiVersion: v1 -kind: Service -metadata: - name: editor-data-helpers - labels: - app.kubernetes.io/name: editor-data-helpers -spec: - ports: - - name: hooks - port: 9000 - targetPort: hooks - selector: - app.kubernetes.io/name: editor-data-helpers - ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: editor-data-helpers - labels: - app.kubernetes.io/name: editor-data-helpers -spec: - template: - metadata: - labels: - app.kubernetes.io/name: editor-data-helpers - spec: - containers: - - name: editor-data-helpers - image: quay.io/codeformuenster/verkehrsunfaelle-editor-data-helpers:editor-data-helpers-v0.4.1 - env: - - name: POSTGRES_URL - valueFrom: - secretKeyRef: - name: postgres - key: postgres-url - ports: - - name: hooks - containerPort: 9000 diff --git a/sources/kinto/verkehrsunfaelle/kinto-config_patch.yaml b/sources/kinto/verkehrsunfaelle/kinto-config_patch.yaml deleted file mode 100644 index b4f9ff54..00000000 --- a/sources/kinto/verkehrsunfaelle/kinto-config_patch.yaml +++ /dev/null @@ -1,68 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: kinto - namespace: kinto - labels: - app.kubernetes.io/name: kinto - app.kubernetes.io/component: datastore -data: - kinto.ini: | - [server:main] - use = egg:waitress#main - host = 0.0.0.0 - port = %(http_port)s - - [app:main] - use = egg:kinto - - kinto.includes = kinto.plugins.default_bucket - kinto.plugins.admin - kinto.plugins.accounts - - kinto.storage_backend = kinto.core.storage.postgresql - - kinto.permission_backend = kinto.core.permission.postgresql - - kinto.experimental_collection_schema_validation = True - - # kinto.userid_hmac_secret = {secret} - multiauth.policies = account - - multiauth.policy.account.use = kinto.plugins.accounts.authentication.AccountsAuthenticationPolicy - # multiauth.policy.account.use = kinto.plugins.accounts.AccountsPolicy - - # Allow anyone to create accounts. - kinto.account_create_principals = system.Everyone - # Set user 'account:admin' as the administrator. - kinto.account_write_principals = account:admin - # Allow administrators to create buckets - kinto.bucket_create_principals = account:admin - - - [loggers] - keys = root, kinto - - [handlers] - keys = console - - [formatters] - keys = color - - [logger_root] - level = INFO - handlers = console - - [logger_kinto] - level = DEBUG - handlers = console - qualname = kinto - - [handler_console] - class = StreamHandler - args = (sys.stderr,) - level = NOTSET - formatter = color - - [formatter_color] - class = logging_color_formatter.ColorFormatter diff --git a/sources/kinto/verkehrsunfaelle/kinto-ingress_patch.yaml b/sources/kinto/verkehrsunfaelle/kinto-ingress_patch.yaml deleted file mode 100644 index c68ee526..00000000 --- a/sources/kinto/verkehrsunfaelle/kinto-ingress_patch.yaml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: kinto - labels: - app.kubernetes.io/name: kinto - app.kubernetes.io/component: datastore - annotations: - certmanager.k8s.io/cluster-issuer: letsencrypt - kubernetes.io/tls-acme: "true" - nginx.ingress.kubernetes.io/from-to-www-redirect: "true" - # nginx.ingress.kubernetes.io/rewrite-target: "/" -spec: - rules: - - host: kinto-verkehrsunfaelle.codeformuenster.org - http: - paths: - - path: / - backend: - serviceName: kinto - servicePort: api - tls: - - hosts: - - kinto-verkehrsunfaelle.codeformuenster.org - secretName: kinto-tls diff --git a/sources/kinto/verkehrsunfaelle/kinto-pod_patch.yaml b/sources/kinto/verkehrsunfaelle/kinto-pod_patch.yaml deleted file mode 100644 index 0caa3cdf..00000000 --- a/sources/kinto/verkehrsunfaelle/kinto-pod_patch.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: kinto - labels: - app.kubernetes.io/name: kinto - app.kubernetes.io/component: datastore -spec: - template: - spec: - containers: - - name: kinto - image: kinto/kinto-server:13.6.2 - env: - - name: KINTO_STORAGE_URL - valueFrom: - secretKeyRef: - name: postgres - key: postgres-url - - name: KINTO_PERMISSION_URL - valueFrom: - secretKeyRef: - name: postgres - key: postgres-url diff --git a/sources/kinto/verkehrsunfaelle/kustomization.yaml b/sources/kinto/verkehrsunfaelle/kustomization.yaml deleted file mode 100644 index b46d09e9..00000000 --- a/sources/kinto/verkehrsunfaelle/kustomization.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: verkehrsunfaelle - -bases: - - ../base -resources: - - namespace.yaml - - editor-data-helpers.yaml - - postgres-backup.yaml -patchesStrategicMerge: - - kinto-pod_patch.yaml - - kinto-config_patch.yaml - - kinto-ingress_patch.yaml - - postgres_patch.yaml - -images: -- name: quay.io/codeformuenster/verkehrsunfaelle - newTag: 2019-11-15 -- name: quay.io/codeformuenster/postgres-minio-mc - newTag: 0.2.0 diff --git a/sources/kinto/verkehrsunfaelle/postgres-backup.yaml b/sources/kinto/verkehrsunfaelle/postgres-backup.yaml deleted file mode 100644 index 59904efd..00000000 --- a/sources/kinto/verkehrsunfaelle/postgres-backup.yaml +++ /dev/null @@ -1,62 +0,0 @@ -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - name: kinto-postgres-backup - labels: - app.kubernetes.io/name: kinto-postgres-backup -spec: - schedule: "5 4 * * *" - concurrencyPolicy: Forbid - suspend: false - jobTemplate: - spec: - parallelism: 1 - template: - spec: - containers: - - name: backup-uploader - image: quay.io/codeformuenster/postgres-minio-mc:0.1.1 - volumeMounts: - - mountPath: /dumps - name: dump-volume - command: - - /bin/bash - - -c - args: - - 'set -e && - pg_dump ${POSTGRES_URL} --encoding=utf8 --format=plain --no-owner --no-acl --no-privileges | gzip -9 > /dumps/verkehrsunfaelle_$(date -Iseconds).sql.gz && - mc config host add backup "${BUCKET_URL}" "${BUCKET_ACCESS_KEY}" "${BUCKET_SECRET_KEY}" && - mc cp /dumps/*.sql.gz ${BUCKET_TARGET}' - env: - - name: POSTGRES_URL - valueFrom: - secretKeyRef: - name: postgres - key: postgres-url - - name: BUCKET_URL - valueFrom: - secretKeyRef: - name: s3 - key: bucket-url - - name: BUCKET_ACCESS_KEY - valueFrom: - secretKeyRef: - name: s3 - key: access-key - - name: BUCKET_SECRET_KEY - valueFrom: - secretKeyRef: - name: s3 - key: secret-key - - name: BUCKET_TARGET - value: backup/codeformuenster/verkehrsunfaelle/ - restartPolicy: OnFailure - volumes: - - name: dump-volume - emptyDir: {} - - name: s3-secrets - secret: - secretName: s3 - - name: postgres-secrets - secret: - secretName: postgres diff --git a/sources/kinto/verkehrsunfaelle/postgres_patch.yaml b/sources/kinto/verkehrsunfaelle/postgres_patch.yaml deleted file mode 100644 index 0c2a42e8..00000000 --- a/sources/kinto/verkehrsunfaelle/postgres_patch.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: postgres - labels: - app.kubernetes.io/name: postgres - app.kubernetes.io/component: database -spec: - template: - spec: - containers: - - name: postgres - image: quay.io/codeformuenster/verkehrsunfaelle:2019-11-03 - env: - - name: POSTGRES_USER - value: null - valueFrom: - secretKeyRef: - name: postgres - key: username - - name: POSTGRES_PASSWORD - value: null - valueFrom: - secretKeyRef: - name: postgres - key: password diff --git a/sources/kube-prometheus/README.md b/sources/kube-prometheus/README.md deleted file mode 100644 index c29b8205..00000000 --- a/sources/kube-prometheus/README.md +++ /dev/null @@ -1,80 +0,0 @@ -# kube-prometheus - -https://github.com/coreos/kube-prometheus#customizing-kube-prometheus - -```bash -# get jb -curl -OL https://github.com/jsonnet-bundler/jsonnet-bundler/releases/download/v0.1.0/jb-linux-amd64 -chmod u+x ./jb-linux-amd64 -sudo mv ./jb-linux-amd64 /usr/local/bin/jb - -# # from master -# sudo docker run -v $PWD:/go/bin golang:1.13 \ -# sh -c "go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb" -# sudo mv ./jb /usr/local/bin/ - -# get jsonnet -curl -L https://github.com/google/jsonnet/releases/download/v0.14.0/jsonnet-bin-v0.14.0-linux.tar.gz \ - | tar -zx -sudo mv jsonnet jsonnetfmt /usr/local/bin/ - -# get tanka -curl -fOL https://github.com/sh0rez/tanka/releases/download/v0.4.0/tk-linux-amd64 -chmod u+x ./tk-linux-amd64 -sudo mv ./tk-linux-amd64 /usr/local/bin/tk -``` - - -```bash -# init -cd ./jsonnet -jb init -# jb install github.com/coreos/kube-prometheus/jsonnet/kube-prometheus@release-0.1 -jb install github.com/coreos/kube-prometheus/jsonnet/kube-prometheus@26750eadf59279f409de47d616527a9632f8ab23 - -# update -# edit jsonnet/jsonnetfile.json -jb update -``` - -```bash - -# render to verify -jsonnet --yaml-stream --jpath ./jsonnet/vendor ./main.jsonnet \ - > manifests-temp.json - -# apply to cluster -jsonnet --yaml-stream --jpath ./jsonnet/vendor ./main.jsonnet \ - | kubectl apply -f - - -# after changes at configmaps/secrets or volumeclaims -kubectl -n kube-prometheus rollout restart statefulset/prometheus-k8s - -# logs -kubectl -n kube-prometheus logs prometheus-k8s-0 prometheus -kubectl -n kube-prometheus logs prometheus-k8s-1 prometheus -``` - - - -## more dashboards - -https://github.com/coreos/kube-prometheus/blob/master/examples/grafana-additional-jsonnet-dashboard-example.jsonnet - - -## blackbox exporter - -**FIXME** not yet done - -https://github.com/coreos/prometheus-operator/issues/2010 -https://github.com/coreos/prometheus-operator/tree/master/example/additional-scrape-configs - - -```bash -# FIXME -Linux: root user or CAP_NET_RAW capability is required. - Can be set by executing setcap cap_net_raw+ep blackbox_exporter -``` - -## FIXME -- add loki to prometheus sources \ No newline at end of file diff --git a/sources/kube-prometheus/blackbox-exporter.libsonnet b/sources/kube-prometheus/blackbox-exporter.libsonnet deleted file mode 100644 index cdb73f46..00000000 --- a/sources/kube-prometheus/blackbox-exporter.libsonnet +++ /dev/null @@ -1,69 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; - -{ - _config+:: { - namespace: 'default', - - versions+:: { - blackboxExporter: 'v0.15.1', - }, - - imageRepos+:: { - blackboxExporter: 'quay.io/prometheus/blackbox-exporter', - // kubeRbacProxy: 'quay.io/coreos/kube-rbac-proxy', - }, - - blackboxExporter+:: { - port: 9115, - }, - }, - - blackboxExporter+:: { - - deployment: - // local deployment = k.apps.v1beta2.deployment; - local deployment = k.apps.v1.deployment; - local container = k.apps.v1.deployment.mixin.spec.template.spec.containersType; - local volume = k.apps.v1.deployment.mixin.spec.template.spec.volumesType; - local containerPort = container.portsType; - local containerVolumeMount = container.volumeMountsType; - local podSelector = deployment.mixin.spec.template.spec.selectorType; - - local podLabels = { app: 'blackbox-exporter' }; - - local blackboxExporter = - container.new('blackbox-exporter', $._config.imageRepos.blackboxExporter + ':' + $._config.versions.blackboxExporter) + - container.withArgs([ - '--config.file=/etc/blackbox_exporter/config.yml', - ]) + - container.withPorts(containerPort.newNamed(9115, 'http')); - // + - // container.mixin.resources.withRequests({ cpu: '10m', memory: '20Mi' }) + - // container.mixin.resources.withLimits({ cpu: '20m', memory: '40Mi' }); - - local c = [blackboxExporter]; - - deployment.new('blackbox-exporter', 1, c, podLabels) + - deployment.mixin.metadata.withNamespace($._config.namespace) + - deployment.mixin.metadata.withLabels(podLabels) + - deployment.mixin.spec.selector.withMatchLabels(podLabels) + - // deployment.mixin.spec.template.spec.withNodeSelector({ 'beta.kubernetes.io/os': 'linux' }) + - deployment.mixin.spec.template.spec.securityContext.withRunAsNonRoot(true) + - deployment.mixin.spec.template.spec.securityContext.withRunAsUser(1000), - // deployment.mixin.spec.template.spec.securityContext.readOnlyRootFilesystem(true), - // + - // deployment.mixin.spec.template.spec.withServiceAccountName('kube-state-metrics'), - - - service: - local service = k.core.v1.service; - local servicePort = k.core.v1.service.mixin.spec.portsType; - - local blackboxExporterPort = servicePort.newNamed('http', $._config.blackboxExporter.port, 'http'); - - service.new('blackbox-exporter', $.blackboxExporter.deployment.spec.selector.matchLabels, blackboxExporterPort) + - service.mixin.metadata.withNamespace($._config.namespace) + - service.mixin.metadata.withLabels({ 'k8s-app': 'blackbox-exporter' }) - // + service.mixin.spec.withClusterIp('None'), - }, -} diff --git a/sources/kube-prometheus/config.libsonnet b/sources/kube-prometheus/config.libsonnet deleted file mode 100644 index f17a5682..00000000 --- a/sources/kube-prometheus/config.libsonnet +++ /dev/null @@ -1,18 +0,0 @@ -{ - _config+:: { - namespace: 'kube-prometheus', - grafanaDomain: 'grafana.codeformuenster.org', - retentionSize: '19GB', - - versions+: { - blackboxExporter: 'v0.15.1', - // kubeStateMetrics: 'v1.7.2', - grafana: '6.4.0-beta1', - }, - - prometheus+:: { - // additional namespaces to watch - namespaces+: ['ingress-nginx', 'cert-manager', 'openebs'], - }, - } -} \ No newline at end of file diff --git a/sources/kube-prometheus/grafana-dashboards/README.md b/sources/kube-prometheus/grafana-dashboards/README.md deleted file mode 100644 index 3de69317..00000000 --- a/sources/kube-prometheus/grafana-dashboards/README.md +++ /dev/null @@ -1,12 +0,0 @@ - - -## FIXME - -- Create dashboards with grafonnet -- as custom resource -- apply via https://github.com/integr8ly/grafana-operator - -probably better this way: - https://github.com/brancz/kubernetes-grafana - -or not! i want dashboard crds... \ No newline at end of file diff --git a/sources/kube-prometheus/ingresses.libsonnet b/sources/kube-prometheus/ingresses.libsonnet deleted file mode 100644 index d7a9d2d5..00000000 --- a/sources/kube-prometheus/ingresses.libsonnet +++ /dev/null @@ -1,69 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; -// local k3 = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; - -// local secret = k3.core.v1.secret; -local ingress = k.extensions.v1beta1.ingress; -local ingressTls = ingress.mixin.spec.tlsType; -local ingressRule = ingress.mixin.spec.rulesType; -local httpIngressPath = ingressRule.mixin.http.pathsType; -// local pvc = k3.core.v1.persistentVolumeClaim; - -{ - // _config+:: { - // namespace: 'default', - - // versions+:: { - // blackboxExporter: 'v0.14.0', - // }, - - // imageRepos+:: { - // blackboxExporter: 'quay.io/prometheus/blackbox-exporter', - // // kubeRbacProxy: 'quay.io/coreos/kube-rbac-proxy', - // }, - - // blackboxExporter+:: { - // port: 9115, - // }, - // }, - - ingresses+:: { - grafana: - ingress.new() + - ingress.mixin.metadata.withName('grafana') + - ingress.mixin.metadata.withNamespace($._config.namespace) + - ingress.mixin.spec.withRules( - ingressRule.new() + - ingressRule.withHost($._config.grafanaDomain) + - ingressRule.mixin.http.withPaths( - httpIngressPath.new() + - httpIngressPath.mixin.backend.withServiceName('grafana') + - httpIngressPath.mixin.backend.withServicePort('http') - ), - ) + - ingress.mixin.spec.withTls( - ingressTls.new() + - ingressTls.withHosts($._config.grafanaDomain) + - ingressTls.withSecretName('grafana-tls') - ), - - grafana_certificate: { - apiVersion: 'certmanager.k8s.io/v1alpha1', - kind: 'Certificate', - metadata: { - name: 'grafana-tls', - namespace: $._config.namespace, - }, - // labels: - // app.kubernetes.io/name: grafana - // app.kubernetes.io/component: webserver - spec: { - secretName: 'grafana-tls', - commonName: $._config.grafanaDomain, - issuerRef: { - kind: 'ClusterIssuer', - name: 'letsencrypt', - }, - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/jsonnetfile.json b/sources/kube-prometheus/jsonnet/jsonnetfile.json deleted file mode 100644 index 9f0c48dc..00000000 --- a/sources/kube-prometheus/jsonnet/jsonnetfile.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "dependencies": [ - { - "name": "kube-prometheus", - "source": { - "git": { - "remote": "https://github.com/coreos/kube-prometheus", - "subdir": "jsonnet/kube-prometheus" - } - }, - "version": "26750eadf59279f409de47d616527a9632f8ab23" - } - ] -} diff --git a/sources/kube-prometheus/jsonnet/jsonnetfile.lock.json b/sources/kube-prometheus/jsonnet/jsonnetfile.lock.json deleted file mode 100644 index 3cfe2aed..00000000 --- a/sources/kube-prometheus/jsonnet/jsonnetfile.lock.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "dependencies": [ - { - "name": "kube-prometheus", - "source": { - "git": { - "remote": "https://github.com/coreos/kube-prometheus", - "subdir": "jsonnet/kube-prometheus" - } - }, - "version": "26750eadf59279f409de47d616527a9632f8ab23" - }, - { - "name": "ksonnet", - "source": { - "git": { - "remote": "https://github.com/ksonnet/ksonnet-lib", - "subdir": "" - } - }, - "version": "0d2f82676817bbf9e4acf6495b2090205f323b9f" - }, - { - "name": "kubernetes-mixin", - "source": { - "git": { - "remote": "https://github.com/kubernetes-monitoring/kubernetes-mixin", - "subdir": "" - } - }, - "version": "6a0450b32a0f3b25299dcca7f40157e21c50d023" - }, - { - "name": "grafonnet", - "source": { - "git": { - "remote": "https://github.com/grafana/grafonnet-lib", - "subdir": "grafonnet" - } - }, - "version": "69bc267211790a1c3f4ea6e6211f3e8ffe22f987" - }, - { - "name": "grafana-builder", - "source": { - "git": { - "remote": "https://github.com/kausalco/public", - "subdir": "grafana-builder" - } - }, - "version": "140c6fbe74104a2bbdeef6871657c0da66e862e8" - }, - { - "name": "grafana", - "source": { - "git": { - "remote": "https://github.com/brancz/kubernetes-grafana", - "subdir": "grafana" - } - }, - "version": "7fadaf2274d5cbe4ac6fbaf8786e4b7ecf3c1713" - }, - { - "name": "prometheus-operator", - "source": { - "git": { - "remote": "https://github.com/coreos/prometheus-operator", - "subdir": "jsonnet/prometheus-operator" - } - }, - "version": "908ee0372a9ac2c6574d589fdc56a4f3cb5f12d1" - }, - { - "name": "etcd-mixin", - "source": { - "git": { - "remote": "https://github.com/coreos/etcd", - "subdir": "Documentation/etcd-mixin" - } - }, - "version": "a54686479098d828a58253836ed31c6b5b2c6ad7" - }, - { - "name": "prometheus", - "source": { - "git": { - "remote": "https://github.com/prometheus/prometheus", - "subdir": "documentation/prometheus-mixin" - } - }, - "version": "4c648eddf47d7e07fbc74d0b18244402200dca9e" - }, - { - "name": "node-mixin", - "source": { - "git": { - "remote": "https://github.com/prometheus/node_exporter", - "subdir": "docs/node-mixin" - } - }, - "version": "f3538e1fc6468ecaeb616fb74597330fb6190159" - }, - { - "name": "promgrafonnet", - "source": { - "git": { - "remote": "https://github.com/kubernetes-monitoring/kubernetes-mixin", - "subdir": "lib/promgrafonnet" - } - }, - "version": "6a0450b32a0f3b25299dcca7f40157e21c50d023" - } - ] -} diff --git a/sources/kube-prometheus/jsonnet/vendor/etcd-mixin/README.md b/sources/kube-prometheus/jsonnet/vendor/etcd-mixin/README.md deleted file mode 100644 index 224066f4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/etcd-mixin/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Prometheus Monitoring Mixin for etcd - -> NOTE: This project is *alpha* stage. Flags, configuration, behaviour and design may change significantly in following releases. - -A set of customisable Prometheus alerts for etcd. - -Instructions for use are the same as the [kubernetes-mixin](https://github.com/kubernetes-monitoring/kubernetes-mixin). - -## Background - -* For more information about monitoring mixins, see this [design doc](https://docs.google.com/document/d/1A9xvzwqnFVSOZ5fD3blKODXfsat5fg6ZhnKu9LK3lB4/edit#). - -## Testing alerts - -Make sure to have [jsonnet](https://jsonnet.org/) and [gojsontoyaml](https://github.com/brancz/gojsontoyaml) installed. - -First compile the mixin to a YAML file, which the promtool will read: -``` -jsonnet -e '(import "mixin.libsonnet").prometheusAlerts' | gojsontoyaml > mixin.yaml -``` - -Then run the unit test: -``` -promtool test rules test.yaml -``` diff --git a/sources/kube-prometheus/jsonnet/vendor/etcd-mixin/mixin.libsonnet b/sources/kube-prometheus/jsonnet/vendor/etcd-mixin/mixin.libsonnet deleted file mode 100644 index 0653c8d0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/etcd-mixin/mixin.libsonnet +++ /dev/null @@ -1,1293 +0,0 @@ -{ - _config+:: { - etcd_selector: 'job=~".*etcd.*"', - }, - - prometheusAlerts+:: { - groups+: [ - { - name: 'etcd', - rules: [ - { - alert: 'etcdMembersDown', - expr: ||| - max by (job) ( - sum by (job) (up{%(etcd_selector)s} == bool 0) - or - count by (job,endpoint) ( - sum by (job,endpoint,To) (rate(etcd_network_peer_sent_failures_total{%(etcd_selector)s}[3m])) > 0.01 - ) - ) - > 0 - ||| % $._config, - 'for': '3m', - labels: { - severity: 'critical', - }, - annotations: { - message: 'etcd cluster "{{ $labels.job }}": members are down ({{ $value }}).', - }, - }, - { - alert: 'etcdInsufficientMembers', - expr: ||| - sum(up{%(etcd_selector)s} == bool 1) by (job) < ((count(up{%(etcd_selector)s}) by (job) + 1) / 2) - ||| % $._config, - 'for': '3m', - labels: { - severity: 'critical', - }, - annotations: { - message: 'etcd cluster "{{ $labels.job }}": insufficient members ({{ $value }}).', - }, - }, - { - alert: 'etcdNoLeader', - expr: ||| - etcd_server_has_leader{%(etcd_selector)s} == 0 - ||| % $._config, - 'for': '1m', - labels: { - severity: 'critical', - }, - annotations: { - message: 'etcd cluster "{{ $labels.job }}": member {{ $labels.instance }} has no leader.', - }, - }, - { - alert: 'etcdHighNumberOfLeaderChanges', - expr: ||| - rate(etcd_server_leader_changes_seen_total{%(etcd_selector)s}[15m]) > 3 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'etcd cluster "{{ $labels.job }}": instance {{ $labels.instance }} has seen {{ $value }} leader changes within the last 30 minutes.', - }, - }, - { - alert: 'etcdHighNumberOfFailedGRPCRequests', - expr: ||| - 100 * sum(rate(grpc_server_handled_total{%(etcd_selector)s, grpc_code!="OK"}[5m])) BY (job, instance, grpc_service, grpc_method) - / - sum(rate(grpc_server_handled_total{%(etcd_selector)s}[5m])) BY (job, instance, grpc_service, grpc_method) - > 1 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'etcd cluster "{{ $labels.job }}": {{ $value }}% of requests for {{ $labels.grpc_method }} failed on etcd instance {{ $labels.instance }}.', - }, - }, - { - alert: 'etcdHighNumberOfFailedGRPCRequests', - expr: ||| - 100 * sum(rate(grpc_server_handled_total{%(etcd_selector)s, grpc_code!="OK"}[5m])) BY (job, instance, grpc_service, grpc_method) - / - sum(rate(grpc_server_handled_total{%(etcd_selector)s}[5m])) BY (job, instance, grpc_service, grpc_method) - > 5 - ||| % $._config, - 'for': '5m', - labels: { - severity: 'critical', - }, - annotations: { - message: 'etcd cluster "{{ $labels.job }}": {{ $value }}% of requests for {{ $labels.grpc_method }} failed on etcd instance {{ $labels.instance }}.', - }, - }, - { - alert: 'etcdGRPCRequestsSlow', - expr: ||| - histogram_quantile(0.99, sum(rate(grpc_server_handling_seconds_bucket{%(etcd_selector)s, grpc_type="unary"}[5m])) by (job, instance, grpc_service, grpc_method, le)) - > 0.15 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'critical', - }, - annotations: { - message: 'etcd cluster "{{ $labels.job }}": gRPC requests to {{ $labels.grpc_method }} are taking {{ $value }}s on etcd instance {{ $labels.instance }}.', - }, - }, - { - alert: 'etcdMemberCommunicationSlow', - expr: ||| - histogram_quantile(0.99, rate(etcd_network_peer_round_trip_time_seconds_bucket{%(etcd_selector)s}[5m])) - > 0.15 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'etcd cluster "{{ $labels.job }}": member communication with {{ $labels.To }} is taking {{ $value }}s on etcd instance {{ $labels.instance }}.', - }, - }, - { - alert: 'etcdHighNumberOfFailedProposals', - expr: ||| - rate(etcd_server_proposals_failed_total{%(etcd_selector)s}[15m]) > 5 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'etcd cluster "{{ $labels.job }}": {{ $value }} proposal failures within the last 30 minutes on etcd instance {{ $labels.instance }}.', - }, - }, - { - alert: 'etcdHighFsyncDurations', - expr: ||| - histogram_quantile(0.99, rate(etcd_disk_wal_fsync_duration_seconds_bucket{%(etcd_selector)s}[5m])) - > 0.5 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'etcd cluster "{{ $labels.job }}": 99th percentile fync durations are {{ $value }}s on etcd instance {{ $labels.instance }}.', - }, - }, - { - alert: 'etcdHighCommitDurations', - expr: ||| - histogram_quantile(0.99, rate(etcd_disk_backend_commit_duration_seconds_bucket{%(etcd_selector)s}[5m])) - > 0.25 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'etcd cluster "{{ $labels.job }}": 99th percentile commit durations {{ $value }}s on etcd instance {{ $labels.instance }}.', - }, - }, - { - alert: 'etcdHighNumberOfFailedHTTPRequests', - expr: ||| - sum(rate(etcd_http_failed_total{%(etcd_selector)s, code!="404"}[5m])) BY (method) / sum(rate(etcd_http_received_total{%(etcd_selector)s}[5m])) - BY (method) > 0.01 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - message: '{{ $value }}% of requests for {{ $labels.method }} failed on etcd instance {{ $labels.instance }}', - }, - }, - { - alert: 'etcdHighNumberOfFailedHTTPRequests', - expr: ||| - sum(rate(etcd_http_failed_total{%(etcd_selector)s, code!="404"}[5m])) BY (method) / sum(rate(etcd_http_received_total{%(etcd_selector)s}[5m])) - BY (method) > 0.05 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'critical', - }, - annotations: { - message: '{{ $value }}% of requests for {{ $labels.method }} failed on etcd instance {{ $labels.instance }}.', - }, - }, - { - alert: 'etcdHTTPRequestsSlow', - expr: ||| - histogram_quantile(0.99, rate(etcd_http_successful_duration_seconds_bucket[5m])) - > 0.15 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'etcd instance {{ $labels.instance }} HTTP requests to {{ $labels.method }} are slow.', - }, - }, - ], - }, - ], - }, - - grafanaDashboards+:: { - 'etcd.json': { - id: 6, - title: 'etcd', - description: 'etcd sample Grafana dashboard with Prometheus', - tags: [], - style: 'dark', - timezone: 'browser', - editable: true, - hideControls: false, - sharedCrosshair: false, - rows: [ - { - collapse: false, - editable: true, - height: '250px', - panels: [ - { - cacheTimeout: null, - colorBackground: false, - colorValue: false, - colors: [ - 'rgba(245, 54, 54, 0.9)', - 'rgba(237, 129, 40, 0.89)', - 'rgba(50, 172, 45, 0.97)', - ], - datasource: '$datasource', - editable: true, - 'error': false, - format: 'none', - gauge: { - maxValue: 100, - minValue: 0, - show: false, - thresholdLabels: false, - thresholdMarkers: true, - }, - id: 28, - interval: null, - isNew: true, - links: [], - mappingType: 1, - mappingTypes: [ - { - name: 'value to text', - value: 1, - }, - { - name: 'range to text', - value: 2, - }, - ], - maxDataPoints: 100, - nullPointMode: 'connected', - nullText: null, - postfix: '', - postfixFontSize: '50%', - prefix: '', - prefixFontSize: '50%', - rangeMaps: [{ - from: 'null', - text: 'N/A', - to: 'null', - }], - span: 3, - sparkline: { - fillColor: 'rgba(31, 118, 189, 0.18)', - full: false, - lineColor: 'rgb(31, 120, 193)', - show: false, - }, - targets: [{ - expr: 'sum(etcd_server_has_leader{job="$cluster"})', - intervalFactor: 2, - legendFormat: '', - metric: 'etcd_server_has_leader', - refId: 'A', - step: 20, - }], - thresholds: '', - title: 'Up', - type: 'singlestat', - valueFontSize: '200%', - valueMaps: [{ - op: '=', - text: 'N/A', - value: 'null', - }], - valueName: 'avg', - }, - { - aliasColors: {}, - bars: false, - datasource: '$datasource', - editable: true, - 'error': false, - fill: 0, - id: 23, - isNew: true, - legend: { - avg: false, - current: false, - max: false, - min: false, - show: false, - total: false, - values: false, - }, - lines: true, - linewidth: 2, - links: [], - nullPointMode: 'connected', - percentage: false, - pointradius: 5, - points: false, - renderer: 'flot', - seriesOverrides: [], - span: 5, - stack: false, - steppedLine: false, - targets: [ - { - expr: 'sum(rate(grpc_server_started_total{job="$cluster",grpc_type="unary"}[5m]))', - format: 'time_series', - intervalFactor: 2, - legendFormat: 'RPC Rate', - metric: 'grpc_server_started_total', - refId: 'A', - step: 2, - }, - { - expr: 'sum(rate(grpc_server_handled_total{job="$cluster",grpc_type="unary",grpc_code!="OK"}[5m]))', - format: 'time_series', - intervalFactor: 2, - legendFormat: 'RPC Failed Rate', - metric: 'grpc_server_handled_total', - refId: 'B', - step: 2, - }, - ], - thresholds: [], - timeFrom: null, - timeShift: null, - title: 'RPC Rate', - tooltip: { - msResolution: false, - shared: true, - sort: 0, - value_type: 'individual', - }, - type: 'graph', - xaxis: { - mode: 'time', - name: null, - show: true, - values: [], - }, - yaxes: [ - { - format: 'ops', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - { - format: 'short', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - ], - }, - { - aliasColors: {}, - bars: false, - datasource: '$datasource', - editable: true, - 'error': false, - fill: 0, - id: 41, - isNew: true, - legend: { - avg: false, - current: false, - max: false, - min: false, - show: false, - total: false, - values: false, - }, - lines: true, - linewidth: 2, - links: [], - nullPointMode: 'connected', - percentage: false, - pointradius: 5, - points: false, - renderer: 'flot', - seriesOverrides: [], - span: 4, - stack: true, - steppedLine: false, - targets: [ - { - expr: 'sum(grpc_server_started_total{job="$cluster",grpc_service="etcdserverpb.Watch",grpc_type="bidi_stream"}) - sum(grpc_server_handled_total{job="$cluster",grpc_service="etcdserverpb.Watch",grpc_type="bidi_stream"})', - intervalFactor: 2, - legendFormat: 'Watch Streams', - metric: 'grpc_server_handled_total', - refId: 'A', - step: 4, - }, - { - expr: 'sum(grpc_server_started_total{job="$cluster",grpc_service="etcdserverpb.Lease",grpc_type="bidi_stream"}) - sum(grpc_server_handled_total{job="$cluster",grpc_service="etcdserverpb.Lease",grpc_type="bidi_stream"})', - intervalFactor: 2, - legendFormat: 'Lease Streams', - metric: 'grpc_server_handled_total', - refId: 'B', - step: 4, - }, - ], - thresholds: [], - timeFrom: null, - timeShift: null, - title: 'Active Streams', - tooltip: { - msResolution: false, - shared: true, - sort: 0, - value_type: 'individual', - }, - type: 'graph', - xaxis: { - mode: 'time', - name: null, - show: true, - values: [], - }, - yaxes: [ - { - format: 'short', - label: '', - logBase: 1, - max: null, - min: null, - show: true, - }, - { - format: 'short', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - ], - }, - ], - showTitle: false, - title: 'Row', - }, - { - collapse: false, - editable: true, - height: '250px', - panels: [ - { - aliasColors: {}, - bars: false, - datasource: '$datasource', - decimals: null, - editable: true, - 'error': false, - fill: 0, - grid: {}, - id: 1, - legend: { - avg: false, - current: false, - max: false, - min: false, - show: false, - total: false, - values: false, - }, - lines: true, - linewidth: 2, - links: [], - nullPointMode: 'connected', - percentage: false, - pointradius: 5, - points: false, - renderer: 'flot', - seriesOverrides: [], - span: 4, - stack: false, - steppedLine: false, - targets: [{ - expr: 'etcd_debugging_mvcc_db_total_size_in_bytes{job="$cluster"}', - hide: false, - interval: '', - intervalFactor: 2, - legendFormat: '{{instance}} DB Size', - metric: '', - refId: 'A', - step: 4, - }], - thresholds: [], - timeFrom: null, - timeShift: null, - title: 'DB Size', - tooltip: { - msResolution: false, - shared: true, - sort: 0, - value_type: 'cumulative', - }, - type: 'graph', - xaxis: { - mode: 'time', - name: null, - show: true, - values: [], - }, - yaxes: [ - { - format: 'bytes', - logBase: 1, - max: null, - min: null, - show: true, - }, - { - format: 'short', - logBase: 1, - max: null, - min: null, - show: false, - }, - ], - }, - { - aliasColors: {}, - bars: false, - datasource: '$datasource', - editable: true, - 'error': false, - fill: 0, - grid: {}, - id: 3, - legend: { - avg: false, - current: false, - max: false, - min: false, - show: false, - total: false, - values: false, - }, - lines: true, - linewidth: 2, - links: [], - nullPointMode: 'connected', - percentage: false, - pointradius: 1, - points: false, - renderer: 'flot', - seriesOverrides: [], - span: 4, - stack: false, - steppedLine: true, - targets: [ - { - expr: 'histogram_quantile(0.99, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job="$cluster"}[5m])) by (instance, le))', - hide: false, - intervalFactor: 2, - legendFormat: '{{instance}} WAL fsync', - metric: 'etcd_disk_wal_fsync_duration_seconds_bucket', - refId: 'A', - step: 4, - }, - { - expr: 'histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job="$cluster"}[5m])) by (instance, le))', - intervalFactor: 2, - legendFormat: '{{instance}} DB fsync', - metric: 'etcd_disk_backend_commit_duration_seconds_bucket', - refId: 'B', - step: 4, - }, - ], - thresholds: [], - timeFrom: null, - timeShift: null, - title: 'Disk Sync Duration', - tooltip: { - msResolution: false, - shared: true, - sort: 0, - value_type: 'cumulative', - }, - type: 'graph', - xaxis: { - mode: 'time', - name: null, - show: true, - values: [], - }, - yaxes: [ - { - format: 's', - logBase: 1, - max: null, - min: null, - show: true, - }, - { - format: 'short', - logBase: 1, - max: null, - min: null, - show: false, - }, - ], - }, - { - aliasColors: {}, - bars: false, - datasource: '$datasource', - editable: true, - 'error': false, - fill: 0, - id: 29, - isNew: true, - legend: { - avg: false, - current: false, - max: false, - min: false, - show: false, - total: false, - values: false, - }, - lines: true, - linewidth: 2, - links: [], - nullPointMode: 'connected', - percentage: false, - pointradius: 5, - points: false, - renderer: 'flot', - seriesOverrides: [], - span: 4, - stack: false, - steppedLine: false, - targets: [{ - expr: 'process_resident_memory_bytes{job="$cluster"}', - intervalFactor: 2, - legendFormat: '{{instance}} Resident Memory', - metric: 'process_resident_memory_bytes', - refId: 'A', - step: 4, - }], - thresholds: [], - timeFrom: null, - timeShift: null, - title: 'Memory', - tooltip: { - msResolution: false, - shared: true, - sort: 0, - value_type: 'individual', - }, - type: 'graph', - xaxis: { - mode: 'time', - name: null, - show: true, - values: [], - }, - yaxes: [ - { - format: 'bytes', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - { - format: 'short', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - ], - }, - ], - title: 'New row', - }, - { - collapse: false, - editable: true, - height: '250px', - panels: [ - { - aliasColors: {}, - bars: false, - datasource: '$datasource', - editable: true, - 'error': false, - fill: 5, - id: 22, - isNew: true, - legend: { - avg: false, - current: false, - max: false, - min: false, - show: false, - total: false, - values: false, - }, - lines: true, - linewidth: 2, - links: [], - nullPointMode: 'connected', - percentage: false, - pointradius: 5, - points: false, - renderer: 'flot', - seriesOverrides: [], - span: 3, - stack: true, - steppedLine: false, - targets: [{ - expr: 'rate(etcd_network_client_grpc_received_bytes_total{job="$cluster"}[5m])', - intervalFactor: 2, - legendFormat: '{{instance}} Client Traffic In', - metric: 'etcd_network_client_grpc_received_bytes_total', - refId: 'A', - step: 4, - }], - thresholds: [], - timeFrom: null, - timeShift: null, - title: 'Client Traffic In', - tooltip: { - msResolution: false, - shared: true, - sort: 0, - value_type: 'individual', - }, - type: 'graph', - xaxis: { - mode: 'time', - name: null, - show: true, - values: [], - }, - yaxes: [ - { - format: 'Bps', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - { - format: 'short', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - ], - }, - { - aliasColors: {}, - bars: false, - datasource: '$datasource', - editable: true, - 'error': false, - fill: 5, - id: 21, - isNew: true, - legend: { - avg: false, - current: false, - max: false, - min: false, - show: false, - total: false, - values: false, - }, - lines: true, - linewidth: 2, - links: [], - nullPointMode: 'connected', - percentage: false, - pointradius: 5, - points: false, - renderer: 'flot', - seriesOverrides: [], - span: 3, - stack: true, - steppedLine: false, - targets: [{ - expr: 'rate(etcd_network_client_grpc_sent_bytes_total{job="$cluster"}[5m])', - intervalFactor: 2, - legendFormat: '{{instance}} Client Traffic Out', - metric: 'etcd_network_client_grpc_sent_bytes_total', - refId: 'A', - step: 4, - }], - thresholds: [], - timeFrom: null, - timeShift: null, - title: 'Client Traffic Out', - tooltip: { - msResolution: false, - shared: true, - sort: 0, - value_type: 'individual', - }, - type: 'graph', - xaxis: { - mode: 'time', - name: null, - show: true, - values: [], - }, - yaxes: [ - { - format: 'Bps', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - { - format: 'short', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - ], - }, - { - aliasColors: {}, - bars: false, - datasource: '$datasource', - editable: true, - 'error': false, - fill: 0, - id: 20, - isNew: true, - legend: { - avg: false, - current: false, - max: false, - min: false, - show: false, - total: false, - values: false, - }, - lines: true, - linewidth: 2, - links: [], - nullPointMode: 'connected', - percentage: false, - pointradius: 5, - points: false, - renderer: 'flot', - seriesOverrides: [], - span: 3, - stack: false, - steppedLine: false, - targets: [{ - expr: 'sum(rate(etcd_network_peer_received_bytes_total{job="$cluster"}[5m])) by (instance)', - intervalFactor: 2, - legendFormat: '{{instance}} Peer Traffic In', - metric: 'etcd_network_peer_received_bytes_total', - refId: 'A', - step: 4, - }], - thresholds: [], - timeFrom: null, - timeShift: null, - title: 'Peer Traffic In', - tooltip: { - msResolution: false, - shared: true, - sort: 0, - value_type: 'individual', - }, - type: 'graph', - xaxis: { - mode: 'time', - name: null, - show: true, - values: [], - }, - yaxes: [ - { - format: 'Bps', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - { - format: 'short', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - ], - }, - { - aliasColors: {}, - bars: false, - datasource: '$datasource', - decimals: null, - editable: true, - 'error': false, - fill: 0, - grid: {}, - id: 16, - legend: { - avg: false, - current: false, - max: false, - min: false, - show: false, - total: false, - values: false, - }, - lines: true, - linewidth: 2, - links: [], - nullPointMode: 'connected', - percentage: false, - pointradius: 5, - points: false, - renderer: 'flot', - seriesOverrides: [], - span: 3, - stack: false, - steppedLine: false, - targets: [{ - expr: 'sum(rate(etcd_network_peer_sent_bytes_total{job="$cluster"}[5m])) by (instance)', - hide: false, - interval: '', - intervalFactor: 2, - legendFormat: '{{instance}} Peer Traffic Out', - metric: 'etcd_network_peer_sent_bytes_total', - refId: 'A', - step: 4, - }], - thresholds: [], - timeFrom: null, - timeShift: null, - title: 'Peer Traffic Out', - tooltip: { - msResolution: false, - shared: true, - sort: 0, - value_type: 'cumulative', - }, - type: 'graph', - xaxis: { - mode: 'time', - name: null, - show: true, - values: [], - }, - yaxes: [ - { - format: 'Bps', - logBase: 1, - max: null, - min: null, - show: true, - }, - { - format: 'short', - logBase: 1, - max: null, - min: null, - show: true, - }, - ], - }, - ], - title: 'New row', - }, - { - collapse: false, - editable: true, - height: '250px', - panels: [ - { - aliasColors: {}, - bars: false, - datasource: '$datasource', - editable: true, - 'error': false, - fill: 0, - id: 40, - isNew: true, - legend: { - avg: false, - current: false, - max: false, - min: false, - show: false, - total: false, - values: false, - }, - lines: true, - linewidth: 2, - links: [], - nullPointMode: 'connected', - percentage: false, - pointradius: 5, - points: false, - renderer: 'flot', - seriesOverrides: [], - span: 6, - stack: false, - steppedLine: false, - targets: [ - { - expr: 'sum(rate(etcd_server_proposals_failed_total{job="$cluster"}[5m]))', - intervalFactor: 2, - legendFormat: 'Proposal Failure Rate', - metric: 'etcd_server_proposals_failed_total', - refId: 'A', - step: 2, - }, - { - expr: 'sum(etcd_server_proposals_pending{job="$cluster"})', - intervalFactor: 2, - legendFormat: 'Proposal Pending Total', - metric: 'etcd_server_proposals_pending', - refId: 'B', - step: 2, - }, - { - expr: 'sum(rate(etcd_server_proposals_committed_total{job="$cluster"}[5m]))', - intervalFactor: 2, - legendFormat: 'Proposal Commit Rate', - metric: 'etcd_server_proposals_committed_total', - refId: 'C', - step: 2, - }, - { - expr: 'sum(rate(etcd_server_proposals_applied_total{job="$cluster"}[5m]))', - intervalFactor: 2, - legendFormat: 'Proposal Apply Rate', - refId: 'D', - step: 2, - }, - ], - thresholds: [], - timeFrom: null, - timeShift: null, - title: 'Raft Proposals', - tooltip: { - msResolution: false, - shared: true, - sort: 0, - value_type: 'individual', - }, - type: 'graph', - xaxis: { - mode: 'time', - name: null, - show: true, - values: [], - }, - yaxes: [ - { - format: 'short', - label: '', - logBase: 1, - max: null, - min: null, - show: true, - }, - { - format: 'short', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - ], - }, - { - aliasColors: {}, - bars: false, - datasource: '$datasource', - decimals: 0, - editable: true, - 'error': false, - fill: 0, - id: 19, - isNew: true, - legend: { - alignAsTable: false, - avg: false, - current: false, - max: false, - min: false, - rightSide: false, - show: false, - total: false, - values: false, - }, - lines: true, - linewidth: 2, - links: [], - nullPointMode: 'connected', - percentage: false, - pointradius: 5, - points: false, - renderer: 'flot', - seriesOverrides: [], - span: 6, - stack: false, - steppedLine: false, - targets: [{ - expr: 'changes(etcd_server_leader_changes_seen_total{job="$cluster"}[1d])', - intervalFactor: 2, - legendFormat: '{{instance}} Total Leader Elections Per Day', - metric: 'etcd_server_leader_changes_seen_total', - refId: 'A', - step: 2, - }], - thresholds: [], - timeFrom: null, - timeShift: null, - title: 'Total Leader Elections Per Day', - tooltip: { - msResolution: false, - shared: true, - sort: 0, - value_type: 'individual', - }, - type: 'graph', - xaxis: { - mode: 'time', - name: null, - show: true, - values: [], - }, - yaxes: [ - { - format: 'short', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - { - format: 'short', - label: null, - logBase: 1, - max: null, - min: null, - show: true, - }, - ], - }, - ], - title: 'New row', - }, - ], - time: { - from: 'now-15m', - to: 'now', - }, - timepicker: { - now: true, - refresh_intervals: [ - '5s', - '10s', - '30s', - '1m', - '5m', - '15m', - '30m', - '1h', - '2h', - '1d', - ], - time_options: [ - '5m', - '15m', - '1h', - '6h', - '12h', - '24h', - '2d', - '7d', - '30d', - ], - }, - templating: { - list: [ - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - { - allValue: null, - current: { - text: 'prod', - value: 'prod', - }, - datasource: '$datasource', - hide: 0, - includeAll: false, - label: 'cluster', - multi: false, - name: 'cluster', - options: [], - query: 'label_values(etcd_server_has_leader, job)', - refresh: 1, - regex: '', - sort: 2, - tagValuesQuery: '', - tags: [], - tagsQuery: '', - type: 'query', - useTags: false, - }, - ], - }, - annotations: { - list: [], - }, - refresh: '10s', - schemaVersion: 13, - version: 215, - links: [], - gnetId: null, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/etcd-mixin/test.yaml b/sources/kube-prometheus/jsonnet/vendor/etcd-mixin/test.yaml deleted file mode 100644 index 408cfd97..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/etcd-mixin/test.yaml +++ /dev/null @@ -1,85 +0,0 @@ -rule_files: - - mixin.yaml - -evaluation_interval: 1m - -tests: - - interval: 1m - input_series: - - series: 'up{job="etcd",instance="10.10.10.0"}' - values: '1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0' - - series: 'up{job="etcd",instance="10.10.10.1"}' - values: '1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0' - - series: 'up{job="etcd",instance="10.10.10.2"}' - values: '1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0' - alert_rule_test: - - eval_time: 3m - alertname: etcdInsufficientMembers - - eval_time: 5m - alertname: etcdInsufficientMembers - - eval_time: 5m - alertname: etcdMembersDown - - eval_time: 7m - alertname: etcdMembersDown - exp_alerts: - - exp_labels: - job: etcd - severity: critical - exp_annotations: - message: 'etcd cluster "etcd": members are down (1).' - - eval_time: 7m - alertname: etcdInsufficientMembers - - eval_time: 11m - alertname: etcdInsufficientMembers - exp_alerts: - - exp_labels: - job: etcd - severity: critical - exp_annotations: - message: 'etcd cluster "etcd": insufficient members (1).' - - eval_time: 15m - alertname: etcdInsufficientMembers - exp_alerts: - - exp_labels: - job: etcd - severity: critical - exp_annotations: - message: 'etcd cluster "etcd": insufficient members (0).' - - - interval: 1m - input_series: - - series: 'up{job="etcd",instance="10.10.10.0"}' - values: '1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0' - - series: 'up{job="etcd",instance="10.10.10.1"}' - values: '1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0' - - series: 'up{job="etcd",instance="10.10.10.2"}' - values: '1 1 1 1 0 0 0 0' - alert_rule_test: - - eval_time: 10m - alertname: etcdMembersDown - exp_alerts: - - exp_labels: - job: etcd - severity: critical - exp_annotations: - message: 'etcd cluster "etcd": members are down (2).' - - - interval: 1m - input_series: - - series: 'up{job="etcd",instance="10.10.10.0"}' - values: '1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0' - - series: 'up{job="etcd",instance="10.10.10.1"}' - values: '1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0' - - series: 'etcd_network_peer_sent_failures_total{To="member-1",job="etcd",endpoint="test"}' - values: '0 0 1 2 3 4 5 6 7 8 9 10' - alert_rule_test: - - eval_time: 4m - alertname: etcdMembersDown - - eval_time: 6m - alertname: etcdMembersDown - exp_alerts: - - exp_labels: - job: etcd - severity: critical - exp_annotations: - message: 'etcd cluster "etcd": members are down (1).' diff --git a/sources/kube-prometheus/jsonnet/vendor/grafana-builder/grafana.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafana-builder/grafana.libsonnet deleted file mode 100644 index 6d347a38..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafana-builder/grafana.libsonnet +++ /dev/null @@ -1,418 +0,0 @@ -{ - dashboard(title, uid=''):: { - // Stuff that isn't materialised. - _nextPanel:: 1, - addRow(row):: self { - // automatically number panels in added rows. - local n = std.length(row.panels), - local nextPanel = super._nextPanel, - local panels = std.makeArray(n, function(i) - row.panels[i] { id: nextPanel + i }), - - _nextPanel: nextPanel + n, - rows+: [row { panels: panels }], - }, - - addTemplate(name, metric_name, label_name, hide=0):: self { - templating+: { - list+: [{ - allValue: null, - current: { - text: 'prod', - value: 'prod', - }, - datasource: '$datasource', - hide: hide, - includeAll: false, - label: name, - multi: false, - name: name, - options: [], - query: 'label_values(%s, %s)' % [metric_name, label_name], - refresh: 1, - regex: '', - sort: 2, - tagValuesQuery: '', - tags: [], - tagsQuery: '', - type: 'query', - useTags: false, - }], - }, - }, - - addMultiTemplate(name, metric_name, label_name, hide=0):: self { - templating+: { - list+: [{ - allValue: null, - current: { - selected: true, - text: 'All', - value: '$__all', - }, - datasource: '$datasource', - hide: hide, - includeAll: true, - label: name, - multi: true, - name: name, - options: [], - query: 'label_values(%s, %s)' % [metric_name, label_name], - refresh: 1, - regex: '', - sort: 2, - tagValuesQuery: '', - tags: [], - tagsQuery: '', - type: 'query', - useTags: false, - }], - }, - }, - - // Stuff that is materialised. - uid: uid, - annotations: { - list: [], - }, - hideControls: false, - links: [], - rows: [], - schemaVersion: 14, - style: 'dark', - tags: [], - editable: true, - gnetId: null, - graphTooltip: 0, - templating: { - list: [ - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ], - }, - time: { - from: 'now-1h', - to: 'now', - }, - refresh: '10s', - timepicker: { - refresh_intervals: [ - '5s', - '10s', - '30s', - '1m', - '5m', - '15m', - '30m', - '1h', - '2h', - '1d', - ], - time_options: [ - '5m', - '15m', - '1h', - '6h', - '12h', - '24h', - '2d', - '7d', - '30d', - ], - }, - timezone: 'utc', - title: title, - version: 0, - }, - - row(title):: { - _panels:: [], - addPanel(panel):: self { - _panels+: [panel], - }, - - panels: - // Automatically distribute panels within a row. - local n = std.length(self._panels); - [ - p { span: std.floor(12 / n) } - for p in self._panels - ], - - collapse: false, - height: '250px', - repeat: null, - repeatIteration: null, - repeatRowId: null, - showTitle: true, - title: title, - titleSize: 'h6', - }, - - panel(title):: { - aliasColors: {}, - bars: false, - dashLength: 10, - dashes: false, - datasource: '$datasource', - fill: 1, - legend: { - avg: false, - current: false, - max: false, - min: false, - show: true, - total: false, - values: false, - }, - lines: true, - linewidth: 1, - links: [], - nullPointMode: 'null as zero', - percentage: false, - pointradius: 5, - points: false, - renderer: 'flot', - seriesOverrides: [], - spaceLength: 10, - span: 6, - stack: false, - steppedLine: false, - targets: [], - thresholds: [], - timeFrom: null, - timeShift: null, - title: title, - tooltip: { - shared: true, - sort: 0, - value_type: 'individual', - }, - type: 'graph', - xaxis: { - buckets: null, - mode: 'time', - name: null, - show: true, - values: [], - }, - yaxes: $.yaxes('short'), - }, - - queryPanel(queries, legends, legendLink=null):: { - - local qs = - if std.type(queries) == 'string' - then [queries] - else queries, - local ls = - if std.type(legends) == 'string' - then [legends] - else legends, - - local qsandls = if std.length(ls) == std.length(qs) - then std.makeArray(std.length(qs), function(x) { q: qs[x], l: ls[x] }) - else error 'length of queries is not equal to length of legends', - - targets+: [ - { - legendLink: legendLink, - expr: ql.q, - format: 'time_series', - intervalFactor: 2, - legendFormat: ql.l, - step: 10, - } - for ql in qsandls - ], - }, - - statPanel(query, format='percentunit'):: { - type: 'singlestat', - thresholds: '70,80', - format: format, - targets: [ - { - expr: query, - format: 'time_series', - instant: true, - intervalFactor: 2, - refId: 'A', - }, - ], - }, - - tablePanel(queries, labelStyles):: { - local qs = - if std.type(queries) == 'string' - then [queries] - else queries, - - local style(labelStyle) = - if std.type(labelStyle) == 'string' - then { - alias: labelStyle, - colorMode: null, - colors: [], - dateFormat: 'YYYY-MM-DD HH:mm:ss', - decimals: 2, - thresholds: [], - type: 'string', - unit: 'short', - } - else { - alias: labelStyle.alias, - colorMode: null, - colors: [], - dateFormat: 'YYYY-MM-DD HH:mm:ss', - decimals: if std.objectHas(labelStyle, 'decimals') then labelStyle.decimals else 2, - thresholds: [], - type: if std.objectHas(labelStyle, 'type') then labelStyle.type else 'number', - unit: if std.objectHas(labelStyle, 'unit') then labelStyle.unit else 'short', - link: std.objectHas(labelStyle, 'link'), - linkTooltip: if std.objectHas(labelStyle, 'linkTooltip') then labelStyle.linkTooltip else 'Drill down', - linkUrl: if std.objectHas(labelStyle, 'link') then labelStyle.link else '', - }, - - _styles:: { - // By default hide time. - Time: { - alias: 'Time', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'hidden', - }, - } + { - [label]: style(labelStyles[label]) - for label in std.objectFields(labelStyles) - }, - - styles: [ - self._styles[pattern] { pattern: pattern } - for pattern in std.objectFields(self._styles) - ] + [style('') + { pattern: '/.*/' }], - - transform: 'table', - type: 'table', - targets: [ - { - expr: qs[i], - format: 'table', - instant: true, - intervalFactor: 2, - legendFormat: '', - step: 10, - refId: std.char(65 + i), - } - for i in std.range(0, std.length(qs) - 1) - ], - }, - - stack:: { - stack: true, - fill: 10, - linewidth: 0, - }, - - yaxes(args):: - local format = if std.type(args) == 'string' then args else null; - local options = if std.type(args) == 'object' then args else {}; - [ - { - format: format, - label: null, - logBase: 1, - max: null, - min: 0, - show: true, - } + options, - { - format: 'short', - label: null, - logBase: 1, - max: null, - min: null, - show: false, - }, - ], - - qpsPanel(selector):: { - aliasColors: { - '1xx': '#EAB839', - '2xx': '#7EB26D', - '3xx': '#6ED0E0', - '4xx': '#EF843C', - '5xx': '#E24D42', - success: '#7EB26D', - 'error': '#E24D42', - }, - targets: [ - { - expr: 'sum by (status) (label_replace(label_replace(rate(' + selector + '[$__interval]),' - + ' "status", "${1}xx", "status_code", "([0-9]).."),' - + ' "status", "${1}", "status_code", "([a-z]+)"))', - format: 'time_series', - intervalFactor: 2, - legendFormat: '{{status}}', - refId: 'A', - step: 10, - }, - ], - } + $.stack, - - latencyPanel(metricName, selector, multiplier='1e3'):: { - nullPointMode: 'null as zero', - targets: [ - { - expr: 'histogram_quantile(0.99, sum(rate(%s_bucket%s[$__interval])) by (le)) * %s' % [metricName, selector, multiplier], - format: 'time_series', - intervalFactor: 2, - legendFormat: '99th Percentile', - refId: 'A', - step: 10, - }, - { - expr: 'histogram_quantile(0.50, sum(rate(%s_bucket%s[$__interval])) by (le)) * %s' % [metricName, selector, multiplier], - format: 'time_series', - intervalFactor: 2, - legendFormat: '50th Percentile', - refId: 'B', - step: 10, - }, - { - expr: 'sum(rate(%s_sum%s[$__interval])) * %s / sum(rate(%s_count%s[$__interval]))' % [metricName, selector, multiplier, metricName, selector], - format: 'time_series', - intervalFactor: 2, - legendFormat: 'Average', - refId: 'C', - step: 10, - }, - ], - yaxes: $.yaxes('ms'), - }, - - selector:: { - eq(label, value):: { label: label, op: '=', value: value }, - neq(label, value):: { label: label, op: '!=', value: value }, - re(label, value):: { label: label, op: '=~', value: value }, - nre(label, value):: { label: label, op: '!~', value: value }, - }, - - toPrometheusSelector(selector):: - local pairs = [ - '%(label)s%(op)s"%(value)s"' % matcher - for matcher in selector - ]; - '{%s}' % std.join(', ', pairs), -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafana/configs/dashboard-sources/dashboards.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafana/configs/dashboard-sources/dashboards.libsonnet deleted file mode 100644 index 1240bb73..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafana/configs/dashboard-sources/dashboards.libsonnet +++ /dev/null @@ -1,14 +0,0 @@ -{ - apiVersion: 1, - providers: [ - { - name: '0', - orgId: 1, - folder: '', - type: 'file', - options: { - path: '/grafana-dashboard-definitions/0', - }, - }, - ], -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafana/grafana.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafana/grafana.libsonnet deleted file mode 100644 index aca5f5f4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafana/grafana.libsonnet +++ /dev/null @@ -1,157 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; - -{ - _config+:: { - namespace: 'default', - - versions+:: { - grafana: '6.2.1', - }, - - imageRepos+:: { - grafana: 'grafana/grafana', - }, - - grafana+:: { - dashboards: {}, - datasources: [{ - name: 'prometheus', - type: 'prometheus', - access: 'proxy', - orgId: 1, - url: 'http://prometheus-k8s.' + $._config.namespace + '.svc:9090', - version: 1, - editable: false, - }], - config: {}, - ldap: null, - plugins: [], - container: { - requests: { cpu: '100m', memory: '100Mi' }, - limits: { cpu: '200m', memory: '200Mi' }, - }, - }, - }, - grafanaDashboards: {}, - grafana+: { - [if std.length($._config.grafana.config) > 0 then 'config']: - local secret = k.core.v1.secret; - local grafanaConfig = { 'grafana.ini': std.base64(std.manifestIni($._config.grafana.config)) } + - if $._config.grafana.ldap != null then { 'ldap.toml': std.base64($._config.grafana.ldap) } else {}; - secret.new('grafana-config', grafanaConfig) + - secret.mixin.metadata.withNamespace($._config.namespace), - dashboardDefinitions: - local configMap = k.core.v1.configMap; - [ - local dashboardName = 'grafana-dashboard-' + std.strReplace(name, '.json', ''); - configMap.new(dashboardName, { [name]: std.manifestJsonEx($._config.grafana.dashboards[name], ' ') }) + - configMap.mixin.metadata.withNamespace($._config.namespace) - - for name in std.objectFields($._config.grafana.dashboards) - ], - dashboardSources: - local configMap = k.core.v1.configMap; - local dashboardSources = import 'configs/dashboard-sources/dashboards.libsonnet'; - - configMap.new('grafana-dashboards', { 'dashboards.yaml': std.manifestJsonEx(dashboardSources, ' ') }) + - configMap.mixin.metadata.withNamespace($._config.namespace), - dashboardDatasources: - local secret = k.core.v1.secret; - secret.new('grafana-datasources', { 'datasources.yaml': std.base64(std.manifestJsonEx({ - apiVersion: 1, - datasources: $._config.grafana.datasources, - }, ' ')) }) + - secret.mixin.metadata.withNamespace($._config.namespace), - service: - local service = k.core.v1.service; - local servicePort = k.core.v1.service.mixin.spec.portsType; - - local grafanaServiceNodePort = servicePort.newNamed('http', 3000, 'http'); - - service.new('grafana', $.grafana.deployment.spec.selector.matchLabels, grafanaServiceNodePort) + - service.mixin.metadata.withLabels({ app: 'grafana' }) + - service.mixin.metadata.withNamespace($._config.namespace), - serviceAccount: - local serviceAccount = k.core.v1.serviceAccount; - serviceAccount.new('grafana') + - serviceAccount.mixin.metadata.withNamespace($._config.namespace), - deployment: - local deployment = k.apps.v1.deployment; - local container = k.apps.v1.deployment.mixin.spec.template.spec.containersType; - local volume = k.apps.v1.deployment.mixin.spec.template.spec.volumesType; - local containerPort = container.portsType; - local containerVolumeMount = container.volumeMountsType; - local podSelector = deployment.mixin.spec.template.spec.selectorType; - local env = container.envType; - - local targetPort = 3000; - local portName = 'http'; - local podLabels = { app: 'grafana' }; - - local configVolumeName = 'grafana-config'; - local configSecretName = 'grafana-config'; - local configVolume = volume.withName(configVolumeName) + volume.mixin.secret.withSecretName(configSecretName); - local configVolumeMount = containerVolumeMount.new(configVolumeName, '/etc/grafana'); - - local storageVolumeName = 'grafana-storage'; - local storageVolume = volume.fromEmptyDir(storageVolumeName); - local storageVolumeMount = containerVolumeMount.new(storageVolumeName, '/var/lib/grafana'); - - local datasourcesVolumeName = 'grafana-datasources'; - local datasourcesSecretName = 'grafana-datasources'; - local datasourcesVolume = volume.withName(datasourcesVolumeName) + volume.mixin.secret.withSecretName(datasourcesSecretName); - local datasourcesVolumeMount = containerVolumeMount.new(datasourcesVolumeName, '/etc/grafana/provisioning/datasources'); - - local dashboardsVolumeName = 'grafana-dashboards'; - local dashboardsConfigMapName = 'grafana-dashboards'; - local dashboardsVolume = volume.withName(dashboardsVolumeName) + volume.mixin.configMap.withName(dashboardsConfigMapName); - local dashboardsVolumeMount = containerVolumeMount.new(dashboardsVolumeName, '/etc/grafana/provisioning/dashboards'); - - local volumeMounts = - [ - storageVolumeMount, - datasourcesVolumeMount, - dashboardsVolumeMount, - ] + - [ - local dashboardName = std.strReplace(name, '.json', ''); - containerVolumeMount.new('grafana-dashboard-' + dashboardName, '/grafana-dashboard-definitions/0/' + dashboardName) - for name in std.objectFields($._config.grafana.dashboards) - ] + - if std.length($._config.grafana.config) > 0 then [configVolumeMount] else []; - - local volumes = - [ - storageVolume, - datasourcesVolume, - dashboardsVolume, - ] + - [ - local dashboardName = 'grafana-dashboard-' + std.strReplace(name, '.json', ''); - volume.withName(dashboardName) + - volume.mixin.configMap.withName(dashboardName) - for name in std.objectFields($._config.grafana.dashboards) - ] + - if std.length($._config.grafana.config) > 0 then [configVolume] else []; - - local c = - container.new('grafana', $._config.imageRepos.grafana + ':' + $._config.versions.grafana) + - (if std.length($._config.grafana.plugins) == 0 then {} else container.withEnv([env.new('GF_INSTALL_PLUGINS', std.join(',', $._config.grafana.plugins))])) + - container.withVolumeMounts(volumeMounts) + - container.withPorts(containerPort.newNamed(targetPort, portName)) + - container.mixin.readinessProbe.httpGet.withPath('/api/health') + - container.mixin.readinessProbe.httpGet.withPort(portName) + - container.mixin.resources.withRequests($._config.grafana.container.requests) + - container.mixin.resources.withLimits($._config.grafana.container.limits); - - deployment.new('grafana', 1, c, podLabels) + - deployment.mixin.metadata.withNamespace($._config.namespace) + - deployment.mixin.metadata.withLabels(podLabels) + - deployment.mixin.spec.selector.withMatchLabels(podLabels) + - deployment.mixin.spec.template.spec.withNodeSelector({ 'beta.kubernetes.io/os': 'linux' }) + - deployment.mixin.spec.template.spec.withVolumes(volumes) + - deployment.mixin.spec.template.spec.securityContext.withRunAsNonRoot(true) + - deployment.mixin.spec.template.spec.securityContext.withRunAsUser(65534) + - deployment.mixin.spec.template.spec.withServiceAccountName('grafana'), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafana/jsonnetfile.json b/sources/kube-prometheus/jsonnet/vendor/grafana/jsonnetfile.json deleted file mode 100644 index 52c8ba33..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafana/jsonnetfile.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "dependencies": [ - { - "name": "grafonnet", - "source": { - "git": { - "remote": "https://github.com/grafana/grafonnet-lib", - "subdir": "grafonnet" - } - }, - "version": "master" - }, - { - "name": "ksonnet", - "source": { - "git": { - "remote": "https://github.com/ksonnet/ksonnet-lib", - "subdir": "" - } - }, - "version": "master" - } - ] -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/alert_condition.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/alert_condition.libsonnet deleted file mode 100644 index d70a1d3b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/alert_condition.libsonnet +++ /dev/null @@ -1,44 +0,0 @@ -{ - /** - * Returns a new condition of alert of graph panel. - * Currently the only condition type that exists is a Query condition - * that allows to specify a query letter, time range and an aggregation function. - * - * @param evaluatorParams Value of threshold - * @param evaluatorType Type of threshold - * @param operatorType Operator between conditions - * @param queryRefId The letter defines what query to execute from the Metrics tab - * @param queryTimeStart Begging of time range - * @param queryTimeEnd End of time range - * @param reducerParams Params of an aggregation function - * @param reducerType Name of an aggregation function - * @return A json that represents a condition of alert - */ - new( - evaluatorParams=[], - evaluatorType='gt', - operatorType='and', - queryRefId='A', - queryTimeEnd='now', - queryTimeStart='5m', - reducerParams=[], - reducerType='avg', - ):: - { - evaluator: { - params: if std.type(evaluatorParams) == 'array' then evaluatorParams else [evaluatorParams], - type: evaluatorType, - }, - operator: { - type: operatorType, - }, - query: { - params: [queryRefId, queryTimeStart, queryTimeEnd], - }, - reducer: { - params: if std.type(reducerParams) == 'array' then reducerParams else [reducerParams], - type: reducerType, - }, - type: 'query', - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/annotation.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/annotation.libsonnet deleted file mode 100644 index 653211e5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/annotation.libsonnet +++ /dev/null @@ -1,35 +0,0 @@ -{ - default:: - { - builtIn: 1, - datasource: '-- Grafana --', - enable: true, - hide: true, - iconColor: 'rgba(0, 211, 255, 1)', - name: 'Annotations & Alerts', - type: 'dashboard', - }, - datasource( - name, - datasource, - expr=null, - enable=true, - hide=false, - iconColor='rgba(255, 96, 96, 1)', - tags=[], - type='tags', - builtIn=null, - ):: - { - datasource: datasource, - enable: enable, - [if expr != null then 'expr']: expr, - hide: hide, - iconColor: iconColor, - name: name, - showIn: 0, - tags: tags, - type: type, - [if builtIn != null then 'builtIn']: builtIn, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/cloudwatch.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/cloudwatch.libsonnet deleted file mode 100644 index 6312eda2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/cloudwatch.libsonnet +++ /dev/null @@ -1,39 +0,0 @@ -{ - /** - * Return a CloudWatch Target - * - * @param region - * @param namespace - * @param metric - * @param datasource - * @param statistic - * @param alias - * @param highResolution - * @param period - * @param dimensions - - * @return Panel target - */ - - target( - region, - namespace, - metric, - datasource=null, - statistic='Average', - alias=null, - highResolution=false, - period='1m', - dimensions={} - ):: { - region: region, - namespace: namespace, - metricName: metric, - [if datasource != null then 'datasource']: datasource, - statistics: [statistic], - [if alias != null then 'alias']: alias, - highResolution: highResolution, - period: period, - dimensions: dimensions, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/dashboard.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/dashboard.libsonnet deleted file mode 100644 index d7005f5d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/dashboard.libsonnet +++ /dev/null @@ -1,145 +0,0 @@ -local timepickerlib = import 'timepicker.libsonnet'; - -{ - new( - title, - editable=false, - style='dark', - tags=[], - time_from='now-6h', - time_to='now', - timezone='browser', - refresh='', - timepicker=timepickerlib.new(), - graphTooltip='default', - hideControls=false, - schemaVersion=14, - uid='', - description=null, - ):: { - local it = self, - _annotations:: [], - [if uid != '' then 'uid']: uid, - editable: editable, - [if description != null then 'description']: description, - gnetId: null, - graphTooltip: - if graphTooltip == 'shared_tooltip' then 2 - else if graphTooltip == 'shared_crosshair' then 1 - else if graphTooltip == 'default' then 0 - else graphTooltip, - hideControls: hideControls, - id: null, - links: [], - panels:: [], - refresh: refresh, - rows: [], - schemaVersion: schemaVersion, - style: style, - tags: tags, - time: { - from: time_from, - to: time_to, - }, - timezone: timezone, - timepicker: timepicker, - title: title, - version: 0, - addAnnotation(annotation):: self { - _annotations+:: [annotation], - }, - addTemplate(t):: self { - templates+: [t], - }, - templates:: [], - annotations: { list: it._annotations }, - templating: { list: it.templates }, - _nextPanel:: 2, - addRow(row):: - self { - // automatically number panels in added rows. - // https://github.com/kausalco/public/blob/master/klumps/grafana.libsonnet - local n = std.length(row.panels), - local nextPanel = super._nextPanel, - local panels = std.makeArray(n, function(i) - row.panels[i] { id: nextPanel + i }), - - _nextPanel: nextPanel + n, - rows+: [row { panels: panels }], - }, - addPanels(newpanels):: - self { - // automatically number panels in added rows. - // https://github.com/kausalco/public/blob/master/klumps/grafana.libsonnet - local n = std.foldl(function(numOfPanels, p) - (if 'panels' in p then - numOfPanels + 1 + std.length(p.panels) - else - numOfPanels + 1), newpanels, 0), - local nextPanel = super._nextPanel, - local _panels = std.makeArray( - std.length(newpanels), function(i) - newpanels[i] { - id: nextPanel + ( - if i == 0 then - 0 - else - if 'panels' in _panels[i - 1] then - (_panels[i - 1].id - nextPanel) + 1 + std.length(_panels[i - 1].panels) - else - (_panels[i - 1].id - nextPanel) + 1 - - ), - [if 'panels' in newpanels[i] then 'panels']: std.makeArray( - std.length(newpanels[i].panels), function(j) - newpanels[i].panels[j] { - id: 1 + j + - nextPanel + ( - if i == 0 then - 0 - else - if 'panels' in _panels[i - 1] then - (_panels[i - 1].id - nextPanel) + 1 + std.length(_panels[i - 1].panels) - else - (_panels[i - 1].id - nextPanel) + 1 - - ), - } - ), - } - ), - - _nextPanel: nextPanel + n, - panels+::: _panels, - }, - addPanel(panel, gridPos):: self.addPanels([panel { gridPos: gridPos }]), - addRows(rows):: std.foldl(function(d, row) d.addRow(row), rows, self), - addLink(link):: self { - links+: [link], - }, - required:: [], - __requires: it.required, - addRequired(type, name, id, version):: self { - required+: [{ type: type, name: name, id: id, version: version }], - }, - inputs:: [], - __inputs: it.inputs, - addInput( - name, - label, - type, - pluginId, - pluginName, - description='', - ):: self { - inputs+: [{ - name: name, - label: label, - type: type, - pluginId: pluginId, - pluginName: pluginName, - description: description, - }], - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/elasticsearch.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/elasticsearch.libsonnet deleted file mode 100644 index 9b29d3d0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/elasticsearch.libsonnet +++ /dev/null @@ -1,38 +0,0 @@ -{ - target( - query, - id=null, - datasource=null, - metrics=[{ - field: 'value', - id: null, - type: 'percentiles', - settings: { - percents: [ - '90', - ], - }, - }], - bucketAggs=[{ - field: 'timestamp', - id: null, - type: 'date_histogram', - settings: { - interval: '1s', - min_doc_count: 0, - trimEdges: 0, - }, - }], - timeField, - alias=null, - ):: { - [if datasource != null then 'datasource']: datasource, - query: query, - id: id, - timeField: timeField, - bucketAggs: bucketAggs, - metrics: metrics, - alias: alias, - // TODO: generate bucket ids - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/grafana.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/grafana.libsonnet deleted file mode 100644 index 70d6ad7b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/grafana.libsonnet +++ /dev/null @@ -1,21 +0,0 @@ -{ - dashboard:: import 'dashboard.libsonnet', - template:: import 'template.libsonnet', - text:: import 'text.libsonnet', - timepicker:: import 'timepicker.libsonnet', - row:: import 'row.libsonnet', - link:: import 'link.libsonnet', - annotation:: import 'annotation.libsonnet', - graphPanel:: import 'graph_panel.libsonnet', - tablePanel:: import 'table_panel.libsonnet', - singlestat:: import 'singlestat.libsonnet', - pieChartPanel:: import 'pie_chart_panel.libsonnet', - influxdb:: import 'influxdb.libsonnet', - prometheus:: import 'prometheus.libsonnet', - sql:: import 'sql.libsonnet', - graphite:: import 'graphite.libsonnet', - alertCondition:: import 'alert_condition.libsonnet', - cloudwatch:: import 'cloudwatch.libsonnet', - elasticsearch:: import 'elasticsearch.libsonnet', - heatmapPanel:: import 'heatmap_panel.libsonnet', -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/graph_panel.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/graph_panel.libsonnet deleted file mode 100644 index 735dff34..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/graph_panel.libsonnet +++ /dev/null @@ -1,237 +0,0 @@ -{ - /** - * Returns a new graph panel that can be added in a row. - * It requires the graph panel plugin in grafana, which is built-in. - * - * @param title The title of the graph panel. - * @param span Width of the panel - * @param datasource Datasource - * @param fill Fill, integer from 0 to 10 - * @param linewidth Line Width, integer from 0 to 10 - * @param decimals Override automatic decimal precision for legend and tooltip. If null, not added to the json output. - * @param min_span Min span - * @param format Unit of the Y axes - * @param formatY1 Unit of the first Y axe - * @param formatY2 Unit of the second Y axe - * @param min Min of the Y axes - * @param max Max of the Y axes - * @param x_axis_mode X axis mode, one of [time, series, histogram] - * @param x_axis_values Chosen value of series, one of [avg, min, max, total, count] - * @param lines Display lines, boolean - * @param points Display points, boolean - * @param pointradius Radius of the points, allowed values are 0.5 or [1 ... 10] with step 1 - * @param bars Display bars, boolean - * @param dashes Display line as dashes - * @param stack Stack values - * @param repeat Variable used to repeat the graph panel - * @param legend_show Show legend - * @param legend_values Show values in legend - * @param legend_min Show min in legend - * @param legend_max Show max in legend - * @param legend_current Show current in legend - * @param legend_total Show total in legend - * @param legend_avg Show average in legend - * @param legend_alignAsTable Show legend as table - * @param legend_rightSide Show legend to the right - * @param legend_sort Sort order of legend - * @param legend_sortDesc Sort legend descending - * @param aliasColors Define color mappings for graphs - * @param thresholds Configuration of graph thresholds - * @param logBase1Y Value of logarithm base of the first Y axe - * @param logBase2Y Value of logarithm base of the second Y axe - * @param transparent Boolean (default: false) If set to true the panel will be transparent - * @param value_type Type of tooltip value - * @return A json that represents a graph panel - */ - new( - title, - span=null, - fill=1, - linewidth=1, - decimals=null, - description=null, - min_span=null, - format='short', - formatY1=null, - formatY2=null, - min=null, - max=null, - x_axis_mode='time', - x_axis_values='total', - lines=true, - datasource=null, - points=false, - pointradius=5, - bars=false, - height=null, - nullPointMode='null', - dashes=false, - stack=false, - repeat=null, - repeatDirection=null, - sort=0, - show_xaxis=true, - legend_show=true, - legend_values=false, - legend_min=false, - legend_max=false, - legend_current=false, - legend_total=false, - legend_avg=false, - legend_alignAsTable=false, - legend_rightSide=false, - legend_hideEmpty=null, - legend_hideZero=null, - legend_sort=null, - legend_sortDesc=null, - aliasColors={}, - thresholds=[], - logBase1Y=1, - logBase2Y=1, - transparent=false, - value_type='individual' - ):: { - title: title, - [if span != null then 'span']: span, - [if min_span != null then 'minSpan']: min_span, - [if decimals != null then 'decimals']: decimals, - type: 'graph', - datasource: datasource, - targets: [ - ], - [if description != null then 'description']: description, - [if height != null then 'height']: height, - renderer: 'flot', - yaxes: [ - self.yaxe(if formatY1 != null then formatY1 else format, min, max, decimals=decimals, logBase=logBase1Y), - self.yaxe(if formatY2 != null then formatY2 else format, min, max, decimals=decimals, logBase=logBase2Y), - ], - xaxis: { - show: show_xaxis, - mode: x_axis_mode, - name: null, - values: if x_axis_mode == 'series' then [x_axis_values] else [], - buckets: null, - }, - lines: lines, - fill: fill, - linewidth: linewidth, - dashes: dashes, - dashLength: 10, - spaceLength: 10, - points: points, - pointradius: pointradius, - bars: bars, - stack: stack, - percentage: false, - legend: { - show: legend_show, - values: legend_values, - min: legend_min, - max: legend_max, - current: legend_current, - total: legend_total, - alignAsTable: legend_alignAsTable, - rightSide: legend_rightSide, - avg: legend_avg, - [if legend_hideEmpty != null then 'hideEmpty']: legend_hideEmpty, - [if legend_hideZero != null then 'hideZero']: legend_hideZero, - [if legend_sort != null then 'sort']: legend_sort, - [if legend_sortDesc != null then 'sortDesc']: legend_sortDesc, - }, - nullPointMode: nullPointMode, - steppedLine: false, - tooltip: { - value_type: value_type, - shared: true, - sort: if sort == 'decreasing' then 2 else if sort == 'increasing' then 1 else sort, - }, - timeFrom: null, - timeShift: null, - [if transparent == true then 'transparent']: transparent, - aliasColors: aliasColors, - repeat: repeat, - [if repeatDirection != null then 'repeatDirection']: repeatDirection, - seriesOverrides: [], - thresholds: thresholds, - links: [], - yaxe( - format='short', - min=null, - max=null, - label=null, - show=true, - logBase=1, - decimals=null, - ):: { - label: label, - show: show, - logBase: logBase, - min: min, - max: max, - format: format, - [if decimals != null then 'decimals']: decimals, - }, - _nextTarget:: 0, - addTarget(target):: self { - // automatically ref id in added targets. - // https://github.com/kausalco/public/blob/master/klumps/grafana.libsonnet - local nextTarget = super._nextTarget, - _nextTarget: nextTarget + 1, - targets+: [target { refId: std.char(std.codepoint('A') + nextTarget) }], - }, - addTargets(targets):: std.foldl(function(p, t) p.addTarget(t), targets, self), - _nextSeriesOverride:: 0, - addSeriesOverride(override):: self { - local nextOverride = super._nextSerieOverride, - _nextSeriesOverride: nextOverride + 1, - seriesOverrides+: [override], - }, - resetYaxes():: self { - yaxes: [], - _nextYaxis:: 0, - }, - _nextYaxis:: 0, - addYaxis( - format='short', - min=null, - max=null, - label=null, - show=true, - logBase=1, - decimals=null, - ):: self { - local nextYaxis = super._nextYaxis, - _nextYaxis: nextYaxis + 1, - yaxes+: [self.yaxe(format, min, max, label, show, logBase, decimals)], - }, - addAlert( - name, - executionErrorState='alerting', - forDuration='5m', - frequency='60s', - handler=1, - message='', - noDataState='no_data', - notifications=[], - ):: self { - local it = self, - _conditions:: [], - alert: { - name: name, - conditions: it._conditions, - executionErrorState: executionErrorState, - 'for': forDuration, - frequency: frequency, - handler: handler, - noDataState: noDataState, - notifications: notifications, - message: message, - }, - addCondition(condition):: self { - _conditions+: [condition], - }, - addConditions(conditions):: std.foldl(function(p, c) p.addCondition(c), conditions, it), - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/graphite.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/graphite.libsonnet deleted file mode 100644 index 15e20eb6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/graphite.libsonnet +++ /dev/null @@ -1,27 +0,0 @@ -{ - /** - * Return an Graphite Target - * - * @param target Graphite Query. Nested queries are possible by adding the query reference (refId). - * @param targetFull Expanding the @target. Used in nested queries. - * @param hide Disable query on graph. - * @param textEditor Enable raw query mode. - * @param datasource Datasource. - - * @return Panel target - */ - target( - target, - targetFull=null, - hide=false, - textEditor=false, - datasource=null, - ):: { - target: target, - hide: hide, - textEditor: textEditor, - - [if targetFull != null then 'targetFull']: targetFull, - [if datasource != null then 'datasource']: datasource, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/heatmap_panel.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/heatmap_panel.libsonnet deleted file mode 100644 index bf38cda8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/heatmap_panel.libsonnet +++ /dev/null @@ -1,137 +0,0 @@ -{ - /* - * Returns a heatmap panel. - * Requires the heatmap panel plugin in Grafana, which is built-in. - * - * @param title The title of the heatmap panel - * @param datasource Datasource - * @param min_span Min span - * @param span Width of the panel - * @param cards_cardPadding How much padding to put between bucket cards - * @param cards_cardRound How much rounding should be applied to the bucket card shape - * @param color_cardColor Hex value of color used when color_colorScheme is 'opacity' - * @param color_colorScale How to scale the color range, 'linear' or 'sqrt' - * @param color_colorScheme TODO: document - * @param color_exponent TODO: document - * @param color_max The value for the end of the color range - * @param color_min The value for the beginning of the color range - * @param color_mode How to display difference in frequency with color, default 'opacity' - * @param dataFormat How to format the data, default is 'timeseries' - * @param highlightCards TODO: document - * @param legend_show Show legend - * @param minSpan Minimum span of the panel when repeated on a template variable - * @param repeat Variable used to repeat the heatmap panel - * @param repeatDirection Which direction to repeat the panel, 'h' for horizontal and 'v' for vertically - * @param tooltipDecimals The number of decimal places to display in the tooltip - * @param tooltip_show Whether or not to display a tooltip when hovering over the heatmap - * @param tooltip_showHistogram Whether or not to display a histogram in the tooltip - * @param xAxis_show Whether or not to show the X axis, default true - * @param xBucketNumber Number of buckets for the X axis - * @param xBucketSize Size of X axis buckets. Number or interval(10s, 15h, etc.) Has priority over xBucketNumber - * @param yAxis_decimals Override automatic decimal precision for the Y axis - * @param yAxis_format Unit of the Y axis - * @param yAxis_logBase Only if dataFormat is 'timeseries' - * @param yAxis_min Only if dataFormat is 'timeseries', min of the Y axis - * @param yAxis_max Only if dataFormat is 'timeseries', max of the Y axis - * @param yAxis_show Wheter or not to show the Y axis - * @param yAxis_splitFactor TODO: document - * @param yBucketBound Which bound ('lower' or 'upper') of the bucket to use, default 'auto' - * @param yBucketNumber Number of buckets for the Y axis - * @param yBucketSize Size of Y axis buckets. Has priority over yBucketNumber - */ - new( - title, - datasource=null, - description=null, - cards_cardPadding=null, - cards_cardRound=null, - color_cardColor='#b4ff00', - color_colorScale='sqrt', - color_colorScheme='interpolateOranges', - color_exponent=0.5, - color_max=null, - color_min=null, - color_mode='spectrum', - dataFormat='timeseries', - highlightCards=true, - legend_show=false, - minSpan=null, - repeat=null, - repeatDirection=null, - tooltipDecimals=null, - tooltip_show=true, - tooltip_showHistogram=false, - xAxis_show=true, - xBucketNumber=null, - xBucketSize=null, - yAxis_decimals=null, - yAxis_format='short', - yAxis_logBase=1, - yAxis_min=null, - yAxis_max=null, - yAxis_show=true, - yAxis_splitFactor=null, - yBucketBound='auto', - yBucketNumber=null, - yBucketSize=null, - - ):: { - title: title, - type: 'heatmap', - [if description != null then 'description']: description, - datasource: datasource, - cards: { - cardPadding: cards_cardPadding, - cardRound: cards_cardRound, - }, - color: { - mode: color_mode, - cardColor: color_cardColor, - colorScale: color_colorScale, - exponent: color_exponent, - [if color_mode == 'spectrum' then 'colorScheme']: color_colorScheme, - [if color_max != null then 'max']: color_max, - [if color_min != null then 'min']: color_min, - }, - [if dataFormat != null then 'dataFormat']: dataFormat, - heatmap: {}, - highlightCards: highlightCards, - legend: { - show: legend_show, - }, - [if minSpan != null then 'minSpan']: minSpan, - [if repeat != null then 'repeat']: repeat, - [if repeatDirection != null then 'repeatDirection']: repeatDirection, - tooltip: { - show: tooltip_show, - showHistogram: tooltip_showHistogram, - }, - [if tooltipDecimals != null then 'tooltipDecimals']: tooltipDecimals, - xAxis: { - show: xAxis_show, - }, - xBucketNumber: if dataFormat == 'timeseries' && xBucketSize != null then xBucketNumber else null, - xBucketSize: if dataFormat == 'timeseries' && xBucketSize != null then xBucketSize else null, - yAxis: { - decimals: yAxis_decimals, - [if dataFormat == 'timeseries' then 'logBase']: yAxis_logBase, - format: yAxis_format, - [if dataFormat == 'timeseries' then 'max']: yAxis_max, - [if dataFormat == 'timeseries' then 'min']: yAxis_min, - show: yAxis_show, - splitFactor: yAxis_splitFactor, - }, - yBucketBound: yBucketBound, - [if dataFormat == 'timeseries' then 'yBucketNumber']: yBucketNumber, - [if dataFormat == 'timeseries' then 'yBucketSize']: yBucketSize, - - _nextTarget:: 0, - addTarget(target):: self { - local nextTarget = super._nextTarget, - _nextTarget: nextTarget + 1, - targets+: [target { refId: std.char(std.codepoint('A') + nextTarget) }], - }, - addTargets(targets):: std.foldl(function(p, t) p.addTarget(t), targets, self), - }, - -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/influxdb.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/influxdb.libsonnet deleted file mode 100644 index 8e0451f0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/influxdb.libsonnet +++ /dev/null @@ -1,27 +0,0 @@ -{ - /** - * Return an InfluxDB Target - * - * @param query Raw InfluxQL statement - * @param alias Alias By pattern - * @param datasource Datasource - * @param rawQuery En/Disable raw query mode - * @param resultFormat Format results as 'Time series' or 'Table' - - * @return Panel target - */ - target( - query, - alias=null, - datasource=null, - rawQuery=true, - resultFormat='time_series', - ):: { - query: query, - rawQuery: rawQuery, - resultFormat: resultFormat, - - [if alias != null then 'alias']: alias, - [if datasource != null then 'datasource']: datasource, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/link.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/link.libsonnet deleted file mode 100644 index 97db18af..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/link.libsonnet +++ /dev/null @@ -1,24 +0,0 @@ -{ - dashboards( - title, - tags, - asDropdown=true, - includeVars=false, - keepTime=false, - icon='external link', - url='', - targetBlank=false, - type='dashboards', - ):: - { - asDropdown: asDropdown, - icon: icon, - includeVars: includeVars, - keepTime: keepTime, - tags: tags, - title: title, - type: type, - url: url, - targetBlank: targetBlank, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/pie_chart_panel.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/pie_chart_panel.libsonnet deleted file mode 100644 index 48436ca3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/pie_chart_panel.libsonnet +++ /dev/null @@ -1,42 +0,0 @@ -{ - /** - * Returns a new pie chart panel that can be added in a row. - * It requires the pie chart panel plugin in grafana, which needs to be explicitly installed. - * - * @param title The title of the pie chart panel. - * @param description Description of the panel - * @param span Width of the panel - * @param min_span Min span - * @param datasource Datasource - * @param aliasColors Define color mappings - * @param pieType Type of pie chart (one of pie or donut) - * @return A json that represents a pie chart panel - */ - new( - title, - description='', - span=null, - min_span=null, - datasource=null, - height=null, - aliasColors={}, - pieType='pie', - ):: { - type: 'grafana-piechart-panel', - pieType: pieType, - title: title, - aliasColors: aliasColors, - [if span != null then 'span']: span, - [if min_span != null then 'minSpan']: min_span, - [if height != null then 'height']: height, - datasource: datasource, - targets: [ - ], - _nextTarget:: 0, - addTarget(target):: self { - local nextTarget = super._nextTarget, - _nextTarget: nextTarget + 1, - targets+: [target { refId: std.char(std.codepoint('A') + nextTarget) }], - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/prometheus.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/prometheus.libsonnet deleted file mode 100644 index a15645d0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/prometheus.libsonnet +++ /dev/null @@ -1,19 +0,0 @@ -{ - target( - expr, - format='time_series', - intervalFactor=2, - legendFormat='', - datasource=null, - interval=null, - instant=null, - ):: { - [if datasource != null then 'datasource']: datasource, - expr: expr, - format: format, - intervalFactor: intervalFactor, - legendFormat: legendFormat, - [if interval != null then 'interval']: interval, - [if instant != null then 'instant']: instant, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/row.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/row.libsonnet deleted file mode 100644 index f5eb6c7b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/row.libsonnet +++ /dev/null @@ -1,32 +0,0 @@ -{ - new( - title='Dashboard Row', - height=null, - collapse=false, - repeat=null, - showTitle=null, - titleSize='h6' - ):: { - collapse: collapse, - collapsed: collapse, - [if height != null then 'height']: height, - panels: [], - repeat: repeat, - repeatIteration: null, - repeatRowId: null, - showTitle: - if showTitle != null then - showTitle - else - title != 'Dashboard Row', - title: title, - type: 'row', - titleSize: titleSize, - addPanels(panels):: self { - panels+: panels, - }, - addPanel(panel, gridPos={}):: self { - panels+: [panel { gridPos: gridPos }], - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/singlestat.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/singlestat.libsonnet deleted file mode 100644 index 23d838f6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/singlestat.libsonnet +++ /dev/null @@ -1,127 +0,0 @@ -{ - new( - title, - format='none', - description='', - interval=null, - height=null, - datasource=null, - span=null, - min_span=null, - decimals=null, - valueName='avg', - valueFontSize='80%', - prefixFontSize='50%', - postfixFontSize='50%', - mappingType=1, - repeat=null, - repeatDirection=null, - prefix='', - postfix='', - colors=[ - '#299c46', - 'rgba(237, 129, 40, 0.89)', - '#d44a3a', - ], - colorBackground=false, - colorValue=false, - thresholds='', - valueMaps=[ - { - value: 'null', - op: '=', - text: 'N/A', - }, - ], - rangeMaps=[ - { - from: 'null', - to: 'null', - text: 'N/A', - }, - ], - transparent=null, - sparklineFillColor='rgba(31, 118, 189, 0.18)', - sparklineFull=false, - sparklineLineColor='rgb(31, 120, 193)', - sparklineShow=false, - gaugeShow=false, - gaugeMinValue=0, - gaugeMaxValue=100, - gaugeThresholdMarkers=true, - gaugeThresholdLabels=false, - ):: - { - [if height != null then 'height']: height, - [if description != '' then 'description']: description, - [if repeat != null then 'repeat']: repeat, - [if repeatDirection != null then 'repeatDirection']: repeatDirection, - [if transparent != null then 'transparent']: transparent, - [if min_span != null then 'minSpan']: min_span, - title: title, - [if span != null then 'span']: span, - type: 'singlestat', - datasource: datasource, - targets: [ - ], - links: [], - [if decimals != null then 'decimals']: decimals, - maxDataPoints: 100, - interval: interval, - cacheTimeout: null, - format: format, - prefix: prefix, - postfix: postfix, - nullText: null, - valueMaps: valueMaps, - mappingTypes: [ - { - name: 'value to text', - value: 1, - }, - { - name: 'range to text', - value: 2, - }, - ], - rangeMaps: rangeMaps, - mappingType: - if mappingType == 'value' - then - 1 - else if mappingType == 'range' - then - 2 - else - mappingType, - nullPointMode: 'connected', - valueName: valueName, - prefixFontSize: prefixFontSize, - valueFontSize: valueFontSize, - postfixFontSize: postfixFontSize, - thresholds: thresholds, - colorBackground: colorBackground, - colorValue: colorValue, - colors: colors, - gauge: { - show: gaugeShow, - minValue: gaugeMinValue, - maxValue: gaugeMaxValue, - thresholdMarkers: gaugeThresholdMarkers, - thresholdLabels: gaugeThresholdLabels, - }, - sparkline: { - fillColor: sparklineFillColor, - full: sparklineFull, - lineColor: sparklineLineColor, - show: sparklineShow, - }, - tableColumn: '', - _nextTarget:: 0, - addTarget(target):: self { - local nextTarget = super._nextTarget, - _nextTarget: nextTarget + 1, - targets+: [target { refId: std.char(std.codepoint('A') + nextTarget) }], - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/sql.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/sql.libsonnet deleted file mode 100644 index 22229f6c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/sql.libsonnet +++ /dev/null @@ -1,11 +0,0 @@ -{ - target( - rawSql, - datasource=null, - format='time_series', - ):: { - [if datasource != null then 'datasource']: datasource, - format: format, - rawSql: rawSql, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/table_panel.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/table_panel.libsonnet deleted file mode 100644 index ec70bb4b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/table_panel.libsonnet +++ /dev/null @@ -1,85 +0,0 @@ -{ - /** - * Returns a new table panel that can be added in a row. - * It requires the table panel plugin in grafana, which is built-in. - * - * @param title The title of the graph panel. - * @param span Width of the panel - * @param description Description of the panel - * @param datasource Datasource - * @param min_span Min span - * @param styles Styles for the panel - * @param columns Table columns for the panel - * @return A json that represents a table panel - */ - new( - title, - description=null, - span=null, - min_span=null, - datasource=null, - styles=[], - columns=[], - ):: { - type: 'table', - title: title, - [if span != null then 'span']: span, - [if min_span != null then 'minSpan']: min_span, - datasource: datasource, - targets: [ - ], - styles: styles, - columns: columns, - [if description != null then 'description']: description, - transform: 'table', - _nextTarget:: 0, - addTarget(target):: self + self.addTargets([target]), - addTargets(newtargets):: - self { - local n = std.foldl(function(numOfTargets, p) - (if 'targets' in p then - numOfTargets + 1 + std.length(p.targets) - else - numOfTargets + 1), newtargets, 0), - local nextTarget = super._nextTarget, - local _targets = std.makeArray( - std.length(newtargets), function(i) - newtargets[i] { - refId: std.char(std.codepoint('A') + nextTarget + ( - if i == 0 then - 0 - else - if 'targets' in _targets[i - 1] then - (std.codepoint(_targets[i - 1].refId) - nextTarget) + 1 + std.length(_targets[i - 1].targets) - else - (std.codepoint(_targets[i - 1].refId) - nextTarget) + 1 - )), - [if 'targets' in newtargets[i] then 'targets']: std.makeArray( - std.length(newtargets[i].targets), function(j) - newtargets[i].targets[j] { - refId: std.char(std.codepoint('A') + 1 + j + - nextTarget + ( - if i == 0 then - 0 - else - if 'targets' in _targets[i - 1] then - (std.codepoint(_targets[i - 1].refId) - nextTarget) + 1 + std.length(_targets[i - 1].targets) - else - (std.codepoint(_targets[i - 1].refId) - nextTarget) + 1 - )), - } - ), - } - ), - - _nextTarget: nextTarget + n, - targets+::: _targets, - }, - addColumn(field, style):: self { - local style_ = style { pattern: field }, - local column_ = { text: field, value: field }, - styles+: [style], - columns+: [column_], - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/template.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/template.libsonnet deleted file mode 100644 index afc22cdf..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/template.libsonnet +++ /dev/null @@ -1,131 +0,0 @@ -{ - new( - name, - datasource, - query, - label=null, - allValues=null, - tagValuesQuery='', - current=null, - hide='', - regex='', - refresh='never', - includeAll=false, - multi=false, - sort=0, - ):: - { - allValue: allValues, - current: $.current(current), - datasource: datasource, - includeAll: includeAll, - hide: $.hide(hide), - label: label, - multi: multi, - name: name, - options: [], - query: query, - refresh: $.refresh(refresh), - regex: regex, - sort: sort, - tagValuesQuery: tagValuesQuery, - tags: [], - tagsQuery: '', - type: 'query', - useTags: false, - }, - interval( - name, - query, - current, - hide='', - label=null, - auto_count=300, - auto_min='10s', - ):: - { - current: $.current(current), - hide: if hide == '' then 0 else if hide == 'label' then 1 else 2, - label: label, - name: name, - query: std.join(',', std.filter($.filterAuto, std.split(query, ','))), - refresh: 2, - type: 'interval', - auto: std.count(std.split(query, ','), 'auto') > 0, - auto_count: auto_count, - auto_min: auto_min, - }, - hide(hide):: - if hide == '' then 0 else if hide == 'label' then 1 else 2, - current(current):: { - [if current != null then 'text']: current, - [if current != null then 'value']: if current == 'auto' then - '$__auto_interval' - else if current == 'all' then - '$__all' - else - current, - }, - datasource( - name, - query, - current, - hide='', - label=null, - regex='', - refresh='load', - ):: { - current: $.current(current), - hide: $.hide(hide), - label: label, - name: name, - options: [], - query: query, - refresh: $.refresh(refresh), - regex: regex, - type: 'datasource', - }, - refresh(refresh):: if refresh == 'never' - then - 0 - else if refresh == 'load' - then - 1 - else if refresh == 'time' - then - 2 - else - refresh, - filterAuto(str):: str != 'auto', - custom( - name, - query, - current, - refresh='never', - label='', - valuelabels={}, - hide='', - ):: - { - allValue: null, - current: { - value: current, - text: if current in valuelabels then valuelabels[current] else current, - }, - options: std.map( - function(i) - { - text: if i in valuelabels then valuelabels[i] else i, - value: i, - }, std.split(query, ',') - ), - hide: $.hide(hide), - includeAll: false, - label: label, - refresh: $.refresh(refresh), - multi: false, - name: name, - query: query, - type: 'custom', - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/text.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/text.libsonnet deleted file mode 100644 index 757d6936..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/text.libsonnet +++ /dev/null @@ -1,17 +0,0 @@ -{ - new( - title='', - span=null, - mode='markdown', - content='', - transparent=null, - ):: - { - [if transparent != null then 'transparent']: transparent, - title: title, - [if span != null then 'span']: span, - type: 'text', - mode: mode, - content: content, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/grafonnet/timepicker.libsonnet b/sources/kube-prometheus/jsonnet/vendor/grafonnet/timepicker.libsonnet deleted file mode 100644 index 0d51d2ec..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/grafonnet/timepicker.libsonnet +++ /dev/null @@ -1,30 +0,0 @@ -{ - new( - refresh_intervals=[ - '5s', - '10s', - '30s', - '1m', - '5m', - '15m', - '30m', - '1h', - '2h', - '1d', - ], - time_options=[ - '5m', - '15m', - '1h', - '6h', - '12h', - '24h', - '2d', - '7d', - '30d', - ], - ):: { - refresh_intervals: refresh_intervals, - time_options: time_options, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/.editorconfig b/sources/kube-prometheus/jsonnet/vendor/ksonnet/.editorconfig deleted file mode 100644 index 4d105818..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/.editorconfig +++ /dev/null @@ -1,5 +0,0 @@ -root = true - -[*.jsonnet] -indent_size = 2 -indent_style = space \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/.gitignore b/sources/kube-prometheus/jsonnet/vendor/ksonnet/.gitignore deleted file mode 100644 index 853cb955..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# External packages folder -vendor/ -tmp/ - -# Project-specific working space -/charts/ - -#stray unwanted in fork -.DS_Store - -/ksonnet-gen/ksonnet-gen - -.vscode diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/.travis.yml b/sources/kube-prometheus/jsonnet/vendor/ksonnet/.travis.yml deleted file mode 100644 index 363db7db..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: go - -env: - global: - - JSONNET_BIN_URL=https://s3-us-west-2.amazonaws.com/ksonnet-ci/dist/linux-amd64/jsonnet - - JSONNET_BIN=/tmp/jsonnet - -go: - - "1.10.x" - - master - -matrix: - # allow master to fail - allow_failures: - - go: master - - # don't wait for items with allowed failures to finish on error - fast_finish: true - -before_install: -- sudo apt-get -qq update -- sudo apt-get install libstdc++6 - -script: -- curl -o ${JSONNET_BIN} ${JSONNET_BIN_URL} -- chmod 755 ${JSONNET_BIN} -- go test -v -race ./... diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/CODE-OF-CONDUCT.md b/sources/kube-prometheus/jsonnet/vendor/ksonnet/CODE-OF-CONDUCT.md deleted file mode 100644 index a24610c5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/CODE-OF-CONDUCT.md +++ /dev/null @@ -1,38 +0,0 @@ -## ksonnet Community Code of Conduct - -### Contributor Code of Conduct - -As contributors and maintainers of this project, and in the interest of fostering -an open and welcoming community, we pledge to respect all people who contribute -through reporting issues, posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. - -We are committed to making participation in this project a harassment-free experience for -everyone, regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, body size, race, ethnicity, age, -religion, or nationality. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, such as physical or electronic addresses, - without explicit permission -* Other unethical or unprofessional conduct. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are not -aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers -commit themselves to fairly and consistently applying these principles to every aspect -of managing this project. Project maintainers who do not follow or enforce the Code of -Conduct may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer, Alex Clemmer (alex@heptio.com) and TBD. - -This Code of Conduct is adapted from the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md) and [Contributor Covenant](http://contributor-covenant.org/version/1/2/0/), version 1.2.0. - diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/CONTRIBUTING.md b/sources/kube-prometheus/jsonnet/vendor/ksonnet/CONTRIBUTING.md deleted file mode 100644 index 5106018d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/CONTRIBUTING.md +++ /dev/null @@ -1,58 +0,0 @@ -## DCO Sign off - -All authors to the project retain copyright to their work. However, to ensure -that they are only submitting work that they have rights to, we are requiring -everyone to acknowldge this by signing their work. - -Any copyright notices in this repos should specify the authors as "The -heptio/aws-quickstart authors". - -To sign your work, just add a line like this at the end of your commit message: - -``` -Signed-off-by: Joe Beda -``` - -This can easily be done with the `--signoff` option to `git commit`. - -By doing this you state that you can certify the following (from https://developercertificate.org/): - -``` -Developer Certificate of Origin -Version 1.1 - -Copyright (C) 2004, 2006 The Linux Foundation and its contributors. -1 Letterman Drive -Suite D4700 -San Francisco, CA, 94129 - -Everyone is permitted to copy and distribute verbatim copies of this -license document, but changing it is not allowed. - - -Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -(a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -(b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -(c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -(d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. -``` \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/Dockerfile b/sources/kube-prometheus/jsonnet/vendor/ksonnet/Dockerfile deleted file mode 100644 index b2fbd2bc..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/Dockerfile +++ /dev/null @@ -1,63 +0,0 @@ -# Builds a Docker image that allows you to run Jsonnet, kubecfg, and/or ksonnet -# on a file in your local directory. Specifically, this image contains: -# -# 1. Jsonnet, added to /usr/local/bin -# 2. ksonnet-lib, added to the Jsonnet library paths, so you can -# compile against the ksonnet libraries without specifying the -J -# flag. -# 3. kubecfg binary, added to /usr/local/bin -# 4. kubecfg lib, included in Jsonnet library paths via KUBECFG_JPATH, -# similarly to (2) ksonnet-lib. -# -# USAGE: Define a function like `ksonnet` below, and then run: -# -# `ksonnet ` -# -# ksonnet() { -# docker run -it --rm \ -# --volume "$PWD":/wd \ -# --workdir /wd \ -# ksonnet \ -# jsonnet "$@" -# } -# -# You can also define a similar function for `kubecfg`. Note that any required -# Jsonnet libraries specified by -J (required for compilation) need to be -# described relative to your working directory. - -############################################## -# STAGE 1: build kubecfg -############################################## - -FROM golang:1.8 as kubecfg-builder -# Keep this in sync with the corresponding ENV in stage 2 -ENV KUBECFG_VERSION v0.5.0 - -RUN go get github.com/ksonnet/kubecfg -WORKDIR /go/src/github.com/ksonnet/kubecfg -RUN git checkout tags/${KUBECFG_VERSION} -b ${KUBECFG_VERSION} -RUN CGO_ENABLED=1 GOOS=linux go install -a --ldflags '-linkmode external -extldflags "-static"' . - -############################################## -# STAGE 2: build jsonnet and download ksonnet -############################################## - -FROM alpine:3.6 -ENV KUBECFG_VERSION v0.5.0 -ENV JSONNET_VERSION v0.9.4 - -# Copy kubecfg executable and lib files from previous stage -RUN mkdir -p /usr/share/kubecfg/${KUBECFG_VERSION} -COPY --from=kubecfg-builder /go/bin/kubecfg /usr/local/bin/ -COPY --from=kubecfg-builder /go/src/github.com/ksonnet/kubecfg/lib/ /usr/share/kubecfg/${KUBECFG_VERSION}/ -ENV KUBECFG_JPATH /usr/share/kubecfg/${KUBECFG_VERSION} - -# Get Jsonnet. -RUN apk update && apk add git make g++ -RUN git clone https://github.com/google/jsonnet.git -RUN cd jsonnet && git checkout tags/${JSONNET_VERSION} -b ${JSONNET_VERSION} && make -j4 && mv jsonnet /usr/local/bin - -# Get ksonnet-lib, add to the Jsonnet -J path. -RUN git clone https://github.com/ksonnet/ksonnet-lib.git -RUN mkdir -p /usr/share/${JSONNET_VERSION} -RUN cp -r ksonnet-lib/ksonnet.beta.2 /usr/share/${JSONNET_VERSION} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/LICENSE b/sources/kube-prometheus/jsonnet/vendor/ksonnet/LICENSE deleted file mode 100644 index 8dada3ed..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/README.md b/sources/kube-prometheus/jsonnet/vendor/ksonnet/README.md deleted file mode 100644 index 32f6eeed..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/README.md +++ /dev/null @@ -1,221 +0,0 @@ -# ksonnet: Simplify working with Kubernetes - -**ksonnet** (currently in beta testing) provides a simpler alternative -to writing complex YAML for your Kubernetes configurations. Instead, -you write template functions against the [Kubernetes application -API][v1] using the data templating language [Jsonnet][jsonnet] . -Components called **mixins** also help simplify the work that's -required to extend your configuration as your application scales up. - -![Jsonnet syntax highlighting][jsonnet-demo] - -Other projects help simplify the work of writing a Kubernetes -configuration by creating a simpler API that wraps the Kubernetes -API. These projects include [Kompose][Kompose], -[OpenCompose][OpenCompose], and [compose2kube][compose2kube]. - -**ksonnet** instead streamlines the process of writing -configurations that create native Kubernetes objects. - -## Install - -First, install Jsonnet. - -### Mac OS X - -If you do not have Homebrew installed, [install it now](https://brew.sh/). - -Then run: - -`brew install jsonnet` - -### Linux - -You must build the binary. For details, [see the GitHub -repository](https://github.com/google/jsonnet). - -## Run - -Fork or clone this repository, using a command such as: - -```shell -git clone git@github.com:ksonnet/ksonnet-lib.git -``` - -Then add the appropriate import -statements for the library to your Jsonnet code: - -```jsonnet -local k = import "ksonnet.beta.2/k.libsonnet"; -``` - -Jsonnet `import` statements look along a "search path" specified using -`jsonnet -J `. To use **ksonnet**, the search path should -include the root of the `ksonnet-lib` git repository. You should add -additional `-J` paths as you build up your own local libraries. - -Jsonnet does not yet support [ES2016-style](https://github.com/google/jsonnet/issues/307) imports, -so it is common to "unpack" an import with a series of `local` definitions: - -```jsonnet -local container = k.core.v1.container; -local deployment = k.extensions.v1beta1.deployment; -``` - -### Tools - -Developed in tandem with `ksonnet-lib` is -[`vscode-jsonnet`](https://github.com/heptio/vscode-jsonnet), a static -analysis toolset written as a [Visual Studio -Code](https://code.visualstudio.com/) plugin, meant to provide -features such as autocomplete, syntax highlighting, and static -analysis. - -### Get started - -If you're not familiar with **Jsonnet**, check out the -[website](http://jsonnet.org/index.html) and [their -tutorial](http://jsonnet.org/docs/tutorial.html). For usage, see the [command -line tool](http://jsonnet.org/implementation/commandline.html). - -You can also start writing `.libsonnet` or `.jsonnet` files based on -the examples in this readme. Then run the -following command: - -```bash -jsonnet -J /path/to/ksonnet-lib -``` - -This command produces a JSON file that you can then run the -appropriate `kubectl` -commands against, with the following syntax: - -```bash -kubectl - -``` - -## Write your config files with ksonnet - -The YAML for the Kubernetes -[nginx hello world tutorial][helloworld] looks -like this: - -```yaml -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: nginx-deployment -spec: - replicas: 2 - template: - metadata: - labels: - app: nginx - spec: - containers: - - name: nginx - image: nginx:1.7.9 - ports: - - containerPort: 80 -``` - -Instead, you can write the following **ksonnet** code: - -```javascript -local k = import "ksonnet.beta.2/k.libsonnet"; - -// Specify the import objects that we need -local container = k.extensions.v1beta1.deployment.mixin.spec.template.spec.containersType; -local containerPort = container.portsType; -local deployment = k.extensions.v1beta1.deployment; - -local targetPort = 80; -local podLabels = {app: "nginx"}; - -local nginxContainer = - container.new("nginx", "nginx:1.7.9") + - container.ports(containerPort.containerPort(targetPort)); - -local nginxDeployment = - deployment.new("nginx-deployment", 2, nginxContainer, podLabels); - -k.core.v1.list.new(nginxDeployment) -``` - -Save the file as `helloworld.libsonnet`, then run: - -```bash -jsonnet -J helloworld.libsonnet > deployment.json -``` - -This command creates the `deployment.json` file that the -**ksonnet** snippet defines. - -You can now apply this deployment to your Kubernetes cluster -by running the following command: - -```bash -kubectl apply -f deployment.json -``` - -## The **ksonnet** libraries - -The **ksonnet** project organizes libraries by the level of -abstraction they approach. For most users, the right entry point is: - -* `ksonnet.beta.2/k.libsonnet`: higher-level abstractions and methods - to help create complex Kubernetes objects out of smaller objects - -`k.libsonnet` is built on top of a utility library, `k8s.libsonnet`, -that is generated directly from the OpenAPI definition. - -## Mixins - -Mixins are a core feature of **ksonnet**. Conceptually, they provide dynamic inheritance, at -runtime instead of compile time, which lets you combine them freely to modify objects or -create new ones. - -**ksonnet** ships with a large library of built-in mixins, or you can write your own custom mixins. -The [tutorial](/docs/TUTORIAL.md) shows you how to create a custom mixin that you can then -easily add as a Sidecar container to your Kubernetes cluster. - -## Contributing - -Thanks for taking the time to join our community and start -contributing! - -### Before you start - -* Please familiarize yourself with the [Code of -Conduct](https://github.com/ksonnet/ksonnet-lib/blob/master/CODE-OF-CONDUCT.md) before contributing. -* See [CONTRIBUTING.md](https://github.com/ksonnet/ksonnet-lib/blob/master/CONTRIBUTING.md) for instructions on the -developer certificate of origin that we require. - -### Pull requests - -* We welcome pull requests. Feel free to dig through the -[issues](https://github.com/ksonnet/ksonnet-lib/issues) and jump in. - -## Contact us - -Have any questions or long-form feedback? You can always find us here: - -* Our [Slack channel](https://ksonnet.slack.com) [working having an auto-invite system!) -* Our [mailing list](https://groups.google.com/forum/#!forum/ksonnet). -* We monitor the [ksonnet -tag](https://stackoverflow.com/questions/tagged/ksonnet) on Stack -Overflow. - -[jsonnet]: http://jsonnet.org/ "Jsonnet" -[v1]: https://kubernetes.io/docs/api-reference/v1/definitions/ "V1 API objects" -[v1Container]: https://kubernetes.io/docs/api-reference/v1/definitions/#_v1_container "v1.Container" -[Kompose]: https://github.com/kubernetes-incubator/kompose "Kompose" -[OpenCompose]: https://github.com/redhat-developer/opencompose "OpenCompose" -[compose2kube]: https://github.com/kelseyhightower/compose2kube "compose2kube" - -[helloworld]: https://kubernetes.io/docs/tutorials/stateless-application/run-stateless-application-deployment/ "Hello, Kubernetes!" -[v1hellojsonnet]: https://github.com/ksonnet/ksonnet-lib/blob/master/examples/hello-world/hello.v1.jsonnet "Hello, Jsonnet (v1)!" -[v2hellojsonnet]: https://github.com/ksonnet/ksonnet-lib/blob/master/examples/hello-world/hello.v2.jsonnet "Hello, Jsonnet (v2)!" -[deploymentspec]: https://kubernetes.io/docs/api-reference/extensions/v1beta1/definitions/#_v1beta1_deploymentspec "v1.DeploymentSpec" - -[jsonnet-demo]: docs/images/kube-demo.gif diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ROADMAP.md b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ROADMAP.md deleted file mode 100644 index d16407e5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ROADMAP.md +++ /dev/null @@ -1,26 +0,0 @@ -# ksonnet Roadmap - -## State of the release -This is a living document that in the coming weeks will be organized grouped for releases. -ksonnet is currently considered to be in a pre-generally available (0.1) state. -Current versions are intended for prototyping activities and we don't recommend production use at this time. - -## Upcoming features - -### Usability Enhancements -* Higher level abstractions, starter kits -* App centric grouping of components; e.g. config is “child” of code -* Reference pattern for SCM based config workflow -* CI/CD integration toolkit - -### Tooling Enhancements -* Extend kubectl -* IDE: type suggestion, arg types, more editors -* Server side evaluation, realize template as operator -* Configuration linting and validation - -### Packaging Enhancements -* Integrate with Helm -* Package management of ksonnet libraries -* Network library download -* Published library of sidecar mix-ins \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/docs/TODO.md b/sources/kube-prometheus/jsonnet/vendor/ksonnet/docs/TODO.md deleted file mode 100644 index 14856f68..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/docs/TODO.md +++ /dev/null @@ -1,20 +0,0 @@ -# TODO - -A list of things to do before we share outside the company. - -* [ ] Finish making the README useful. (Incorportae Joe's suggestions.) - * [ ] Explicitly declare the goals of the project, and add a roadmap that articulates how we are (currently) planning on accomplishing them. - * [ ] Create a specific "how to use" section for (_e.g._) the GitLab folks. -* [x] Create compelling "Hello World" example. -* [ ] Move to a constructor-based paradigm. (_e.g._, - `container.New(...) + container.Ports(...)`.) - * This should be both more familiar to developers, and also enables - us to do things like verify that we're `+`'ing components together - that make sense. -* [ ] Add some rudimentary type checking for the `+` operator. - (_e.g._, we should error if you try to add a `conatiner` to a - `deployment`, or something.) -* [ ] Add the ability to add a container to the containers list. - (_e.g._, `pod.Container(...) + pod.Container(...)` vs - `pod.Container([...])`.) -* [ ] Move from `kube.v1` -> `kube.core.v1`. diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/docs/TUTORIAL.md b/sources/kube-prometheus/jsonnet/vendor/ksonnet/docs/TUTORIAL.md deleted file mode 100644 index 6503c894..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/docs/TUTORIAL.md +++ /dev/null @@ -1,299 +0,0 @@ -# Tutorial - -One of the strengths of **ksonnet** mixin libraries is their ability -to allow users to separate a Kubernetes application into several -modular components. - -For example, a team might split into application and logging subteams. -Rather than writing a single YAML file that combines them into a -single Kubernetes app, the logging team can simply write a mixin -library that the application team can use to add logging to their -Kubernetes application definition. - -In this tutorial, we will explore how such libraries are constructed, -using a mixin library for [fluentd][fluentd] (hosted in the official -[mixins repository][fluentd-mixin]). Specifically, we see how one team -writing an app using [Elasticsearch][elastic] can use the Fluentd -mixin library to use easily configure Fluentd to tail the -Elasticsearch logs and pass them Kibana to be rendered in a dashboard. - -For more information about Elasticsearch and Kibana, see [the Elastic -website][elastic]. For `fluentd`, see [the Fluentd website][fluentd]. - -## Requirements to build your own mixins - -If you want to build your own mixin libraries, or write **ksonnet** -using the built-in mixins, you need to perform the following tasks. -For details, see the [readme][readme]. - -* Install **Jsonnet**, version 0.9.4 or later -* Clone the **ksonnet** repository locally -* Install and configure the Visual Studio Code extension (optional) -* Create a test Kubernetes cluster - -## Architecture and design - -The idea of the application is for Elasticsearch to emit logs to -standard out, and for Fluentd to tail those logs and send them to -Kibana for rendering. - -In Kubernetes, accessing the `Pod` logs involves: - -* Giving the Fluentd container permissions to access the `Pod` logs, - and -* Appending volume mounts that contain the `Pod` logs, to the Fluentd - container, so that it can access them. - -We'll walk through the key parts of the files in example in detail, -but at a high level this implementation is broken up as: - -* A `DaemonSet` that causes Fluentd to run once on every machine, so - that it can tail `Pod` logs for Elasticsearch running anywhere in - the cluster. - - On its own, this `DaemonSet` only contains the core Fluentd - application definition. For example, it has no permissions to access - (_e.g._) `Pod` Logs, or the volume mounts required to access them. -* A separate mixin that defines the `VolumeMounts` and `Volumes` that - the `DaemonSet` requires to access the `Pod` Logs. -* A separate mixin that configures the access permissions for the - `DaemonSet` -* The RBAC objects that the cluster administrator must send to the - cluster so that the `ServiceAccount` associated with Fluentd can be - granted permission to obtain the `Pod` logs. - -The power of this approach lies in its separation of concerns: an -application developer can define the `DaemonSet`, while a cluster -admin can define the access permissions that this or any other -`DaemonSet` might require. The `DaemonSet` or the access permissions -can be modified as needed without requiring a complete cluster -reconfiguration. Indeed, as the `DaemonSet` mixin demonstrates, the -details of the `DaemonSet` (in this case, the `Volumes` and -`VolumeMounts`) can also be adjusted without having to touch the base -`DaemonSet` definition. - -### Define mixins to configure access to pod logs - -Let's look at how we can decouple the pieces of a complete Fluentd -configuration, so that your logging team, for example, can write just -the core of a Fluentd DaemonSet, and then write a **ksonnet** library -that lets you customize key details of the configuration as needed. - -`fluentd-es-ds.jsonnet` defines a basic DaemonSet, and then adds access permissions to it. - -```javascript -// daemonset -local ds = - // base daemonset - fluentd.app.daemonSetBuilder.new(config) + - // add configuration for access to pod logs - fluentd.app.daemonSetBuilder.configureForPodLogs(config); - - // create access permissions for pod logs - local rbacObjs = fluentd.app.admin.rbacForPodLogs(config); -``` - -Note that our base DaemonSet can't do anything. It doesn't know where -the pod logs that it needs are -- it needs Volumes and VolumeMounts to -provide this information. It also needs access permissions, provided -with RBAC. So we add these items separately. Let's look more closely -at the advantages of this approach. - -In `fluentd.libsonnet`, we define the `daemonSet` mixin. Here is where -we start to see the real power of **ksonnet** mixins at work. This -mixin specifies the VolumeMounts and Volumes that Fluentd requires -separately from the DaemonSet definition itself. This approach lets us -decouple application definitions from deployment details. - -Note particularly in the following snippet the `containerSelector` -parameter to `addHostMountedPodLogs`. We pass this function to -`ds.mapContainers` to iterate over our containers (in this case, our -Fluentd containers) and add the VolumeMounts that they need. (The -details of the pod logs have also been abstracted away to their own -function.) - -```javascript - mixin:: { - daemonSet:: { - // Takes two volume names and produces a - // mixin that mounts the Kubernetes pod logs into a set of - // containers specified by `containerSelector`. - addHostMountedPodLogs( - varlogName, podlogsName, containerSelector=function(c) true - ):: - local podLogs = $.parts.podLogs(varlogName, podlogsName); - - // Add volume to DaemonSet. - ds.mixin.spec.template.spec.volumes([ - podLogs.varLogVolume, - podLogs.podLogVolume, - ]) + - - // Iterate over a specified set of containers to add the VolumeMounts - ds.mapContainers( - function (c) - if containerSelector(c) - then - c + container.volumeMounts([ - podLogs.varLogMount, - podLogs.podLogMount, - ]) - else c), - }, - }, -``` - -The `daemonSetBuilder` that we used to create the DaemonSet calls our -`daemonSet` mixin, and also defines the `configureForPodLogs` function -that the DaemonSet needs. But the DaemonSet itself, from our first -code snippet, doesn't need to know any of these details: - -```javascript - daemonSetBuilder:: { - new(config):: { - toArray():: [self.daemonSet], - daemonSet:: $.parts.daemonSet(config.daemonSet.name, config.container.name, config.container.tag, config.namespace) - }, - - // access configuration - configureForPodLogs( - config, - varlogVolName="varlog", - podLogsVolName="varlibdockercontainers", - ):: - {} + { - daemonSet+:: - $.mixin.daemonSet.addHostMountedPodLogs( - varlogVolName, - podLogsVolName, - $.util.containerNameInSet(config.container.name)) + - // RBAC and service account - ds.mixin.spec.template.spec.serviceAccountName(config.rbac.accountName) - }, - }, -``` - -In the previous snippet, we notice that we're specifying a Service -Account, and RBAC is involved. It's time to define our RBAC objects so -that our Fluentd access permissions mean something. - -### Define RBAC objects - -We define RBAC objects separately so that they can be managed -independently of the rest of the cluster configuration. This approach -lets cluster admins and application developers work independently. -Your cluster admins can determine and define access permissions that -can be applied to application configurations with a few lines of code. - -Defining access permissions in Kubernetes requires definition of the -RBAC objects that are encapsulated in this definition (from -`fluentd.libsonnet`). - -```javascript - admin:: { - rbacForPodLogs(config):: - $.parts.rbac(config.rbac.accountName, config.namespace), - }, -``` - -Let's unpack this snippet. - -`fluentd.libsonnet` also defines all the required RBAC objects. Note -especially that we abstract the attributes of the Service Account -separately and assign their values in a separate `config` object. This -approach lets us make sure that the correct Service Account is -appropriately associated with all required objects. - -```javascript - rbac(name, namespace):: - local metadata = svcAccount.mixin.metadata.name(name) + - svcAccount.mixin.metadata.namespace(namespace); - - local hcServiceAccount = svcAccount.new() + - metadata; - - local hcClusterRole = - clRole.new() + - metadata + - clRole.rules( - rule.new() + - rule.apiGroups("*") + - rule.resources(["pods", "nodes"]) + - rule.verbs(["list", "watch"]) - ); - - local hcClusterRoleBinding = - clRoleBinding.new() + - metadata + - clRoleBinding.mixin.roleRef.apiGroup("rbac.authorization.k8s.io") + - clRoleBinding.mixin.roleRef.name(name) + - clRoleBinding.mixin.roleRef.mixinInstance({kind: "ClusterRole"}) + - clRoleBinding.subjects( - subject.new() + - subject.name(name) + - subject.namespace(namespace) - {kind: "ServiceAccount"} - ); - -``` - -In `fluentd-es-ds.jsonnet` we define our config thus: - -```javascript -local config = { - namespace:: "elasticsearch", - container:: { - name:: "fluentd-es", - tag:: "1.22", - }, - daemonSet:: { - name:: "fluentd-es-v1.22", - }, - rbac:: { - accountName:: "fluentd-serviceaccount" - }, -}; -``` - -The relevant fields here are `namespace` and `AccountName`, which we -pass as the arguments that our RBAC snippet needs when it calls the -`rbac` function. - -## Wrap it all up - -Here's where we started, with our simple DaemonSet, its pod logging, -and its access permissions. But now you've seen what's going on -underneath -- not just how the functions for adding pod logs and -permissions are clearly separated, but how we can customize them as -needed without having to rewrite the entire configuration. - -```javascript -// daemonset -local ds = - // base daemonset - fluentd.app.daemonSetBuilder.new(config) + - // add configuration for access to pod logs - fluentd.app.daemonSetBuilder.configureForPodLogs(config); - - // create access permissions for pod logs - local rbacObjs = fluentd.app.admin.rbacForPodLogs(config); -``` - -## Explore further - -The GitHub example directory also includes the generated JSON files. -Examine them to help understand the details of how **ksonnet**'s -decomposition and abstraction are compiled into complete -configurations. - -As you start to write your own custom mixins, look also at how we -break down the basic **ksonnet** imports into smaller component -objects for easier manipulation. - -And feel free to contribute your own examples to our mixins -repository! - -[readme]: ../readme.md "ksonnet readme" -[fluentd-mixin]: https://github.com/ksonnet/mixins/tree/master/incubator/fluentd -[fluentd]: http://www.fluentd.org/architecture -[elastic]: https://www.elastic.co/products diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/docs/images/kube-demo.gif b/sources/kube-prometheus/jsonnet/vendor/ksonnet/docs/images/kube-demo.gif deleted file mode 100644 index 2a1225d4..00000000 Binary files a/sources/kube-prometheus/jsonnet/vendor/ksonnet/docs/images/kube-demo.gif and /dev/null differ diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/docs/jsonnetIntro.md b/sources/kube-prometheus/jsonnet/vendor/ksonnet/docs/jsonnetIntro.md deleted file mode 100644 index 3eb675b0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/docs/jsonnetIntro.md +++ /dev/null @@ -1,215 +0,0 @@ -# Introduction to Jsonnet - -If you're not familiar with **Jsonnet**, this brief introduction can -help you get started with **ksonnet**. See also the **Jsonnet** -[tutorial][jsonnetTutorial]. - -## References, variables, simple JSON templating - -You can think of **Jsonnet** as a domain-specific language -that can be extended to provide templating for other -languages. Think JSON, but with: - -* variables ([lexically-scoped locals][jsonnetLocals] and - JsonPath-style [references][jsonnetReferences]) -* [functions][jsonnetFunctions] -* some notion of [object-oriented inheritance between JSON - objects][jsonnetOO] -* the ability to define libraries and [import][jsonnetImports] them -* [cleaner syntax][jsonnetSyntax]. - -This introdution focuses on the first three items. - -## Local variables and references - -In Jsonnet, you can define lexically-scoped local variables: - -```javascript -{ - local foo = "bar", - baz: foo, -} -``` - -which produces: - -```json -{ "baz": "bar" } -``` - -**Jsonnet** also exposes a `self` to access properties of the -current object, and a JsonPath-style `$`, which refers to the root -object (the grandparent that is farthest away from the `$`): - -```javascript -{ - foo: "bar", - baz: self.foo, - cow: { - moo: $.foo, - }, -} -``` - -```json -{ - "foo": "bar", - "baz": "bar", - "cow": { "moo": "bar" } -} -``` - -It is worth noting that both `local` variables and references are -_order-independent_, which is a decision that largely falls out of -JSON's design. Notice, for example, that if we re-order `foo` and -`baz`, it does not affect the output of Jsonnet: - -```javascript -{ - baz: self.foo, - cow: { - moo: $.foo, - }, - - // This is perfectly legal. - foo: "bar", -} -``` - -## Functions - -Jsonnet implements lexically-scoped functions, but they can be -declared in a few ways, and it's worth pointing them out. - -In the example below, note the use of the double colon (`::`) in -the declaration of `function2`. This marks the field as _hidden_, -which is a concept we will look closer at in the section on -object-orientation. For now, it is only important to understand that a -function must be either `local` or hidden with `::`, because Jsonnet -doesn't know how to render a function as JSON data. (Instead of -rendering it, Jsonnet will complain and crash.) - -```javascript -{ - local function1(arg1) = { foo: arg1 }, - function2(arg1="cluck"):: { bar: arg1 }, - cow: function1("moo"), - chicken: self.function2(), -} -``` - -```json -{ - "chicken": { - "bar": "cluck" - }, - "cow": { - "foo": "moo" - } -} -``` - -## Object-orientation (inheritance, mixins) - -One of Jsonnet's most powerful features, which we use liberally in -this tutorial and in **ksonnet**, is its object model, which -implements a concise, [well-specified _algebra_][jsonnetAlgebra] for -combining JSON-like objects. - -The primary tool for combining objects is the `+` operator. In this -example we see two objects (the first is called the _parent_, or -_base_, and the second is called the _child_) that are combined with -the `+`. The child (which is said to _inherit_ from the parent) -overwrites the `bar` property that was defined in the parent: - -```javascript - -{ - // Parent object. - foo: "foo", - bar: "bar", -} + { - // Child object. - bar: "fubar", -} -``` - -```json -{ - "bar": "fubar", - "foo": "foo" -} -``` - -It is sometimes convenient for a child to reference members of the -parent, so Jsonnet also exposes `super`, which behaves a lot like -`self`, except in reference to the parent: - -```javascript -{ - foo: "foo", -} + { - bar: super.foo + "bar", -} -``` - -```json -{ - "bar": "foobar", - "foo": "foo" -} -``` - -One interesting aspect of `super` is that it can be "mixed in", -meaning that if you have an object that refers to `super.bar`, then it -can dynamically be made to inherit from _any object_ that has a `bar` -property. For example: - -```javascript -local fooTheBar = { bar: super.bar + "foo" }; -{ - bar: "bar", -} + fooTheBar -``` - -```json -{ - "bar": "barfoo" -} -``` - -This stands in contrast to the object model of (say) Java, where you -would have to declare at compile time an `Animal` class before a `Dog` -class could be made to inherit from it. The technique above (called a -_mixin_) causes the object to inherit dynamically, at runtime rather -than compile time. - -Lastly, Jsonnet allows you to create hidden properties, not included -when we generate the final JSON. Denoted with with a `::`, they are -also visible to all descendent objects (_i.e._, children, -grandchildren, _etc_.), and are useful for holding data you'd like to -use to construct other properties, but not expose as part of the -generated JSON itself: - -```javascript -{ - foo:: "foo", -} + { - bar: super.foo + "bar", -} -``` - -```json -{ - "bar": "foobar" -} -``` - -[jsonnetTutorial]: http://jsonnet.org/docs/tutorial.html "Jsonnet tutorial" -[jsonnetSyntax]: http://jsonnet.org/docs/tutorial.html#syntax_improvements "Jsonnet syntax improvements" -[jsonnetFunctions]: http://jsonnet.org/docs/tutorial.html#functions "Jsonnet functions" -[jsonnetLocals]: http://jsonnet.org/docs/tutorial.html#locals "Jsonnet local variables" -[jsonnetReferences]: http://jsonnet.org/docs/tutorial.html#references "Jsonnet references" -[jsonnetImports]: http://jsonnet.org/docs/tutorial.html#imports "Jsonnet imports" -[jsonnetOO]: http://jsonnet.org/docs/tutorial.html#oo "Jsonnet OO" -[jsonnetAlgebra]: http://jsonnet.org/language/spec.html#properties "Jsonnet inheritance algebra" diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/examples/readme/hello-nginx.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/examples/readme/hello-nginx.jsonnet deleted file mode 100644 index 9ed242b3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/examples/readme/hello-nginx.jsonnet +++ /dev/null @@ -1,19 +0,0 @@ -// This expects to be run with `jsonnet -J ` -local k = import "ksonnet.beta.2/k.libsonnet"; - -// Specify the import objects that we need -local container = k.extensions.v1beta1.deployment.mixin.spec.template.spec.containersType; -local containerPort = container.portsType; -local deployment = k.extensions.v1beta1.deployment; - -local targetPort = 80; -local podLabels = {app: "nginx"}; - -local nginxContainer = - container.new("nginx", "nginx:1.7.9") + - container.ports(containerPort.containerPort(targetPort)); - -local nginxDeployment = - deployment.new("nginx-deployment", 2, nginxContainer, podLabels); - -k.core.v1.list.new(nginxDeployment) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/Gopkg.toml b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/Gopkg.toml deleted file mode 100644 index cab822c0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/Gopkg.toml +++ /dev/null @@ -1,27 +0,0 @@ -[[constraint]] - name = "github.com/blang/semver" - version = "3.5.1" - -[[constraint]] - branch = "master" - name = "github.com/go-openapi/spec" - -[[constraint]] - branch = "master" - name = "github.com/go-openapi/swag" - -[[constraint]] - name = "github.com/google/go-jsonnet" - version = "0.10.0" - -[[constraint]] - name = "github.com/pkg/errors" - version = "0.8.0" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.2.1" - -[prune] - go-tests = true - unused-packages = true diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/README.md b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/README.md deleted file mode 100644 index 7ee0077d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# ksonnet-gen - -`ksonnet-gen` takes the OpenAPI Kubernetes specification and generates -a Jsonnet file representing that API definition. - -## Build - -```bash -dep ensure # Fetch dependencies -go build -o ksonnet-gen . -``` - -## Usage - -`ksonnet-gen [path to k8s OpenAPI swagger.json] [output dir]` - -Typically the swagger spec is in something like -`k8s.io/kubernetes/api/openapi-spec`, where `k8s.io` is in your Go src -folder. diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/astext/astext.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/astext/astext.go deleted file mode 100644 index bedb29e6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/astext/astext.go +++ /dev/null @@ -1,62 +0,0 @@ -package astext - -import ( - "regexp" - - "github.com/google/go-jsonnet/ast" - "github.com/pkg/errors" -) - -// ObjectFields is a slice of ObjectField. -type ObjectFields []ObjectField - -// ObjectField wraps ast.ObjectField and adds commenting and the ability to -// be printed on one line. -type ObjectField struct { - ast.ObjectField - - // Comment is a comment for the object field. - Comment *Comment - - // Oneline prints this field on a single line. - Oneline bool -} - -// Object wraps ast.Object and adds the ability to be printed on one line. -type Object struct { - ast.Object - - Fields []ObjectField - - // Oneline prints this field on a single line. - Oneline bool -} - -var ( - // reFieldStr matches a field id that should be enclosed in quotes. - reFieldStr = regexp.MustCompile(`^([_A-Za-z0-9\.]?[A-Za-z0-9\-_\.]+(\.[A-Za-z0-9\-_]+)*)?$`) - // reField matches a field id. - reField = regexp.MustCompile(`^[_A-Za-z]+[_A-Za-z0-9]*$`) -) - -// CreateField creates an ObjectField with a name. If the name matches `reFieldStr`, it will -// create an ObjectField with Kind `ObjectFieldStr`. If not, it will create an identifier -// and set the ObjectField kind to `ObjectFieldId`. -func CreateField(name string) (*ObjectField, error) { - of := ObjectField{ObjectField: ast.ObjectField{}} - if reField.MatchString(name) { - id := ast.Identifier(name) - of.Kind = ast.ObjectFieldID - of.Id = &id - } else if reFieldStr.MatchString(name) { - of.Expr1 = &ast.LiteralString{ - Value: name, - Kind: ast.StringDouble, - } - of.Kind = ast.ObjectFieldStr - } else { - return nil, errors.Errorf("invalid field name %q", name) - } - - return &of, nil -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/astext/astext_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/astext/astext_test.go deleted file mode 100644 index 3f98e7b7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/astext/astext_test.go +++ /dev/null @@ -1,107 +0,0 @@ -package astext - -import ( - "testing" - - "github.com/google/go-jsonnet/ast" - "github.com/stretchr/testify/require" -) - -func TestCreateField(t *testing.T) { - id := ast.Identifier("name") - uID := ast.Identifier("underscore_name") - leadingID := ast.Identifier("__leading") - - cases := []struct { - name string - isErr bool - expected *ObjectField - }{ - { - name: "name", - expected: &ObjectField{ - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, Id: &id}}, - }, - { - name: "underscore_name", - expected: &ObjectField{ - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, Id: &uID}}, - }, - { - name: "underscore_field-", - expected: &ObjectField{ - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldStr, - Expr1: &ast.LiteralString{ - Value: "underscore_field-", - Kind: ast.StringDouble, - }}}, - }, - { - name: "dashed-name", - expected: &ObjectField{ - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldStr, - Expr1: &ast.LiteralString{ - Value: "dashed-name", - Kind: ast.StringDouble, - }}}, - }, - { - name: "__leading", - expected: &ObjectField{ - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Id: &leadingID, - }}, - }, - { - name: "dot.name", - expected: &ObjectField{ - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldStr, - Expr1: &ast.LiteralString{ - Value: "dot.name", - Kind: ast.StringDouble, - }}}, - }, - { - name: ".", - expected: &ObjectField{ - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldStr, - Expr1: &ast.LiteralString{ - Value: ".", - Kind: ast.StringDouble, - }}}, - }, - { - name: "9p", - expected: &ObjectField{ - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldStr, - Expr1: &ast.LiteralString{ - Value: "9p", - Kind: ast.StringDouble, - }}}, - }, - { - name: "invalid$", - isErr: true, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - got, err := CreateField(tc.name) - if tc.isErr { - require.Error(t, err) - } else { - require.NoError(t, err) - require.Equal(t, tc.expected, got) - } - }) - } -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/astext/extensions.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/astext/extensions.go deleted file mode 100644 index 0b5eb436..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/astext/extensions.go +++ /dev/null @@ -1,8 +0,0 @@ -package astext - -// extensions for ast that could live upstream - -// Comment is a comment. -type Comment struct { - Text string // represents a single line comment -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/jsonnet/rewrite.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/jsonnet/rewrite.go deleted file mode 100644 index 4e53a314..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/jsonnet/rewrite.go +++ /dev/null @@ -1,123 +0,0 @@ -// Package jsonnet contains a collection of simple rewriting -// facilities that allow us to easily map text from the OpenAPI spec -// to things that are Jsonnet-friendly (e.g., renaming identifiers -// that are Jsonnet keywords, lowerCamelCase'ing names, and so on). -package jsonnet - -import ( - "fmt" - "log" - "strings" - - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/kubespec" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/kubeversion" -) - -// FieldKey represents the literal text of a key for some JSON object -// field, after rewriting to avoid collisions with Jsonnet keywords. -// For example, for `{foo: ...}`, the `FieldKey` would be `foo`, while -// for `{error: ...}`, the `FieldKey` would be `"error"` (with -// quotation marks, to avoid collisions). -type FieldKey string - -// FuncParam represents the parameter to a Jsonnet function, after -// being rewritten to avoid collisions with Jsonnet keywords and -// normalized to fit the Jsonnet style (i.e., lowerCamelCase) using a -// manual set of custom transformations that change per Kubernetes -// version. For example, in `foo(BarAPI) {...}`, `FuncParam` would be -// `barApi`, and in `foo(error) {...}`, `FuncParam` would be -// `errorParam`. -type FuncParam string - -// Identifier represents any identifier in a Jsonnet program, after -// being normalized to fit the Jsonnet style (i.e., lowerCamelCase) -// using a manual set of custom transformations that change per -// Kubernetes version. For example, `fooAPI` becomes `fooApi`. -type Identifier string - -func (id Identifier) ToSetterID() Identifier { - return Identifier("with" + strings.Title(string(id))) -} - -func (id Identifier) ToMixinID() Identifier { - return Identifier("with" + strings.Title(string(id)) + "Mixin") -} - -// RewriteAsFieldKey takes a `PropertyName` and converts it to a valid -// Jsonnet field name. For example, if the `PropertyName` has a value -// of `"error"`, then this would generate an invalid object, `{error: -// ...}`. Hence, this function will quote this string, so that it ends -// up like: `{"error": ...}`. -func RewriteAsFieldKey(text kubespec.PropertyName) FieldKey { - // NOTE: Because the field needs to have precisely the same text as - // the Kubernetes API spec, we do not compute a version-specific ID - // alias as we do for other rewrites. - if _, ok := jsonnetKeywordSet[text]; ok { - return FieldKey(fmt.Sprintf("\"%s\"", text)) - } - return FieldKey(text) -} - -// RewriteAsFuncParam takes a `PropertyName` and converts it to a -// valid Jsonnet function parameter. For example, if the -// `PropertyName` has a value of `"error"`, then this would generate -// an invalid function parameter, `function(error) ...`. Hence, this -// function will alter the identifier, so that it ends up like: -// `function(errorParam) ...`. -// -// NOTE: This transformation involves a hand-curated style change to -// lowerCamelCase (e.g., `fooAPI` -> `fooApi`). This list changes per -// Kubernetes version, according to identifiers that don't conform to -// this style. -func RewriteAsFuncParam( - k8sVersion string, text kubespec.PropertyName, -) FuncParam { - id := RewriteAsIdentifier(k8sVersion, text) - if _, ok := jsonnetKeywordSet[kubespec.PropertyName(id)]; ok { - return FuncParam(fmt.Sprintf("%sParam", id)) - } - return FuncParam(id) -} - -// RewriteAsIdentifier takes a `GroupName`, `ObjectKind`, -// `PropertyName`, or `string`, and converts it to a Jsonnet-style -// Identifier. Typically this includes lower-casing the first letter, -// but also changing initialisms like fooAPI -> fooApi. -// -// NOTE: This transformation involves a hand-curated style change to -// lowerCamelCase (e.g., `fooAPI` -> `fooApi`). This list changes per -// Kubernetes version, according to identifiers that don't conform to -// this style. -func RewriteAsIdentifier( - k8sVersion string, rawID fmt.Stringer, -) Identifier { - var id = rawID.String() - - if len(id) == 0 { - log.Fatalf("Can't lowercase first letter of 0-rune string") - } - kindString := kubeversion.MapIdentifier(k8sVersion, id) - - upper := strings.ToLower(kindString[:1]) - return Identifier(upper + kindString[1:]) -} - -var jsonnetKeywordSet = map[kubespec.PropertyName]string{ - "assert": "assert", - "else": "else", - "error": "error", - "false": "false", - "for": "for", - "function": "function", - "if": "if", - "import": "import", - "importstr": "importstr", - "in": "in", - "local": "local", - "null": "null", - "tailstrict": "tailstrict", - "then": "then", - "self": "self", - "super": "super", - "true": "true", -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/jsonnet/rewrite_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/jsonnet/rewrite_test.go deleted file mode 100644 index f4177856..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/jsonnet/rewrite_test.go +++ /dev/null @@ -1,122 +0,0 @@ -package jsonnet - -import "testing" -import "github.com/ksonnet/ksonnet-lib/ksonnet-gen/kubespec" - -var fieldKeyTests = map[kubespec.PropertyName]FieldKey{ - "assert": "\"assert\"", - "else": "\"else\"", - "error": "\"error\"", - "false": "\"false\"", - "for": "\"for\"", - "function": "\"function\"", - "if": "\"if\"", - "import": "\"import\"", - "importstr": "\"importstr\"", - "in": "\"in\"", - // TODO: this needs to be resolved - // "local": "\"local\"", - "null": "\"null\"", - "tailstrict": "\"tailstrict\"", - "then": "\"then\"", - "self": "\"self\"", - "super": "\"super\"", - "true": "\"true\"", -} - -var funcParamTests = map[kubespec.PropertyName]FuncParam{ - "assert": "assertParam", - "else": "elseParam", - "error": "errorParam", - "false": "falseParam", - "for": "forParam", - "function": "functionParam", - "if": "ifParam", - "import": "importParam", - "importstr": "importstrParam", - "in": "inParam", - // TODO: this needs to be resolved - // "local": "localParam", - "null": "nullParam", - "tailstrict": "tailstrictParam", - "then": "thenParam", - "self": "selfParam", - "super": "superParam", - "true": "trueParam", -} - -var identifierTests = map[kubespec.PropertyName]Identifier{ - "hostIPC": "hostIpc", - "hostPID": "hostPid", - "targetCPUUtilizationPercentage": "targetCpuUtilizationPercentage", - "externalID": "externalId", - "podCIDR": "podCidr", - "providerID": "providerId", - "bootID": "bootId", - "machineID": "machineId", - "systemUUID": "systemUuid", - "volumeID": "volumeId", - "diskURI": "diskUri", - "targetWWNs": "targetWwns", - "datasetUUID": "datasetUuid", - "pdID": "pdId", - "scaleIO": "scaleIo", - "podIP": "podIp", - "hostIP": "hostIp", - "clusterIP": "clusterIp", - "externalIPs": "externalIps", - "loadBalancerIP": "loadBalancerIp", -} - -func TestRewriteAsFieldKey(t *testing.T) { - for keyword, target := range fieldKeyTests { - actual := RewriteAsFieldKey(keyword) - if target != actual { - t.Errorf("Expected '%s' got '%s'", target, actual) - } - } - - // Test rewrite is a no-op for other identifiers. - for id := range identifierTests { - target := FieldKey(id) - actual := RewriteAsFieldKey(kubespec.PropertyName(id)) - if target != actual { - t.Errorf("Expected '%s' got '%s'", target, actual) - } - } -} - -func TestRewriteAsFuncParam(t *testing.T) { - for keyword, target := range funcParamTests { - actual := RewriteAsFuncParam("v1.7.0", keyword) - if target != actual { - t.Errorf("Expected '%s' got '%s'", target, actual) - } - } - - // Test we also do aliasing for func parameters - for id, target := range identifierTests { - actual := RewriteAsFuncParam("v1.7.0", id) - if FuncParam(target) != actual { - t.Errorf("Expected '%s' got '%s'", target, actual) - } - } -} - -func TestRewriteAsIdentifier(t *testing.T) { - for id, target := range identifierTests { - actual := RewriteAsIdentifier("v1.7.0", id) - if target != actual { - t.Errorf("Expected '%s' got '%s'", target, actual) - } - } - - // Test rewrite is a no-op for keywords. - for keyword := range fieldKeyTests { - target := Identifier(keyword) - actual := RewriteAsIdentifier("v1.7.0", kubespec.PropertyName(keyword)) - if target != actual { - t.Errorf("Expected '%s' got '%s'", target, actual) - } - } -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/api_object.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/api_object.go deleted file mode 100644 index 6e1c7733..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/api_object.go +++ /dev/null @@ -1,99 +0,0 @@ -package ksonnet - -import ( - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" - "github.com/pkg/errors" -) - -// APIObject is an API object. -type APIObject struct { - resource Object - renderFieldsFn renderFieldsFn -} - -// NewAPIObject creates an instance of APIObject. -func NewAPIObject(resource Object) *APIObject { - ao := &APIObject{ - resource: resource, - renderFieldsFn: renderFields, - } - - return ao -} - -// Kind is the kind of api object this is. -func (a *APIObject) Kind() string { - return FormatKind(a.resource.Kind()) -} - -// Description is the description of this API object. -func (a *APIObject) Description() string { - return a.resource.Description() -} - -// Node returns an AST node for this api object. -func (a *APIObject) Node(catalog *Catalog) (*nm.Object, error) { - return apiObjectNode(catalog, a) -} - -func (a *APIObject) initNode(catalog *Catalog) (*nm.Object, error) { - o := nm.NewObject() - - if a.resource.IsType() { - kindObject := nm.OnelineObject() - kind := a.resource.Kind() - kindObject.Set(nm.InheritedKey("kind"), nm.NewStringDouble(kind)) - o.Set(nm.LocalKey("kind"), kindObject) - - ctorBase := []nm.Noder{ - nm.NewVar("apiVersion"), - nm.NewVar("kind"), - } - - a.setConstructors(o, ctorBase, objectConstructor()) - } else { - a.setConstructors(o, nil, nm.OnelineObject()) - } - - return o, nil -} - -func (a *APIObject) setConstructors(parent *nm.Object, ctorBase []nm.Noder, defaultCtorBody nm.Noder) error { - desc := makeDescriptor(a.resource.Codebase(), a.resource.Group(), a.resource.Kind()) - ctors := locateConstructors(desc) - - if len(ctors) > 0 { - for _, ctor := range ctors { - key, err := ctor.Key() - if err != nil { - return errors.Wrap(err, "generate constructor key") - } - - parent.Set(key, ctor.Body(ctorBase...)) - } - return nil - } - - parent.Set(nm.FunctionKey("new", []string{}), defaultCtorBody) - return nil - -} - -func objectConstructor() *nm.Binary { - return nm.NewBinary(nm.NewVar("apiVersion"), nm.NewVar("kind"), nm.BopPlus) -} - -func apiObjectNode(catalog *Catalog, a *APIObject) (*nm.Object, error) { - if catalog == nil { - return nil, errors.New("catalog is nil") - } - - o, err := a.initNode(catalog) - if err != nil { - return nil, err - } - if err := a.renderFieldsFn(catalog, o, "", a.resource.Properties()); err != nil { - return nil, err - } - return o, nil -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/api_object_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/api_object_test.go deleted file mode 100644 index e2d91a5f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/api_object_test.go +++ /dev/null @@ -1,86 +0,0 @@ -package ksonnet - -import ( - "testing" - - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" - "github.com/pkg/errors" - "github.com/stretchr/testify/require" -) - -func TestAPIObject_Kind(t *testing.T) { - c1 := Component{Group: "group2", Version: "v1", Kind: "Deployment"} - o1 := NewType("alpha", "desc", "codebase", "group", c1, nil) - ao := NewAPIObject(&o1) - - require.Equal(t, "deployment", ao.Kind()) -} - -func TestAPIObject_Description(t *testing.T) { - c1 := Component{Group: "group2", Version: "v1", Kind: "Deployment"} - o1 := NewType("alpha", "desc", "codebase", "group", c1, nil) - ao := NewAPIObject(&o1) - - require.Equal(t, "desc", ao.Description()) -} - -func TestAPIObject_Node_with_type(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - t1 := NewField("io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", "desc", "apimachinery", "group", "ver", "Kind", nil) - ao := NewAPIObject(t1) - - n, err := ao.Node(c) - require.NoError(t, err) - - _, ok := n.Get("kind").(*nm.Object) - require.False(t, ok) - - require.NotNil(t, n.Get("new")) -} - -func TestAPIObject_Node_with_field(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - c1 := Component{Group: "group2", Version: "v1", Kind: "Deployment"} - - o1 := NewType("io.k8s.codebase.pkg.api.version.kind", "desc", "codebase", "group", c1, nil) - ao := NewAPIObject(&o1) - - n, err := ao.Node(c) - require.NoError(t, err) - - kindo, ok := n.Get("kind").(*nm.Object) - require.True(t, ok) - require.IsType(t, nm.NewObject(), kindo) - - kind, ok := kindo.Get("kind").(*nm.StringDouble) - require.True(t, ok) - require.Equal(t, nm.NewStringDouble("Deployment"), kind) - - require.NotNil(t, n.Get("new")) -} - -func TestAPIObject_Node_with_nil_catalog(t *testing.T) { - c1 := Component{Group: "group2", Version: "v1", Kind: "Deployment"} - o1 := NewType("alpha", "desc", "codebase", "group", c1, nil) - ao := NewAPIObject(&o1) - - _, err := ao.Node(nil) - require.Error(t, err) -} - -func TestAPIObject_Node_fails_when_renderer_fails(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - c1 := Component{Group: "group2", Version: "v1", Kind: "Deployment"} - o1 := NewType("alpha", "desc", "codebase", "group", c1, nil) - ao := NewAPIObject(&o1) - - ao.renderFieldsFn = func(typeLookup, *nm.Object, string, map[string]Property) error { - return errors.New("failed") - } - - _, err := ao.Node(c) - require.Error(t, err) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/buffer.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/buffer.go deleted file mode 100644 index 15dc6cce..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/buffer.go +++ /dev/null @@ -1,58 +0,0 @@ -package ksonnet - -import ( - "bytes" - "fmt" - "strings" -) - -// indentWriter abstracts the task of writing out indented text to a -// buffer. Different components can call `indent` and `dedent` as -// appropriate to specify how indentation needs to change, rather than -// to keep track of the current indentation. -// -// For example, if one component is responsible for writing an array, -// and an element in that array is a function, the component -// responsible for the array need only know to call `indent` after the -// '[' character and `dedent` before the ']' character, while the -// routine responsible for writing out the function can handle its own -// indentation independently. -type indentWriter struct { - depth int - err error - buffer bytes.Buffer -} - -func newIndentWriter() *indentWriter { - var buffer bytes.Buffer - return &indentWriter{ - depth: 0, - err: nil, - buffer: buffer, - } -} - -func (m *indentWriter) writeLine(text string) { - if m.err != nil { - return - } - prefix := strings.Repeat(" ", m.depth) - line := fmt.Sprintf("%s%s\n", prefix, text) - _, m.err = m.buffer.WriteString(line) -} - -func (m *indentWriter) bytes() ([]byte, error) { - if m.err != nil { - return nil, m.err - } - - return m.buffer.Bytes(), nil -} - -func (m *indentWriter) indent() { - m.depth++ -} - -func (m *indentWriter) dedent() { - m.depth-- -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/catalog.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/catalog.go deleted file mode 100644 index de81258b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/catalog.go +++ /dev/null @@ -1,336 +0,0 @@ -package ksonnet - -import ( - "strings" - - "github.com/blang/semver" - "github.com/go-openapi/spec" - "github.com/pkg/errors" -) - -var ( - blockedReferences = []string{ - "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "io.k8s.apimachinery.pkg.apis.meta.v1.Status", - } - - blockedPropertyNames = []string{ - "status", - "apiVersion", - "kind", - } -) - -// ExtractFn is a function which extracts properties from a schema. -type ExtractFn func(*Catalog, map[string]spec.Schema, []string) (map[string]Property, error) - -// CatalogOpt is an option for configuring Catalog. -type CatalogOpt func(*Catalog) - -// CatalogOptExtractProperties is a Catalog option for setting the property -// extractor. -func CatalogOptExtractProperties(fn ExtractFn) CatalogOpt { - return func(c *Catalog) { - c.extractFn = fn - } -} - -// CatalogOptChecksum is a Catalog option for setting the checksum of the swagger schema. -func CatalogOptChecksum(checksum string) CatalogOpt { - return func(c *Catalog) { - c.checksum = checksum - } -} - -// Catalog is a catalog definitions -type Catalog struct { - apiSpec *spec.Swagger - extractFn ExtractFn - apiVersion semver.Version - paths map[string]Component - checksum string - - // memos - typesCache []Type - fieldsCache []Field -} - -// NewCatalog creates an instance of Catalog. -func NewCatalog(apiSpec *spec.Swagger, opts ...CatalogOpt) (*Catalog, error) { - if apiSpec == nil { - return nil, errors.New("apiSpec is nil") - } - - if apiSpec.Info == nil { - return nil, errors.New("apiSpec Info is nil") - } - - parts := strings.SplitN(apiSpec.Info.Version, ".", 3) - parts[0] = strings.TrimPrefix(parts[0], "v") - vers := strings.Join(parts, ".") - apiVersion, err := semver.Parse(vers) - if err != nil { - return nil, errors.Wrap(err, "invalid apiSpec version") - } - - paths, err := parsePaths(apiSpec) - if err != nil { - return nil, errors.Wrap(err, "parse apiSpec paths") - } - - c := &Catalog{ - apiSpec: apiSpec, - extractFn: extractProperties, - apiVersion: apiVersion, - paths: paths, - } - - for _, opt := range opts { - opt(c) - } - - return c, nil -} - -// Checksum returns the checksum of the swagger schema. -func (c *Catalog) Checksum() string { - return c.checksum -} - -// Version returns the Kubernetes API version represented by this Catalog. -func (c *Catalog) Version() string { - return c.apiVersion.String() -} - -// Types returns a slice of all types. -func (c *Catalog) Types() ([]Type, error) { - if c.typesCache != nil { - return c.typesCache, nil - } - - var resources []Type - - for name, schema := range c.definitions() { - desc, err := ParseDescription(name) - if err != nil { - return nil, errors.Wrapf(err, "parse description for %s", name) - } - - // If there is a path, we can update it as a first class object - // in the API. This makes this schema a type. - component, ok := c.paths[name] - if !ok { - continue - } - - props, err := c.extractFn(c, schema.Properties, schema.Required) - if err != nil { - return nil, errors.Wrapf(err, "extract propererties from %s", name) - } - - kind := NewType(name, schema.Description, desc.Codebase, desc.Group, component, props) - - resources = append(resources, kind) - } - - c.typesCache = resources - - return resources, nil -} - -// Fields returns a slice of all fields. -func (c *Catalog) Fields() ([]Field, error) { - if c.fieldsCache != nil { - return c.fieldsCache, nil - } - - var types []Field - - for name, schema := range c.definitions() { - desc, err := ParseDescription(name) - if err != nil { - return nil, errors.Wrapf(err, "parse description for %s", name) - } - - // If there is a path, this should not be a hidden object. This - // makes this schema a field. - if _, ok := c.paths[name]; ok { - continue - } - - props, err := c.extractFn(c, schema.Properties, schema.Required) - if err != nil { - return nil, errors.Wrapf(err, "extract propererties from %s", name) - } - t := NewField(name, schema.Description, desc.Codebase, desc.Group, desc.Version, desc.Kind, props) - types = append(types, *t) - } - - c.fieldsCache = types - return types, nil -} - -func (c *Catalog) isFormatRef(name string) (bool, error) { - schema, ok := c.apiSpec.Definitions[name] - if !ok { - return false, errors.Errorf("%s was not found", name) - } - - if schema.Format != "" { - return true, nil - } - - return false, nil -} - -// Field returns a field by definition id. If the type cannot be found, it returns an error. -func (c *Catalog) Field(name string) (*Field, error) { - types, err := c.Fields() - if err != nil { - return nil, err - } - - for _, ty := range types { - if ty.Identifier() == name { - return &ty, nil - } - } - - return nil, errors.Errorf("%s was not found", name) -} - -// Resource returns a resource by group, version, kind. If the field cannot be found, -// it returns an error -func (c *Catalog) Resource(group, version, kind string) (*Type, error) { - resources, err := c.Types() - if err != nil { - return nil, err - } - - for _, resource := range resources { - if group == resource.Group() && - version == resource.Version() && - kind == resource.Kind() { - return &resource, nil - } - } - - return nil, errors.Errorf("unable to find %s.%s.%s", - group, version, kind) -} - -// TypeByID returns a type by identifier. -func (c *Catalog) TypeByID(id string) (*Type, error) { - resources, err := c.Types() - if err != nil { - return nil, err - } - - for _, resource := range resources { - if resource.Identifier() == id { - return &resource, nil - } - } - - return nil, errors.Errorf("unable to find type %q", id) -} - -// TypesWithDescendant returns types who have the specified definition as a descendant. -// This list does not include List types (e.g. DeploymentList). -func (c *Catalog) TypesWithDescendant(definition string) ([]Type, error) { - types, err := c.Types() - if err != nil { - return nil, errors.Wrap(err, "retrieve types") - } - - var out []Type - for _, ty := range types { - - if strings.HasSuffix(ty.Kind(), "List") { - continue - } - tf, err := c.descend(definition, ty.Properties()) - if err != nil { - return nil, err - } - - if tf { - out = append(out, ty) - } - } - - return out, nil -} - -func (c *Catalog) find(id string) (Object, error) { - f, err := c.Field(id) - if err == nil { - return f, nil - } - - t, err := c.TypeByID(id) - if err != nil { - return nil, errors.Errorf("unable to find object %q", id) - } - - return t, nil -} - -func (c *Catalog) descend(definition string, m map[string]Property) (bool, error) { - - for _, prop := range m { - if ref := prop.Ref(); ref != "" { - - if ref == definition { - return true, nil - } - - // NOTE: if this is a reference to json schema, bail out because this is recursive. - if ref == "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" { - continue - } - - f, err := c.find(ref) - if err != nil { - return false, errors.Wrapf(err, "find field %s", ref) - } - - tf, err := c.descend(definition, f.Properties()) - if err != nil { - return false, err - } - - if tf { - return true, nil - } - } - } - - return false, nil -} - -func isValidDefinition(name string, ver semver.Version) bool { - checkVer := semver.Version{Major: 1, Minor: 7} - if ver.GTE(checkVer) { - return !strings.HasPrefix(name, "io.k8s.kubernetes.pkg.api") - } - - return true -} - -// extractRef extracts a ref from a schema. -func extractRef(schema spec.Schema) string { - return strings.TrimPrefix(schema.Ref.String(), "#/definitions/") -} - -func (c *Catalog) definitions() spec.Definitions { - out := spec.Definitions{} - - for name, schema := range c.apiSpec.Definitions { - if isValidDefinition(name, c.apiVersion) { - out[name] = schema - } - } - - return out -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/catalog_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/catalog_test.go deleted file mode 100644 index ed894aca..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/catalog_test.go +++ /dev/null @@ -1,258 +0,0 @@ -package ksonnet - -import ( - "io/ioutil" - "sort" - "testing" - - "github.com/go-openapi/spec" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/kubespec" - "github.com/pkg/errors" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -var ( - apiSpecCache = map[string]*spec.Swagger{} -) - -func initCatalog(t *testing.T, file string, opts ...CatalogOpt) *Catalog { - apiSpec := apiSpecCache[file] - if apiSpec == nil { - var err error - apiSpec, _, err = kubespec.Import(testdata(file)) - require.NoError(t, err) - - apiSpecCache[file] = apiSpec - } - - c, err := NewCatalog(apiSpec, opts...) - require.NoError(t, err) - - return c -} - -func TestCatalog_nil_apiSpec(t *testing.T) { - _, err := NewCatalog(nil) - require.Error(t, err) -} - -func TestCatalog_Types(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - resources, err := c.Types() - require.NoError(t, err) - - var found bool - for _, resource := range resources { - if resource.Identifier() == "io.k8s.api.apps.v1beta1.Deployment" { - found = true - } - } - - require.True(t, found) -} - -func TestCatalog_Resources_invalid_description(t *testing.T) { - source, err := ioutil.ReadFile("testdata/invalid_definition.json") - require.NoError(t, err) - - apiSpec, err := kubespec.CreateAPISpec(source) - require.NoError(t, err) - - c, err := NewCatalog(apiSpec) - require.NoError(t, err) - - _, err = c.Types() - assert.Error(t, err) - - _, err = c.Resource("group", "version", "kind") - assert.Error(t, err) -} - -func TestCatalog_Resources_invalid_field_properties(t *testing.T) { - fn := func(*Catalog, map[string]spec.Schema, []string) (map[string]Property, error) { - return nil, errors.New("failed") - } - - opt := CatalogOptExtractProperties(fn) - - c := initCatalog(t, "swagger-1.8.json", opt) - - _, err := c.Types() - require.Error(t, err) -} - -func TestCatalog_Resource(t *testing.T) { - cases := []struct { - name string - group string - version string - kind string - isErr bool - }{ - {name: "valid id", group: "apps", version: "v1beta2", kind: "Deployment"}, - {name: "unknown kind", group: "apps", version: "v1beta2", kind: "Foo", isErr: true}, - {name: "unknown version", group: "apps", version: "Foo", kind: "Foo", isErr: true}, - {name: "unknown group", group: "Foo", version: "Foo", kind: "Foo", isErr: true}, - } - - c := initCatalog(t, "swagger-1.8.json") - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - r, err := c.Resource(tc.group, tc.version, tc.kind) - if tc.isErr { - require.Error(t, err) - } else { - require.NoError(t, err) - - t.Logf("id is %s", r.Identifier()) - - require.Equal(t, tc.group, r.Group()) - require.Equal(t, tc.version, r.Version()) - require.Equal(t, tc.kind, r.Kind()) - } - }) - } -} - -func TestCatalog_Fields(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - fields, err := c.Fields() - require.NoError(t, err) - - var found bool - for _, field := range fields { - if field.Identifier() == "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" { - found = true - } - } - - require.True(t, found) -} - -func TestCatalog_Fields_invalid_description(t *testing.T) { - source, err := ioutil.ReadFile("testdata/invalid_definition.json") - require.NoError(t, err) - - apiSpec, err := kubespec.CreateAPISpec(source) - require.NoError(t, err) - - c, err := NewCatalog(apiSpec) - require.NoError(t, err) - - _, err = c.Fields() - assert.Error(t, err) - - _, err = c.Field("anything") - assert.Error(t, err) -} - -func TestCatalog_Fields_invalid_field_properties(t *testing.T) { - fn := func(*Catalog, map[string]spec.Schema, []string) (map[string]Property, error) { - return nil, errors.New("failed") - } - - opt := CatalogOptExtractProperties(fn) - - c := initCatalog(t, "swagger-1.8.json", opt) - - _, err := c.Fields() - require.Error(t, err) -} - -func TestCatalog_Field(t *testing.T) { - cases := []struct { - name string - id string - isErr bool - }{ - {name: "valid id", id: "io.k8s.apimachinery.pkg.apis.meta.v1.Initializers"}, - {name: "missing", id: "missing", isErr: true}, - } - - c := initCatalog(t, "swagger-1.8.json") - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - ty, err := c.Field(tc.id) - if tc.isErr { - require.Error(t, err) - } else { - require.NoError(t, err) - - require.Equal(t, tc.id, ty.Identifier()) - } - }) - } -} - -func TestCatalog_TypesWithDescendant(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - types, err := c.TypesWithDescendant("io.k8s.api.core.v1.PodSpec") - require.NoError(t, err) - - var names []string - for _, ty := range types { - names = append(names, ty.component.String()) - } - - sort.Strings(names) - - expected := []string{ - "apps.v1beta1.Deployment", - "apps.v1beta1.StatefulSet", - "apps.v1beta2.DaemonSet", - "apps.v1beta2.Deployment", - "apps.v1beta2.ReplicaSet", - "apps.v1beta2.StatefulSet", - "batch.v1.Job", - "batch.v1beta1.CronJob", - "batch.v2alpha1.CronJob", - "core.v1.Pod", - "core.v1.PodTemplate", - "core.v1.ReplicationController", - "extensions.v1beta1.DaemonSet", - "extensions.v1beta1.Deployment", - "extensions.v1beta1.ReplicaSet", - } - require.Equal(t, expected, names) -} - -func TestCatalog_isFormatRef(t *testing.T) { - cases := []struct { - name string - isFormatRef bool - isErr bool - }{ - { - name: "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - }, - { - name: "missing", - isErr: true, - }, - { - name: "io.k8s.apimachinery.pkg.util.intstr.IntOrString", - isFormatRef: true, - }, - } - - c := initCatalog(t, "swagger-1.8.json") - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - tf, err := c.isFormatRef(tc.name) - if tc.isErr { - require.Error(t, err) - } else { - require.NoError(t, err) - - require.Equal(t, tc.isFormatRef, tf) - } - }) - } -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/component.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/component.go deleted file mode 100644 index 123aa18a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/component.go +++ /dev/null @@ -1,77 +0,0 @@ -package ksonnet - -import ( - "fmt" - - "github.com/go-openapi/spec" - "github.com/pkg/errors" -) - -const ( - extensionGroupVersionKind = "x-kubernetes-group-version-kind" -) - -// Component is resource information provided in the k8s swagger schema -// which contains the group, kind, and version for a definition. -type Component struct { - Group string - Kind string - Version string -} - -// NewComponent extracts component information from a schema. -func NewComponent(s spec.Schema) (*Component, error) { - re := componentExtractor{schema: s} - group := re.extract("group") - kind := re.extract("kind") - version := re.extract("version") - - if re.err != nil { - return nil, re.err - } - - return &Component{ - Group: group, - Kind: kind, - Version: version, - }, nil -} - -func (c *Component) String() string { - group := c.Group - if group == "" { - group = "core" - } - - return fmt.Sprintf("%s.%s.%s", group, c.Version, c.Kind) -} - -type componentExtractor struct { - err error - schema spec.Schema -} - -func (re *componentExtractor) extract(key string) string { - if re.err != nil { - return "" - } - - i, ok := re.schema.Extensions[extensionGroupVersionKind] - if !ok { - re.err = errors.New("no group/kind/version extension") - return "" - } - - s, ok := i.([]interface{}) - if ok { - m, ok := s[0].(map[string]interface{}) - if ok { - str, ok := m[key].(string) - if ok { - return str - } - } - } - - return "" -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/component_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/component_test.go deleted file mode 100644 index fb45349e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/component_test.go +++ /dev/null @@ -1,58 +0,0 @@ -package ksonnet - -import ( - "path/filepath" - "testing" - - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/kubespec" - "github.com/stretchr/testify/require" -) - -func testdata(name string) string { - return filepath.Join("testdata", name) -} - -func TestComponent(t *testing.T) { - cases := []struct { - name string - expected *Component - isErr bool - }{ - { - name: "io.k8s.api.apps.v1beta2.Deployment", - expected: &Component{ - Group: "apps", - Version: "v1beta2", - Kind: "Deployment", - }, - }, - { - name: "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - isErr: true, - }, - { - name: "missing", - isErr: true, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - apiSpec, _, err := kubespec.Import(testdata("swagger-1.8.json")) - require.NoError(t, err) - - schema := apiSpec.Definitions[tc.name] - - c, err := NewComponent(schema) - if tc.isErr { - require.Error(t, err) - - } else { - require.NoError(t, err) - require.Equal(t, tc.expected, c) - } - - }) - } - -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/constructors.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/constructors.go deleted file mode 100644 index fb496ec7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/constructors.go +++ /dev/null @@ -1,187 +0,0 @@ -package ksonnet - -import ( - "regexp" - "sort" - - "github.com/google/go-jsonnet/ast" - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" - "github.com/pkg/errors" -) - -var ( - // reCtorSetter is a regex that matches function names. It'll successfully - // match `withName`, `foo.withName`, and `foo.bar.withName`. - reCtorSetter = regexp.MustCompile(`((^.*?)\.)*(with\w+|mixinInstance)$`) -) - -func matchCtorSetter(in string) (string, string, error) { - match := reCtorSetter.FindAllStringSubmatch(in, -1) - if len(match) == 0 { - return "", "", errors.New("no match") - } - - cur := match[0] - if cur[1] == "" { - return "self", cur[3], nil - } - - return "self." + cur[2], cur[3], nil -} - -type constructor struct { - name string - params []constructorParam -} - -func newConstructor(name string, params ...constructorParam) *constructor { - return &constructor{ - name: name, - params: params, - } -} - -// Key creates an object key for the constructor. -func (c *constructor) Key() (nm.Key, error) { - var args []nm.OptionalArg - - for _, param := range c.params { - option, err := param.Option() - if err != nil { - return nm.Key{}, errors.Wrap(err, "unable to create key from param") - } - - args = append(args, option) - } - - key := nm.FunctionKey(c.name, []string{}, nm.KeyOptNamedParams(args...)) - return key, nil -} - -func (c *constructor) Body(baseNodes ...nm.Noder) nm.Noder { - var items []nm.Noder - for _, node := range baseNodes { - items = append(items, node) - } - - // collection functions so they can be de-duplicated. - funs := make(map[string][]argRef) - for _, param := range c.params { - path, fn, err := matchCtorSetter(param.function) - if err != nil { - // TODO should we handle this error? - continue - } - - if _, ok := funs[path]; !ok { - funs[path] = make([]argRef, 0) - } - - funs[path] = append(funs[path], argRef{name: param.name, fn: fn}) - } - - var funNames []string - for funName := range funs { - funNames = append(funNames, funName) - } - sort.Strings(funNames) - - for _, funName := range funNames { - - call := nm.NewCall(funName) - - var curApply *ctorApply - var addedCall bool - - ars := funs[funName] - sort.Slice(ars, func(i, j int) bool { - return ars[i].fn < ars[j].fn - }) - - for _, ar := range ars { - indexID := ast.Identifier(ar.fn) - index := &ast.Index{Id: &indexID} - if !addedCall { - index.Target = call.Node() - addedCall = true - } else { - index.Target = curApply.Node() - } - - arg := &ast.Var{Id: ast.Identifier(ar.name)} - apply := ast.Apply{ - Arguments: ast.Arguments{Positional: ast.Nodes{arg}}, - Target: index, - } - - curApply = &ctorApply{Apply: apply} - } - - items = append(items, curApply) - } - - return nm.Combine(items...) -} - -type ctorApply struct { - ast.Apply -} - -func (ca *ctorApply) Node() ast.Node { - return &ca.Apply -} - -type argRef struct { - name string - fn string -} - -type constructorParam struct { - name string - function string - defaultValue interface{} -} - -func newConstructorParam(name, function string, defaultValue interface{}) *constructorParam { - if defaultValue == nil { - defaultValue = "" - } - - return &constructorParam{ - name: name, - function: function, - defaultValue: defaultValue, - } -} - -func (cp *constructorParam) Option() (nm.OptionalArg, error) { - var node nm.Noder - - var err error - - switch t := cp.defaultValue.(type) { - case string: - node = nm.NewStringDouble(t) - case map[string]interface{}: - node, err = nm.KVFromMap(t) - if err != nil { - return nm.OptionalArg{}, errors.Wrap(err, "invalid parameter") - } - case []string: - var items []nm.Noder - for _, item := range t { - items = append(items, nm.NewStringDouble(item)) - } - node = nm.NewArray(items) - case float64: - node = nm.NewFloat(t) - case int: - node = nm.NewInt(t) - case bool: - node = nm.NewBoolean(t) - default: - return nm.OptionalArg{}, errors.Errorf("unable to use type %T in param", t) - } - - return nm.OptionalArg{Name: cp.name, Default: node}, nil -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/constructors_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/constructors_test.go deleted file mode 100644 index 859f4071..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/constructors_test.go +++ /dev/null @@ -1,172 +0,0 @@ -package ksonnet - -import ( - "bytes" - "io/ioutil" - "strings" - "testing" - - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/printer" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_matchCtorSetter(t *testing.T) { - cases := []struct { - name string - in string - path string - fn string - isErr bool - }{ - { - name: "with no path", - in: "withName", - fn: "withName", - path: "self", - }, - { - name: "with a path", - in: "foo.bar.baz.withName", - path: "self.foo.bar.baz", - fn: "withName", - }, - { - name: "unrecognized", - in: "invalid", - isErr: true, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - path, fn, err := matchCtorSetter(tc.in) - if tc.isErr { - require.Error(t, err) - } else { - assert.Equal(t, tc.path, path) - assert.Equal(t, tc.fn, fn) - } - }) - } -} - -func Test_constructor(t *testing.T) { - obj := map[string]interface{}{ - "key": "val", - } - - array := []string{"val"} - - params := []constructorParam{ - *newConstructorParam("name", "withName", nil), - *newConstructorParam("nestedName", "foo.bar.baz.withName", nil), - *newConstructorParam("nestedItem", "foo.bar.baz.withItem", nil), - *newConstructorParam("str", "withStr", "val"), - *newConstructorParam("obj", "withObj", obj), - *newConstructorParam("array", "withArray", array), - *newConstructorParam("other", "other.withArray", nil), - *newConstructorParam("foo", "last.path.withFoo", nil), - } - - c := newConstructor("new", params...) - - o := nm.NewObject() - - ctorBase := []nm.Noder{ - nm.NewVar("apiVersion"), - nm.NewVar("kind"), - } - - key, err := c.Key() - require.NoError(t, err) - o.Set(key, c.Body(ctorBase...)) - - var buf bytes.Buffer - err = printer.Fprint(&buf, o.Node()) - require.NoError(t, err) - - testData, err := ioutil.ReadFile("testdata/constructor.libsonnet") - require.NoError(t, err) - - got := strings.TrimSpace(buf.String()) - expected := strings.TrimSpace(string(testData)) - assert.Equal(t, expected, got) -} - -func Test_constructorParam(t *testing.T) { - obj, err := nm.KVFromMap(map[string]interface{}{"alpha": "beta"}) - require.NoError(t, err) - - cases := []struct { - name string - cp *constructorParam - option nm.OptionalArg - isOptErr bool - }{ - { - name: "local property", - cp: newConstructorParam("name", "withName", nil), - option: nm.OptionalArg{Name: "name", Default: nm.NewStringDouble("")}, - }, - { - name: "nested property", - cp: newConstructorParam("name", "foo.bar.baz.withName", nil), - option: nm.OptionalArg{Name: "name", Default: nm.NewStringDouble("")}, - }, - { - name: "string", - cp: newConstructorParam("name", "withName", "name"), - option: nm.OptionalArg{Name: "name", Default: nm.NewStringDouble("name")}, - }, - { - name: "map[string]interface{}", - cp: newConstructorParam("name", "withName", map[string]interface{}{"alpha": "beta"}), - option: nm.OptionalArg{Name: "name", Default: obj}, - }, - { - name: "invalid item in map[string]interface{}", - cp: newConstructorParam("name", "withName", map[string]interface{}{"alpha": []int{1}}), - isOptErr: true, - }, - { - name: "array of strings", - cp: newConstructorParam("name", "withName", []string{"one", "two"}), - option: nm.OptionalArg{Name: "name", - Default: nm.NewArray([]nm.Noder{nm.NewStringDouble("one"), nm.NewStringDouble("two")})}, - }, - { - name: "float64", - cp: newConstructorParam("name", "withName", 1.0), - option: nm.OptionalArg{Name: "name", Default: nm.NewFloat(1.0)}, - }, - { - name: "int", - cp: newConstructorParam("name", "withName", 1), - option: nm.OptionalArg{Name: "name", Default: nm.NewInt(1)}, - }, - { - name: "bool", - cp: newConstructorParam("name", "withName", true), - option: nm.OptionalArg{Name: "name", Default: nm.NewBoolean(true)}, - }, - { - name: "unknown type", - cp: newConstructorParam("name", "withName", []int{1}), - isOptErr: true, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - option, err := tc.cp.Option() - if tc.isOptErr { - require.Error(t, err) - } else { - require.NoError(t, err) - assert.Equal(t, tc.option, option) - } - }) - } -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/custom_constructor.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/custom_constructor.go deleted file mode 100644 index 638f5c30..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/custom_constructor.go +++ /dev/null @@ -1,215 +0,0 @@ -package ksonnet - -// NOTE: custom constructors will be removed at ksonnet 0.11 - -func locateConstructors(desc Description) []constructor { - ctors, ok := customConstructors[desc] - if !ok { - return nil - } - - return ctors -} - -func makeDescriptor(codebase, group, kind string) Description { - return Description{ - Codebase: codebase, - Group: group, - Kind: kind, - } -} - -var ( - customConstructors = map[Description][]constructor{ - makeDescriptor("api", "apps", "Deployment"): deploymentCtor, - makeDescriptor("api", "apps", "DeploymentList"): objectList, - makeDescriptor("api", "apps", "DeploymentRollback"): deploymentRollbackCtor, - makeDescriptor("api", "apps", "Scale"): scaleCtor, - makeDescriptor("api", "apps", "StatefulSet"): statefulSetCtor, - makeDescriptor("api", "apps", "StatefulSetList"): objectList, - - makeDescriptor("api", "extensions", "Deployment"): deploymentCtor, - makeDescriptor("api", "extensions", "DeploymentList"): objectList, - makeDescriptor("api", "extensions", "DeploymentRollback"): deploymentRollbackCtor, - makeDescriptor("api", "extensions", "Scale"): scaleCtor, - makeDescriptor("api", "extensions", "StatefulSet"): statefulSetCtor, - makeDescriptor("api", "extensions", "StatefulSetList"): objectList, - - makeDescriptor("api", "authentication", "TokenReview"): []constructor{ - *newConstructor( - "new", - *newConstructorParam("token", "mixin.spec.withToken", nil), - ), - }, - - makeDescriptor("api", "autoscaling", "HorizontalPodAutoscalerList"): objectList, - makeDescriptor("api", "autoscaling", "Scale"): scaleCtor, - - makeDescriptor("api", "batch", "JobList"): objectList, - makeDescriptor("api", "batch", "CronJobList"): objectList, - - makeDescriptor("api", "certificates", "CertificateSigningRequestList"): objectList, - - makeDescriptor("api", "core", "ConfigMap"): []constructor{ - *newConstructor( - "new", - *newConstructorParam("name", "mixin.metadata.withName", nil), - *newConstructorParam("data", "withData", nil), - ), - }, - makeDescriptor("api", "core", "ConfigMapList"): objectList, - makeDescriptor("api", "core", "Container"): []constructor{ - *newConstructor( - "new", - *newConstructorParam("name", "withName", nil), - *newConstructorParam("image", "withImage", nil), - ), - }, - makeDescriptor("api", "core", "ContainerPort"): []constructor{ - *newConstructor("new", *newConstructorParam("containerPort", "withContainerPort", nil)), - *newConstructor("newNamed", - *newConstructorParam("containerPort", "withContainerPort", nil), - *newConstructorParam("name", "withName", nil), - ), - }, - makeDescriptor("api", "core", "EndpointsList"): objectList, - makeDescriptor("api", "core", "EnvVar"): []constructor{ - *newConstructor("new", - *newConstructorParam("name", "withName", nil), - *newConstructorParam("value", "withValue", nil)), - *newConstructor("fromSecretRef", - *newConstructorParam("name", "withName", nil), - *newConstructorParam("secretRefName", "mixin.valueFrom.secretKeyRef.withName", nil), - *newConstructorParam("secretRefKey", "mixin.valueFrom.secretKeyRef.withKey", nil)), - *newConstructor("fromFieldPath", - *newConstructorParam("name", "withName", nil), - *newConstructorParam("fieldPath", "mixin.valueFrom.fieldRef.withFieldPath", nil)), - }, - makeDescriptor("api", "core", "EventList"): objectList, - makeDescriptor("api", "core", "KeyToPath"): []constructor{ - *newConstructor("new", - *newConstructorParam("key", "withKey", nil), - *newConstructorParam("path", "withPath", nil)), - }, - makeDescriptor("api", "core", "LimitRangeList"): objectList, - makeDescriptor("api", "core", "Namespace"): []constructor{ - *newConstructor("new", - *newConstructorParam("name", "mixin.metadata.withName", nil)), - }, - makeDescriptor("api", "core", "NamespaceList"): objectList, - makeDescriptor("api", "core", "NodeList"): objectList, - makeDescriptor("api", "core", "PersistentVolumeClaimList"): objectList, - makeDescriptor("api", "core", "PersistentVolumeList"): objectList, - makeDescriptor("api", "core", "PodList"): objectList, - makeDescriptor("api", "core", "PodTemplateList"): objectList, - makeDescriptor("api", "core", "ReplicationControllerList"): objectList, - makeDescriptor("api", "core", "ResourceQuotaList"): objectList, - makeDescriptor("api", "core", "Secret"): []constructor{ - *newConstructor("new", - *newConstructorParam("name", "mixin.metadata.withName", nil), - *newConstructorParam("data", "withData", nil), - *newConstructorParam("type", "withType", "Opaque")), - *newConstructor("new", - *newConstructorParam("name", "mixin.metadata.withName", nil), - *newConstructorParam("stringDate", "withStringData", nil), - *newConstructorParam("type", "withType", "Opaque")), - }, - makeDescriptor("api", "core", "SecretList"): objectList, - makeDescriptor("api", "core", "Service"): []constructor{ - *newConstructor("new", - *newConstructorParam("name", "mixin.metadata.withName", nil), - *newConstructorParam("selector", "mixin.spec.withSelector", nil), - *newConstructorParam("ports", "mixin.spec.withPorts", nil)), - }, - makeDescriptor("api", "core", "ServiceAccount"): []constructor{ - *newConstructor("new", - *newConstructorParam("name", "mixin.metadata.withName", nil)), - }, - makeDescriptor("api", "core", "ServiceAccountList"): objectList, - makeDescriptor("api", "core", "ServiceList"): objectList, - makeDescriptor("api", "core", "ServicePort"): []constructor{ - *newConstructor("new", - *newConstructorParam("port", "withPort", nil), - *newConstructorParam("targetPort", "withTargetPort", nil)), - *newConstructor("newNamed", - *newConstructorParam("name", "withName", nil), - *newConstructorParam("port", "withPort", nil), - *newConstructorParam("targetPort", "withTargetPort", nil)), - }, - makeDescriptor("api", "core", "Volume"): []constructor{ - *newConstructor( - "fromConfigMap", - *newConstructorParam("name", "withName", nil), - *newConstructorParam("configMapName", "mixin.configMap.withName", nil), - *newConstructorParam("configMapItems", "mixin.configMap.withItems", nil)), - *newConstructor("fromEmptyDir", - *newConstructorParam("name", "withName", nil), - *newConstructorParam("emptyDir", "mixin.emptyDir.mixinInstance", - map[string]interface{}{})), - *newConstructor("fromPersistentVolumeClaim", - *newConstructorParam("name", "withName", nil), - *newConstructorParam("emptyDir", "mixin.persistentVolumeClaim.withClaimName", nil)), - *newConstructor("fromHostPath", - *newConstructorParam("name", "withName", nil), - *newConstructorParam("hostPath", "mixin.hostPath.withPath", nil)), - *newConstructor("fromSecret", - *newConstructorParam("name", "withName", nil), - *newConstructorParam("secretName", "mixin.secret.withSecretName", nil)), - }, - makeDescriptor("api", "core", "VolumeMount"): []constructor{ - *newConstructor("new", - *newConstructorParam("name", "withName", nil), - *newConstructorParam("mountPath", "withMountPath", nil), - *newConstructorParam("readOnly", "withReadOnly", false)), - }, - } - - // customConstructor definitions - - deploymentCtor = []constructor{ - *newConstructor( - "new", - *newConstructorParam("name", "mixin.metadata.withName", nil), - *newConstructorParam("replicas", "mixin.spec.withReplicas", 1), - *newConstructorParam("containers", "mixin.spec.template.spec.withContainers", nil), - *newConstructorParam("podLabels", "mixin.spec.template.metadata.withLabels", - map[string]interface{}{"app": "name"}), - ), - } - deploymentRollbackCtor = []constructor{ - *newConstructor( - "new", - *newConstructorParam("name", "withName", nil), - ), - } - objectList = []constructor{ - *newConstructor( - "new", - *newConstructorParam("items", "withItems", nil), - ), - } - scaleCtor = []constructor{ - *newConstructor( - "new", - *newConstructorParam("replicas", "mixin.spec.withReplicas", 1), - ), - } - statefulSetCtor = []constructor{ - *newConstructor( - "new", - *newConstructorParam("name", "mixin.metadata.withName", nil), - *newConstructorParam("replicas", "mixin.spec.withReplicas", 1), - *newConstructorParam("containers", "mixin.spec.template.spec.withContainers", nil), - *newConstructorParam("volumeClaims", "mixin.spec.withVolumeClaimTemplates", nil), - *newConstructorParam("podLabels", "mixin.spec.template.metadata.withLabels", map[string]interface{}{ - "app": "name", - }), - ), - } - tokenReviewCtor = []constructor{ - *newConstructor( - "new", - *newConstructorParam("token", "mixin.spec.withToken", nil), - ), - } -) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/description.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/description.go deleted file mode 100644 index 6c3dfda5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/description.go +++ /dev/null @@ -1,97 +0,0 @@ -package ksonnet - -import ( - "fmt" - "regexp" -) - -const ( - groupCore = "core" -) - -var ( - reNames = []*regexp.Regexp{ - // Core API, pre-1.8 Kubernetes OR non-Kubernetes codebase APIs - regexp.MustCompile(`io\.k8s\.(?P\S+)\.pkg\.api\.(?P\S+)\.(?P\S+)`), - // Core API, 1.8+ Kubernetes - regexp.MustCompile(`io\.k8s\.api\.(?Pcore)\.(?P\S+)\.(?P\S+)`), - // Other APIs, pre-1.8 Kubernetes OR non-Kubernetes codebase APIs - regexp.MustCompile(`io\.k8s\.(?P\S+)\.pkg\.(?Papis)\.(?P\S+)\.(?P\S+)\.(?P\S+)`), - // Other APIs, 1.8+ Kubernetes - regexp.MustCompile(`io\.k8s\.api\.(?P\S+)\.(?P\S+)\.(?P\S+)`), - // Util packageType - regexp.MustCompile(`io\.k8s\.(?P\S+)\.pkg\.(?Putil)\.(?P\S+)\.(?P\S+)`), - // Version packageType - regexp.MustCompile(`io\.k8s\.(?P\S+)\.pkg\.(?Pversion)\.(?P\S+)`), - // Runtime packageType - regexp.MustCompile(`io\.k8s\.(?P\S+)\.pkg\.(?Pruntime)\.(?P\S+)`), - } -) - -// UnknownDefinitionError is an error signifying an unknown definition. -type UnknownDefinitionError struct { - name string -} - -var _ error = (*UnknownDefinitionError)(nil) - -// NewUnknownDefinitionError creates an instance of UnknownDefinitionError. -func NewUnknownDefinitionError(name string) *UnknownDefinitionError { - return &UnknownDefinitionError{ - name: name, - } -} - -func (e *UnknownDefinitionError) Error() string { - return fmt.Sprintf("%q is not a known definition name", e.name) -} - -// Description is a description of a Kubernetes definition name. -type Description struct { - Name string - Version string - Kind string - Group string - Codebase string -} - -// Validate validates the Description. A description is valid if it has a version. -func (d *Description) Validate() error { - if d.Version == "" { - return fmt.Errorf("version is nil for %q", d.Name) - } - - return nil -} - -// ParseDescription takes a definition name and returns a Description. -func ParseDescription(name string) (*Description, error) { - for _, r := range reNames { - if match := r.FindStringSubmatch(name); len(match) > 0 { - - result := make(map[string]string) - for i, name := range r.SubexpNames() { - if i != 0 { - result[name] = match[i] - } - } - - codebase := result["codebase"] - if codebase == "" { - codebase = "api" - } - - d := &Description{ - Name: name, - Version: result["version"], - Kind: result["kind"], - Group: result["group"], - Codebase: codebase, - } - - return d, nil - } - } - - return nil, &UnknownDefinitionError{name: name} -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/description_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/description_test.go deleted file mode 100644 index 2df69d0d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/description_test.go +++ /dev/null @@ -1,103 +0,0 @@ -package ksonnet - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func Test_UnknownDefinitionError(t *testing.T) { - err := NewUnknownDefinitionError("name") - require.Equal(t, `"name" is not a known definition name`, err.Error()) -} - -func Test_Description_Validate(t *testing.T) { - cases := []struct { - name string - description Description - isErr bool - }{ - { - name: "with version", - description: Description{Version: "version"}, - }, - { - name: "with out version", - description: Description{}, - isErr: true, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - err := tc.description.Validate() - if tc.isErr { - require.Error(t, err) - } else { - require.NoError(t, err) - } - }) - } -} - -func Test_ParseDescription(t *testing.T) { - cases := []struct { - name string - description Description - err error - }{ - { - name: "foo.bar", - err: NewUnknownDefinitionError("foo.bar"), - }, - { - name: "io.k8s.apimachinery.pkg.version.Info", - description: Description{ - Name: "io.k8s.apimachinery.pkg.version.Info", - Kind: "Info", - Codebase: "apimachinery", - }, - }, - { - name: "io.k8s.apimachinery.pkg.apis.meta.v1.Status", - description: Description{ - Name: "io.k8s.apimachinery.pkg.apis.meta.v1.Status", - Kind: "Status", - Version: "v1", - Group: "meta", - Codebase: "apimachinery", - }, - }, - { - name: "io.k8s.api.admissionregistration.v1alpha1.AdmissionHookClientConfig", - description: Description{ - Name: "io.k8s.api.admissionregistration.v1alpha1.AdmissionHookClientConfig", - Version: "v1alpha1", - Kind: "AdmissionHookClientConfig", - Group: "admissionregistration", - Codebase: "api", - }, - }, - { - name: "io.k8s.codebase.pkg.api.version.kind", - description: Description{ - Name: "io.k8s.codebase.pkg.api.version.kind", - Version: "version", - Kind: "kind", - Codebase: "codebase", - }, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - d, err := ParseDescription(tc.name) - if tc.err == nil { - require.NoError(t, err) - require.Equal(t, tc.description, *d) - } else { - require.Error(t, err) - } - }) - } -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/document.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/document.go deleted file mode 100644 index 48180853..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/document.go +++ /dev/null @@ -1,188 +0,0 @@ -package ksonnet - -import ( - "sort" - - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" - "github.com/pkg/errors" -) - -type renderNodeFn func(c *Catalog, a *APIObject) (*nm.Object, error) - -// Document represents a ksonnet lib document. -type Document struct { - catalog *Catalog - - // these are defined to aid testing Document - typesFn func() ([]Type, error) - fieldsFn func() ([]Field, error) - renderFn func(fn renderNodeFn, c *Catalog, o *nm.Object, groups []Group) error - renderGroups func(doc *Document, container *nm.Object) error - renderHiddenGroups func(doc *Document, container *nm.Object) error - objectNodeFn func(c *Catalog, a *APIObject) (*nm.Object, error) -} - -// NewDocument creates an instance of Document. -func NewDocument(catalog *Catalog) (*Document, error) { - if catalog == nil { - return nil, errors.New("catalog is nil") - } - - return &Document{ - catalog: catalog, - typesFn: catalog.Types, - fieldsFn: catalog.Fields, - renderFn: render, - renderGroups: renderGroups, - renderHiddenGroups: renderHiddenGroups, - objectNodeFn: apiObjectNode, - }, nil -} - -// Groups returns an alphabetically sorted list of groups. -func (d *Document) Groups() ([]Group, error) { - resources, err := d.typesFn() - if err != nil { - return nil, errors.Wrap(err, "retrieve resources") - } - - var nodeObjects []Object - for _, resource := range resources { - res := resource - nodeObjects = append(nodeObjects, &res) - } - - return d.groups(nodeObjects) -} - -// HiddenGroups returns an alphabetically sorted list of hidden groups. -func (d *Document) HiddenGroups() ([]Group, error) { - resources, err := d.fieldsFn() - if err != nil { - return nil, errors.Wrap(err, "retrieve types") - } - - var nodeObjects []Object - for _, resource := range resources { - res := resource - nodeObjects = append(nodeObjects, &res) - } - - return d.groups(nodeObjects) -} - -func (d *Document) groups(resources []Object) ([]Group, error) { - gMap := make(map[string]*Group) - - for i := range resources { - res := resources[i] - name := res.Group() - - g, ok := gMap[name] - if !ok { - g = NewGroup(name) - gMap[name] = g - } - - g.AddResource(res) - gMap[name] = g - } - - var groupNames []string - - for name := range gMap { - groupNames = append(groupNames, name) - } - - sort.Strings(groupNames) - - var groups []Group - - for _, name := range groupNames { - g := gMap[name] - groups = append(groups, *g) - } - - return groups, nil -} - -// Node converts a document to a node. -func (d *Document) Node() (*nm.Object, error) { - out := nm.NewObject() - - metadata := map[string]interface{}{ - "kubernetesVersion": d.catalog.Version(), - "checksum": d.catalog.Checksum(), - } - metadataObj, err := nm.KVFromMap(metadata) - if err != nil { - return nil, errors.Wrap(err, "create metadata key") - } - out.Set(nm.InheritedKey("__ksonnet"), metadataObj) - - if err := d.renderGroups(d, out); err != nil { - return nil, err - } - - hidden := nm.NewObject() - - if err := d.renderHiddenGroups(d, hidden); err != nil { - return nil, err - } - - out.Set(nm.LocalKey("hidden"), hidden) - - return out, nil -} - -func render(fn renderNodeFn, catalog *Catalog, o *nm.Object, groups []Group) error { - for _, group := range groups { - groupNode := group.Node() - for _, version := range group.Versions() { - versionNode := version.Node() - for _, apiObject := range version.APIObjects() { - objectNode, err := fn(catalog, &apiObject) - if err != nil { - return errors.Wrapf(err, "create node %s", apiObject.Kind()) - } - - versionNode.Set( - nm.NewKey(apiObject.Kind(), nm.KeyOptComment(apiObject.Description())), - objectNode) - } - - groupNode.Set(nm.NewKey(version.Name()), versionNode) - } - - o.Set(nm.NewKey(group.Name()), groupNode) - } - - return nil - -} - -func renderGroups(d *Document, container *nm.Object) error { - groups, err := d.Groups() - if err != nil { - return errors.Wrap(err, "retrieve groups") - } - - if err = d.renderFn(d.objectNodeFn, d.catalog, container, groups); err != nil { - return errors.Wrap(err, "render groups") - } - - return nil -} - -func renderHiddenGroups(d *Document, container *nm.Object) error { - groups, err := d.HiddenGroups() - if err != nil { - return errors.Wrap(err, "retrieve hidden groups") - } - - if err = d.renderFn(d.objectNodeFn, d.catalog, container, groups); err != nil { - return errors.Wrap(err, "render hidden groups") - } - - return nil -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/document_integration_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/document_integration_test.go deleted file mode 100644 index 297db48e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/document_integration_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package ksonnet_test - -import ( - "bytes" - "io" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "testing" - - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/ksonnet" - "github.com/stretchr/testify/require" -) - -func testdata(name string) string { - return filepath.Join("testdata", name) -} - -func TestDocument_Integration(t *testing.T) { - dir, err := ioutil.TempDir("", "document") - require.NoError(t, err) - - defer os.RemoveAll(dir) - - lib := genDoc(t, "testdata/swagger-1.8.json") - - k8sPath := filepath.Join(dir, "k8s.libsonnet") - writeFile(t, k8sPath, lib.K8s) - verifyJsonnet(t, dir, "k8s.libsonnet") - - ksPath := filepath.Join(dir, "k.libsonnet") - writeFile(t, ksPath, lib.Extensions) - verifyJsonnet(t, dir, "k.libsonnet") - - compPath := filepath.Join(dir, "component.libsonnet") - copyFile(t, testdata("component.libsonnet"), compPath) - - cmd := exec.Command(jsonnetCmd(), "component.libsonnet") - cmd.Dir = dir - - out, err := cmd.CombinedOutput() - if err != nil { - t.Fatal(string(out)) - } - - expected, err := ioutil.ReadFile(testdata("component.json")) - require.NoError(t, err) - - require.Equal(t, string(expected), string(out)) -} - -func jsonnetCmd() string { - bin := os.Getenv("JSONNET_BIN") - if bin == "" { - bin = "jsonnet" - } - - return bin -} - -func verifyJsonnet(t *testing.T, dir, fileName string) { - cmd := exec.Command(jsonnetCmd(), "fmt", fileName) - cmd.Dir = dir - - var b bytes.Buffer - cmd.Stderr = &b - - err := cmd.Run() - if err != nil { - t.Fatalf("%s verification failed: %v", fileName, b.String()) - } -} - -func genDoc(t *testing.T, input string) *ksonnet.Lib { - lib, err := ksonnet.GenerateLib(input) - require.NoError(t, err) - - return lib -} - -func writeFile(t *testing.T, name string, content []byte) { - err := ioutil.WriteFile(name, content, 0600) - require.NoError(t, err) -} - -func copyFile(t *testing.T, src, dest string) { - from, err := os.Open(src) - require.NoError(t, err) - defer from.Close() - - to, err := os.OpenFile(dest, os.O_RDWR|os.O_CREATE, 0666) - require.NoError(t, err) - defer to.Close() - - _, err = io.Copy(to, from) - require.NoError(t, err) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/document_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/document_test.go deleted file mode 100644 index 4e60d1d2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/document_test.go +++ /dev/null @@ -1,211 +0,0 @@ -package ksonnet - -import ( - "sort" - "testing" - - "github.com/go-openapi/spec" - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" - "github.com/pkg/errors" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestDocument_nil_catalog(t *testing.T) { - _, err := NewDocument(nil) - require.Error(t, err) -} - -func TestDocument_Groups(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - doc, err := NewDocument(c) - require.NoError(t, err) - - groups, err := doc.Groups() - require.NoError(t, err) - - var names []string - for _, group := range groups { - names = append(names, group.Name()) - } - - sort.Strings(names) - expected := []string{"admissionregistration", "apiextensions", "apiregistration", "apps", - "authentication", "authorization", "autoscaling", "batch", "certificates", "core", - "extensions", "meta", "networking", "policy", "rbac", "scheduling", "settings", "storage"} - require.Equal(t, expected, names) -} - -func TestDocument_Groups_types_error(t *testing.T) { - fn := func(*Catalog, map[string]spec.Schema, []string) (map[string]Property, error) { - return nil, errors.New("fail") - } - - c := initCatalog(t, "swagger-1.8.json", CatalogOptExtractProperties(fn)) - - doc, err := NewDocument(c) - require.NoError(t, err) - - _, err = doc.Groups() - require.Error(t, err) -} - -func TestDocument_HiddenGroups(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - doc, err := NewDocument(c) - require.NoError(t, err) - - groups, err := doc.HiddenGroups() - require.NoError(t, err) - - var names []string - for _, group := range groups { - names = append(names, group.Name()) - } - - sort.Strings(names) - - expected := []string{"admissionregistration", "apiextensions", "apiregistration", "apps", - "authentication", "authorization", "autoscaling", "batch", "certificates", "core", - "extensions", "meta", "networking", "policy", "rbac", "scheduling", "settings", - "storage"} - require.Equal(t, expected, names) -} - -func TestDocument_HiddenGroups_fields_error(t *testing.T) { - fn := func(*Catalog, map[string]spec.Schema, []string) (map[string]Property, error) { - return nil, errors.New("fail") - } - - c := initCatalog(t, "swagger-1.8.json", CatalogOptExtractProperties(fn)) - - doc, err := NewDocument(c) - require.NoError(t, err) - - _, err = doc.HiddenGroups() - require.Error(t, err) -} - -func TestDocument_Node(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - doc, err := NewDocument(c) - require.NoError(t, err) - - n, err := doc.Node() - require.NoError(t, err) - - for _, name := range []string{"apps", "apiextensions", "core"} { - _, ok := n.Get(name).(*nm.Object) - assert.True(t, ok, "node %s was not found", name) - } - - local, ok := n.Get("hidden").(*nm.Object) - require.True(t, ok) - - for _, name := range []string{"apps", "core", "meta"} { - _, ok := local.Get(name).(*nm.Object) - assert.True(t, ok, "hidden node %s was not found", name) - } -} - -func TestDocument_Node_groups_error(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - doc, err := NewDocument(c) - require.NoError(t, err) - - doc.renderGroups = func(*Document, *nm.Object) error { - return errors.New("fail") - } - - _, err = doc.Node() - require.Error(t, err) -} - -func TestDocument_Node_hidden_groups_error(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - doc, err := NewDocument(c) - require.NoError(t, err) - - doc.renderHiddenGroups = func(*Document, *nm.Object) error { - return errors.New("fail") - } - - _, err = doc.Node() - require.Error(t, err) -} - -func TestDocument_Node_api_object_error(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - doc, err := NewDocument(c) - require.NoError(t, err) - - doc.objectNodeFn = func(*Catalog, *APIObject) (*nm.Object, error) { - return nil, errors.New("fail") - } - - _, err = doc.Node() - require.Error(t, err) -} - -func Test_renderGroups_groups_error(t *testing.T) { - fn := func(*Catalog, map[string]spec.Schema, []string) (map[string]Property, error) { - return nil, errors.New("fail") - } - - c := initCatalog(t, "swagger-1.8.json", CatalogOptExtractProperties(fn)) - - doc, err := NewDocument(c) - require.NoError(t, err) - - err = renderGroups(doc, nm.NewObject()) - require.Error(t, err) -} - -func TestDocument_renderGroups_render_error(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - doc, err := NewDocument(c) - require.NoError(t, err) - - doc.renderFn = func(fn renderNodeFn, c *Catalog, o *nm.Object, groups []Group) error { - return errors.New("fail") - } - - err = renderGroups(doc, nm.NewObject()) - require.Error(t, err) -} - -func Test_renderHiddenGroups_hidden_groups_error(t *testing.T) { - fn := func(*Catalog, map[string]spec.Schema, []string) (map[string]Property, error) { - return nil, errors.New("fail") - } - - c := initCatalog(t, "swagger-1.8.json", CatalogOptExtractProperties(fn)) - - doc, err := NewDocument(c) - require.NoError(t, err) - - err = renderHiddenGroups(doc, nm.NewObject()) - require.Error(t, err) -} - -func TestDocument_renderHiddenGroups_render_error(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - doc, err := NewDocument(c) - require.NoError(t, err) - - doc.renderFn = func(fn renderNodeFn, c *Catalog, o *nm.Object, groups []Group) error { - return errors.New("fail") - } - - err = renderHiddenGroups(doc, nm.NewObject()) - require.Error(t, err) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/emit.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/emit.go deleted file mode 100644 index 987b7113..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/emit.go +++ /dev/null @@ -1,1110 +0,0 @@ -package ksonnet - -import ( - "fmt" - "log" - "regexp" - "sort" - "strconv" - "strings" - - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/jsonnet" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/kubespec" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/kubeversion" -) - -// Emit takes a swagger API specification, and returns the text of -// `ksonnet-lib`, written in Jsonnet. -func Emit(spec *kubespec.APISpec, ksonnetLibSHA, k8sSHA *string) ([]byte, []byte, error) { - root, err := newRoot(spec, ksonnetLibSHA, k8sSHA) - if err != nil { - return nil, nil, err - } - - m := newIndentWriter() - if err = root.emit(m); err != nil { - return nil, nil, err - } - - k8sBytes, err := m.bytes() - if err != nil { - return nil, nil, err - } - - kBytes := []byte(kubeversion.KSource(spec.Info.Version)) - - return kBytes, k8sBytes, nil -} - -//----------------------------------------------------------------------------- -// Root. -//----------------------------------------------------------------------------- - -func usesLegacySchema(version string) (bool, error) { - semVer := regexp.MustCompile(`v(\d*)\.(\d*)\.\d*`) - match := semVer.FindStringSubmatch(version) - - if len(match) == 0 { - return false, - fmt.Errorf( - "Schema version %q does not follow semver (e.g. v1.0.3)", version) - } - - major, err := strconv.Atoi(match[1]) - if err != nil { - return false, - fmt.Errorf( - "Major version %q must be a number", match[1]) - } - - minor, err := strconv.Atoi(match[2]) - if err != nil { - return false, - fmt.Errorf( - "Minor version %q must be a number", match[2]) - } - - if major == 1 && minor >= 8 { - return false, nil - } else if major > 1 { - return false, nil - } - - return true, nil -} - -// `root` is an abstraction of the root of `k8s.libsonnet`, which can be -// emitted as Jsonnet code using the `emit` method. -// -// `root` contains and manages a set of `groups`, which represent a -// set of Kubernetes API groups (e.g., core, apps, extensions), and -// holds all of the logic required to build the `groups` from an -// `kubespec.APISpec`. -type root struct { - spec *kubespec.APISpec - groups groupSet // set of groups, e.g., core, apps, extensions. - hiddenGroups groupSet - - ksonnetLibSHA *string - k8sSHA *string - - isLegacySchema bool -} - -func newRoot(spec *kubespec.APISpec, ksonnetLibSHA, k8sSHA *string) (*root, error) { - uls, err := usesLegacySchema(spec.Info.Version) - if err != nil { - return nil, fmt.Errorf("check schema: %v", err) - } - - r := root{ - spec: spec, - groups: make(groupSet), - hiddenGroups: make(groupSet), - - ksonnetLibSHA: ksonnetLibSHA, - k8sSHA: k8sSHA, - - isLegacySchema: uls, - } - - crds := map[kubespec.DefinitionName]bool{} - for defName, def := range spec.Definitions { - if def.IsCRD() { - crds[defName] = false - ref := def.Properties["Schema"] - def := strings.TrimPrefix(string(*ref.Ref), "#/definitions/") - crds[kubespec.DefinitionName(def)] = false - } - } - - for defName, def := range spec.Definitions { - if !uls { - if def.IsDeprecated() { - continue - } - } - - _, isCRD := crds[defName] - isBlacklisted := kubeversion.IsBlacklistedID(r.spec.Info.Version, defName) - if isCRD || isBlacklisted { - continue - } - - if err := r.addDefinition(defName, def); err != nil { - return nil, err - } - } - - return &r, nil -} - -func (root *root) emit(m *indentWriter) error { - m.writeLine("// AUTOGENERATED from the Kubernetes OpenAPI specification. DO NOT MODIFY.") - m.writeLine(fmt.Sprintf("// Kubernetes version: %s", root.spec.Info.Version)) - - if root.ksonnetLibSHA != nil { - m.writeLine(fmt.Sprintf( - "// SHA of ksonnet-lib HEAD: %s", *root.ksonnetLibSHA)) - } - - if root.ksonnetLibSHA != nil { - m.writeLine(fmt.Sprintf( - "// SHA of Kubernetes HEAD OpenAPI spec is generated from: %s", - *root.k8sSHA)) - } - m.writeLine("") - - m.writeLine("{") - m.indent() - - // Emit in sorted order so that we can diff the output. - groups := root.groups.toSortedSlice() - var groupNames []string - for _, g := range groups { - groupNames = append(groupNames, string(g.name)) - } - - for _, group := range root.groups.toSortedSlice() { - if err := group.emit(m); err != nil { - return err - } - } - - m.writeLine("local hidden = {") - m.indent() - - for _, hiddenGroup := range root.hiddenGroups.toSortedSlice() { - if err := hiddenGroup.emit(m); err != nil { - return err - } - } - - m.dedent() - m.writeLine("},") - - m.dedent() - m.writeLine("}") - - return nil -} - -func (root *root) addDefinition(path kubespec.DefinitionName, def *kubespec.SchemaDefinition) error { - parsedName, err := path.Parse() - if err != nil { - return fmt.Errorf("parse path: %v", err) - } - - if parsedName.Version == nil { - return nil - } - apiObject, err := root.createAPIObject(parsedName, def) - if err != nil { - return fmt.Errorf("create api object: %v", err) - } - - for propName, prop := range def.Properties { - pm := newPropertyMethod(propName, path, prop, apiObject) - apiObject.properties[propName] = pm - - st := prop.Type - if pm.ref.IsMixinRef() || - (st != nil && *st == "array" && prop.Items.Ref != nil) { - typeAliasName := propName + "Type" - ta, ok := apiObject.properties[typeAliasName] - if ok && ta.kind != typeAlias { - return fmt.Errorf("Can't create type alias %q because a property with that name already exists", typeAliasName) - } - - ta = newPropertyTypeAlias(typeAliasName, path, prop, apiObject) - apiObject.properties[typeAliasName] = ta - } - } - - return nil -} - -func (r *root) createAPIObject( - parsedName *kubespec.ParsedDefinitionName, def *kubespec.SchemaDefinition, -) (*apiObject, error) { - dn, err := parsedName.Unparse(r.isLegacySchema) - if err != nil { - return nil, fmt.Errorf("unparse definition name: %v", err) - } - - if parsedName.Version == nil { - return nil, fmt.Errorf( - "Can't make API object from name with nil version in path: %q", - dn) - } - - var groupName kubespec.GroupName - if parsedName.Group == nil { - groupName = "core" - } else { - groupName = *parsedName.Group - } - - var qualifiedName kubespec.GroupName - if len(def.TopLevelSpecs) > 0 && def.TopLevelSpecs[0].Group != "" { - qualifiedName = def.TopLevelSpecs[0].Group - } else { - qualifiedName = groupName - } - - // Separate out top-level definitions from everything else. - var groups groupSet - if len(def.TopLevelSpecs) > 0 { - groups = r.groups - } else { - groups = r.hiddenGroups - } - - group, ok := groups[groupName] - if !ok { - group = newGroup(groupName, qualifiedName, r) - groups[groupName] = group - } - - versionedAPI, ok := group.versionedAPIs[*parsedName.Version] - if !ok { - versionedAPI = newVersionedAPI(*parsedName.Version, group) - group.versionedAPIs[*parsedName.Version] = versionedAPI - } - - apiObject := newAPIObject(parsedName, versionedAPI, def) - - _, ok = versionedAPI.apiObjects[parsedName.Kind] - if ok { - var names []string - for _, ao := range versionedAPI.apiObjects { - names = append(names, string(ao.name)) - } - - return nil, - fmt.Errorf("Duplicate object kinds with name '%s'", dn) - - } - versionedAPI.apiObjects[parsedName.Kind] = apiObject - return apiObject, nil -} - -func (root *root) getAPIObject( - parsedName *kubespec.ParsedDefinitionName, -) *apiObject { - ao, err := root.getAPIObjectHelper(parsedName, false) - if err == nil { - return ao - } - - ao, err = root.getAPIObjectHelper(parsedName, true) - if err != nil { - log.Panic(err.Error()) - } - return ao -} - -func (r *root) getAPIObjectHelper( - parsedName *kubespec.ParsedDefinitionName, hidden bool, -) (*apiObject, error) { - dn, err := parsedName.Unparse(r.isLegacySchema) - if err != nil { - return nil, fmt.Errorf("unparse definition name: %v", err) - } - - if parsedName.Version == nil { - return nil, fmt.Errorf( - "Can't get API object with nil version: %q", dn) - } - - var groupName kubespec.GroupName - if parsedName.Group == nil { - groupName = "core" - } else { - groupName = *parsedName.Group - } - - var groups groupSet - if hidden { - groups = r.groups - } else { - groups = r.hiddenGroups - } - - group, ok := groups[groupName] - if !ok { - return nil, fmt.Errorf( - "Could not retrieve object, group in path %q doesn't exist", - dn) - } - - versionedAPI, ok := group.versionedAPIs[*parsedName.Version] - if !ok { - return nil, fmt.Errorf( - "Could not retrieve object, versioned API in path %q doesn't exist", - dn) - } - - if apiObject, ok := versionedAPI.apiObjects[parsedName.Kind]; ok { - return apiObject, nil - } - return nil, fmt.Errorf( - "Could not retrieve object, kind in path %q doesn't exist", - dn) -} - -//----------------------------------------------------------------------------- -// Group. -//----------------------------------------------------------------------------- - -// `group` is an abstract representation of a Kubernetes API group -// (e.g., apps, extensions, core), which can be emitted as Jsonnet -// code using the `emit` method. -// -// `group` contains a set of versioned APIs (e.g., v1, v1beta1, etc.), -// though the logic for creating them is handled largely by `root`. -type group struct { - name kubespec.GroupName // e.g., core, apps, extensions. - qualifiedName kubespec.GroupName // e.g., rbac.authorization.k8s.io. - versionedAPIs versionedAPISet // e.g., v1, v1beta1. - parent *root -} -type groupSet map[kubespec.GroupName]*group -type groupSlice []*group - -func newGroup( - name kubespec.GroupName, qualifiedName kubespec.GroupName, parent *root, -) *group { - return &group{ - name: name, - qualifiedName: qualifiedName, - versionedAPIs: make(versionedAPISet), - parent: parent, - } -} - -func (group *group) root() *root { - return group.parent -} - -func (group *group) emit(m *indentWriter) error { - k8sVersion := group.root().spec.Info.Version - mixinName := jsonnet.RewriteAsIdentifier(k8sVersion, group.name) - line := fmt.Sprintf("%s:: {", mixinName) - m.writeLine(line) - m.indent() - - // Emit in sorted order so that we can diff the output. - for _, versioned := range group.versionedAPIs.toSortedSlice() { - if err := versioned.emit(m); err != nil { - return err - } - } - - m.dedent() - m.writeLine("},") - - return nil -} - -func (gs groupSet) toSortedSlice() groupSlice { - groups := groupSlice{} - for _, group := range gs { - groups = append(groups, group) - } - sort.Slice(groups, func(i, j int) bool { - return groups[i].name < groups[j].name - }) - return groups -} - -//----------------------------------------------------------------------------- -// Versioned API. -//----------------------------------------------------------------------------- - -// `versionedAPI` is an abstract representation of a version of a -// Kubernetes API group (e.g., apps.v1beta1, extensions.v1beta1, -// core.v1), which can be emitted as Jsonnet code using the `emit` -// method. -// -// `versionedAPI` contains a set of API objects (e.g., v1.Container, -// v1beta1.Deployment, etc.), though the logic for creating them is -// handled largely by `root`. -type versionedAPI struct { - version kubespec.VersionString // version string, e.g., v1, v1beta1. - apiObjects apiObjectSet // set of objects, e.g, v1.Container. - parent *group -} -type versionedAPISet map[kubespec.VersionString]*versionedAPI -type versionedAPISlice []*versionedAPI - -func newVersionedAPI( - version kubespec.VersionString, parent *group, -) *versionedAPI { - return &versionedAPI{ - version: version, - apiObjects: make(apiObjectSet), - parent: parent, - } -} - -func (va *versionedAPI) root() *root { - return va.parent.parent -} - -func (va *versionedAPI) emit(m *indentWriter) error { - // NOTE: Do not need to call `jsonnet.RewriteAsIdentifier`. - line := fmt.Sprintf("%s:: {", va.version) - m.writeLine(line) - m.indent() - - gn := va.parent.qualifiedName - if gn == "core" { - m.writeLine(fmt.Sprintf( - "local apiVersion = {apiVersion: \"%s\"},", va.version)) - } else { - m.writeLine(fmt.Sprintf( - "local apiVersion = {apiVersion: \"%s/%s\"},", gn, va.version)) - } - - // Emit in sorted order so that we can diff the output. - for _, object := range va.apiObjects.toSortedSlice() { - objName, err := object.parsedName.Unparse(false) - if err != nil { - return err - } - - if kubeversion.IsBlacklistedID(va.root().spec.Info.Version, objName) { - continue - } - - if err := object.emit(m); err != nil { - return err - } - } - - m.dedent() - m.writeLine("},") - - return nil -} - -func (vas versionedAPISet) toSortedSlice() versionedAPISlice { - versionedAPIs := versionedAPISlice{} - for _, va := range vas { - versionedAPIs = append(versionedAPIs, va) - } - sort.Slice(versionedAPIs, func(i, j int) bool { - return versionedAPIs[i].version < versionedAPIs[j].version - }) - return versionedAPIs -} - -//----------------------------------------------------------------------------- -// API object. -//----------------------------------------------------------------------------- - -// `apiObject` is an abstract representation of a Kubernetes API -// object (e.g., v1.Container, v1beta1.Deployment), which can be -// emitted as Jsonnet code using the `emit` method. -// -// `apiObject` contains a set of property methods and mixins which -// formulate the basis of much of ksonnet-lib's programming surface. -// The logic for creating them is handled largely by `root`. -type apiObject struct { - name kubespec.ObjectKind // e.g., `Container` in `v1.Container` - properties propertySet // e.g., container.image, container.env - parsedName *kubespec.ParsedDefinitionName - comments comments - parent *versionedAPI - isTopLevel bool -} -type apiObjectSet map[kubespec.ObjectKind]*apiObject -type apiObjectSlice []*apiObject - -func newAPIObject( - name *kubespec.ParsedDefinitionName, parent *versionedAPI, - def *kubespec.SchemaDefinition, -) *apiObject { - isTopLevel := len(def.TopLevelSpecs) > 0 - comments := newComments(def.Description) - return &apiObject{ - name: name.Kind, - parsedName: name, - properties: make(propertySet), - comments: comments, - parent: parent, - isTopLevel: isTopLevel, - } -} - -func (ao apiObject) toRefPropertyMethod( - name kubespec.PropertyName, path kubespec.DefinitionName, parent *apiObject, -) *property { - return &property{ - ref: path.AsObjectRef(), - schemaType: nil, - itemTypes: kubespec.Items{}, - name: name, - path: path, - comments: ao.comments, - parent: parent, - } -} - -func (ao *apiObject) root() *root { - return ao.parent.parent.parent -} - -func (ao *apiObject) emit(m *indentWriter) error { - k8sVersion := ao.root().spec.Info.Version - jsonnetName := kubespec.ObjectKind( - jsonnet.RewriteAsIdentifier(k8sVersion, ao.name)) - if _, ok := ao.parent.apiObjects[jsonnetName]; ok { - log.Panicf( - "Tried to lowercase first character of object kind %q, but lowercase name was already present in version %q", - jsonnetName, - ao.parent.version) - } - - ao.comments.emit(m) - - m.writeLine(fmt.Sprintf("%s:: {", jsonnetName)) - m.indent() - - if ao.isTopLevel { - // NOTE: It is important to NOT capitalize `ao.name` here. - m.writeLine(fmt.Sprintf("local kind = {kind: \"%s\"},", ao.name)) - } - if err := ao.emitConstructors(m); err != nil { - return fmt.Errorf("emit constructors: %v", err) - } - - list, err := ao.properties.sortAndFilterBlacklisted() - if err != nil { - return err - } - - for _, pm := range list { - // Skip special properties and fields that `$ref` another API - // object type, since those will go in the `mixin` namespace. - if isSpecialProperty(pm.name) || pm.ref.IsMixinRef() { - continue - } - if err := pm.emit(m); err != nil { - return err - } - } - - // Emit the properties that `$ref` another API object type in the - // `mixin:: {` namespace. - m.writeLine("mixin:: {") - m.indent() - - for _, pm := range list { - // TODO: Emit mixin code also for arrays whose elements are - // `$ref`. - if !pm.ref.IsMixinRef() { - continue - } - - if err := pm.emit(m); err != nil { - return err - } - } - - m.dedent() - m.writeLine("},") - - m.dedent() - m.writeLine("},") - - return nil -} - -// `emitAsRefMixins` recursively emits an API object as a collection -// of mixin methods, particularly when another API object has a -// property that uses `$ref` to reference the current API object. -// -// For example, `v1beta1.Deployment` has a field, `spec`, which is of -// type `v1beta1.DeploymentSpec`. In this case, we'd like to -// recursively capture all the properties of `v1beta1.DeploymentSpec` -// and create mixin methods, so that we can do something like -// `someDeployment + deployment.mixin.spec.minReadySeconds(3)`. -func (ao *apiObject) emitAsRefMixins( - m *indentWriter, p *property, parentMixinName *string, -) error { - k8sVersion := ao.root().spec.Info.Version - functionName := jsonnet.RewriteAsIdentifier(k8sVersion, p.name) - paramName := jsonnet.RewriteAsFuncParam(k8sVersion, p.name) - fieldName := jsonnet.RewriteAsFieldKey(p.name) - mixinName := fmt.Sprintf("__%sMixin", functionName) - var mixinText string - if parentMixinName == nil { - mixinText = fmt.Sprintf( - "local %s(%s) = {%s+: %s},", mixinName, paramName, fieldName, paramName) - } else { - mixinText = fmt.Sprintf( - "local %s(%s) = %s({%s+: %s}),", - mixinName, paramName, *parentMixinName, fieldName, paramName) - } - - if _, ok := ao.parent.apiObjects[kubespec.ObjectKind(functionName)]; ok { - log.Panicf( - "Tried to lowercase first character of object kind %q, but lowercase name was already present in version %q", - functionName, - ao.parent.version) - } - - // NOTE: Comments are emitted by `property#emit`, before we - // call this method. - - line := fmt.Sprintf("%s:: {", functionName) - m.writeLine(line) - m.indent() - - m.writeLine(mixinText) - m.writeLine( - fmt.Sprintf("mixinInstance(%s):: %s(%s),", paramName, mixinName, paramName)) - - list, err := ao.properties.sortAndFilterBlacklisted() - if err != nil { - return err - } - - for _, pm := range list { - if isSpecialProperty(pm.name) { - continue - } - if err := pm.emitAsRefMixin(m, mixinName); err != nil { - return err - } - } - - m.dedent() - m.writeLine("},") - - return nil -} - -func (ao *apiObject) emitConstructors(m *indentWriter) error { - dn, err := ao.parsedName.Unparse(ao.root().isLegacySchema) - if err != nil { - return fmt.Errorf("unparse definition name: %v", err) - } - - k8sVersion := ao.root().spec.Info.Version - path := dn - - specs, ok := kubeversion.ConstructorSpec(k8sVersion, path) - if !ok { - ao.emitConstructor(m, constructorName, []kubeversion.CustomConstructorParam{}) - return nil - } - - for _, spec := range specs { - ao.emitConstructor(m, spec.ID, spec.Params) - } - - return nil -} - -func (ao *apiObject) emitConstructor( - m *indentWriter, id string, params []kubeversion.CustomConstructorParam, -) { - // Panic if a function with the constructor's name already exists. - specName := kubespec.PropertyName(id) - if dm, ok := ao.properties[specName]; ok { - log.Panicf( - "Attempted to create constructor, but %q property already existed at %q", - specName, dm.path) - } - - // Default body of the constructor. Usually either `apiVersion + - // kind` or `{}`. - var defaultSetters []string - if ao.isTopLevel { - defaultSetters = specialPropertiesList - } else { - defaultSetters = []string{"{}"} - } - - // Build parameters and body of constructor. Considering the example - // of the constructor of `v1.Container`: - // - // new(name, image):: self.name(name) + self.image(image), - // - // Here we want to (1) assemble the parameter list (i.e., `name` and - // `image`), as well as the body (i.e., the calls to `self.name` and - // so on). - paramLiterals := []string{} - setters := defaultSetters - for _, param := range params { - // Add the param to the param list, including default value if - // applicable. - if param.DefaultValue != nil { - paramLiterals = append( - paramLiterals, fmt.Sprintf("%s=%s", param.ID, *param.DefaultValue)) - } else { - paramLiterals = append(paramLiterals, param.ID) - } - - // Add an element to the body (e.g., `self.name` above). - if param.RelativePath == nil { - prop, ok := ao.properties[kubespec.PropertyName(param.ID)] - if !ok { - log.Panicf( - "Attempted to create constructor, but property %q does not exist", - param.ID) - } - k8sVersion := ao.root().spec.Info.Version - propMethodName := jsonnet.RewriteAsIdentifier(k8sVersion, prop.name).ToSetterID() - setters = append( - setters, fmt.Sprintf("self.%s(%s)", propMethodName, param.ID)) - } else { - // TODO(hausdorff): We may want to verify this relative path - // exists. - setters = append( - setters, fmt.Sprintf("self.%s(%s)", *param.RelativePath, param.ID)) - } - } - - // Write out constructor. - paramsText := strings.Join(paramLiterals, ", ") - bodyText := strings.Join(setters, " + ") - m.writeLine(fmt.Sprintf("%s(%s):: %s,", specName, paramsText, bodyText)) -} - -func (aos apiObjectSet) toSortedSlice() apiObjectSlice { - apiObjects := apiObjectSlice{} - for _, apiObject := range aos { - apiObjects = append(apiObjects, apiObject) - } - sort.Slice(apiObjects, func(i, j int) bool { - return apiObjects[i].name < apiObjects[j].name - }) - return apiObjects -} - -//----------------------------------------------------------------------------- -// Property method. -//----------------------------------------------------------------------------- - -type propertyKind int - -const ( - method propertyKind = iota - typeAlias -) - -// `property` is an abstract representation of a ksonnet-lib's -// property methods, which can be emitted as Jsonnet code using the -// `emit` method. -// -// For example, ksonnet-lib exposes many functions such as -// `v1.container.image`, which can be added together with the `+` -// operator to construct a complete image. `property` is an -// abstract representation of these so-called "property methods". -// -// `property` contains the name of the property given in the -// `apiObject` that is its parent (for example, `Deployment` has a -// field called `containers`, which is an array of `v1.Container`), as -// well as the `kubespec.PropertyName`, which contains information -// required to generate the Jsonnet code. -// -// The logic for creating them is handled largely by `root`. -type property struct { - kind propertyKind - ref *kubespec.ObjectRef - schemaType *kubespec.SchemaType - itemTypes kubespec.Items - name kubespec.PropertyName // e.g., image in container.image. - path kubespec.DefinitionName - comments comments - parent *apiObject -} -type propertySet map[kubespec.PropertyName]*property -type propertySlice []*property - -func newPropertyMethod( - name kubespec.PropertyName, path kubespec.DefinitionName, - prop *kubespec.Property, parent *apiObject, -) *property { - comments := newComments(prop.Description) - return &property{ - kind: method, - ref: prop.Ref, - schemaType: prop.Type, - itemTypes: prop.Items, - name: name, - path: path, - comments: comments, - parent: parent, - } -} - -func newPropertyTypeAlias( - name kubespec.PropertyName, path kubespec.DefinitionName, - prop *kubespec.Property, parent *apiObject, -) *property { - comments := newComments(prop.Description) - return &property{ - kind: typeAlias, - ref: prop.Ref, - schemaType: prop.Type, - itemTypes: prop.Items, - name: name, - path: path, - comments: comments, - parent: parent, - } -} - -func (p *property) root() *root { - return p.parent.parent.parent.parent -} - -func (p *property) emit(m *indentWriter) error { - return p.emitHelper(m, nil) -} - -// `emitAsRefMixin` will emit a property as a mixin method, so that it -// can be "mixed in" to alter an existing object. -// -// For example if we have a fully-formed deployment object, -// `someDeployment`, we'd like to be able to do something like -// `someDeployment + deployment.mixin.spec.minReadySeconds(3)` to "mix -// in" a change to the `spec.minReadySeconds` field. -// -// This method will take the `property`, which specifies a -// property method, and use it to emit such a "mixin method". -func (p *property) emitAsRefMixin( - m *indentWriter, parentMixinName string, -) error { - return p.emitHelper(m, &parentMixinName) -} - -func (p *property) emitAsTypeAlias(m *indentWriter) error { - var path kubespec.DefinitionName - if p.ref != nil { - path = *p.ref.Name() - } else { - path = *p.itemTypes.Ref.Name() - } - parsedPath, err := path.Parse() - if err != nil { - return fmt.Errorf("parse path: %v", err) - } - - if parsedPath.Version == nil { - log.Printf("Could not emit type alias for %q\n", path) - return nil - } - - // Chop the `Type` off the end of the type alias name, rewrite the - // "base" of the type alias, and then append `Type` to the end - // again. - // - // Why: the desired behavior is for a rewrite rule to apply to both - // a method and its type alias. For example, if we specify that - // `scaleIO` should be rewritten `scaleIo`, then we'd like the type - // alias to be emitted as `scaleIoType`, not `scaleIOType`, - // automatically, so that the user doesn't have to specify another, - // separate rule for the type alias itself. - k8sVersion := p.root().spec.Info.Version - trimmedName := kubespec.PropertyName(strings.TrimSuffix(string(p.name), "Type")) - typeName := jsonnet.RewriteAsIdentifier(k8sVersion, trimmedName) + "Type" - - var group kubespec.GroupName - if parsedPath.Group == nil { - group = "core" - } else { - group = *parsedPath.Group - } - - id := jsonnet.RewriteAsIdentifier(k8sVersion, parsedPath.Kind) - line := fmt.Sprintf( - "%s:: hidden.%s.%s.%s,", - typeName, group, parsedPath.Version, id) - - m.writeLine(line) - - return nil -} - -// `emitHelper` emits the Jsonnet program text for a `property`, -// handling both the case that it's a mixin (i.e., `parentMixinName != -// nil`), and the case that it's a "normal", non-mixin property method -// (i.e., `parentMixinName == nil`). -// -// NOTE: To get `emitHelper` to emit this property as a mixin, it is -// REQUIRED for `parentMixinName` to be non-nil; likewise, to get -// `emitHelper` to emit this property as a normal, non-mixin property -// method, it is necessary for `parentMixinName == nil`. -func (p *property) emitHelper(m *indentWriter, parentMixinName *string) error { - if p.kind == typeAlias { - if err := p.emitAsTypeAlias(m); err != nil { - return err - } - return nil - } - - p.comments.emit(m) - - k8sVersion := p.root().spec.Info.Version - setterFunctionName := jsonnet.RewriteAsIdentifier(k8sVersion, p.name).ToSetterID() - mixinFunctionName := jsonnet.RewriteAsIdentifier(k8sVersion, p.name).ToMixinID() - paramName := jsonnet.RewriteAsFuncParam(k8sVersion, p.name) - fieldName := jsonnet.RewriteAsFieldKey(p.name) - setterSignature := fmt.Sprintf("%s(%s)::", setterFunctionName, paramName) - mixinSignature := fmt.Sprintf("%s(%s)::", mixinFunctionName, paramName) - - if p.ref.IsMixinRef() { - parsedRefPath, err := p.ref.Name().Parse() - if err != nil { - return fmt.Errorf("parse path: %v", err) - } - - apiObject := p.root().getAPIObject(parsedRefPath) - - if err := apiObject.emitAsRefMixins(m, p, parentMixinName); err != nil { - return err - } - - } else if p.ref != nil && !p.ref.IsMixinRef() { - var body string - if parentMixinName == nil { - body = fmt.Sprintf("{%s: %s}", fieldName, paramName) - } else { - body = fmt.Sprintf("%s({%s: %s})", *parentMixinName, fieldName, paramName) - } - line := fmt.Sprintf("%s %s,", setterSignature, body) - m.writeLine(line) - } else if p.schemaType != nil { - paramType := *p.schemaType - - // - // Generate both setter and mixin functions for some property. For - // example, we emit both `metadata.setAnnotations({foo: "bar"})` - // (which replaces a set of annotations with given object) and - // `metadata.mixinAnnotations({foo: "bar"})` (which replaces only - // the `foo` key, if it exists.) - // - - var setterBody string - var mixinBody string - emitMixin := false - switch paramType { - case "array": - emitMixin = true - if parentMixinName == nil { - setterBody = fmt.Sprintf( - "if std.type(%s) == \"array\" then {%s: %s} else {%s: [%s]}", - paramName, fieldName, paramName, fieldName, paramName, - ) - mixinBody = fmt.Sprintf( - "if std.type(%s) == \"array\" then {%s+: %s} else {%s+: [%s]}", - paramName, fieldName, paramName, fieldName, paramName, - ) - } else { - setterBody = fmt.Sprintf( - "if std.type(%s) == \"array\" then %s({%s: %s}) else %s({%s: [%s]})", - paramName, *parentMixinName, fieldName, paramName, *parentMixinName, - fieldName, paramName, - ) - mixinBody = fmt.Sprintf( - "if std.type(%s) == \"array\" then %s({%s+: %s}) else %s({%s+: [%s]})", - paramName, *parentMixinName, fieldName, paramName, *parentMixinName, - fieldName, paramName, - ) - } - case "integer", "string", "boolean", "number": - if parentMixinName == nil { - setterBody = fmt.Sprintf("{%s: %s}", fieldName, paramName) - } else { - setterBody = fmt.Sprintf("%s({%s: %s})", *parentMixinName, fieldName, paramName) - } - case "object": - emitMixin = true - if parentMixinName == nil { - setterBody = fmt.Sprintf("{%s: %s}", fieldName, paramName) - mixinBody = fmt.Sprintf("{%s+: %s}", fieldName, paramName) - } else { - setterBody = fmt.Sprintf("%s({%s: %s})", *parentMixinName, fieldName, paramName) - mixinBody = fmt.Sprintf("%s({%s+: %s})", *parentMixinName, fieldName, paramName) - } - default: - log.Panicf("Unrecognized type %q", paramType) - } - - // - // Emit. - // - - line := fmt.Sprintf("%s self + %s,", setterSignature, setterBody) - m.writeLine(line) - - if emitMixin { - p.comments.emit(m) - line = fmt.Sprintf("%s self + %s,", mixinSignature, mixinBody) - m.writeLine(line) - } - } else { - log.Panicf("Neither a type nor a ref") - } - - return nil -} - -func (aos propertySet) sortAndFilterBlacklisted() (propertySlice, error) { - properties := propertySlice{} - for _, pm := range aos { - k8sVersion := pm.root().spec.Info.Version - var name kubespec.PropertyName - if pm.kind == typeAlias { - name = kubespec.PropertyName(strings.TrimSuffix(string(pm.name), "Type")) - } else { - name = pm.name - } - if kubeversion.IsBlacklistedProperty(k8sVersion, pm.path, name) { - continue - } else if pm.ref != nil { - parsed, err := pm.ref.Name().Parse() - if err != nil { - return nil, fmt.Errorf("parse path: %v", err) - } - - if parsed.Version == nil { - // TODO: Might want to error out here. - continue - } - } - properties = append(properties, pm) - } - sort.Slice(properties, func(i, j int) bool { - return properties[i].name < properties[j].name - }) - - return properties, nil -} - -//----------------------------------------------------------------------------- -// Comments. -//----------------------------------------------------------------------------- - -type comments []string - -func newComments(text string) comments { - return strings.Split(text, "\n") -} - -func (cs *comments) emit(m *indentWriter) { - for _, comment := range *cs { - if comment == "" { - // Don't create trailing space if comment is empty. - m.writeLine("//") - } else { - m.writeLine(fmt.Sprintf("// %s", comment)) - } - } -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/extension.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/extension.go deleted file mode 100644 index 63f471a0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/extension.go +++ /dev/null @@ -1,286 +0,0 @@ -package ksonnet - -import ( - "fmt" - "sort" - "strings" - - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" - "github.com/pkg/errors" -) - -const ( - localK8s = "k8s" -) - -// Extension represents a ksonnet lib extension document. -type Extension struct { - catalog *Catalog -} - -// NewExtension creates an an instance of Extension. -func NewExtension(catalog *Catalog) *Extension { - return &Extension{ - catalog: catalog, - } -} - -// Node converts an extension to a node. -func (e *Extension) Node() (nm.Noder, error) { - ext, err := e.genK8sExtension() - if err != nil { - return nil, err - } - - extBinary := nm.NewBinary(nm.NewVar(localK8s), ext, nm.BopPlus) - - fns := genMapContainers(extBinary) - - k8sImportFile := nm.NewImport("k8s.libsonnet") - k8sImport := nm.NewLocal(localK8s, k8sImportFile, fns) - - return k8sImport, nil -} - -func (e *Extension) genK8sExtension() (*nm.Object, error) { - gi := makeGroupItems() - - e.listExtension(gi) - - if err := e.mapContainersExtension(gi); err != nil { - return nil, errors.Wrap(err, "map container extensions") - } - - return gi.Node(), nil -} - -func (e *Extension) mapContainersExtension(gi *groupItems) error { - types, err := e.catalog.TypesWithDescendant("io.k8s.api.core.v1.PodSpec") - if err != nil { - return errors.Wrap(err, "find types with PodSec") - } - - mapping := nm.NewObject() - mapping.Set( - nm.FunctionKey("mapContainers", []string{"f"}), - nm.ApplyCall("fn.mapContainers", nm.NewVar("f")), - ) - - mapping.Set( - nm.FunctionKey("mapContainersWithName", []string{"names", "f"}), - nm.ApplyCall("fn.mapContainersWithName", nm.NewVar("names"), nm.NewVar("f")), - ) - - for _, ty := range types { - parts := strings.Split(ty.component.String(), ".") - gi.add(parts[0], parts[1], FormatKind(parts[2]), mapping, true) - } - - return nil -} - -func (e *Extension) listExtension(gi *groupItems) { - apiVersion := nm.NewObject() - apiVersion.Set(nm.InheritedKey("apiVersion"), nm.NewStringDouble("v1")) - - kind := nm.NewObject() - kind.Set(nm.InheritedKey("kind"), nm.NewStringDouble("List")) - - items := nm.ApplyCall("self.items", nm.NewVar("items")) - - o := nm.NewObject() - o.Set( - nm.FunctionKey("new", []string{"items"}), - nm.Combine(apiVersion, kind, items), - ) - o.Set( - nm.FunctionKey("items", []string{"items"}), - convertToArray("items", "", true), - ) - - gi.add("core", "v1", "list", o, false) -} - -type nodeMixin struct { - node nm.Noder - isMixin bool -} - -type groupItems struct { - groups map[string]map[string]map[string]nodeMixin -} - -func makeGroupItems() *groupItems { - return &groupItems{ - groups: make(map[string]map[string]map[string]nodeMixin), - } -} - -func (gi *groupItems) add(group, version, key string, node nm.Noder, isMixin bool) { - g, ok := gi.groups[group] - if !ok { - g = make(map[string]map[string]nodeMixin) - gi.groups[group] = g - } - - v, ok := g[version] - if !ok { - v = make(map[string]nodeMixin) - g[version] = v - } - - v[key] = nodeMixin{node: node, isMixin: isMixin} -} - -func (gi *groupItems) Node() *nm.Object { - var groupNames []string - for name := range gi.groups { - groupNames = append(groupNames, name) - } - sort.Strings(groupNames) - - o := nm.NewObject() - - for _, groupName := range groupNames { - group := gi.groups[groupName] - groupObject := nm.NewObject() - - var versionNames []string - for name := range group { - versionNames = append(versionNames, name) - } - sort.Strings(versionNames) - - for _, versionName := range versionNames { - version := group[versionName] - versionObject := nm.NewObject() - - var keyNames []string - for name := range version { - keyNames = append(keyNames, name) - } - sort.Strings(keyNames) - - for _, keyName := range keyNames { - node := version[keyName].node - isMixin := version[keyName].isMixin - - if isMixin { - parent := nm.NewCall(fmt.Sprintf("k8s.%s.%s.%s", groupName, versionName, keyName)) - node = nm.NewBinary(parent, node, nm.BopPlus) - } - versionObject.Set(nm.NewKey(keyName), node) - } - - parent := nm.NewCall(fmt.Sprintf("k8s.%s.%s", groupName, versionName)) - groupObject.Set(nm.NewKey(versionName), nm.NewBinary(parent, versionObject, nm.BopPlus)) - } - - parent := nm.NewCall(fmt.Sprintf("k8s.%s", groupName)) - o.Set(nm.NewKey(groupName), nm.NewBinary(parent, groupObject, nm.BopPlus)) - } - - return o -} - -func genMapContainers(body nm.Noder) *nm.Local { - o := nm.NewObject() - - o.Set( - nm.FunctionKey("mapContainers", []string{"f"}), - createMapContainersFn(), - ) - - o.Set( - nm.FunctionKey("mapContainersWithName", []string{"names", "f"}), - createMapContainersWithName(), - ) - - return nm.NewLocal("fn", o, body) -} - -func createMapContainersFn() *nm.Object { - o := nm.NewObject() - o.Set( - nm.LocalKey("podContainers"), - nm.NewCall("super.spec.template.spec.containers"), - ) - - templateSpecObject := nm.NewObject() - templateSpecObject.Set( - nm.InheritedKey("containers"), - nm.ApplyCall("std.map", nm.NewVar("f"), nm.NewVar("podContainers")), - ) - - templateObject := nm.NewObject() - templateObject.Set( - nm.InheritedKey("spec", nm.KeyOptMixin(true)), - templateSpecObject, - ) - - specObject := nm.NewObject() - specObject.Set( - nm.InheritedKey("template", nm.KeyOptMixin(true)), - templateObject, - ) - - o.Set( - nm.InheritedKey("spec", nm.KeyOptMixin(true)), - specObject, - ) - - return o -} - -func createMapContainersWithName() *nm.Local { - c1Binary := nm.NewBinary( - nm.ApplyCall("std.objectHas", nm.NewVar("c"), nm.NewStringDouble("name")), - nm.ApplyCall("inNameSet", nm.NewCall("c.name")), - nm.BopAnd, - ) - - c1True := nm.ApplyCall("f", nm.NewVar("c")) - c1False := nm.NewVar("c") - - c1 := nm.NewConditional(c1Binary, c1True, c1False) - - apply := nm.NewApply(c1, []nm.Noder{nm.NewVar("c")}, nil) - - runMap := nm.ApplyCall("self.mapContainers", apply) - - a := nm.NewVar("nameSet") - b := nm.ApplyCall("std.set", nm.NewArray([]nm.Noder{nm.NewVar("name")})) - - inNameSet := nm.NewLocal( - "inNameSet", - nm.NewFunction([]string{"name"}, genIsIntersection(a, b)), - runMap, - ) - nameSet := nm.NewLocal("nameSet", setArray("names"), inNameSet) - - return nameSet -} - -func setArray(varName string) *nm.Conditional { - bin := nm.NewBinary( - nm.ApplyCall("std.type", nm.NewVar(varName)), - nm.NewStringDouble("array"), - nm.BopEqual, - ) - - tBranch := nm.ApplyCall("std.set", nm.NewVar(varName)) - fBranch := nm.ApplyCall("std.set", nm.NewArray([]nm.Noder{nm.NewVar(varName)})) - - return nm.NewConditional(bin, tBranch, fBranch) -} - -func genIsIntersection(a, b nm.Noder) *nm.Binary { - intersection := nm.ApplyCall("std.setInter", a, b) - checkLen := nm.ApplyCall("std.length", intersection) - - return nm.NewBinary( - checkLen, - nm.NewInt(0), - nm.BopGreater, - ) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/extension_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/extension_test.go deleted file mode 100644 index 7757508a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/extension_test.go +++ /dev/null @@ -1,20 +0,0 @@ -package ksonnet - -import ( - "io/ioutil" - "testing" - - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/printer" - "github.com/stretchr/testify/require" -) - -func TestExtension_Output(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - e := NewExtension(c) - - node, err := e.Node() - require.NoError(t, err) - - require.NoError(t, printer.Fprint(ioutil.Discard, node.Node())) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/field.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/field.go deleted file mode 100644 index 7d8ce3fe..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/field.go +++ /dev/null @@ -1,76 +0,0 @@ -package ksonnet - -// Field is a Kubernetes field. -type Field struct { - kind string - description string - properties map[string]Property - version string - group string - codebase string - identifier string -} - -var _ Object = (*Field)(nil) - -// NewField creates an instance of Field. -func NewField(id, desc, codebase, group, ver, kind string, props map[string]Property) *Field { - return &Field{ - identifier: id, - description: desc, - group: group, - codebase: codebase, - version: ver, - kind: kind, - properties: props, - } -} - -// Kind is the kind for this field. -func (f *Field) Kind() string { - return f.kind -} - -// Version is the version for this field. -func (f *Field) Version() string { - return f.version -} - -// Codebase is the codebase for this field. -func (f *Field) Codebase() string { - return f.codebase -} - -// Group is the group for this field. -func (f *Field) Group() string { - if f.group == "" { - return "core" - } - - return f.group -} - -// QualifiedGroup is the group for this field. -func (f *Field) QualifiedGroup() string { - return f.Group() -} - -// Description is the description for this field. -func (f *Field) Description() string { - return f.description -} - -// Identifier is the identifier for this field. -func (f *Field) Identifier() string { - return f.identifier -} - -// IsType returns if this item is a type. It always returns false. -func (f *Field) IsType() bool { - return false -} - -// Properties are the properties for this field. -func (f *Field) Properties() map[string]Property { - return f.properties -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/field_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/field_test.go deleted file mode 100644 index dc7d962b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/field_test.go +++ /dev/null @@ -1,35 +0,0 @@ -package ksonnet - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestField(t *testing.T) { - props := make(map[string]Property) - props["foo"] = NewLiteralField("name", "integer", "desc", "ref") - - ty := NewField("id", "desc", "codebase", "group", "ver", "kind", props) - - assert.Equal(t, "id", ty.Identifier()) - assert.Equal(t, "desc", ty.Description()) - assert.Equal(t, "codebase", ty.Codebase()) - assert.Equal(t, "group", ty.Group()) - assert.Equal(t, "group", ty.QualifiedGroup()) - assert.Equal(t, "ver", ty.Version()) - assert.Equal(t, "kind", ty.Kind()) - assert.False(t, ty.IsType()) - - assert.Len(t, ty.Properties(), 1) -} - -func TestField_no_group(t *testing.T) { - props := make(map[string]Property) - props["foo"] = NewLiteralField("name", "integer", "desc", "ref") - - ty := NewField("id", "desc", "codebase", "", "ver", "kind", props) - - assert.Equal(t, "core", ty.Group()) - assert.Equal(t, "core", ty.QualifiedGroup()) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/group.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/group.go deleted file mode 100644 index 07d44277..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/group.go +++ /dev/null @@ -1,64 +0,0 @@ -package ksonnet - -import ( - "sort" - - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" -) - -// Group is group of definitions. -type Group struct { - versions map[string]*Version - name string -} - -// NewGroup creates an instance of Group. -func NewGroup(name string) *Group { - return &Group{ - versions: make(map[string]*Version), - name: name, - } -} - -// Name is the name of the group. -func (g *Group) Name() string { - return g.name -} - -// Versions returns the versions available for this group. -func (g *Group) Versions() []Version { - var names []string - for name := range g.versions { - names = append(names, name) - } - - sort.Strings(names) - - var versions []Version - for _, name := range names { - versions = append(versions, *g.versions[name]) - } - - return versions -} - -// AddResource adds a resource to a version. -func (g *Group) AddResource(r Object) { - name := r.Version() - if name == "" { - return - } - - v, ok := g.versions[name] - if !ok { - v = NewVersion(name, r.QualifiedGroup()) - g.versions[name] = v - } - - v.AddResource(r) -} - -// Node returns an ast node for this group. -func (g *Group) Node() *nm.Object { - return nm.NewObject() -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/group_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/group_test.go deleted file mode 100644 index cebfbcf3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/group_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package ksonnet - -import ( - "testing" - - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" - "github.com/stretchr/testify/require" -) - -func TestGroup_Name(t *testing.T) { - g := NewGroup("groupName") - require.Equal(t, "groupName", g.Name()) -} - -func TestGroup_Node(t *testing.T) { - g := NewGroup("groupName") - versions := nm.NewObject() - - require.Equal(t, versions, g.Node()) -} - -func TestGroup_Versions(t *testing.T) { - g := NewGroup("groupName") - g.versions = map[string]*Version{ - "v1": &Version{}, - "v2": &Version{}, - } - - require.Len(t, g.Versions(), 2) -} - -func TestGroup_AddResource(t *testing.T) { - c1 := Component{Group: "group2", Version: "v1", Kind: "kind"} - o1 := NewType("alpha", "desc", "codebase", "group", c1, nil) - - g := NewGroup("groupName") - g.AddResource(&o1) - - require.Len(t, g.Versions(), 1) - - c2 := Component{Group: "group2", Version: "", Kind: "kind"} - o2 := NewType("beta", "desc", "codebase", "group", c2, nil) - g.AddResource(&o2) - - require.Len(t, g.Versions(), 1) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/ksonnet.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/ksonnet.go deleted file mode 100644 index 677ed0a8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/ksonnet.go +++ /dev/null @@ -1,84 +0,0 @@ -package ksonnet - -import ( - "bytes" - - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/kubespec" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/printer" - "github.com/pkg/errors" -) - -// Lib is a ksonnet lib. -type Lib struct { - K8s []byte - Extensions []byte - Version string -} - -// GenerateLib generates ksonnet lib. -func GenerateLib(source string) (*Lib, error) { - apiSpec, checksum, err := kubespec.Import(source) - if err != nil { - return nil, errors.Wrap(err, "import Kubernetes spec") - } - - c, err := NewCatalog(apiSpec, CatalogOptChecksum(checksum)) - if err != nil { - return nil, errors.Wrap(err, "create ksonnet catalog") - } - - k8s, err := createK8s(c) - if err != nil { - return nil, errors.Wrap(err, "create k8s.libsonnet") - } - - k, err := createK(c) - if err != nil { - return nil, errors.Wrap(err, "create k.libsonnet") - } - - lib := &Lib{ - K8s: k8s, - Extensions: k, - Version: c.apiVersion.String(), - } - - return lib, nil -} - -func createK8s(c *Catalog) ([]byte, error) { - doc, err := NewDocument(c) - if err != nil { - return nil, errors.Wrapf(err, "create document") - } - - node, err := doc.Node() - if err != nil { - return nil, errors.Wrapf(err, "build document node") - } - - var buf bytes.Buffer - - if err := printer.Fprint(&buf, node.Node()); err != nil { - return nil, errors.Wrap(err, "print AST") - } - - return buf.Bytes(), nil -} - -func createK(c *Catalog) ([]byte, error) { - e := NewExtension(c) - - node, err := e.Node() - if err != nil { - return nil, errors.Wrapf(err, "build extension node") - } - - var buf bytes.Buffer - - if err := printer.Fprint(&buf, node.Node()); err != nil { - return nil, errors.Wrap(err, "print AST") - } - - return buf.Bytes(), nil -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/object.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/object.go deleted file mode 100644 index 471b6565..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/object.go +++ /dev/null @@ -1,94 +0,0 @@ -package ksonnet - -// Object is an object that can be turned into a node by APIObject. -type Object interface { - Kind() string - Description() string - IsType() bool - Properties() map[string]Property - Version() string - Group() string - Codebase() string - QualifiedGroup() string - Identifier() string -} - -// Property is a field in a resource -type Property interface { - Description() string - Name() string - Ref() string -} - -// LiteralField is a literal field. (e.g. string, number, int, array) -type LiteralField struct { - name string - fieldType string - description string - ref string -} - -var _ Property = (*LiteralField)(nil) - -// NewLiteralField creates an instance of LiteralField. -func NewLiteralField(name, fieldType, description, ref string) *LiteralField { - return &LiteralField{ - name: name, - fieldType: fieldType, - description: description, - ref: ref, - } -} - -// FieldType returns the field type of the LiteralField. -func (f *LiteralField) FieldType() string { - return f.fieldType -} - -// Name returns the name of the LiteralField. -func (f *LiteralField) Name() string { - return f.name -} - -// Description returns the description of the LiteralField. -func (f *LiteralField) Description() string { - return f.description -} - -// Ref returns the ref of the LiteralField. -func (f *LiteralField) Ref() string { - return f.ref -} - -// ReferenceField is a reference field. -type ReferenceField struct { - name string - description string - ref string -} - -var _ Property = (*ReferenceField)(nil) - -// NewReferenceField creates an instance of ReferenceField. -func NewReferenceField(name, description, ref string) *ReferenceField { - return &ReferenceField{ - name: name, - description: description, - ref: ref, - } -} - -// Name returns the name of the ReferenceField. -func (f *ReferenceField) Name() string { - return f.name -} - -// Description returns the description of the ReferenceField. -func (f *ReferenceField) Description() string { - return f.description -} - -// Ref returns the defintion this ReferenceField represents. -func (f *ReferenceField) Ref() string { - return f.ref -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/object_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/object_test.go deleted file mode 100644 index c07a123d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/object_test.go +++ /dev/null @@ -1,24 +0,0 @@ -package ksonnet - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestLiteralField(t *testing.T) { - f := NewLiteralField("name", "string", "desc", "ref") - - assert.Equal(t, "name", f.Name()) - assert.Equal(t, "string", f.FieldType()) - assert.Equal(t, "desc", f.Description()) - assert.Equal(t, "ref", f.Ref()) -} - -func TestReferenceField(t *testing.T) { - f := NewReferenceField("name", "desc", "ref") - - assert.Equal(t, "name", f.Name()) - assert.Equal(t, "desc", f.Description()) - assert.Equal(t, "ref", f.Ref()) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/paths.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/paths.go deleted file mode 100644 index 5e48576f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/paths.go +++ /dev/null @@ -1,75 +0,0 @@ -package ksonnet - -import ( - "github.com/go-openapi/spec" - "github.com/pkg/errors" -) - -func parsePaths(apiSpec *spec.Swagger) (map[string]Component, error) { - m := make(map[string]Component) - - if apiSpec.Paths == nil { - return nil, errors.New("api spec has zero paths") - } - paths := apiSpec.Paths.Paths - for _, pathItem := range paths { - verbs := []*spec.Operation{pathItem.Post, pathItem.Patch, pathItem.Put} - for _, verb := range verbs { - if verb == nil { - continue - } - - var body spec.Parameter - var hasBody bool - for _, param := range verb.Parameters { - if param.Name == "body" { - body = param // shallow copy - hasBody = true - break - } - } - - if !hasBody { - continue - } - - if body.Schema == nil { - return nil, errors.Errorf("invalid body parameter - missing required field: schema") - } - ref := extractRef(*body.Schema) - - component, exists, err := pathExtensionComponent(verb.Extensions) - if err != nil { - return nil, errors.Wrapf(err, "extract component for %s", ref) - } - - if exists { - m[ref] = component - } - - } - } - - return m, nil -} - -// pathExtensionComponent generates a component from a method tpe extension -func pathExtensionComponent(extensions spec.Extensions) (Component, bool, error) { - for x, v := range extensions { - if x == extensionGroupVersionKind { - gvk, ok := v.(map[string]interface{}) - if !ok { - return Component{}, false, errors.New("gvk extension was invalid") - } - - component := Component{ - Group: gvk["group"].(string), - Version: gvk["version"].(string), - Kind: gvk["kind"].(string), - } - return component, true, nil - } - } - - return Component{}, false, nil -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/paths_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/paths_test.go deleted file mode 100644 index 43509474..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/paths_test.go +++ /dev/null @@ -1,24 +0,0 @@ -package ksonnet - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_parsePaths(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - m, err := parsePaths(c.apiSpec) - require.NoError(t, err) - require.NotNil(t, m) - - expected := Component{ - Group: "rbac.authorization.k8s.io", - Version: "v1alpha1", - Kind: "ClusterRoleBinding", - } - - assert.Equal(t, expected, m["io.k8s.api.rbac.v1alpha1.ClusterRoleBinding"]) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/properties.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/properties.go deleted file mode 100644 index 37fed84b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/properties.go +++ /dev/null @@ -1,95 +0,0 @@ -package ksonnet - -import ( - "strings" - - "github.com/go-openapi/spec" - "github.com/pkg/errors" -) - -var ( - recursiveRefs = []string{ - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps", - } -) - -func extractProperties(c *Catalog, properties map[string]spec.Schema, required []string) (map[string]Property, error) { - if c == nil { - return nil, errors.New("catalog is nil") - } - - out := make(map[string]Property) - - for name, schema := range properties { - if isSkippedProperty(name, schema) { - if !stringInSlice(name, required) { - continue - } - } - - ref := extractRef(schema) - - if ref != "" && stringInSlice(ref, recursiveRefs) { - out[name] = NewLiteralField(name, "object", schema.Description, ref) - continue - } - - // literal - if t := schema.Type; len(t) == 1 { - out[name] = buildLiteralField(t[0], name, schema) - continue - } - - ifr, err := c.isFormatRef(ref) - if err != nil { - return nil, errors.Wrap(err, "check for format ref") - } - - if ifr { - // don't have to check for existence here because isFormatRef does the same thing - formatSchema := c.apiSpec.Definitions[ref] - out[name] = buildLiteralField(fieldType(formatSchema), name, schema) - continue - } - - // must be a mixin - f := NewReferenceField(name, schema.Description, ref) - out[name] = f - } - - return out, nil -} - -func buildLiteralField(fieldType, name string, schema spec.Schema) *LiteralField { - var itemRef string - if schema.Items != nil && schema.Items.Schema != nil { - itemRef = extractRef(*schema.Items.Schema) - } - - return NewLiteralField(name, fieldType, schema.Description, itemRef) -} - -func isSkippedProperty(name string, schema spec.Schema) bool { - if stringInSlice(name, blockedPropertyNames) { - return true - } - - if strings.Contains(strings.ToLower(schema.Description), "read-only") && name != "readOnly" { - return true - } - - ref := extractRef(schema) - if stringInSlice(ref, blockedReferences) { - return true - } - - return false -} - -func fieldType(schema spec.Schema) string { - if t := schema.Type; len(t) == 1 { - return t[0] - } - - return "" -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/properties_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/properties_test.go deleted file mode 100644 index 379c28c9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/properties_test.go +++ /dev/null @@ -1,182 +0,0 @@ -package ksonnet - -import ( - "testing" - - "github.com/go-openapi/spec" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_extractProperties_nil_catalog(t *testing.T) { - _, err := extractProperties(nil, nil, nil) - require.Error(t, err) -} - -func Test_extractProperties_nil_properties(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - m, err := extractProperties(c, nil, []string{}) - require.NoError(t, err) - require.NotNil(t, m) -} - -func Test_extractProperties_literal(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - s, ok := c.apiSpec.Definitions["io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta"] - require.True(t, ok) - - props, err := extractProperties(c, s.Properties, []string{}) - require.NoError(t, err) - - i, ok := props["clusterName"] - require.True(t, ok) - - prop, ok := i.(*LiteralField) - require.True(t, ok) - - assert.Equal(t, "string", prop.FieldType()) - assert.Equal(t, "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.", prop.Description()) - assert.Equal(t, "", prop.Ref()) - assert.Equal(t, "clusterName", prop.Name()) -} - -func Test_extractProperties_json_schema_props(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - s, ok := c.apiSpec.Definitions["io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation"] - require.True(t, ok) - - props, err := extractProperties(c, s.Properties, s.Required) - require.NoError(t, err) - - i, ok := props["openAPIV3Schema"] - require.True(t, ok) - - prop, ok := i.(*LiteralField) - require.True(t, ok) - - assert.Equal(t, "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps", prop.Ref()) -} - -func Test_extractProperties_kind_required(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - s, ok := c.apiSpec.Definitions["io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames"] - require.True(t, ok) - - props, err := extractProperties(c, s.Properties, s.Required) - require.NoError(t, err) - - i, ok := props["kind"] - require.True(t, ok) - - prop, ok := i.(*LiteralField) - require.True(t, ok) - - assert.Equal(t, "string", prop.FieldType()) - assert.Equal(t, "Kind is the serialized kind of the resource. It is normally CamelCase and singular.", prop.Description()) - assert.Equal(t, "", prop.Ref()) - assert.Equal(t, "kind", prop.Name()) -} - -func Test_extractProperties_kind_not_required(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - s, ok := c.apiSpec.Definitions["io.k8s.api.apps.v1beta2.Deployment"] - require.True(t, ok) - - props, err := extractProperties(c, s.Properties, s.Required) - require.NoError(t, err) - - _, ok = props["kind"] - require.False(t, ok) -} - -func Test_extractProperties_type_ref(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - s, ok := c.apiSpec.Definitions["io.k8s.api.apps.v1beta2.RollingUpdateDeployment"] - require.True(t, ok) - - props, err := extractProperties(c, s.Properties, []string{}) - require.NoError(t, err) - - i, ok := props["maxSurge"] - require.True(t, ok) - - prop, ok := i.(*LiteralField) - require.True(t, ok) - - assert.Equal(t, "string", prop.FieldType()) - assert.Equal(t, "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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", prop.Description()) - assert.Equal(t, "", prop.Ref()) - assert.Equal(t, "maxSurge", prop.Name()) -} - -func Test_extractProperties_ref(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - s, ok := c.apiSpec.Definitions["io.k8s.api.apps.v1beta2.Deployment"] - require.True(t, ok) - - props, err := extractProperties(c, s.Properties, []string{}) - require.NoError(t, err) - - i, ok := props["metadata"] - require.True(t, ok) - - prop, ok := i.(*ReferenceField) - require.True(t, ok) - - assert.Equal(t, "Standard object metadata.", prop.Description()) - assert.Equal(t, "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", prop.Ref()) - assert.Equal(t, "metadata", prop.Name()) -} - -func Test_extractProperties_invalid_format_ref(t *testing.T) { - c := initCatalog(t, "invalid_ref.json") - - s, ok := c.apiSpec.Definitions["io.k8s.api.apps.v1beta2.RollingUpdateDeployment"] - require.True(t, ok) - - _, err := extractProperties(c, s.Properties, []string{}) - require.Error(t, err) -} - -func Test_fieldType(t *testing.T) { - - var ( - s1 = spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: spec.StringOrArray{"string"}, - }, - } - - s2 = spec.Schema{} - ) - - cases := []struct { - name string - schema spec.Schema - expected string - }{ - { - name: "with an item", - schema: s1, - expected: "string", - }, - { - name: "with no items", - schema: s2, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - got := fieldType(tc.schema) - require.Equal(t, tc.expected, got) - }) - } -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/renderer.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/renderer.go deleted file mode 100644 index b08d237b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/renderer.go +++ /dev/null @@ -1,366 +0,0 @@ -package ksonnet - -import ( - "fmt" - "sort" - "strings" - - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" - "github.com/pkg/errors" -) - -// renderer is an item that can be rendered. -type renderer interface { - Render(parent *nm.Object) error -} - -type baseRenderer struct { - name string - description string - parent string - ref string -} - -func newBaseRenderer(field Property, parent string) baseRenderer { - return baseRenderer{ - name: field.Name(), - description: field.Description(), - parent: parent, - ref: field.Ref(), - } -} - -func (r *baseRenderer) setter() string { - return fieldName(r.name, false) -} - -func (r *baseRenderer) mixin() string { - return fieldName(r.name, true) -} - -// LiteralFieldRenderer renders a literal field. -type LiteralFieldRenderer struct { - lf *LiteralField - parentName string -} - -// NewLiteralFieldRenderer creates an instance of LiteralField. -func NewLiteralFieldRenderer(lf *LiteralField, parentName string) *LiteralFieldRenderer { - return &LiteralFieldRenderer{ - lf: lf, - parentName: parentName, - } -} - -// Render renders the literal field in the container. -func (r *LiteralFieldRenderer) Render(container *nm.Object) error { - var rndr renderer - - switch ft := r.lf.FieldType(); ft { - case "array": - rndr = NewArrayRenderer(r.lf, r.parentName) - case "object": - rndr = NewObjectRenderer(r.lf, r.parentName) - case "string", "boolean", "integer", "number": - rndr = NewItemRenderer(r.lf, r.parentName) - default: - return errors.Errorf("unknown literal field type %s", ft) - } - - return rndr.Render(container) -} - -// ReferenceRenderer renders a reference field. -type ReferenceRenderer struct { - baseRenderer - rf *ReferenceField - tl typeLookup -} - -// NewReferenceRenderer creates an instance of ReferenceRenderer. -func NewReferenceRenderer(rf *ReferenceField, tl typeLookup, parent string) *ReferenceRenderer { - return &ReferenceRenderer{ - baseRenderer: newBaseRenderer(rf, parent), - tl: tl, - rf: rf, - } -} - -// Render renders the reference in the container. -func (r *ReferenceRenderer) Render(container *nm.Object) error { - name := r.rf.Name() - desc := r.rf.Description() - - mo := nm.NewObject() - mixinPreamble(mo, r.parent, name) - - ref := r.rf.Ref() - - ty, err := r.tl.Field(ref) - if err != nil { - return errors.Wrapf(err, "fetch type %s", ref) - } - - renderFields(r.tl, mo, name, ty.Properties()) - - formattedName := FormatKind(r.rf.Name()) - - container.Set(nm.NewKey(formattedName, nm.KeyOptComment(desc)), mo) - _ = genTypeAliasEntry(container, name, ref) - - return nil -} - -// ObjectRenderer renders an object field. -type ObjectRenderer struct { - baseRenderer -} - -// NewObjectRenderer creates an instance of ObjectRenderer -func NewObjectRenderer(field Property, parent string) *ObjectRenderer { - return &ObjectRenderer{ - baseRenderer: newBaseRenderer(field, parent), - } -} - -// Render renders the object field in the container. -func (r *ObjectRenderer) Render(container *nm.Object) error { - wrapper := mixinName(r.parent) - setterFn := createObjectWithField(r.name, wrapper, false) - setProperty(container, r.setter(), r.description, []string{FormatKind(r.name)}, setterFn) - - mixinFn := createObjectWithField(r.name, wrapper, true) - setProperty(container, r.mixin(), r.description, []string{FormatKind(r.name)}, mixinFn) - - _ = genTypeAliasEntry(container, r.name, r.ref) - - return nil -} - -// ItemRenderer renders items. -type ItemRenderer struct { - baseRenderer -} - -var _ renderer = (*ItemRenderer)(nil) - -// NewItemRenderer creates an instance of ItemRenderer. -func NewItemRenderer(f Property, parent string) *ItemRenderer { - return &ItemRenderer{baseRenderer: newBaseRenderer(f, parent)} -} - -// Render renders an item in its parent object. -func (r *ItemRenderer) Render(parent *nm.Object) error { - noder := createObjectWithField(r.name, mixinName(r.parent), false) - setProperty(parent, r.setter(), r.description, []string{FormatKind(r.name)}, noder) - - _ = genTypeAliasEntry(parent, r.name, r.ref) - return nil -} - -// ArrayRenderer renders arrays. -type ArrayRenderer struct { - baseRenderer -} - -// NewArrayRenderer creates an instance of ArrayRenderer. -func NewArrayRenderer(f Property, parent string) *ArrayRenderer { - return &ArrayRenderer{baseRenderer: newBaseRenderer(f, parent)} -} - -// Render renders an item in its parent object. -func (r *ArrayRenderer) Render(container *nm.Object) error { - wrapper := mixinName(r.parent) - setterFn := convertToArray(r.name, wrapper, false) - setProperty(container, r.setter(), r.description, []string{FormatKind(r.name)}, setterFn) - - mixinFn := convertToArray(r.name, wrapper, true) - setProperty(container, r.mixin(), r.description, []string{FormatKind(r.name)}, mixinFn) - - _ = genTypeAliasEntry(container, r.name, r.ref) - return nil -} - -func convertToArray(varName, parent string, mixin bool) nm.Noder { - apply := nm.NewApply( - nm.NewCall("std.type"), - []nm.Noder{nm.NewVar(FormatKind(varName))}, - nil) - - test := nm.NewBinary(apply, nm.NewStringDouble("array"), nm.BopEqual) - - var trueBranch nm.Noder - var falseBranch nm.Noder - - trueO := nm.OnelineObject() - trueO.Set( - nm.InheritedKey(varName, nm.KeyOptMixin(mixin)), - nm.NewVar(FormatKind(varName))) - - falseO := nm.OnelineObject() - falseO.Set( - nm.InheritedKey(varName, nm.KeyOptMixin(mixin)), - nm.NewArray([]nm.Noder{nm.NewVar(FormatKind(varName))})) - - if parent == "" { - trueBranch = trueO - falseBranch = falseO - } else { - trueBranch = nm.NewApply(nm.NewCall(parent), []nm.Noder{trueO}, nil) - falseBranch = nm.NewApply(nm.NewCall(parent), []nm.Noder{falseO}, nil) - } - - return nm.NewConditional(test, trueBranch, falseBranch) -} - -// createObjectWithField creates an object with a field. Creates {field: field} or {field+: field} -// if mixin. If it has a parent, it create __parentNameMixin({field: field}). -func createObjectWithField(name, parentName string, mixin bool) nm.Noder { - var noder nm.Noder - io := nm.OnelineObject() - io.Set(nm.InheritedKey(name, nm.KeyOptMixin(mixin)), nm.NewVar(FormatKind(name))) - - if parentName == "" { - noder = io - } else { - noder = nm.NewApply(nm.NewCall(parentName), []nm.Noder{io}, nil) - } - - return noder -} - -func setProperty(o *nm.Object, fnName, desc string, args []string, node nm.Noder) { - node = nm.NewBinary(&nm.Self{}, node, nm.BopPlus) - key := nm.FunctionKey(fnName, args, nm.KeyOptComment(desc)) - o.Set(key, node) -} - -func mixinPreamble(o *nm.Object, parent, name string) error { - if o == nil { - return errors.New("parent object is nil") - } - name = FormatKind(name) - - formattedName := mixinName(name) - - var noder nm.Noder - - io := nm.OnelineObject() - io.Set(nm.InheritedKey(name, nm.KeyOptMixin(true)), nm.NewVar(name)) - - if parent == "" { - noder = io - } else { - noder = nm.ApplyCall(mixinName(parent), io) - } - - o.Set(nm.LocalKey(formattedName, nm.KeyOptParams([]string{name})), noder) - - miFn := nm.NewCall(formattedName) - o.Set(nm.FunctionKey("mixinInstance", []string{name}), nm.NewApply(miFn, []nm.Noder{nm.NewVar(name)}, nil)) - - return nil -} - -func genTypeAliasEntry(container *nm.Object, name, refName string) error { - if refName == "" { - return errors.New("ref name is blank") - } - - rd, err := ParseDescription(refName) - if err != nil { - return errors.Wrapf(err, "parse ref name from %q and %q", name, refName) - } - - if rd.Group == "" { - rd.Group = "core" - } - - if rd.Version == "" { - return errors.Errorf("there is no version in the ref name for %q and %q", - name, refName) - } - - kind := FormatKind(rd.Kind) - path := []string{"hidden", rd.Group, rd.Version, kind} - location := strings.Join(path, ".") - - typeAliasName := fmt.Sprintf("%sType", name) - - c := nm.NewCall(location) - - container.Set(nm.NewKey(typeAliasName), c) - - return nil -} - -// Generates a field name. -func fieldName(name string, isMixin bool) string { - var out string - - name = FormatKind(name) - - out = fmt.Sprintf("with%s", strings.Title(name)) - if isMixin { - return fmt.Sprintf("%s%s", out, "Mixin") - } - - return out -} - -func mixinName(name string) string { - if name == "" { - return "" - } - - name = FormatKind(name) - - return fmt.Sprintf("__%sMixin", name) -} - -// typeLookup can look up types by id. -type typeLookup interface { - Field(id string) (*Field, error) -} - -type renderFieldsFn func(tl typeLookup, parent *nm.Object, parentName string, props map[string]Property) error - -// renderFields renders fields from a property map. -func renderFields(tl typeLookup, parent *nm.Object, parentName string, props map[string]Property) error { - container := parent - if parentName == "" { - container = nm.NewObject() - } - - var names []string - for name := range props { - names = append(names, name) - } - - sort.Strings(names) - - for _, name := range names { - field := props[name] - - switch t := field.(type) { - case *LiteralField: - r := NewLiteralFieldRenderer(t, parentName) - if err := r.Render(parent); err != nil { - return errors.Wrap(err, "render literal field") - } - case *ReferenceField: - r := NewReferenceRenderer(t, tl, parentName) - if err := r.Render(container); err != nil { - return errors.Wrap(err, "render reference field") - } - default: - return errors.Errorf("unknown field type %T", t) - } - } - - if parentName == "" { - parent.Set(nm.NewKey("mixin"), container) - } - - return nil -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/renderer_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/renderer_test.go deleted file mode 100644 index 31f05172..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/renderer_test.go +++ /dev/null @@ -1,429 +0,0 @@ -package ksonnet - -import ( - "io/ioutil" - "testing" - - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/printer" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestLiteralFieldRenderer(t *testing.T) { - cases := []struct { - name string - fieldType string - hasMixin bool - isErr bool - }{ - { - name: "item", - fieldType: "string", - }, - { - name: "array", - fieldType: "array", - hasMixin: true, - }, - { - name: "object", - fieldType: "object", - hasMixin: true, - }, - { - name: "unknown field type", - fieldType: "unknown", - isErr: true, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - f := NewLiteralField("name", tc.fieldType, "desc", "") - r := NewLiteralFieldRenderer(f, "") - - o := nm.NewObject() - err := r.Render(o) - - if tc.isErr { - require.Error(t, err) - } else { - require.NoError(t, err) - - assert.NotNil(t, o.Get(fieldName("name", false))) - if tc.hasMixin { - assert.NotNil(t, o.Get(fieldName("name", true))) - } - } - }) - } -} - -func TestReferenceRenderer(t *testing.T) { - cases := []struct { - name string - ref string - isErr bool - }{ - { - name: "with a reference", - ref: "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - }, - { - name: "without a resource", - isErr: true, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - - f := NewReferenceField("name", "desc", tc.ref) - - r := NewReferenceRenderer(f, c, "") - - o := nm.NewObject() - err := r.Render(o) - if tc.isErr { - require.Error(t, err) - } else { - require.NoError(t, err) - require.NotNil(t, o.Get("name")) - } - }) - } -} - -func Test_setProperty(t *testing.T) { - o := nm.NewObject() - setProperty(o, "fnName", "desc", []string{"arg1"}, nm.NewObject()) - - expected := nm.NewObject() - node := nm.NewBinary(&nm.Self{}, nm.NewObject(), nm.BopPlus) - expected.Set( - nm.FunctionKey("fnName", []string{"arg1"}, nm.KeyOptComment("desc")), - node) - - require.Equal(t, expected, o) - -} - -func Test_createObjectWithField(t *testing.T) { - cases := []struct { - name string - parent string - }{ - { - name: "without parent", - parent: "", - }, - { - name: "with parent", - parent: "parent", - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - got := createObjectWithField("varName", tc.parent, false) - - io := nm.OnelineObject() - io.Set(nm.InheritedKey("varName"), nm.NewVar("varName")) - - var expected nm.Noder - if tc.parent == "" { - expected = io - } else { - expected = nm.NewApply(nm.NewCall(tc.parent), []nm.Noder{io}, nil) - } - - require.Equal(t, expected, got) - }) - } -} - -func Test_convertToArray(t *testing.T) { - cases := []struct { - name string - mixin bool - parent string - }{ - { - name: "no mixin", - mixin: false, - }, - { - name: "mixin", - mixin: true, - }, - { - name: "parent", - parent: "parent", - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - call := nm.NewCall("std.type") - args := nm.NewVar("varName") - apply := nm.NewApply(call, []nm.Noder{args}, nil) - - key := nm.InheritedKey("varName", nm.KeyOptMixin(tc.mixin)) - - var trueBranch, falseBranch nm.Noder - - bo := nm.NewBinary(apply, nm.NewStringDouble("array"), nm.BopEqual) - trueObject := nm.OnelineObject() - trueObject.Set(key, nm.NewVar("varName")) - - falseObject := nm.OnelineObject() - falseObject.Set(key, nm.NewArray([]nm.Noder{nm.NewVar("varName")})) - - if tc.parent == "" { - trueBranch = trueObject - falseBranch = falseObject - } else { - trueBranch = nm.NewApply(nm.NewCall(tc.parent), []nm.Noder{trueObject}, nil) - falseBranch = nm.NewApply(nm.NewCall(tc.parent), []nm.Noder{falseObject}, nil) - } - - expected := nm.NewConditional(bo, trueBranch, falseBranch) - - got := convertToArray("varName", tc.parent, tc.mixin) - - require.Equal(t, expected, got) - }) - } -} - -func Test_genTypeAlias(t *testing.T) { - cases := []struct { - name string - propName string - ref string - keyName string - alias string - isErr bool - }{ - { - name: "with a ref", - propName: "prop", - ref: "io.k8s.api.group.v1.Prop", - keyName: "propType", - alias: "hidden.group.v1.prop", - }, - { - name: "with no ref", - isErr: true, - }, - { - name: "with an un-parsable ref", - ref: "none", - isErr: true, - }, - { - name: "with an item ref", - propName: "prop", - ref: "io.k8s.api.group.v1.Prop", - keyName: "propType", - alias: "hidden.group.v1.prop", - }, - { - name: "without a group", - propName: "prop", - ref: "io.k8s.codebase.pkg.api.version.kind", - keyName: "propType", - alias: "hidden.core.version.kind", - }, - { - name: "without a version", - propName: "prop", - ref: "io.k8s.codebase.pkg.runtime.kind", - isErr: true, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - - o := nm.NewObject() - err := genTypeAliasEntry(o, tc.propName, tc.ref) - - if tc.isErr { - require.Error(t, err) - } else { - require.NoError(t, err) - - n := o.Get(tc.keyName) - assert.NotNil(t, n) - - expectedCall := nm.NewCall(tc.alias) - assert.Equal(t, expectedCall, n) - } - }) - } -} - -func Test_mixinPreamble(t *testing.T) { - cases := []struct { - name string - container *nm.Object - parentName string - mixinName string - isErr bool - }{ - { - name: "with an empty parent container", - mixinName: "name", - isErr: true, - }, - { - name: "without a parent name", - container: nm.NewObject(), - mixinName: "name", - }, - { - name: "with a parent name", - container: nm.NewObject(), - parentName: "parent", - mixinName: "name", - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - err := mixinPreamble(tc.container, tc.parentName, tc.mixinName) - if tc.isErr { - require.Error(t, err) - } else { - require.NoError(t, err) - - require.NotNil(t, tc.container.Get("mixinInstance")) - - n := tc.container.Get(mixinName(tc.mixinName)) - require.NotNil(t, n) - - if tc.parentName == "" { - require.IsType(t, &nm.Object{}, n) - } else { - require.IsType(t, &nm.Apply{}, n) - } - } - }) - } - -} - -func Test_fieldName(t *testing.T) { - cases := []struct { - name string - in string - isMixin bool - expected string - }{ - { - name: "is mixin", - in: "name", - isMixin: true, - expected: "withNameMixin", - }, - { - name: "is not mixin", - in: "name", - isMixin: false, - expected: "withName", - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - got := fieldName(tc.in, tc.isMixin) - require.Equal(t, tc.expected, got) - }) - } -} - -func Test_mixinName(t *testing.T) { - cases := []struct { - name string - in string - expected string - }{ - { - name: "empty", - }, - { - name: "valid", - in: "name", - expected: "__nameMixin", - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - got := mixinName(tc.in) - require.Equal(t, tc.expected, got) - }) - } -} - -func Test_renderFields(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - o := nm.NewObject() - props := map[string]Property{ - "name": NewLiteralField("name", "string", "desc", ""), - "aref": NewReferenceField("aref", "desc", "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector"), - } - - err := renderFields(c, o, "", props) - require.NoError(t, err) - - err = printer.Fprint(ioutil.Discard, o.Node()) - require.NoError(t, err) - - require.NotNil(t, o.Get(fieldName("name", false))) - mo, ok := o.Get("mixin").(*nm.Object) - require.True(t, ok) - require.NotNil(t, mo.Get("aref")) -} - -type customField struct{} - -func (cf *customField) Description() string { return "desc" } -func (cf *customField) Name() string { return "name" } -func (cf *customField) Ref() string { return "" } - -func Test_renderFields_unknown_type(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - o := nm.NewObject() - props := map[string]Property{ - "name": &customField{}, - } - - err := renderFields(c, o, "", props) - require.Error(t, err) -} - -func Test_renderFields_literal_field_error(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - o := nm.NewObject() - props := map[string]Property{ - "name": NewLiteralField("name", "unknown", "desc", ""), - } - - err := renderFields(c, o, "", props) - require.Error(t, err) -} - -func Test_renderFields_reference_field_error(t *testing.T) { - c := initCatalog(t, "swagger-1.8.json") - o := nm.NewObject() - props := map[string]Property{ - "aref": NewReferenceField("aref", "desc", "unknown-id"), - } - - err := renderFields(c, o, "", props) - require.Error(t, err) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/strings.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/strings.go deleted file mode 100644 index 0891d383..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/strings.go +++ /dev/null @@ -1,103 +0,0 @@ -package ksonnet - -import ( - "bytes" - "strings" - "unicode" -) - -var ( - jsonnetKeywords = []string{"assert", "else", "error", "false", "for", "function", "if", - "import", "importstr", "in", "null", "tailstrict", "then", "self", "super", - "true"} -) - -// camelCase converts a string to camel case. -func camelCase(in string) string { - out := "" - - for i, r := range in { - if i == 0 { - out += strings.ToLower(string(r)) - continue - } - - out += string(r) - - } - - return out -} - -// stringInSlice returns true if the string is in the slice. -func stringInSlice(a string, list []string) bool { - for _, b := range list { - if b == a { - return true - } - } - return false -} - -// capitalizer adjusts the case of terms found in a string. -func toLower(b byte) byte { - return byte(unicode.ToLower(rune(b))) -} - -func isUpper(b byte) bool { - return unicode.IsUpper(rune(b)) -} - -// capitalize adjusts the case of terms found in a string. It will convert `HTTPHeader` into -// `HttpHeader`. -func capitalize(in string) string { - l := len(in) - 1 - - if l == 0 { - // nothing to do when there is a one character strings - return in - } - - var b bytes.Buffer - b.WriteByte(in[0]) - - for i := 1; i <= l; i++ { - if isUpper(in[i-1]) { - if i < l { - if isUpper(in[i+1]) || (isUpper(in[i]) && i+1 == l) { - b.WriteByte(toLower(in[i])) - } else { - b.WriteByte(in[i]) - } - } else if i == l && isUpper(in[i]) { - b.WriteByte(toLower(in[i])) - } else { - b.WriteByte(in[i]) - } - } else { - b.WriteByte(in[i]) - } - } - - return b.String() -} - -// FormatKind formats a string in kind format. i.e camel case with jsonnet keywords massaged. -func FormatKind(s string) string { - if strings.ToLower(s) == "local" { - return "localStorage" - } - - if strings.HasPrefix(s, "$") { - s = "dollar" + strings.Title(strings.TrimPrefix(s, "$")) - return s - } - s = capitalize(s) - s = camelCase(s) - - if stringInSlice(s, jsonnetKeywords) { - s = s + "Param" - } - - return s -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/strings_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/strings_test.go deleted file mode 100644 index 2961c22b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/strings_test.go +++ /dev/null @@ -1,167 +0,0 @@ -package ksonnet - -import ( - "testing" - - "github.com/stretchr/testify/require" -) - -func Test_camelCase(t *testing.T) { - cases := []struct { - in string - out string - }{ - { - in: "foo", - out: "foo", - }, - { - in: "Foo", - out: "foo", - }, - { - in: "PascalCase", - out: "pascalCase", - }, - } - - for _, tc := range cases { - t.Run(tc.in, func(t *testing.T) { - out := camelCase(tc.in) - require.Equal(t, tc.out, out) - }) - } -} - -func Test_stringInSlice(t *testing.T) { - cases := []struct { - name string - s string - sl []string - found bool - }{ - { - name: "item present", - s: "a", - sl: []string{"a", "b", "c"}, - found: true, - }, - { - name: "item not present", - s: "d", - sl: []string{"a", "b", "c"}, - found: false, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - require.Equal(t, tc.found, stringInSlice(tc.s, tc.sl)) - }) - } -} - -func Test_capitalizer_capitalize(t *testing.T) { - tests := []struct { - in string - want string - }{ - {in: "hostIPC", want: "hostIpc"}, - {in: "hostPID", want: "hostPid"}, - {in: "targetCPUUtilizationPercentage", want: "targetCpuUtilizationPercentage"}, - {in: "externalID", want: "externalId"}, - {in: "podCIDR", want: "podCidr"}, - {in: "providerID", want: "providerId"}, - {in: "bootID", want: "bootId"}, - {in: "machineID", want: "machineId"}, - {in: "systemUUID", want: "systemUuid"}, - {in: "volumeID", want: "volumeId"}, - {in: "diskURI", want: "diskUri"}, - {in: "targetWWNs", want: "targetWwns"}, - {in: "datasetUUID", want: "datasetUuid"}, - {in: "pdID", want: "pdId"}, - {in: "scaleIO", want: "scaleIo"}, - {in: "podIP", want: "podIp"}, - {in: "hostIP", want: "hostIp"}, - {in: "clusterIP", want: "clusterIp"}, - {in: "externalIPs", want: "externalIps"}, - {in: "loadBalancerIP", want: "loadBalancerIp"}, - {in: "containerID", want: "containerId"}, - {in: "imageID", want: "imageId"}, - {in: "serverAddressByClientCIDRs", want: "serverAddressByClientCidrs"}, - {in: "clientCIDR", want: "clientCidr"}, - {in: "nonResourceURLs", want: "nonResourceUrls"}, - {in: "currentCPUUtilizationPercentage", want: "currentCpuUtilizationPercentage"}, - {in: "downwardAPI", want: "downwardApi"}, - {in: "AWSElasticBlockStoreVolumeSource", want: "AwsElasticBlockStoreVolumeSource"}, - {in: "CephFSVolumeSource", want: "CephFsVolumeSource"}, - {in: "DownwardAPIProjection", want: "DownwardApiProjection"}, - {in: "DownwardAPIVolumeFile", want: "DownwardApiVolumeFile"}, - {in: "DownwardAPIVolumeSource", want: "DownwardApiVolumeSource"}, - {in: "FCVolumeSource", want: "FcVolumeSource"}, - {in: "GCEPersistentDiskVolumeSource", want: "GcePersistentDiskVolumeSource"}, - {in: "HTTPGetAction", want: "HttpGetAction"}, - {in: "HTTPHeader", want: "HttpHeader"}, - {in: "ISCSIVolumeSource", want: "IscsiVolumeSource"}, - {in: "NFSVolumeSource", want: "NfsVolumeSource"}, - {in: "RBDVolumeSource", want: "RbdVolumeSource"}, - {in: "SELinuxOptions", want: "SeLinuxOptions"}, - {in: "ScaleIOVolumeSource", want: "ScaleIoVolumeSource"}, - {in: "TCPSocketAction", want: "TcpSocketAction"}, - {in: "APIVersion", want: "ApiVersion"}, - {in: "FSGroupStrategyOptions", want: "FsGroupStrategyOptions"}, - {in: "HTTPIngressPath", want: "HttpIngressPath"}, - {in: "HTTPIngressRuleValue", want: "HttpIngressRuleValue"}, - {in: "IDRange", want: "IdRange"}, - {in: "IngressTLS", want: "IngressTls"}, - {in: "SELinuxStrategyOptions", want: "SeLinuxStrategyOptions"}, - {in: "APIGroup", want: "ApiGroup"}, - {in: "APIGroupList", want: "ApiGroupList"}, - {in: "APIResource", want: "ApiResource"}, - {in: "APIResourceList", want: "ApiResourceList"}, - {in: "APIVersions", want: "ApiVersions"}, - {in: "ServerAddressByClientCIDR", want: "ServerAddressByClientCidr"}, - {in: "a", want: "a"}, - {in: "A", want: "A"}, - } - for _, tt := range tests { - t.Run(tt.in, func(t *testing.T) { - require.Equal(t, tt.want, capitalize(tt.in), "c.capitalize(%s)", tt.in) - }) - } -} - -func Test_FormatKind(t *testing.T) { - cases := []struct { - name string - expected string - }{ - { - name: "local", - expected: "localStorage", - }, - { - name: "error", - expected: "errorParam", - }, - { - name: "foo", - expected: "foo", - }, - { - name: "CIDRType", - expected: "cidrType", - }, - { - name: "$ref", - expected: "dollarRef", - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - got := FormatKind(tc.name) - require.Equal(t, tc.expected, got) - }) - } -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/component.json b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/component.json deleted file mode 100644 index f4350fbd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/component.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "apiVersion": "v1", - "items": [ - { - "apiVersion": "apps/v1beta2", - "kind": "Deployment", - "metadata": { - "name": "appName" - }, - "spec": { - "replicas": 2, - "template": { - "metadata": { - "labels": { - "app": "customName" - } - }, - "spec": { - "containers": [ - { - "image": "nginx:latest", - "name": "appName", - "ports": [ - { - "containerPort": 80 - } - ] - } - ] - } - } - } - } - ], - "kind": "List" -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/component.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/component.libsonnet deleted file mode 100644 index a53ae9cd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/component.libsonnet +++ /dev/null @@ -1,66 +0,0 @@ -local k = import 'k.libsonnet'; - -local params = { - version: 'v1beta2', - name: 'appName', - replicas: 3, - containerPort: 80, - image: 'nginx:latest', - labels: { app: 'customName' }, -}; - -// defining the deployment version as a variable means you potentially have the ability to -// set versions in params. It also means a single prototype can support multiple versions of a -// resource. -local deploymentVersion = params.version; - -// container creates a container object -local container = function(version, name, image, containerPort) - // create a local variable with our resource - local deployment = k.apps[deploymentVersion].deployment; - - local containersType = deployment.mixin.spec.template.spec.containersType; - local portsType = containersType.portsType; - - local port = portsType.withContainerPort(containerPort); - - containersType - .withName(name) - .withImage(image) - .withPorts(port); - - -// createDeployment is our function for creating a deployment -local createDeployment = function(version, name, containers, podLabels={}, replicas=1) - // create a local variable with our resource - local deployment = k.apps[version].deployment; - - local labels = { app: name } + podLabels; - local metadata = deployment.mixin.metadata.withName(name); - local spec = deployment.mixin.spec.withReplicas(replicas); - local templateSpec = spec.template.spec.withContainers(containers); - local templateMetadata = spec.template.metadata.withLabels(labels); - - deployment - .new() - + metadata - + spec - + templateSpec - + templateMetadata; - - -local containers = [ - container(deploymentVersion, params.name, params.image, params.containerPort), -]; - -// The createDeployment function allows authors to generate the objects they would like rather -// than being confined to what is generated in ksonnet-lib. -local appDeployment = createDeployment( - deploymentVersion, - params.name, - containers, - podLabels=params.labels, - replicas=2 -); - -k.core.v1.list.new([appDeployment]) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/constructor.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/constructor.libsonnet deleted file mode 100644 index 947ce77e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/constructor.libsonnet +++ /dev/null @@ -1,3 +0,0 @@ -{ - new(name='', nestedName='', nestedItem='', str='val', obj={ key: 'val' }, array=['val'], other='', foo=''):: apiVersion + kind + self.withArray(array).withName(name).withObj(obj).withStr(str) + self.foo.bar.baz.withItem(nestedItem).withName(nestedName) + self.last.path.withFoo(foo) + self.other.withArray(other), -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/generated_k.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/generated_k.libsonnet deleted file mode 100644 index 42dcd6b7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/generated_k.libsonnet +++ /dev/null @@ -1,111 +0,0 @@ -local k8s = import 'k8s.libsonnet'; -local fn = { - mapContainers(f):: { - local podContainers = super.spec.template.spec.containers, - spec+: { - template+: { - spec+: { - containers: std.map(f, podContainers), - }, - }, - }, - }, - mapContainersWithName(names, f):: - local nameSet = if std.type(names) == 'array' then std.set(names) else std.set([names]); - local inNameSet(name) = std.length(std.setInter(nameSet, std.set([name]))) > 0; - - self.mapContainers(function(c) if std.objectHas(c, 'name') && inNameSet(c.name) then f(c) else c), -}; - -k8s { - apps:: k8s.apps { - v1beta1:: k8s.apps.v1beta1 { - deployment:: k8s.apps.v1beta1.deployment { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - statefulSet:: k8s.apps.v1beta1.statefulSet { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - v1beta2:: k8s.apps.v1beta2 { - daemonSet:: k8s.apps.v1beta2.daemonSet { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - deployment:: k8s.apps.v1beta2.deployment { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - replicaSet:: k8s.apps.v1beta2.replicaSet { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - statefulSet:: k8s.apps.v1beta2.statefulSet { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - }, - batch:: k8s.batch { - v1:: k8s.batch.v1 { - job:: k8s.batch.v1.job { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - v1beta1:: k8s.batch.v1beta1 { - cronJob:: k8s.batch.v1beta1.cronJob { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - v2alpha1:: k8s.batch.v2alpha1 { - cronJob:: k8s.batch.v2alpha1.cronJob { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - }, - core:: k8s.core { - v1:: k8s.core.v1 { - list:: { - new(items):: { - apiVersion: 'v1', - } + { - kind: 'List', - } + self.items(items), - items(items):: if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - }, - pod:: k8s.core.v1.pod { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - podTemplate:: k8s.core.v1.podTemplate { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - replicationController:: k8s.core.v1.replicationController { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - }, - extensions:: k8s.extensions { - v1beta1:: k8s.extensions.v1beta1 { - daemonSet:: k8s.extensions.v1beta1.daemonSet { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - deployment:: k8s.extensions.v1beta1.deployment { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - replicaSet:: k8s.extensions.v1beta1.replicaSet { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/invalid_definition.json b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/invalid_definition.json deleted file mode 100644 index 90eba751..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/invalid_definition.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "v1.8.0" - }, - "paths": { - "/invalid": {} - }, - "definitions": { - "invalid": {} - } -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/invalid_ref.json b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/invalid_ref.json deleted file mode 100644 index 90ab8541..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/invalid_ref.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "v1.8.0" - }, - "paths": { - "/invalid": {} - }, - "definitions": { - "io.k8s.api.apps.v1beta2.RollingUpdateDeployment": { - "description": "Spec to control the desired behavior of rolling update.", - "properties": { - "maxSurge": { - "description": "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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - }, - "maxUnavailable": { - "description": "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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - } - } - } - } -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/k.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/k.libsonnet deleted file mode 100644 index 42dcd6b7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/k.libsonnet +++ /dev/null @@ -1,111 +0,0 @@ -local k8s = import 'k8s.libsonnet'; -local fn = { - mapContainers(f):: { - local podContainers = super.spec.template.spec.containers, - spec+: { - template+: { - spec+: { - containers: std.map(f, podContainers), - }, - }, - }, - }, - mapContainersWithName(names, f):: - local nameSet = if std.type(names) == 'array' then std.set(names) else std.set([names]); - local inNameSet(name) = std.length(std.setInter(nameSet, std.set([name]))) > 0; - - self.mapContainers(function(c) if std.objectHas(c, 'name') && inNameSet(c.name) then f(c) else c), -}; - -k8s { - apps:: k8s.apps { - v1beta1:: k8s.apps.v1beta1 { - deployment:: k8s.apps.v1beta1.deployment { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - statefulSet:: k8s.apps.v1beta1.statefulSet { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - v1beta2:: k8s.apps.v1beta2 { - daemonSet:: k8s.apps.v1beta2.daemonSet { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - deployment:: k8s.apps.v1beta2.deployment { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - replicaSet:: k8s.apps.v1beta2.replicaSet { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - statefulSet:: k8s.apps.v1beta2.statefulSet { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - }, - batch:: k8s.batch { - v1:: k8s.batch.v1 { - job:: k8s.batch.v1.job { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - v1beta1:: k8s.batch.v1beta1 { - cronJob:: k8s.batch.v1beta1.cronJob { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - v2alpha1:: k8s.batch.v2alpha1 { - cronJob:: k8s.batch.v2alpha1.cronJob { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - }, - core:: k8s.core { - v1:: k8s.core.v1 { - list:: { - new(items):: { - apiVersion: 'v1', - } + { - kind: 'List', - } + self.items(items), - items(items):: if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - }, - pod:: k8s.core.v1.pod { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - podTemplate:: k8s.core.v1.podTemplate { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - replicationController:: k8s.core.v1.replicationController { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - }, - extensions:: k8s.extensions { - v1beta1:: k8s.extensions.v1beta1 { - daemonSet:: k8s.extensions.v1beta1.daemonSet { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - deployment:: k8s.extensions.v1beta1.deployment { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - replicaSet:: k8s.extensions.v1beta1.replicaSet { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/swagger-1.8.json b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/swagger-1.8.json deleted file mode 100644 index 389eaaa9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/testdata/swagger-1.8.json +++ /dev/null @@ -1,73741 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Kubernetes", - "version": "v1.8.0" - }, - "paths": { - "/api/": { - "get": { - "description": "get available API versions", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core" - ], - "operationId": "getCoreAPIVersions", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIVersions" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/api/v1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "getCoreV1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/api/v1/componentstatuses": { - "get": { - "description": "list objects of kind ComponentStatus", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1ComponentStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ComponentStatusList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ComponentStatus", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/componentstatuses/{name}": { - "get": { - "description": "read the specified ComponentStatus", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1ComponentStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ComponentStatus" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ComponentStatus", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ComponentStatus", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/configmaps": { - "get": { - "description": "list or watch objects of kind ConfigMap", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1ConfigMapForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ConfigMap", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/endpoints": { - "get": { - "description": "list or watch objects of kind Endpoints", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1EndpointsForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.EndpointsList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Endpoints", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/events": { - "get": { - "description": "list or watch objects of kind Event", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1EventForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.EventList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Event", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/limitranges": { - "get": { - "description": "list or watch objects of kind LimitRange", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1LimitRangeForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRangeList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "LimitRange", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/namespaces": { - "get": { - "description": "list or watch objects of kind Namespace", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1Namespace", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.NamespaceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Namespace", - "version": "v1" - } - }, - "post": { - "description": "create a Namespace", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1Namespace", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Namespace", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/bindings": { - "post": { - "description": "create a Binding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Binding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Binding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Binding", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/configmaps": { - "get": { - "description": "list or watch objects of kind ConfigMap", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1NamespacedConfigMap", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ConfigMap", - "version": "v1" - } - }, - "post": { - "description": "create a ConfigMap", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedConfigMap", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMap" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMap" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ConfigMap", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of ConfigMap", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionNamespacedConfigMap", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ConfigMap", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/configmaps/{name}": { - "get": { - "description": "read the specified ConfigMap", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedConfigMap", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMap" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ConfigMap", - "version": "v1" - } - }, - "put": { - "description": "replace the specified ConfigMap", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedConfigMap", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMap" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMap" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ConfigMap", - "version": "v1" - } - }, - "delete": { - "description": "delete a ConfigMap", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1NamespacedConfigMap", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ConfigMap", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified ConfigMap", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedConfigMap", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMap" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ConfigMap", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ConfigMap", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/endpoints": { - "get": { - "description": "list or watch objects of kind Endpoints", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1NamespacedEndpoints", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.EndpointsList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Endpoints", - "version": "v1" - } - }, - "post": { - "description": "create Endpoints", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedEndpoints", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Endpoints" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Endpoints" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Endpoints", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of Endpoints", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionNamespacedEndpoints", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Endpoints", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/endpoints/{name}": { - "get": { - "description": "read the specified Endpoints", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedEndpoints", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Endpoints" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Endpoints", - "version": "v1" - } - }, - "put": { - "description": "replace the specified Endpoints", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedEndpoints", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Endpoints" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Endpoints" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Endpoints", - "version": "v1" - } - }, - "delete": { - "description": "delete Endpoints", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1NamespacedEndpoints", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Endpoints", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified Endpoints", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedEndpoints", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Endpoints" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Endpoints", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Endpoints", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/events": { - "get": { - "description": "list or watch objects of kind Event", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1NamespacedEvent", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.EventList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Event", - "version": "v1" - } - }, - "post": { - "description": "create an Event", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedEvent", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Event" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Event" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Event", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of Event", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionNamespacedEvent", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Event", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/events/{name}": { - "get": { - "description": "read the specified Event", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedEvent", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Event" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Event", - "version": "v1" - } - }, - "put": { - "description": "replace the specified Event", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedEvent", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Event" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Event" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Event", - "version": "v1" - } - }, - "delete": { - "description": "delete an Event", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1NamespacedEvent", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Event", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified Event", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedEvent", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Event" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Event", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Event", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/limitranges": { - "get": { - "description": "list or watch objects of kind LimitRange", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1NamespacedLimitRange", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRangeList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "LimitRange", - "version": "v1" - } - }, - "post": { - "description": "create a LimitRange", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedLimitRange", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRange" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRange" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "LimitRange", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of LimitRange", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionNamespacedLimitRange", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "LimitRange", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/limitranges/{name}": { - "get": { - "description": "read the specified LimitRange", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedLimitRange", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRange" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "LimitRange", - "version": "v1" - } - }, - "put": { - "description": "replace the specified LimitRange", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedLimitRange", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRange" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRange" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "LimitRange", - "version": "v1" - } - }, - "delete": { - "description": "delete a LimitRange", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1NamespacedLimitRange", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "LimitRange", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified LimitRange", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedLimitRange", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRange" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "LimitRange", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the LimitRange", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/persistentvolumeclaims": { - "get": { - "description": "list or watch objects of kind PersistentVolumeClaim", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1NamespacedPersistentVolumeClaim", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "post": { - "description": "create a PersistentVolumeClaim", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedPersistentVolumeClaim", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of PersistentVolumeClaim", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionNamespacedPersistentVolumeClaim", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}": { - "get": { - "description": "read the specified PersistentVolumeClaim", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedPersistentVolumeClaim", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "put": { - "description": "replace the specified PersistentVolumeClaim", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedPersistentVolumeClaim", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "delete": { - "description": "delete a PersistentVolumeClaim", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1NamespacedPersistentVolumeClaim", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified PersistentVolumeClaim", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedPersistentVolumeClaim", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the PersistentVolumeClaim", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status": { - "get": { - "description": "read status of the specified PersistentVolumeClaim", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedPersistentVolumeClaimStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "put": { - "description": "replace status of the specified PersistentVolumeClaim", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedPersistentVolumeClaimStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "patch": { - "description": "partially update status of the specified PersistentVolumeClaim", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedPersistentVolumeClaimStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the PersistentVolumeClaim", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/pods": { - "get": { - "description": "list or watch objects of kind Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1NamespacedPod", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "post": { - "description": "create a Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedPod", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Pod" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Pod" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionNamespacedPod", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/pods/{name}": { - "get": { - "description": "read the specified Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedPod", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Pod" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "put": { - "description": "replace the specified Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedPod", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Pod" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Pod" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "delete": { - "description": "delete a Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1NamespacedPod", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified Pod", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedPod", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Pod" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Pod", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/pods/{name}/attach": { - "get": { - "description": "connect GET requests to attach of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1GetNamespacedPodAttach", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "post": { - "description": "connect POST requests to attach of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PostNamespacedPodAttach", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The container in which to execute the command. Defaults to only container if there is only one container in the pod.", - "name": "container", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Pod", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.", - "name": "stderr", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.", - "name": "stdin", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.", - "name": "stdout", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false.", - "name": "tty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/pods/{name}/binding": { - "post": { - "description": "create binding of a Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedPodBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Binding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Binding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Binding", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Binding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/pods/{name}/eviction": { - "post": { - "description": "create eviction of a Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedPodEviction", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.Eviction" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.Eviction" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "Eviction", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Eviction", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/pods/{name}/exec": { - "get": { - "description": "connect GET requests to exec of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1GetNamespacedPodExec", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "post": { - "description": "connect POST requests to exec of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PostNamespacedPodExec", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "Command is the remote command to execute. argv array. Not executed within a shell.", - "name": "command", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "Container in which to execute the command. Defaults to only container if there is only one container in the pod.", - "name": "container", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Pod", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Redirect the standard error stream of the pod for this call. Defaults to true.", - "name": "stderr", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Redirect the standard input stream of the pod for this call. Defaults to false.", - "name": "stdin", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Redirect the standard output stream of the pod for this call. Defaults to true.", - "name": "stdout", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.", - "name": "tty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/pods/{name}/log": { - "get": { - "description": "read log of the specified Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "text/plain", - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedPodLog", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The container for which to stream logs. Defaults to only container if there is one container in the pod.", - "name": "container", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Follow the log stream of the pod. Defaults to false.", - "name": "follow", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", - "name": "limitBytes", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Pod", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Return previous terminated container logs. Defaults to false.", - "name": "previous", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - "name": "sinceSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", - "name": "tailLines", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", - "name": "timestamps", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/pods/{name}/portforward": { - "get": { - "description": "connect GET requests to portforward of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1GetNamespacedPodPortforward", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "post": { - "description": "connect POST requests to portforward of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PostNamespacedPodPortforward", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Pod", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "integer", - "description": "List of ports to forward Required when using WebSockets", - "name": "ports", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/pods/{name}/proxy": { - "get": { - "description": "connect GET requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1GetNamespacedPodProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "put": { - "description": "connect PUT requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PutNamespacedPodProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "post": { - "description": "connect POST requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PostNamespacedPodProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "delete": { - "description": "connect DELETE requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1DeleteNamespacedPodProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "options": { - "description": "connect OPTIONS requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1OptionsNamespacedPodProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "head": { - "description": "connect HEAD requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1HeadNamespacedPodProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "patch": { - "description": "connect PATCH requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PatchNamespacedPodProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Pod", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "Path is the URL path to use for the current proxy request to pod.", - "name": "path", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}": { - "get": { - "description": "connect GET requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1GetNamespacedPodProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "put": { - "description": "connect PUT requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PutNamespacedPodProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "post": { - "description": "connect POST requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PostNamespacedPodProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "delete": { - "description": "connect DELETE requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1DeleteNamespacedPodProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "options": { - "description": "connect OPTIONS requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1OptionsNamespacedPodProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "head": { - "description": "connect HEAD requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1HeadNamespacedPodProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "patch": { - "description": "connect PATCH requests to proxy of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PatchNamespacedPodProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Pod", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "path to the resource", - "name": "path", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "Path is the URL path to use for the current proxy request to pod.", - "name": "path", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/pods/{name}/status": { - "get": { - "description": "read status of the specified Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedPodStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Pod" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "put": { - "description": "replace status of the specified Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedPodStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Pod" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Pod" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "patch": { - "description": "partially update status of the specified Pod", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedPodStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Pod" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Pod", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/podtemplates": { - "get": { - "description": "list or watch objects of kind PodTemplate", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1NamespacedPodTemplate", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodTemplate", - "version": "v1" - } - }, - "post": { - "description": "create a PodTemplate", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedPodTemplate", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplate" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplate" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodTemplate", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of PodTemplate", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionNamespacedPodTemplate", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodTemplate", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/podtemplates/{name}": { - "get": { - "description": "read the specified PodTemplate", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedPodTemplate", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplate" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodTemplate", - "version": "v1" - } - }, - "put": { - "description": "replace the specified PodTemplate", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedPodTemplate", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplate" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplate" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodTemplate", - "version": "v1" - } - }, - "delete": { - "description": "delete a PodTemplate", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1NamespacedPodTemplate", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodTemplate", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified PodTemplate", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedPodTemplate", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplate" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodTemplate", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the PodTemplate", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/replicationcontrollers": { - "get": { - "description": "list or watch objects of kind ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1NamespacedReplicationController", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "post": { - "description": "create a ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedReplicationController", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionNamespacedReplicationController", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}": { - "get": { - "description": "read the specified ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedReplicationController", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "put": { - "description": "replace the specified ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedReplicationController", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "delete": { - "description": "delete a ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1NamespacedReplicationController", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified ReplicationController", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedReplicationController", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ReplicationController", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale": { - "get": { - "description": "read scale of the specified ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedReplicationControllerScale", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "Scale", - "version": "v1" - } - }, - "put": { - "description": "replace scale of the specified ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedReplicationControllerScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "Scale", - "version": "v1" - } - }, - "patch": { - "description": "partially update scale of the specified ReplicationController", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedReplicationControllerScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "Scale", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Scale", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status": { - "get": { - "description": "read status of the specified ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedReplicationControllerStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "put": { - "description": "replace status of the specified ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedReplicationControllerStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "patch": { - "description": "partially update status of the specified ReplicationController", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedReplicationControllerStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ReplicationController", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/resourcequotas": { - "get": { - "description": "list or watch objects of kind ResourceQuota", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1NamespacedResourceQuota", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuotaList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "post": { - "description": "create a ResourceQuota", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedResourceQuota", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of ResourceQuota", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionNamespacedResourceQuota", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/resourcequotas/{name}": { - "get": { - "description": "read the specified ResourceQuota", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedResourceQuota", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "put": { - "description": "replace the specified ResourceQuota", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedResourceQuota", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "delete": { - "description": "delete a ResourceQuota", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1NamespacedResourceQuota", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified ResourceQuota", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedResourceQuota", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ResourceQuota", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/resourcequotas/{name}/status": { - "get": { - "description": "read status of the specified ResourceQuota", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedResourceQuotaStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "put": { - "description": "replace status of the specified ResourceQuota", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedResourceQuotaStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "patch": { - "description": "partially update status of the specified ResourceQuota", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedResourceQuotaStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ResourceQuota", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/secrets": { - "get": { - "description": "list or watch objects of kind Secret", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1NamespacedSecret", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.SecretList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Secret", - "version": "v1" - } - }, - "post": { - "description": "create a Secret", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedSecret", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Secret" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Secret" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Secret", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of Secret", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionNamespacedSecret", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Secret", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/secrets/{name}": { - "get": { - "description": "read the specified Secret", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedSecret", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Secret" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Secret", - "version": "v1" - } - }, - "put": { - "description": "replace the specified Secret", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedSecret", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Secret" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Secret" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Secret", - "version": "v1" - } - }, - "delete": { - "description": "delete a Secret", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1NamespacedSecret", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Secret", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified Secret", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedSecret", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Secret" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Secret", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Secret", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/serviceaccounts": { - "get": { - "description": "list or watch objects of kind ServiceAccount", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1NamespacedServiceAccount", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccountList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ServiceAccount", - "version": "v1" - } - }, - "post": { - "description": "create a ServiceAccount", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedServiceAccount", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccount" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccount" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ServiceAccount", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of ServiceAccount", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionNamespacedServiceAccount", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ServiceAccount", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/serviceaccounts/{name}": { - "get": { - "description": "read the specified ServiceAccount", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedServiceAccount", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccount" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ServiceAccount", - "version": "v1" - } - }, - "put": { - "description": "replace the specified ServiceAccount", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedServiceAccount", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccount" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccount" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ServiceAccount", - "version": "v1" - } - }, - "delete": { - "description": "delete a ServiceAccount", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1NamespacedServiceAccount", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ServiceAccount", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified ServiceAccount", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedServiceAccount", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccount" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ServiceAccount", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ServiceAccount", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/services": { - "get": { - "description": "list or watch objects of kind Service", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1NamespacedService", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "post": { - "description": "create a Service", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1NamespacedService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Service" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Service" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/services/{name}": { - "get": { - "description": "read the specified Service", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedService", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Service" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "put": { - "description": "replace the specified Service", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Service" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Service" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "delete": { - "description": "delete a Service", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1NamespacedService", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified Service", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Service" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Service", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/services/{name}/proxy": { - "get": { - "description": "connect GET requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1GetNamespacedServiceProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "put": { - "description": "connect PUT requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PutNamespacedServiceProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "post": { - "description": "connect POST requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PostNamespacedServiceProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "delete": { - "description": "connect DELETE requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1DeleteNamespacedServiceProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "options": { - "description": "connect OPTIONS requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1OptionsNamespacedServiceProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "head": { - "description": "connect HEAD requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1HeadNamespacedServiceProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "patch": { - "description": "connect PATCH requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PatchNamespacedServiceProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Service", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.", - "name": "path", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}": { - "get": { - "description": "connect GET requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1GetNamespacedServiceProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "put": { - "description": "connect PUT requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PutNamespacedServiceProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "post": { - "description": "connect POST requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PostNamespacedServiceProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "delete": { - "description": "connect DELETE requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1DeleteNamespacedServiceProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "options": { - "description": "connect OPTIONS requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1OptionsNamespacedServiceProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "head": { - "description": "connect HEAD requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1HeadNamespacedServiceProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "patch": { - "description": "connect PATCH requests to proxy of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PatchNamespacedServiceProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Service", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "path to the resource", - "name": "path", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy.", - "name": "path", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{namespace}/services/{name}/status": { - "get": { - "description": "read status of the specified Service", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespacedServiceStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Service" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "put": { - "description": "replace status of the specified Service", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespacedServiceStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Service" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Service" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "patch": { - "description": "partially update status of the specified Service", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespacedServiceStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Service" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Service", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{name}": { - "get": { - "description": "read the specified Namespace", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1Namespace", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Namespace", - "version": "v1" - } - }, - "put": { - "description": "replace the specified Namespace", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1Namespace", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Namespace", - "version": "v1" - } - }, - "delete": { - "description": "delete a Namespace", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1Namespace", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Namespace", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified Namespace", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1Namespace", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Namespace", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Namespace", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{name}/finalize": { - "put": { - "description": "replace finalize of the specified Namespace", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespaceFinalize", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Namespace", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Namespace", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/namespaces/{name}/status": { - "get": { - "description": "read status of the specified Namespace", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NamespaceStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Namespace", - "version": "v1" - } - }, - "put": { - "description": "replace status of the specified Namespace", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NamespaceStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Namespace", - "version": "v1" - } - }, - "patch": { - "description": "partially update status of the specified Namespace", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NamespaceStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Namespace", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Namespace", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/nodes": { - "get": { - "description": "list or watch objects of kind Node", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1Node", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.NodeList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "post": { - "description": "create a Node", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1Node", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Node" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Node" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionNode", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/nodes/{name}": { - "get": { - "description": "read the specified Node", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1Node", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Node" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "put": { - "description": "replace the specified Node", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1Node", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Node" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Node" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "delete": { - "description": "delete a Node", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1Node", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified Node", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1Node", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Node" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Node", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/nodes/{name}/proxy": { - "get": { - "description": "connect GET requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1GetNodeProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "put": { - "description": "connect PUT requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PutNodeProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "post": { - "description": "connect POST requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PostNodeProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "delete": { - "description": "connect DELETE requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1DeleteNodeProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "options": { - "description": "connect OPTIONS requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1OptionsNodeProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "head": { - "description": "connect HEAD requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1HeadNodeProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "patch": { - "description": "connect PATCH requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PatchNodeProxy", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Node", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "Path is the URL path to use for the current proxy request to node.", - "name": "path", - "in": "query" - } - ] - }, - "/api/v1/nodes/{name}/proxy/{path}": { - "get": { - "description": "connect GET requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1GetNodeProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "put": { - "description": "connect PUT requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PutNodeProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "post": { - "description": "connect POST requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PostNodeProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "delete": { - "description": "connect DELETE requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1DeleteNodeProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "options": { - "description": "connect OPTIONS requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1OptionsNodeProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "head": { - "description": "connect HEAD requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1HeadNodeProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "patch": { - "description": "connect PATCH requests to proxy of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "connectCoreV1PatchNodeProxyWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "connect", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Node", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "path to the resource", - "name": "path", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "Path is the URL path to use for the current proxy request to node.", - "name": "path", - "in": "query" - } - ] - }, - "/api/v1/nodes/{name}/status": { - "get": { - "description": "read status of the specified Node", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1NodeStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Node" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "put": { - "description": "replace status of the specified Node", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1NodeStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Node" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Node" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "patch": { - "description": "partially update status of the specified Node", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1NodeStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.Node" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Node", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/persistentvolumeclaims": { - "get": { - "description": "list or watch objects of kind PersistentVolumeClaim", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1PersistentVolumeClaimForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/persistentvolumes": { - "get": { - "description": "list or watch objects of kind PersistentVolume", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1PersistentVolume", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - }, - "post": { - "description": "create a PersistentVolume", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "createCoreV1PersistentVolume", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of PersistentVolume", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1CollectionPersistentVolume", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/persistentvolumes/{name}": { - "get": { - "description": "read the specified PersistentVolume", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1PersistentVolume", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - }, - "put": { - "description": "replace the specified PersistentVolume", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1PersistentVolume", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - }, - "delete": { - "description": "delete a PersistentVolume", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "deleteCoreV1PersistentVolume", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified PersistentVolume", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1PersistentVolume", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the PersistentVolume", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/persistentvolumes/{name}/status": { - "get": { - "description": "read status of the specified PersistentVolume", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "readCoreV1PersistentVolumeStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - }, - "put": { - "description": "replace status of the specified PersistentVolume", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "replaceCoreV1PersistentVolumeStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - }, - "patch": { - "description": "partially update status of the specified PersistentVolume", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "patchCoreV1PersistentVolumeStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the PersistentVolume", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/api/v1/pods": { - "get": { - "description": "list or watch objects of kind Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1PodForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/podtemplates": { - "get": { - "description": "list or watch objects of kind PodTemplate", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1PodTemplateForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodTemplate", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/proxy/namespaces/{namespace}/pods/{name}": { - "get": { - "description": "proxy GET requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1GETNamespacedPod", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "put": { - "description": "proxy PUT requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1PUTNamespacedPod", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "post": { - "description": "proxy POST requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1POSTNamespacedPod", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "delete": { - "description": "proxy DELETE requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1DELETENamespacedPod", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "options": { - "description": "proxy OPTIONS requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1OPTIONSNamespacedPod", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "head": { - "description": "proxy HEAD requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1HEADNamespacedPod", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "patch": { - "description": "proxy PATCH requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1PATCHNamespacedPod", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Pod", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - } - ] - }, - "/api/v1/proxy/namespaces/{namespace}/pods/{name}/{path}": { - "get": { - "description": "proxy GET requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1GETNamespacedPodWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "put": { - "description": "proxy PUT requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1PUTNamespacedPodWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "post": { - "description": "proxy POST requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1POSTNamespacedPodWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "delete": { - "description": "proxy DELETE requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1DELETENamespacedPodWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "options": { - "description": "proxy OPTIONS requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1OPTIONSNamespacedPodWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "head": { - "description": "proxy HEAD requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1HEADNamespacedPodWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "patch": { - "description": "proxy PATCH requests to Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1PATCHNamespacedPodWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Pod", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "path to the resource", - "name": "path", - "in": "path", - "required": true - } - ] - }, - "/api/v1/proxy/namespaces/{namespace}/services/{name}": { - "get": { - "description": "proxy GET requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1GETNamespacedService", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "put": { - "description": "proxy PUT requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1PUTNamespacedService", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "post": { - "description": "proxy POST requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1POSTNamespacedService", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "delete": { - "description": "proxy DELETE requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1DELETENamespacedService", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "options": { - "description": "proxy OPTIONS requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1OPTIONSNamespacedService", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "head": { - "description": "proxy HEAD requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1HEADNamespacedService", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "patch": { - "description": "proxy PATCH requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1PATCHNamespacedService", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Service", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - } - ] - }, - "/api/v1/proxy/namespaces/{namespace}/services/{name}/{path}": { - "get": { - "description": "proxy GET requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1GETNamespacedServiceWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "put": { - "description": "proxy PUT requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1PUTNamespacedServiceWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "post": { - "description": "proxy POST requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1POSTNamespacedServiceWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "delete": { - "description": "proxy DELETE requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1DELETENamespacedServiceWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "options": { - "description": "proxy OPTIONS requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1OPTIONSNamespacedServiceWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "head": { - "description": "proxy HEAD requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1HEADNamespacedServiceWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "patch": { - "description": "proxy PATCH requests to Service", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1PATCHNamespacedServiceWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Service", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "path to the resource", - "name": "path", - "in": "path", - "required": true - } - ] - }, - "/api/v1/proxy/nodes/{name}": { - "get": { - "description": "proxy GET requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1GETNode", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "put": { - "description": "proxy PUT requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1PUTNode", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "post": { - "description": "proxy POST requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1POSTNode", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "delete": { - "description": "proxy DELETE requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1DELETENode", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "options": { - "description": "proxy OPTIONS requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1OPTIONSNode", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "head": { - "description": "proxy HEAD requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1HEADNode", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "patch": { - "description": "proxy PATCH requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1PATCHNode", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Node", - "name": "name", - "in": "path", - "required": true - } - ] - }, - "/api/v1/proxy/nodes/{name}/{path}": { - "get": { - "description": "proxy GET requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1GETNodeWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "put": { - "description": "proxy PUT requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1PUTNodeWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "post": { - "description": "proxy POST requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1POSTNodeWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "delete": { - "description": "proxy DELETE requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1DELETENodeWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "options": { - "description": "proxy OPTIONS requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1OPTIONSNodeWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "head": { - "description": "proxy HEAD requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1HEADNodeWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "patch": { - "description": "proxy PATCH requests to Node", - "consumes": [ - "*/*" - ], - "produces": [ - "*/*" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "proxyCoreV1PATCHNodeWithPath", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "string" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "proxy", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Node", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "path to the resource", - "name": "path", - "in": "path", - "required": true - } - ] - }, - "/api/v1/replicationcontrollers": { - "get": { - "description": "list or watch objects of kind ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1ReplicationControllerForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/resourcequotas": { - "get": { - "description": "list or watch objects of kind ResourceQuota", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1ResourceQuotaForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuotaList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/secrets": { - "get": { - "description": "list or watch objects of kind Secret", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1SecretForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.SecretList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Secret", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/serviceaccounts": { - "get": { - "description": "list or watch objects of kind ServiceAccount", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1ServiceAccountForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccountList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ServiceAccount", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/services": { - "get": { - "description": "list or watch objects of kind Service", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "listCoreV1ServiceForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/configmaps": { - "get": { - "description": "watch individual changes to a list of ConfigMap", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1ConfigMapListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ConfigMap", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/endpoints": { - "get": { - "description": "watch individual changes to a list of Endpoints", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1EndpointsListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Endpoints", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/events": { - "get": { - "description": "watch individual changes to a list of Event", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1EventListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Event", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/limitranges": { - "get": { - "description": "watch individual changes to a list of LimitRange", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1LimitRangeListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "LimitRange", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces": { - "get": { - "description": "watch individual changes to a list of Namespace", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespaceList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Namespace", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/configmaps": { - "get": { - "description": "watch individual changes to a list of ConfigMap", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedConfigMapList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ConfigMap", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/configmaps/{name}": { - "get": { - "description": "watch changes to an object of kind ConfigMap", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedConfigMap", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ConfigMap", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ConfigMap", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/endpoints": { - "get": { - "description": "watch individual changes to a list of Endpoints", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedEndpointsList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Endpoints", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/endpoints/{name}": { - "get": { - "description": "watch changes to an object of kind Endpoints", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedEndpoints", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Endpoints", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Endpoints", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/events": { - "get": { - "description": "watch individual changes to a list of Event", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedEventList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Event", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/events/{name}": { - "get": { - "description": "watch changes to an object of kind Event", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedEvent", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Event", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Event", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/limitranges": { - "get": { - "description": "watch individual changes to a list of LimitRange", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedLimitRangeList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "LimitRange", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/limitranges/{name}": { - "get": { - "description": "watch changes to an object of kind LimitRange", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedLimitRange", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "LimitRange", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the LimitRange", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/persistentvolumeclaims": { - "get": { - "description": "watch individual changes to a list of PersistentVolumeClaim", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedPersistentVolumeClaimList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/persistentvolumeclaims/{name}": { - "get": { - "description": "watch changes to an object of kind PersistentVolumeClaim", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedPersistentVolumeClaim", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the PersistentVolumeClaim", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/pods": { - "get": { - "description": "watch individual changes to a list of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedPodList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/pods/{name}": { - "get": { - "description": "watch changes to an object of kind Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedPod", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Pod", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/podtemplates": { - "get": { - "description": "watch individual changes to a list of PodTemplate", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedPodTemplateList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodTemplate", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/podtemplates/{name}": { - "get": { - "description": "watch changes to an object of kind PodTemplate", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedPodTemplate", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodTemplate", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the PodTemplate", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/replicationcontrollers": { - "get": { - "description": "watch individual changes to a list of ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedReplicationControllerList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/replicationcontrollers/{name}": { - "get": { - "description": "watch changes to an object of kind ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedReplicationController", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ReplicationController", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/resourcequotas": { - "get": { - "description": "watch individual changes to a list of ResourceQuota", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedResourceQuotaList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/resourcequotas/{name}": { - "get": { - "description": "watch changes to an object of kind ResourceQuota", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedResourceQuota", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ResourceQuota", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/secrets": { - "get": { - "description": "watch individual changes to a list of Secret", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedSecretList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Secret", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/secrets/{name}": { - "get": { - "description": "watch changes to an object of kind Secret", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedSecret", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Secret", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Secret", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/serviceaccounts": { - "get": { - "description": "watch individual changes to a list of ServiceAccount", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedServiceAccountList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ServiceAccount", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/serviceaccounts/{name}": { - "get": { - "description": "watch changes to an object of kind ServiceAccount", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedServiceAccount", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ServiceAccount", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ServiceAccount", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/services": { - "get": { - "description": "watch individual changes to a list of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedServiceList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{namespace}/services/{name}": { - "get": { - "description": "watch changes to an object of kind Service", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NamespacedService", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Service", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/namespaces/{name}": { - "get": { - "description": "watch changes to an object of kind Namespace", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1Namespace", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Namespace", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Namespace", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/nodes": { - "get": { - "description": "watch individual changes to a list of Node", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1NodeList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/nodes/{name}": { - "get": { - "description": "watch changes to an object of kind Node", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1Node", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Node", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Node", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/persistentvolumeclaims": { - "get": { - "description": "watch individual changes to a list of PersistentVolumeClaim", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1PersistentVolumeClaimListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/persistentvolumes": { - "get": { - "description": "watch individual changes to a list of PersistentVolume", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1PersistentVolumeList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/persistentvolumes/{name}": { - "get": { - "description": "watch changes to an object of kind PersistentVolume", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1PersistentVolume", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the PersistentVolume", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/pods": { - "get": { - "description": "watch individual changes to a list of Pod", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1PodListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Pod", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/podtemplates": { - "get": { - "description": "watch individual changes to a list of PodTemplate", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1PodTemplateListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "PodTemplate", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/replicationcontrollers": { - "get": { - "description": "watch individual changes to a list of ReplicationController", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1ReplicationControllerListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/resourcequotas": { - "get": { - "description": "watch individual changes to a list of ResourceQuota", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1ResourceQuotaListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/secrets": { - "get": { - "description": "watch individual changes to a list of Secret", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1SecretListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Secret", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/serviceaccounts": { - "get": { - "description": "watch individual changes to a list of ServiceAccount", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1ServiceAccountListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "ServiceAccount", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/api/v1/watch/services": { - "get": { - "description": "watch individual changes to a list of Service", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "core_v1" - ], - "operationId": "watchCoreV1ServiceListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "", - "kind": "Service", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/": { - "get": { - "description": "get available API versions", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apis" - ], - "operationId": "getAPIVersions", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroupList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/admissionregistration.k8s.io/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration" - ], - "operationId": "getAdmissionregistrationAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/admissionregistration.k8s.io/v1alpha1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "getAdmissionregistrationV1alpha1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/admissionregistration.k8s.io/v1alpha1/externaladmissionhookconfigurations": { - "get": { - "description": "list or watch objects of kind ExternalAdmissionHookConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "listAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", - "version": "v1alpha1" - } - }, - "post": { - "description": "create an ExternalAdmissionHookConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "createAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete collection of ExternalAdmissionHookConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "deleteAdmissionregistrationV1alpha1CollectionExternalAdmissionHookConfiguration", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/admissionregistration.k8s.io/v1alpha1/externaladmissionhookconfigurations/{name}": { - "get": { - "description": "read the specified ExternalAdmissionHookConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "readAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", - "version": "v1alpha1" - } - }, - "put": { - "description": "replace the specified ExternalAdmissionHookConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "replaceAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete an ExternalAdmissionHookConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "deleteAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", - "version": "v1alpha1" - } - }, - "patch": { - "description": "partially update the specified ExternalAdmissionHookConfiguration", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "patchAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ExternalAdmissionHookConfiguration", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations": { - "get": { - "description": "list or watch objects of kind InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "listAdmissionregistrationV1alpha1InitializerConfiguration", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfigurationList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "post": { - "description": "create an InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "createAdmissionregistrationV1alpha1InitializerConfiguration", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete collection of InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "deleteAdmissionregistrationV1alpha1CollectionInitializerConfiguration", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/admissionregistration.k8s.io/v1alpha1/initializerconfigurations/{name}": { - "get": { - "description": "read the specified InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "readAdmissionregistrationV1alpha1InitializerConfiguration", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "put": { - "description": "replace the specified InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "replaceAdmissionregistrationV1alpha1InitializerConfiguration", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete an InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "deleteAdmissionregistrationV1alpha1InitializerConfiguration", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "patch": { - "description": "partially update the specified InitializerConfiguration", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "patchAdmissionregistrationV1alpha1InitializerConfiguration", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the InitializerConfiguration", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/externaladmissionhookconfigurations": { - "get": { - "description": "watch individual changes to a list of ExternalAdmissionHookConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "watchAdmissionregistrationV1alpha1ExternalAdmissionHookConfigurationList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/externaladmissionhookconfigurations/{name}": { - "get": { - "description": "watch changes to an object of kind ExternalAdmissionHookConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "watchAdmissionregistrationV1alpha1ExternalAdmissionHookConfiguration", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ExternalAdmissionHookConfiguration", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/initializerconfigurations": { - "get": { - "description": "watch individual changes to a list of InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "watchAdmissionregistrationV1alpha1InitializerConfigurationList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/admissionregistration.k8s.io/v1alpha1/watch/initializerconfigurations/{name}": { - "get": { - "description": "watch changes to an object of kind InitializerConfiguration", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "admissionregistration_v1alpha1" - ], - "operationId": "watchAdmissionregistrationV1alpha1InitializerConfiguration", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the InitializerConfiguration", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apiextensions.k8s.io/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiextensions" - ], - "operationId": "getApiextensionsAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/apiextensions.k8s.io/v1beta1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiextensions_v1beta1" - ], - "operationId": "getApiextensionsV1beta1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions": { - "get": { - "description": "list or watch objects of kind CustomResourceDefinition", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiextensions_v1beta1" - ], - "operationId": "listApiextensionsV1beta1CustomResourceDefinition", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apiextensions.k8s.io", - "kind": "CustomResourceDefinition", - "version": "v1beta1" - } - }, - "post": { - "description": "create a CustomResourceDefinition", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiextensions_v1beta1" - ], - "operationId": "createApiextensionsV1beta1CustomResourceDefinition", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "apiextensions.k8s.io", - "kind": "CustomResourceDefinition", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of CustomResourceDefinition", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiextensions_v1beta1" - ], - "operationId": "deleteApiextensionsV1beta1CollectionCustomResourceDefinition", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "apiextensions.k8s.io", - "kind": "CustomResourceDefinition", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}": { - "get": { - "description": "read the specified CustomResourceDefinition", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiextensions_v1beta1" - ], - "operationId": "readApiextensionsV1beta1CustomResourceDefinition", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apiextensions.k8s.io", - "kind": "CustomResourceDefinition", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified CustomResourceDefinition", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiextensions_v1beta1" - ], - "operationId": "replaceApiextensionsV1beta1CustomResourceDefinition", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apiextensions.k8s.io", - "kind": "CustomResourceDefinition", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a CustomResourceDefinition", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiextensions_v1beta1" - ], - "operationId": "deleteApiextensionsV1beta1CustomResourceDefinition", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "apiextensions.k8s.io", - "kind": "CustomResourceDefinition", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified CustomResourceDefinition", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiextensions_v1beta1" - ], - "operationId": "patchApiextensionsV1beta1CustomResourceDefinition", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apiextensions.k8s.io", - "kind": "CustomResourceDefinition", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the CustomResourceDefinition", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/{name}/status": { - "put": { - "description": "replace status of the specified CustomResourceDefinition", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiextensions_v1beta1" - ], - "operationId": "replaceApiextensionsV1beta1CustomResourceDefinitionStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apiextensions.k8s.io", - "kind": "CustomResourceDefinition", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the CustomResourceDefinition", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apiextensions.k8s.io/v1beta1/watch/customresourcedefinitions": { - "get": { - "description": "watch individual changes to a list of CustomResourceDefinition", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiextensions_v1beta1" - ], - "operationId": "watchApiextensionsV1beta1CustomResourceDefinitionList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apiextensions.k8s.io", - "kind": "CustomResourceDefinition", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apiextensions.k8s.io/v1beta1/watch/customresourcedefinitions/{name}": { - "get": { - "description": "watch changes to an object of kind CustomResourceDefinition", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiextensions_v1beta1" - ], - "operationId": "watchApiextensionsV1beta1CustomResourceDefinition", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "apiextensions.k8s.io", - "kind": "CustomResourceDefinition", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the CustomResourceDefinition", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apiregistration.k8s.io/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiregistration" - ], - "operationId": "getApiregistrationAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/apiregistration.k8s.io/v1beta1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiregistration_v1beta1" - ], - "operationId": "getApiregistrationV1beta1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/apiregistration.k8s.io/v1beta1/apiservices": { - "get": { - "description": "list or watch objects of kind APIService", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiregistration_v1beta1" - ], - "operationId": "listApiregistrationV1beta1APIService", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apiregistration.k8s.io", - "kind": "APIService", - "version": "v1beta1" - } - }, - "post": { - "description": "create an APIService", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiregistration_v1beta1" - ], - "operationId": "createApiregistrationV1beta1APIService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "apiregistration.k8s.io", - "kind": "APIService", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of APIService", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiregistration_v1beta1" - ], - "operationId": "deleteApiregistrationV1beta1CollectionAPIService", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "apiregistration.k8s.io", - "kind": "APIService", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}": { - "get": { - "description": "read the specified APIService", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiregistration_v1beta1" - ], - "operationId": "readApiregistrationV1beta1APIService", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apiregistration.k8s.io", - "kind": "APIService", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified APIService", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiregistration_v1beta1" - ], - "operationId": "replaceApiregistrationV1beta1APIService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apiregistration.k8s.io", - "kind": "APIService", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete an APIService", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiregistration_v1beta1" - ], - "operationId": "deleteApiregistrationV1beta1APIService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "apiregistration.k8s.io", - "kind": "APIService", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified APIService", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiregistration_v1beta1" - ], - "operationId": "patchApiregistrationV1beta1APIService", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apiregistration.k8s.io", - "kind": "APIService", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the APIService", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apiregistration.k8s.io/v1beta1/apiservices/{name}/status": { - "put": { - "description": "replace status of the specified APIService", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiregistration_v1beta1" - ], - "operationId": "replaceApiregistrationV1beta1APIServiceStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apiregistration.k8s.io", - "kind": "APIService", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the APIService", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apiregistration.k8s.io/v1beta1/watch/apiservices": { - "get": { - "description": "watch individual changes to a list of APIService", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiregistration_v1beta1" - ], - "operationId": "watchApiregistrationV1beta1APIServiceList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apiregistration.k8s.io", - "kind": "APIService", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apiregistration.k8s.io/v1beta1/watch/apiservices/{name}": { - "get": { - "description": "watch changes to an object of kind APIService", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apiregistration_v1beta1" - ], - "operationId": "watchApiregistrationV1beta1APIService", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "apiregistration.k8s.io", - "kind": "APIService", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the APIService", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps" - ], - "operationId": "getAppsAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/apps/v1beta1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "getAppsV1beta1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/apps/v1beta1/controllerrevisions": { - "get": { - "description": "list or watch objects of kind ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "listAppsV1beta1ControllerRevisionForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevisionList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/deployments": { - "get": { - "description": "list or watch objects of kind Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "listAppsV1beta1DeploymentForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions": { - "get": { - "description": "list or watch objects of kind ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "listAppsV1beta1NamespacedControllerRevision", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevisionList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta1" - } - }, - "post": { - "description": "create a ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "createAppsV1beta1NamespacedControllerRevision", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevision" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevision" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "deleteAppsV1beta1CollectionNamespacedControllerRevision", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/namespaces/{namespace}/controllerrevisions/{name}": { - "get": { - "description": "read the specified ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "readAppsV1beta1NamespacedControllerRevision", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevision" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "replaceAppsV1beta1NamespacedControllerRevision", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevision" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevision" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "deleteAppsV1beta1NamespacedControllerRevision", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified ControllerRevision", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "patchAppsV1beta1NamespacedControllerRevision", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevision" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ControllerRevision", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/namespaces/{namespace}/deployments": { - "get": { - "description": "list or watch objects of kind Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "listAppsV1beta1NamespacedDeployment", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "post": { - "description": "create a Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "createAppsV1beta1NamespacedDeployment", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "deleteAppsV1beta1CollectionNamespacedDeployment", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}": { - "get": { - "description": "read the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "readAppsV1beta1NamespacedDeployment", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "replaceAppsV1beta1NamespacedDeployment", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "deleteAppsV1beta1NamespacedDeployment", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified Deployment", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "patchAppsV1beta1NamespacedDeployment", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Deployment", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/rollback": { - "post": { - "description": "create rollback of a Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "createAppsV1beta1NamespacedDeploymentRollback", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentRollback" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentRollback" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DeploymentRollback", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the DeploymentRollback", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/scale": { - "get": { - "description": "read scale of the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "readAppsV1beta1NamespacedDeploymentScale", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta1" - } - }, - "put": { - "description": "replace scale of the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "replaceAppsV1beta1NamespacedDeploymentScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Scale" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update scale of the specified Deployment", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "patchAppsV1beta1NamespacedDeploymentScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Scale", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/namespaces/{namespace}/deployments/{name}/status": { - "get": { - "description": "read status of the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "readAppsV1beta1NamespacedDeploymentStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "put": { - "description": "replace status of the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "replaceAppsV1beta1NamespacedDeploymentStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update status of the specified Deployment", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "patchAppsV1beta1NamespacedDeploymentStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Deployment", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/namespaces/{namespace}/statefulsets": { - "get": { - "description": "list or watch objects of kind StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "listAppsV1beta1NamespacedStatefulSet", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "post": { - "description": "create a StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "createAppsV1beta1NamespacedStatefulSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "deleteAppsV1beta1CollectionNamespacedStatefulSet", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}": { - "get": { - "description": "read the specified StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "readAppsV1beta1NamespacedStatefulSet", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "replaceAppsV1beta1NamespacedStatefulSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "deleteAppsV1beta1NamespacedStatefulSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified StatefulSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "patchAppsV1beta1NamespacedStatefulSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the StatefulSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/scale": { - "get": { - "description": "read scale of the specified StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "readAppsV1beta1NamespacedStatefulSetScale", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta1" - } - }, - "put": { - "description": "replace scale of the specified StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "replaceAppsV1beta1NamespacedStatefulSetScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Scale" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update scale of the specified StatefulSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "patchAppsV1beta1NamespacedStatefulSetScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Scale", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/namespaces/{namespace}/statefulsets/{name}/status": { - "get": { - "description": "read status of the specified StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "readAppsV1beta1NamespacedStatefulSetStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "put": { - "description": "replace status of the specified StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "replaceAppsV1beta1NamespacedStatefulSetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update status of the specified StatefulSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "patchAppsV1beta1NamespacedStatefulSetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the StatefulSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/statefulsets": { - "get": { - "description": "list or watch objects of kind StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "listAppsV1beta1StatefulSetForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/watch/controllerrevisions": { - "get": { - "description": "watch individual changes to a list of ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "watchAppsV1beta1ControllerRevisionListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/watch/deployments": { - "get": { - "description": "watch individual changes to a list of Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "watchAppsV1beta1DeploymentListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/watch/namespaces/{namespace}/controllerrevisions": { - "get": { - "description": "watch individual changes to a list of ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "watchAppsV1beta1NamespacedControllerRevisionList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/watch/namespaces/{namespace}/controllerrevisions/{name}": { - "get": { - "description": "watch changes to an object of kind ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "watchAppsV1beta1NamespacedControllerRevision", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ControllerRevision", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/watch/namespaces/{namespace}/deployments": { - "get": { - "description": "watch individual changes to a list of Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "watchAppsV1beta1NamespacedDeploymentList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/watch/namespaces/{namespace}/deployments/{name}": { - "get": { - "description": "watch changes to an object of kind Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "watchAppsV1beta1NamespacedDeployment", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Deployment", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/watch/namespaces/{namespace}/statefulsets": { - "get": { - "description": "watch individual changes to a list of StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "watchAppsV1beta1NamespacedStatefulSetList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/watch/namespaces/{namespace}/statefulsets/{name}": { - "get": { - "description": "watch changes to an object of kind StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "watchAppsV1beta1NamespacedStatefulSet", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the StatefulSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta1/watch/statefulsets": { - "get": { - "description": "watch individual changes to a list of StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta1" - ], - "operationId": "watchAppsV1beta1StatefulSetListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "getAppsV1beta2APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/apps/v1beta2/controllerrevisions": { - "get": { - "description": "list or watch objects of kind ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "listAppsV1beta2ControllerRevisionForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ControllerRevisionList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/daemonsets": { - "get": { - "description": "list or watch objects of kind DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "listAppsV1beta2DaemonSetForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/deployments": { - "get": { - "description": "list or watch objects of kind Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "listAppsV1beta2DeploymentForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DeploymentList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions": { - "get": { - "description": "list or watch objects of kind ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "listAppsV1beta2NamespacedControllerRevision", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ControllerRevisionList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta2" - } - }, - "post": { - "description": "create a ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "createAppsV1beta2NamespacedControllerRevision", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ControllerRevision" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ControllerRevision" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta2" - } - }, - "delete": { - "description": "delete collection of ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "deleteAppsV1beta2CollectionNamespacedControllerRevision", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/controllerrevisions/{name}": { - "get": { - "description": "read the specified ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "readAppsV1beta2NamespacedControllerRevision", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ControllerRevision" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta2" - } - }, - "put": { - "description": "replace the specified ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "replaceAppsV1beta2NamespacedControllerRevision", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ControllerRevision" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ControllerRevision" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta2" - } - }, - "delete": { - "description": "delete a ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "deleteAppsV1beta2NamespacedControllerRevision", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta2" - } - }, - "patch": { - "description": "partially update the specified ControllerRevision", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "patchAppsV1beta2NamespacedControllerRevision", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ControllerRevision" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ControllerRevision", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/daemonsets": { - "get": { - "description": "list or watch objects of kind DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "listAppsV1beta2NamespacedDaemonSet", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "post": { - "description": "create a DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "createAppsV1beta2NamespacedDaemonSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "delete": { - "description": "delete collection of DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "deleteAppsV1beta2CollectionNamespacedDaemonSet", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}": { - "get": { - "description": "read the specified DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "readAppsV1beta2NamespacedDaemonSet", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "put": { - "description": "replace the specified DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "replaceAppsV1beta2NamespacedDaemonSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "delete": { - "description": "delete a DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "deleteAppsV1beta2NamespacedDaemonSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "patch": { - "description": "partially update the specified DaemonSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "patchAppsV1beta2NamespacedDaemonSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the DaemonSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/daemonsets/{name}/status": { - "get": { - "description": "read status of the specified DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "readAppsV1beta2NamespacedDaemonSetStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "put": { - "description": "replace status of the specified DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "replaceAppsV1beta2NamespacedDaemonSetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "patch": { - "description": "partially update status of the specified DaemonSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "patchAppsV1beta2NamespacedDaemonSetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the DaemonSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/deployments": { - "get": { - "description": "list or watch objects of kind Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "listAppsV1beta2NamespacedDeployment", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DeploymentList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "post": { - "description": "create a Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "createAppsV1beta2NamespacedDeployment", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Deployment" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "delete": { - "description": "delete collection of Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "deleteAppsV1beta2CollectionNamespacedDeployment", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}": { - "get": { - "description": "read the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "readAppsV1beta2NamespacedDeployment", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "put": { - "description": "replace the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "replaceAppsV1beta2NamespacedDeployment", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Deployment" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "delete": { - "description": "delete a Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "deleteAppsV1beta2NamespacedDeployment", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "patch": { - "description": "partially update the specified Deployment", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "patchAppsV1beta2NamespacedDeployment", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Deployment", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/scale": { - "get": { - "description": "read scale of the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "readAppsV1beta2NamespacedDeploymentScale", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta2" - } - }, - "put": { - "description": "replace scale of the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "replaceAppsV1beta2NamespacedDeploymentScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Scale" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta2" - } - }, - "patch": { - "description": "partially update scale of the specified Deployment", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "patchAppsV1beta2NamespacedDeploymentScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Scale", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/deployments/{name}/status": { - "get": { - "description": "read status of the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "readAppsV1beta2NamespacedDeploymentStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "put": { - "description": "replace status of the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "replaceAppsV1beta2NamespacedDeploymentStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Deployment" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "patch": { - "description": "partially update status of the specified Deployment", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "patchAppsV1beta2NamespacedDeploymentStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Deployment", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/replicasets": { - "get": { - "description": "list or watch objects of kind ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "listAppsV1beta2NamespacedReplicaSet", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "post": { - "description": "create a ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "createAppsV1beta2NamespacedReplicaSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "delete": { - "description": "delete collection of ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "deleteAppsV1beta2CollectionNamespacedReplicaSet", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}": { - "get": { - "description": "read the specified ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "readAppsV1beta2NamespacedReplicaSet", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "put": { - "description": "replace the specified ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "replaceAppsV1beta2NamespacedReplicaSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "delete": { - "description": "delete a ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "deleteAppsV1beta2NamespacedReplicaSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "patch": { - "description": "partially update the specified ReplicaSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "patchAppsV1beta2NamespacedReplicaSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ReplicaSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/scale": { - "get": { - "description": "read scale of the specified ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "readAppsV1beta2NamespacedReplicaSetScale", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta2" - } - }, - "put": { - "description": "replace scale of the specified ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "replaceAppsV1beta2NamespacedReplicaSetScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Scale" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta2" - } - }, - "patch": { - "description": "partially update scale of the specified ReplicaSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "patchAppsV1beta2NamespacedReplicaSetScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Scale", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/replicasets/{name}/status": { - "get": { - "description": "read status of the specified ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "readAppsV1beta2NamespacedReplicaSetStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "put": { - "description": "replace status of the specified ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "replaceAppsV1beta2NamespacedReplicaSetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "patch": { - "description": "partially update status of the specified ReplicaSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "patchAppsV1beta2NamespacedReplicaSetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ReplicaSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/statefulsets": { - "get": { - "description": "list or watch objects of kind StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "listAppsV1beta2NamespacedStatefulSet", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "post": { - "description": "create a StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "createAppsV1beta2NamespacedStatefulSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "delete": { - "description": "delete collection of StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "deleteAppsV1beta2CollectionNamespacedStatefulSet", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}": { - "get": { - "description": "read the specified StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "readAppsV1beta2NamespacedStatefulSet", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "put": { - "description": "replace the specified StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "replaceAppsV1beta2NamespacedStatefulSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "delete": { - "description": "delete a StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "deleteAppsV1beta2NamespacedStatefulSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "patch": { - "description": "partially update the specified StatefulSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "patchAppsV1beta2NamespacedStatefulSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the StatefulSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/scale": { - "get": { - "description": "read scale of the specified StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "readAppsV1beta2NamespacedStatefulSetScale", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta2" - } - }, - "put": { - "description": "replace scale of the specified StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "replaceAppsV1beta2NamespacedStatefulSetScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Scale" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta2" - } - }, - "patch": { - "description": "partially update scale of the specified StatefulSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "patchAppsV1beta2NamespacedStatefulSetScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Scale", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Scale", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/namespaces/{namespace}/statefulsets/{name}/status": { - "get": { - "description": "read status of the specified StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "readAppsV1beta2NamespacedStatefulSetStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "put": { - "description": "replace status of the specified StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "replaceAppsV1beta2NamespacedStatefulSetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "patch": { - "description": "partially update status of the specified StatefulSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "patchAppsV1beta2NamespacedStatefulSetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the StatefulSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/replicasets": { - "get": { - "description": "list or watch objects of kind ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "listAppsV1beta2ReplicaSetForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/statefulsets": { - "get": { - "description": "list or watch objects of kind StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "listAppsV1beta2StatefulSetForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/controllerrevisions": { - "get": { - "description": "watch individual changes to a list of ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2ControllerRevisionListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/daemonsets": { - "get": { - "description": "watch individual changes to a list of DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2DaemonSetListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/deployments": { - "get": { - "description": "watch individual changes to a list of Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2DeploymentListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/namespaces/{namespace}/controllerrevisions": { - "get": { - "description": "watch individual changes to a list of ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2NamespacedControllerRevisionList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/namespaces/{namespace}/controllerrevisions/{name}": { - "get": { - "description": "watch changes to an object of kind ControllerRevision", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2NamespacedControllerRevision", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ControllerRevision", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/namespaces/{namespace}/daemonsets": { - "get": { - "description": "watch individual changes to a list of DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2NamespacedDaemonSetList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/namespaces/{namespace}/daemonsets/{name}": { - "get": { - "description": "watch changes to an object of kind DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2NamespacedDaemonSet", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the DaemonSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/namespaces/{namespace}/deployments": { - "get": { - "description": "watch individual changes to a list of Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2NamespacedDeploymentList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/namespaces/{namespace}/deployments/{name}": { - "get": { - "description": "watch changes to an object of kind Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2NamespacedDeployment", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Deployment", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/namespaces/{namespace}/replicasets": { - "get": { - "description": "watch individual changes to a list of ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2NamespacedReplicaSetList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/namespaces/{namespace}/replicasets/{name}": { - "get": { - "description": "watch changes to an object of kind ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2NamespacedReplicaSet", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ReplicaSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/namespaces/{namespace}/statefulsets": { - "get": { - "description": "watch individual changes to a list of StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2NamespacedStatefulSetList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/namespaces/{namespace}/statefulsets/{name}": { - "get": { - "description": "watch changes to an object of kind StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2NamespacedStatefulSet", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the StatefulSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/replicasets": { - "get": { - "description": "watch individual changes to a list of ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2ReplicaSetListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/apps/v1beta2/watch/statefulsets": { - "get": { - "description": "watch individual changes to a list of StatefulSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "apps_v1beta2" - ], - "operationId": "watchAppsV1beta2StatefulSetListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/authentication.k8s.io/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authentication" - ], - "operationId": "getAuthenticationAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/authentication.k8s.io/v1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authentication_v1" - ], - "operationId": "getAuthenticationV1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/authentication.k8s.io/v1/tokenreviews": { - "post": { - "description": "create a TokenReview", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authentication_v1" - ], - "operationId": "createAuthenticationV1TokenReview", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReview" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReview" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "authentication.k8s.io", - "kind": "TokenReview", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/authentication.k8s.io/v1beta1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authentication_v1beta1" - ], - "operationId": "getAuthenticationV1beta1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/authentication.k8s.io/v1beta1/tokenreviews": { - "post": { - "description": "create a TokenReview", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authentication_v1beta1" - ], - "operationId": "createAuthenticationV1beta1TokenReview", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.TokenReview" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.TokenReview" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "authentication.k8s.io", - "kind": "TokenReview", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/authorization.k8s.io/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authorization" - ], - "operationId": "getAuthorizationAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/authorization.k8s.io/v1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authorization_v1" - ], - "operationId": "getAuthorizationV1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews": { - "post": { - "description": "create a LocalSubjectAccessReview", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authorization_v1" - ], - "operationId": "createAuthorizationV1NamespacedLocalSubjectAccessReview", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "LocalSubjectAccessReview", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/authorization.k8s.io/v1/selfsubjectaccessreviews": { - "post": { - "description": "create a SelfSubjectAccessReview", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authorization_v1" - ], - "operationId": "createAuthorizationV1SelfSubjectAccessReview", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "SelfSubjectAccessReview", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/authorization.k8s.io/v1/selfsubjectrulesreviews": { - "post": { - "description": "create a SelfSubjectRulesReview", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authorization_v1" - ], - "operationId": "createAuthorizationV1SelfSubjectRulesReview", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReview" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "SelfSubjectRulesReview", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/authorization.k8s.io/v1/subjectaccessreviews": { - "post": { - "description": "create a SubjectAccessReview", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authorization_v1" - ], - "operationId": "createAuthorizationV1SubjectAccessReview", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "SubjectAccessReview", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/authorization.k8s.io/v1beta1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authorization_v1beta1" - ], - "operationId": "getAuthorizationV1beta1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/authorization.k8s.io/v1beta1/namespaces/{namespace}/localsubjectaccessreviews": { - "post": { - "description": "create a LocalSubjectAccessReview", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authorization_v1beta1" - ], - "operationId": "createAuthorizationV1beta1NamespacedLocalSubjectAccessReview", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.LocalSubjectAccessReview" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.LocalSubjectAccessReview" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "LocalSubjectAccessReview", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/authorization.k8s.io/v1beta1/selfsubjectaccessreviews": { - "post": { - "description": "create a SelfSubjectAccessReview", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authorization_v1beta1" - ], - "operationId": "createAuthorizationV1beta1SelfSubjectAccessReview", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectAccessReview" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectAccessReview" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "SelfSubjectAccessReview", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/authorization.k8s.io/v1beta1/selfsubjectrulesreviews": { - "post": { - "description": "create a SelfSubjectRulesReview", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authorization_v1beta1" - ], - "operationId": "createAuthorizationV1beta1SelfSubjectRulesReview", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectRulesReview" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectRulesReview" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "SelfSubjectRulesReview", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/authorization.k8s.io/v1beta1/subjectaccessreviews": { - "post": { - "description": "create a SubjectAccessReview", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "authorization_v1beta1" - ], - "operationId": "createAuthorizationV1beta1SubjectAccessReview", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReview" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReview" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "authorization.k8s.io", - "kind": "SubjectAccessReview", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/autoscaling/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling" - ], - "operationId": "getAutoscalingAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/autoscaling/v1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "getAutoscalingV1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/autoscaling/v1/horizontalpodautoscalers": { - "get": { - "description": "list or watch objects of kind HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "listAutoscalingV1HorizontalPodAutoscalerForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers": { - "get": { - "description": "list or watch objects of kind HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "listAutoscalingV1NamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "post": { - "description": "create a HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "createAutoscalingV1NamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "deleteAutoscalingV1CollectionNamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}": { - "get": { - "description": "read the specified HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "put": { - "description": "replace the specified HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "delete": { - "description": "delete a HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "deleteAutoscalingV1NamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified HorizontalPodAutoscaler", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the HorizontalPodAutoscaler", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { - "get": { - "description": "read status of the specified HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "readAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "put": { - "description": "replace status of the specified HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "replaceAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "patch": { - "description": "partially update status of the specified HorizontalPodAutoscaler", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "patchAutoscalingV1NamespacedHorizontalPodAutoscalerStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the HorizontalPodAutoscaler", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/autoscaling/v1/watch/horizontalpodautoscalers": { - "get": { - "description": "watch individual changes to a list of HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "watchAutoscalingV1HorizontalPodAutoscalerListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers": { - "get": { - "description": "watch individual changes to a list of HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscalerList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/autoscaling/v1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { - "get": { - "description": "watch changes to an object of kind HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v1" - ], - "operationId": "watchAutoscalingV1NamespacedHorizontalPodAutoscaler", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the HorizontalPodAutoscaler", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/autoscaling/v2beta1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "getAutoscalingV2beta1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/autoscaling/v2beta1/horizontalpodautoscalers": { - "get": { - "description": "list or watch objects of kind HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "listAutoscalingV2beta1HorizontalPodAutoscalerForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers": { - "get": { - "description": "list or watch objects of kind HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "listAutoscalingV2beta1NamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "post": { - "description": "create a HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "createAutoscalingV2beta1NamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "delete": { - "description": "delete collection of HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "deleteAutoscalingV2beta1CollectionNamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}": { - "get": { - "description": "read the specified HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "readAutoscalingV2beta1NamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "put": { - "description": "replace the specified HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "replaceAutoscalingV2beta1NamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "delete": { - "description": "delete a HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "deleteAutoscalingV2beta1NamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "patch": { - "description": "partially update the specified HorizontalPodAutoscaler", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "patchAutoscalingV2beta1NamespacedHorizontalPodAutoscaler", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the HorizontalPodAutoscaler", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status": { - "get": { - "description": "read status of the specified HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "readAutoscalingV2beta1NamespacedHorizontalPodAutoscalerStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "put": { - "description": "replace status of the specified HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "replaceAutoscalingV2beta1NamespacedHorizontalPodAutoscalerStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "patch": { - "description": "partially update status of the specified HorizontalPodAutoscaler", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "patchAutoscalingV2beta1NamespacedHorizontalPodAutoscalerStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the HorizontalPodAutoscaler", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/autoscaling/v2beta1/watch/horizontalpodautoscalers": { - "get": { - "description": "watch individual changes to a list of HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "watchAutoscalingV2beta1HorizontalPodAutoscalerListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/autoscaling/v2beta1/watch/namespaces/{namespace}/horizontalpodautoscalers": { - "get": { - "description": "watch individual changes to a list of HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "watchAutoscalingV2beta1NamespacedHorizontalPodAutoscalerList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/autoscaling/v2beta1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}": { - "get": { - "description": "watch changes to an object of kind HorizontalPodAutoscaler", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "autoscaling_v2beta1" - ], - "operationId": "watchAutoscalingV2beta1NamespacedHorizontalPodAutoscaler", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the HorizontalPodAutoscaler", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/batch/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch" - ], - "operationId": "getBatchAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/batch/v1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "getBatchV1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/batch/v1/jobs": { - "get": { - "description": "list or watch objects of kind Job", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "listBatchV1JobForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.JobList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/batch/v1/namespaces/{namespace}/jobs": { - "get": { - "description": "list or watch objects of kind Job", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "listBatchV1NamespacedJob", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.JobList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "post": { - "description": "create a Job", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "createBatchV1NamespacedJob", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of Job", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "deleteBatchV1CollectionNamespacedJob", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/batch/v1/namespaces/{namespace}/jobs/{name}": { - "get": { - "description": "read the specified Job", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "readBatchV1NamespacedJob", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "put": { - "description": "replace the specified Job", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "replaceBatchV1NamespacedJob", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "delete": { - "description": "delete a Job", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "deleteBatchV1NamespacedJob", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified Job", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "patchBatchV1NamespacedJob", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Job", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status": { - "get": { - "description": "read status of the specified Job", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "readBatchV1NamespacedJobStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "put": { - "description": "replace status of the specified Job", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "replaceBatchV1NamespacedJobStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "patch": { - "description": "partially update status of the specified Job", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "patchBatchV1NamespacedJobStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Job", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/batch/v1/watch/jobs": { - "get": { - "description": "watch individual changes to a list of Job", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "watchBatchV1JobListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/batch/v1/watch/namespaces/{namespace}/jobs": { - "get": { - "description": "watch individual changes to a list of Job", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "watchBatchV1NamespacedJobList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/batch/v1/watch/namespaces/{namespace}/jobs/{name}": { - "get": { - "description": "watch changes to an object of kind Job", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1" - ], - "operationId": "watchBatchV1NamespacedJob", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "Job", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Job", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/batch/v1beta1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "getBatchV1beta1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/batch/v1beta1/cronjobs": { - "get": { - "description": "list or watch objects of kind CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "listBatchV1beta1CronJobForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJobList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs": { - "get": { - "description": "list or watch objects of kind CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "listBatchV1beta1NamespacedCronJob", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJobList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "post": { - "description": "create a CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "createBatchV1beta1NamespacedCronJob", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "deleteBatchV1beta1CollectionNamespacedCronJob", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}": { - "get": { - "description": "read the specified CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "readBatchV1beta1NamespacedCronJob", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "replaceBatchV1beta1NamespacedCronJob", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "deleteBatchV1beta1NamespacedCronJob", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified CronJob", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "patchBatchV1beta1NamespacedCronJob", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the CronJob", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status": { - "get": { - "description": "read status of the specified CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "readBatchV1beta1NamespacedCronJobStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "put": { - "description": "replace status of the specified CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "replaceBatchV1beta1NamespacedCronJobStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update status of the specified CronJob", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "patchBatchV1beta1NamespacedCronJobStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the CronJob", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/batch/v1beta1/watch/cronjobs": { - "get": { - "description": "watch individual changes to a list of CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "watchBatchV1beta1CronJobListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/batch/v1beta1/watch/namespaces/{namespace}/cronjobs": { - "get": { - "description": "watch individual changes to a list of CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "watchBatchV1beta1NamespacedCronJobList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/batch/v1beta1/watch/namespaces/{namespace}/cronjobs/{name}": { - "get": { - "description": "watch changes to an object of kind CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v1beta1" - ], - "operationId": "watchBatchV1beta1NamespacedCronJob", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the CronJob", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/batch/v2alpha1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "getBatchV2alpha1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/batch/v2alpha1/cronjobs": { - "get": { - "description": "list or watch objects of kind CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "listBatchV2alpha1CronJobForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJobList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs": { - "get": { - "description": "list or watch objects of kind CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "listBatchV2alpha1NamespacedCronJob", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJobList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "post": { - "description": "create a CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "createBatchV2alpha1NamespacedCronJob", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJob" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "delete": { - "description": "delete collection of CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "deleteBatchV2alpha1CollectionNamespacedCronJob", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}": { - "get": { - "description": "read the specified CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "readBatchV2alpha1NamespacedCronJob", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "put": { - "description": "replace the specified CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "replaceBatchV2alpha1NamespacedCronJob", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJob" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "delete": { - "description": "delete a CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "deleteBatchV2alpha1NamespacedCronJob", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "patch": { - "description": "partially update the specified CronJob", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "patchBatchV2alpha1NamespacedCronJob", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the CronJob", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/batch/v2alpha1/namespaces/{namespace}/cronjobs/{name}/status": { - "get": { - "description": "read status of the specified CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "readBatchV2alpha1NamespacedCronJobStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "put": { - "description": "replace status of the specified CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "replaceBatchV2alpha1NamespacedCronJobStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJob" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "patch": { - "description": "partially update status of the specified CronJob", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "patchBatchV2alpha1NamespacedCronJobStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJob" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the CronJob", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/batch/v2alpha1/watch/cronjobs": { - "get": { - "description": "watch individual changes to a list of CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "watchBatchV2alpha1CronJobListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/batch/v2alpha1/watch/namespaces/{namespace}/cronjobs": { - "get": { - "description": "watch individual changes to a list of CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "watchBatchV2alpha1NamespacedCronJobList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/batch/v2alpha1/watch/namespaces/{namespace}/cronjobs/{name}": { - "get": { - "description": "watch changes to an object of kind CronJob", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "batch_v2alpha1" - ], - "operationId": "watchBatchV2alpha1NamespacedCronJob", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the CronJob", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/certificates.k8s.io/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates" - ], - "operationId": "getCertificatesAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/certificates.k8s.io/v1beta1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1beta1" - ], - "operationId": "getCertificatesV1beta1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests": { - "get": { - "description": "list or watch objects of kind CertificateSigningRequest", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1beta1" - ], - "operationId": "listCertificatesV1beta1CertificateSigningRequest", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequestList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1beta1" - } - }, - "post": { - "description": "create a CertificateSigningRequest", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1beta1" - ], - "operationId": "createCertificatesV1beta1CertificateSigningRequest", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of CertificateSigningRequest", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1beta1" - ], - "operationId": "deleteCertificatesV1beta1CollectionCertificateSigningRequest", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}": { - "get": { - "description": "read the specified CertificateSigningRequest", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1beta1" - ], - "operationId": "readCertificatesV1beta1CertificateSigningRequest", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified CertificateSigningRequest", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1beta1" - ], - "operationId": "replaceCertificatesV1beta1CertificateSigningRequest", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a CertificateSigningRequest", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1beta1" - ], - "operationId": "deleteCertificatesV1beta1CertificateSigningRequest", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified CertificateSigningRequest", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1beta1" - ], - "operationId": "patchCertificatesV1beta1CertificateSigningRequest", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the CertificateSigningRequest", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/approval": { - "put": { - "description": "replace approval of the specified CertificateSigningRequest", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1beta1" - ], - "operationId": "replaceCertificatesV1beta1CertificateSigningRequestApproval", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the CertificateSigningRequest", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/certificates.k8s.io/v1beta1/certificatesigningrequests/{name}/status": { - "put": { - "description": "replace status of the specified CertificateSigningRequest", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1beta1" - ], - "operationId": "replaceCertificatesV1beta1CertificateSigningRequestStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the CertificateSigningRequest", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/certificates.k8s.io/v1beta1/watch/certificatesigningrequests": { - "get": { - "description": "watch individual changes to a list of CertificateSigningRequest", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1beta1" - ], - "operationId": "watchCertificatesV1beta1CertificateSigningRequestList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/certificates.k8s.io/v1beta1/watch/certificatesigningrequests/{name}": { - "get": { - "description": "watch changes to an object of kind CertificateSigningRequest", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "certificates_v1beta1" - ], - "operationId": "watchCertificatesV1beta1CertificateSigningRequest", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the CertificateSigningRequest", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions" - ], - "operationId": "getExtensionsAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/extensions/v1beta1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "getExtensionsV1beta1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/extensions/v1beta1/daemonsets": { - "get": { - "description": "list or watch objects of kind DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "listExtensionsV1beta1DaemonSetForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/deployments": { - "get": { - "description": "list or watch objects of kind Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "listExtensionsV1beta1DeploymentForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/ingresses": { - "get": { - "description": "list or watch objects of kind Ingress", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "listExtensionsV1beta1IngressForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets": { - "get": { - "description": "list or watch objects of kind DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "listExtensionsV1beta1NamespacedDaemonSet", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "post": { - "description": "create a DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "createExtensionsV1beta1NamespacedDaemonSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "deleteExtensionsV1beta1CollectionNamespacedDaemonSet", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}": { - "get": { - "description": "read the specified DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1NamespacedDaemonSet", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1NamespacedDaemonSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "deleteExtensionsV1beta1NamespacedDaemonSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified DaemonSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1NamespacedDaemonSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the DaemonSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/daemonsets/{name}/status": { - "get": { - "description": "read status of the specified DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1NamespacedDaemonSetStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "put": { - "description": "replace status of the specified DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1NamespacedDaemonSetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update status of the specified DaemonSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1NamespacedDaemonSetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the DaemonSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/deployments": { - "get": { - "description": "list or watch objects of kind Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "listExtensionsV1beta1NamespacedDeployment", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "post": { - "description": "create a Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "createExtensionsV1beta1NamespacedDeployment", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Deployment" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "deleteExtensionsV1beta1CollectionNamespacedDeployment", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}": { - "get": { - "description": "read the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1NamespacedDeployment", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1NamespacedDeployment", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Deployment" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "deleteExtensionsV1beta1NamespacedDeployment", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified Deployment", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1NamespacedDeployment", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Deployment", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/rollback": { - "post": { - "description": "create rollback of a Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "createExtensionsV1beta1NamespacedDeploymentRollback", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentRollback" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentRollback" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DeploymentRollback", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the DeploymentRollback", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale": { - "get": { - "description": "read scale of the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1NamespacedDeploymentScale", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Scale", - "version": "v1beta1" - } - }, - "put": { - "description": "replace scale of the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1NamespacedDeploymentScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Scale", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update scale of the specified Deployment", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1NamespacedDeploymentScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Scale", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Scale", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/status": { - "get": { - "description": "read status of the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1NamespacedDeploymentStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "put": { - "description": "replace status of the specified Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1NamespacedDeploymentStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Deployment" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update status of the specified Deployment", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1NamespacedDeploymentStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Deployment" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Deployment", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses": { - "get": { - "description": "list or watch objects of kind Ingress", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "listExtensionsV1beta1NamespacedIngress", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "post": { - "description": "create an Ingress", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "createExtensionsV1beta1NamespacedIngress", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of Ingress", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "deleteExtensionsV1beta1CollectionNamespacedIngress", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}": { - "get": { - "description": "read the specified Ingress", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1NamespacedIngress", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified Ingress", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1NamespacedIngress", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete an Ingress", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "deleteExtensionsV1beta1NamespacedIngress", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified Ingress", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1NamespacedIngress", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Ingress", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status": { - "get": { - "description": "read status of the specified Ingress", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1NamespacedIngressStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "put": { - "description": "replace status of the specified Ingress", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1NamespacedIngressStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update status of the specified Ingress", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1NamespacedIngressStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Ingress", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies": { - "get": { - "description": "list or watch objects of kind NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "listExtensionsV1beta1NamespacedNetworkPolicy", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicyList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "NetworkPolicy", - "version": "v1beta1" - } - }, - "post": { - "description": "create a NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "createExtensionsV1beta1NamespacedNetworkPolicy", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicy" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "NetworkPolicy", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "deleteExtensionsV1beta1CollectionNamespacedNetworkPolicy", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "NetworkPolicy", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}": { - "get": { - "description": "read the specified NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1NamespacedNetworkPolicy", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "NetworkPolicy", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1NamespacedNetworkPolicy", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicy" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "NetworkPolicy", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "deleteExtensionsV1beta1NamespacedNetworkPolicy", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "NetworkPolicy", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified NetworkPolicy", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1NamespacedNetworkPolicy", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "NetworkPolicy", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the NetworkPolicy", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/replicasets": { - "get": { - "description": "list or watch objects of kind ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "listExtensionsV1beta1NamespacedReplicaSet", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "post": { - "description": "create a ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "createExtensionsV1beta1NamespacedReplicaSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "deleteExtensionsV1beta1CollectionNamespacedReplicaSet", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}": { - "get": { - "description": "read the specified ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1NamespacedReplicaSet", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1NamespacedReplicaSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "deleteExtensionsV1beta1NamespacedReplicaSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified ReplicaSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1NamespacedReplicaSet", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ReplicaSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/scale": { - "get": { - "description": "read scale of the specified ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1NamespacedReplicaSetScale", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Scale", - "version": "v1beta1" - } - }, - "put": { - "description": "replace scale of the specified ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1NamespacedReplicaSetScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Scale", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update scale of the specified ReplicaSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1NamespacedReplicaSetScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Scale", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Scale", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/replicasets/{name}/status": { - "get": { - "description": "read status of the specified ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1NamespacedReplicaSetStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "put": { - "description": "replace status of the specified ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1NamespacedReplicaSetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSet" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update status of the specified ReplicaSet", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1NamespacedReplicaSetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSet" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ReplicaSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/namespaces/{namespace}/replicationcontrollers/{name}/scale": { - "get": { - "description": "read scale of the specified ReplicationControllerDummy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1NamespacedReplicationControllerDummyScale", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Scale", - "version": "v1beta1" - } - }, - "put": { - "description": "replace scale of the specified ReplicationControllerDummy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1NamespacedReplicationControllerDummyScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Scale", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update scale of the specified ReplicationControllerDummy", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1NamespacedReplicationControllerDummyScale", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Scale", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Scale", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/networkpolicies": { - "get": { - "description": "list or watch objects of kind NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "listExtensionsV1beta1NetworkPolicyForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicyList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "NetworkPolicy", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/podsecuritypolicies": { - "get": { - "description": "list or watch objects of kind PodSecurityPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "listExtensionsV1beta1PodSecurityPolicy", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.PodSecurityPolicyList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "PodSecurityPolicy", - "version": "v1beta1" - } - }, - "post": { - "description": "create a PodSecurityPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "createExtensionsV1beta1PodSecurityPolicy", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.PodSecurityPolicy" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.PodSecurityPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "PodSecurityPolicy", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of PodSecurityPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "deleteExtensionsV1beta1CollectionPodSecurityPolicy", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "PodSecurityPolicy", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/podsecuritypolicies/{name}": { - "get": { - "description": "read the specified PodSecurityPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "readExtensionsV1beta1PodSecurityPolicy", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.PodSecurityPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "PodSecurityPolicy", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified PodSecurityPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "replaceExtensionsV1beta1PodSecurityPolicy", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.PodSecurityPolicy" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.PodSecurityPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "PodSecurityPolicy", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a PodSecurityPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "deleteExtensionsV1beta1PodSecurityPolicy", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "PodSecurityPolicy", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified PodSecurityPolicy", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "patchExtensionsV1beta1PodSecurityPolicy", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.PodSecurityPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "PodSecurityPolicy", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the PodSecurityPolicy", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/replicasets": { - "get": { - "description": "list or watch objects of kind ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "listExtensionsV1beta1ReplicaSetForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/daemonsets": { - "get": { - "description": "watch individual changes to a list of DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1DaemonSetListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/deployments": { - "get": { - "description": "watch individual changes to a list of Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1DeploymentListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/ingresses": { - "get": { - "description": "watch individual changes to a list of Ingress", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1IngressListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/namespaces/{namespace}/daemonsets": { - "get": { - "description": "watch individual changes to a list of DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1NamespacedDaemonSetList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/namespaces/{namespace}/daemonsets/{name}": { - "get": { - "description": "watch changes to an object of kind DaemonSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1NamespacedDaemonSet", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the DaemonSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/namespaces/{namespace}/deployments": { - "get": { - "description": "watch individual changes to a list of Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1NamespacedDeploymentList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/namespaces/{namespace}/deployments/{name}": { - "get": { - "description": "watch changes to an object of kind Deployment", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1NamespacedDeployment", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Deployment", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses": { - "get": { - "description": "watch individual changes to a list of Ingress", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1NamespacedIngressList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses/{name}": { - "get": { - "description": "watch changes to an object of kind Ingress", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1NamespacedIngress", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Ingress", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies": { - "get": { - "description": "watch individual changes to a list of NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1NamespacedNetworkPolicyList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "NetworkPolicy", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies/{name}": { - "get": { - "description": "watch changes to an object of kind NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1NamespacedNetworkPolicy", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "NetworkPolicy", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the NetworkPolicy", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/namespaces/{namespace}/replicasets": { - "get": { - "description": "watch individual changes to a list of ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1NamespacedReplicaSetList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/namespaces/{namespace}/replicasets/{name}": { - "get": { - "description": "watch changes to an object of kind ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1NamespacedReplicaSet", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ReplicaSet", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/networkpolicies": { - "get": { - "description": "watch individual changes to a list of NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1NetworkPolicyListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "NetworkPolicy", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/podsecuritypolicies": { - "get": { - "description": "watch individual changes to a list of PodSecurityPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1PodSecurityPolicyList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "PodSecurityPolicy", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/podsecuritypolicies/{name}": { - "get": { - "description": "watch changes to an object of kind PodSecurityPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1PodSecurityPolicy", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "PodSecurityPolicy", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the PodSecurityPolicy", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/extensions/v1beta1/watch/replicasets": { - "get": { - "description": "watch individual changes to a list of ReplicaSet", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "extensions_v1beta1" - ], - "operationId": "watchExtensionsV1beta1ReplicaSetListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/networking.k8s.io/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking" - ], - "operationId": "getNetworkingAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/networking.k8s.io/v1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "operationId": "getNetworkingV1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies": { - "get": { - "description": "list or watch objects of kind NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "operationId": "listNetworkingV1NamespacedNetworkPolicy", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "post": { - "description": "create a NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "operationId": "createNetworkingV1NamespacedNetworkPolicy", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "operationId": "deleteNetworkingV1CollectionNamespacedNetworkPolicy", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}": { - "get": { - "description": "read the specified NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "operationId": "readNetworkingV1NamespacedNetworkPolicy", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "put": { - "description": "replace the specified NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "operationId": "replaceNetworkingV1NamespacedNetworkPolicy", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "delete": { - "description": "delete a NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "operationId": "deleteNetworkingV1NamespacedNetworkPolicy", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified NetworkPolicy", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "operationId": "patchNetworkingV1NamespacedNetworkPolicy", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the NetworkPolicy", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/networking.k8s.io/v1/networkpolicies": { - "get": { - "description": "list or watch objects of kind NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "operationId": "listNetworkingV1NetworkPolicyForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/networkpolicies": { - "get": { - "description": "watch individual changes to a list of NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "operationId": "watchNetworkingV1NamespacedNetworkPolicyList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/networking.k8s.io/v1/watch/namespaces/{namespace}/networkpolicies/{name}": { - "get": { - "description": "watch changes to an object of kind NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "operationId": "watchNetworkingV1NamespacedNetworkPolicy", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the NetworkPolicy", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/networking.k8s.io/v1/watch/networkpolicies": { - "get": { - "description": "watch individual changes to a list of NetworkPolicy", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "networking_v1" - ], - "operationId": "watchNetworkingV1NetworkPolicyListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/policy/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy" - ], - "operationId": "getPolicyAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/policy/v1beta1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "getPolicyV1beta1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets": { - "get": { - "description": "list or watch objects of kind PodDisruptionBudget", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "listPolicyV1beta1NamespacedPodDisruptionBudget", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudgetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "post": { - "description": "create a PodDisruptionBudget", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "createPolicyV1beta1NamespacedPodDisruptionBudget", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of PodDisruptionBudget", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "deletePolicyV1beta1CollectionNamespacedPodDisruptionBudget", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}": { - "get": { - "description": "read the specified PodDisruptionBudget", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "readPolicyV1beta1NamespacedPodDisruptionBudget", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified PodDisruptionBudget", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "replacePolicyV1beta1NamespacedPodDisruptionBudget", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a PodDisruptionBudget", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "deletePolicyV1beta1NamespacedPodDisruptionBudget", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified PodDisruptionBudget", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "patchPolicyV1beta1NamespacedPodDisruptionBudget", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the PodDisruptionBudget", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status": { - "get": { - "description": "read status of the specified PodDisruptionBudget", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "readPolicyV1beta1NamespacedPodDisruptionBudgetStatus", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "put": { - "description": "replace status of the specified PodDisruptionBudget", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "replacePolicyV1beta1NamespacedPodDisruptionBudgetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update status of the specified PodDisruptionBudget", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "patchPolicyV1beta1NamespacedPodDisruptionBudgetStatus", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the PodDisruptionBudget", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/policy/v1beta1/poddisruptionbudgets": { - "get": { - "description": "list or watch objects of kind PodDisruptionBudget", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "listPolicyV1beta1PodDisruptionBudgetForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudgetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/policy/v1beta1/watch/namespaces/{namespace}/poddisruptionbudgets": { - "get": { - "description": "watch individual changes to a list of PodDisruptionBudget", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "watchPolicyV1beta1NamespacedPodDisruptionBudgetList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/policy/v1beta1/watch/namespaces/{namespace}/poddisruptionbudgets/{name}": { - "get": { - "description": "watch changes to an object of kind PodDisruptionBudget", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "watchPolicyV1beta1NamespacedPodDisruptionBudget", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the PodDisruptionBudget", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/policy/v1beta1/watch/poddisruptionbudgets": { - "get": { - "description": "watch individual changes to a list of PodDisruptionBudget", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "policy_v1beta1" - ], - "operationId": "watchPolicyV1beta1PodDisruptionBudgetListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization" - ], - "operationId": "getRbacAuthorizationAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/rbac.authorization.k8s.io/v1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "getRbacAuthorizationV1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings": { - "get": { - "description": "list or watch objects of kind ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "listRbacAuthorizationV1ClusterRoleBinding", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBindingList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" - } - }, - "post": { - "description": "create a ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "createRbacAuthorizationV1ClusterRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "deleteRbacAuthorizationV1CollectionClusterRoleBinding", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}": { - "get": { - "description": "read the specified ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "readRbacAuthorizationV1ClusterRoleBinding", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" - } - }, - "put": { - "description": "replace the specified ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "replaceRbacAuthorizationV1ClusterRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" - } - }, - "delete": { - "description": "delete a ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "deleteRbacAuthorizationV1ClusterRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified ClusterRoleBinding", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "patchRbacAuthorizationV1ClusterRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ClusterRoleBinding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/clusterroles": { - "get": { - "description": "list or watch objects of kind ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "listRbacAuthorizationV1ClusterRole", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" - } - }, - "post": { - "description": "create a ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "createRbacAuthorizationV1ClusterRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "deleteRbacAuthorizationV1CollectionClusterRole", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}": { - "get": { - "description": "read the specified ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "readRbacAuthorizationV1ClusterRole", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" - } - }, - "put": { - "description": "replace the specified ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "replaceRbacAuthorizationV1ClusterRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" - } - }, - "delete": { - "description": "delete a ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "deleteRbacAuthorizationV1ClusterRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified ClusterRole", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "patchRbacAuthorizationV1ClusterRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ClusterRole", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings": { - "get": { - "description": "list or watch objects of kind RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "listRbacAuthorizationV1NamespacedRoleBinding", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBindingList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "post": { - "description": "create a RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "createRbacAuthorizationV1NamespacedRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "deleteRbacAuthorizationV1CollectionNamespacedRoleBinding", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}": { - "get": { - "description": "read the specified RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "readRbacAuthorizationV1NamespacedRoleBinding", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "put": { - "description": "replace the specified RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "replaceRbacAuthorizationV1NamespacedRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "delete": { - "description": "delete a RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "deleteRbacAuthorizationV1NamespacedRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified RoleBinding", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "patchRbacAuthorizationV1NamespacedRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the RoleBinding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles": { - "get": { - "description": "list or watch objects of kind Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "listRbacAuthorizationV1NamespacedRole", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "post": { - "description": "create a Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "createRbacAuthorizationV1NamespacedRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "deleteRbacAuthorizationV1CollectionNamespacedRole", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}": { - "get": { - "description": "read the specified Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "readRbacAuthorizationV1NamespacedRole", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "put": { - "description": "replace the specified Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "replaceRbacAuthorizationV1NamespacedRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "delete": { - "description": "delete a Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "deleteRbacAuthorizationV1NamespacedRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified Role", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "patchRbacAuthorizationV1NamespacedRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Role", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/rolebindings": { - "get": { - "description": "list or watch objects of kind RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "listRbacAuthorizationV1RoleBindingForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBindingList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/roles": { - "get": { - "description": "list or watch objects of kind Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "listRbacAuthorizationV1RoleForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings": { - "get": { - "description": "watch individual changes to a list of ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "watchRbacAuthorizationV1ClusterRoleBindingList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/clusterrolebindings/{name}": { - "get": { - "description": "watch changes to an object of kind ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "watchRbacAuthorizationV1ClusterRoleBinding", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ClusterRoleBinding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/clusterroles": { - "get": { - "description": "watch individual changes to a list of ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "watchRbacAuthorizationV1ClusterRoleList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/clusterroles/{name}": { - "get": { - "description": "watch changes to an object of kind ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "watchRbacAuthorizationV1ClusterRole", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ClusterRole", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/rolebindings": { - "get": { - "description": "watch individual changes to a list of RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "watchRbacAuthorizationV1NamespacedRoleBindingList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/rolebindings/{name}": { - "get": { - "description": "watch changes to an object of kind RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "watchRbacAuthorizationV1NamespacedRoleBinding", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the RoleBinding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/roles": { - "get": { - "description": "watch individual changes to a list of Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "watchRbacAuthorizationV1NamespacedRoleList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/namespaces/{namespace}/roles/{name}": { - "get": { - "description": "watch changes to an object of kind Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "watchRbacAuthorizationV1NamespacedRole", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Role", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/rolebindings": { - "get": { - "description": "watch individual changes to a list of RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "watchRbacAuthorizationV1RoleBindingListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1/watch/roles": { - "get": { - "description": "watch individual changes to a list of Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1" - ], - "operationId": "watchRbacAuthorizationV1RoleListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "getRbacAuthorizationV1alpha1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings": { - "get": { - "description": "list or watch objects of kind ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "listRbacAuthorizationV1alpha1ClusterRoleBinding", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRoleBindingList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1alpha1" - } - }, - "post": { - "description": "create a ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "createRbacAuthorizationV1alpha1ClusterRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRoleBinding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete collection of ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "deleteRbacAuthorizationV1alpha1CollectionClusterRoleBinding", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}": { - "get": { - "description": "read the specified ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "readRbacAuthorizationV1alpha1ClusterRoleBinding", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1alpha1" - } - }, - "put": { - "description": "replace the specified ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "replaceRbacAuthorizationV1alpha1ClusterRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRoleBinding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete a ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "deleteRbacAuthorizationV1alpha1ClusterRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1alpha1" - } - }, - "patch": { - "description": "partially update the specified ClusterRoleBinding", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "patchRbacAuthorizationV1alpha1ClusterRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ClusterRoleBinding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles": { - "get": { - "description": "list or watch objects of kind ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "listRbacAuthorizationV1alpha1ClusterRole", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRoleList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1alpha1" - } - }, - "post": { - "description": "create a ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "createRbacAuthorizationV1alpha1ClusterRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRole" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRole" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete collection of ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "deleteRbacAuthorizationV1alpha1CollectionClusterRole", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}": { - "get": { - "description": "read the specified ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "readRbacAuthorizationV1alpha1ClusterRole", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRole" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1alpha1" - } - }, - "put": { - "description": "replace the specified ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "replaceRbacAuthorizationV1alpha1ClusterRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRole" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRole" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete a ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "deleteRbacAuthorizationV1alpha1ClusterRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1alpha1" - } - }, - "patch": { - "description": "partially update the specified ClusterRole", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "patchRbacAuthorizationV1alpha1ClusterRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRole" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ClusterRole", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings": { - "get": { - "description": "list or watch objects of kind RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "listRbacAuthorizationV1alpha1NamespacedRoleBinding", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleBindingList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1alpha1" - } - }, - "post": { - "description": "create a RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "createRbacAuthorizationV1alpha1NamespacedRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleBinding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete collection of RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "deleteRbacAuthorizationV1alpha1CollectionNamespacedRoleBinding", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}": { - "get": { - "description": "read the specified RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "readRbacAuthorizationV1alpha1NamespacedRoleBinding", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1alpha1" - } - }, - "put": { - "description": "replace the specified RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "replaceRbacAuthorizationV1alpha1NamespacedRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleBinding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete a RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "deleteRbacAuthorizationV1alpha1NamespacedRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1alpha1" - } - }, - "patch": { - "description": "partially update the specified RoleBinding", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "patchRbacAuthorizationV1alpha1NamespacedRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the RoleBinding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles": { - "get": { - "description": "list or watch objects of kind Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "listRbacAuthorizationV1alpha1NamespacedRole", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1alpha1" - } - }, - "post": { - "description": "create a Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "createRbacAuthorizationV1alpha1NamespacedRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.Role" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete collection of Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "deleteRbacAuthorizationV1alpha1CollectionNamespacedRole", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}": { - "get": { - "description": "read the specified Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "readRbacAuthorizationV1alpha1NamespacedRole", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1alpha1" - } - }, - "put": { - "description": "replace the specified Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "replaceRbacAuthorizationV1alpha1NamespacedRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.Role" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete a Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "deleteRbacAuthorizationV1alpha1NamespacedRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1alpha1" - } - }, - "patch": { - "description": "partially update the specified Role", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "patchRbacAuthorizationV1alpha1NamespacedRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Role", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/rolebindings": { - "get": { - "description": "list or watch objects of kind RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "listRbacAuthorizationV1alpha1RoleBindingForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleBindingList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/roles": { - "get": { - "description": "list or watch objects of kind Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "listRbacAuthorizationV1alpha1RoleForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterrolebindings": { - "get": { - "description": "watch individual changes to a list of ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "watchRbacAuthorizationV1alpha1ClusterRoleBindingList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterrolebindings/{name}": { - "get": { - "description": "watch changes to an object of kind ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "watchRbacAuthorizationV1alpha1ClusterRoleBinding", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ClusterRoleBinding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterroles": { - "get": { - "description": "watch individual changes to a list of ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "watchRbacAuthorizationV1alpha1ClusterRoleList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/watch/clusterroles/{name}": { - "get": { - "description": "watch changes to an object of kind ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "watchRbacAuthorizationV1alpha1ClusterRole", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ClusterRole", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{namespace}/rolebindings": { - "get": { - "description": "watch individual changes to a list of RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "watchRbacAuthorizationV1alpha1NamespacedRoleBindingList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{namespace}/rolebindings/{name}": { - "get": { - "description": "watch changes to an object of kind RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "watchRbacAuthorizationV1alpha1NamespacedRoleBinding", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the RoleBinding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{namespace}/roles": { - "get": { - "description": "watch individual changes to a list of Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "watchRbacAuthorizationV1alpha1NamespacedRoleList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/watch/namespaces/{namespace}/roles/{name}": { - "get": { - "description": "watch changes to an object of kind Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "watchRbacAuthorizationV1alpha1NamespacedRole", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Role", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/watch/rolebindings": { - "get": { - "description": "watch individual changes to a list of RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "watchRbacAuthorizationV1alpha1RoleBindingListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1alpha1/watch/roles": { - "get": { - "description": "watch individual changes to a list of Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1alpha1" - ], - "operationId": "watchRbacAuthorizationV1alpha1RoleListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "getRbacAuthorizationV1beta1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings": { - "get": { - "description": "list or watch objects of kind ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "listRbacAuthorizationV1beta1ClusterRoleBinding", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleBindingList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1beta1" - } - }, - "post": { - "description": "create a ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "createRbacAuthorizationV1beta1ClusterRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleBinding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "deleteRbacAuthorizationV1beta1CollectionClusterRoleBinding", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/clusterrolebindings/{name}": { - "get": { - "description": "read the specified ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "readRbacAuthorizationV1beta1ClusterRoleBinding", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "replaceRbacAuthorizationV1beta1ClusterRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleBinding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "deleteRbacAuthorizationV1beta1ClusterRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified ClusterRoleBinding", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "patchRbacAuthorizationV1beta1ClusterRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ClusterRoleBinding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/clusterroles": { - "get": { - "description": "list or watch objects of kind ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "listRbacAuthorizationV1beta1ClusterRole", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1beta1" - } - }, - "post": { - "description": "create a ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "createRbacAuthorizationV1beta1ClusterRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRole" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRole" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "deleteRbacAuthorizationV1beta1CollectionClusterRole", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/clusterroles/{name}": { - "get": { - "description": "read the specified ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "readRbacAuthorizationV1beta1ClusterRole", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRole" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "replaceRbacAuthorizationV1beta1ClusterRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRole" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRole" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "deleteRbacAuthorizationV1beta1ClusterRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified ClusterRole", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "patchRbacAuthorizationV1beta1ClusterRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRole" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the ClusterRole", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings": { - "get": { - "description": "list or watch objects of kind RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "listRbacAuthorizationV1beta1NamespacedRoleBinding", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleBindingList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1beta1" - } - }, - "post": { - "description": "create a RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "createRbacAuthorizationV1beta1NamespacedRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleBinding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "deleteRbacAuthorizationV1beta1CollectionNamespacedRoleBinding", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/rolebindings/{name}": { - "get": { - "description": "read the specified RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "readRbacAuthorizationV1beta1NamespacedRoleBinding", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "replaceRbacAuthorizationV1beta1NamespacedRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleBinding" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "deleteRbacAuthorizationV1beta1NamespacedRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified RoleBinding", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "patchRbacAuthorizationV1beta1NamespacedRoleBinding", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleBinding" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the RoleBinding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles": { - "get": { - "description": "list or watch objects of kind Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "listRbacAuthorizationV1beta1NamespacedRole", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1beta1" - } - }, - "post": { - "description": "create a Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "createRbacAuthorizationV1beta1NamespacedRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Role" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "deleteRbacAuthorizationV1beta1CollectionNamespacedRole", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/namespaces/{namespace}/roles/{name}": { - "get": { - "description": "read the specified Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "readRbacAuthorizationV1beta1NamespacedRole", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "replaceRbacAuthorizationV1beta1NamespacedRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Role" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "deleteRbacAuthorizationV1beta1NamespacedRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified Role", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "patchRbacAuthorizationV1beta1NamespacedRole", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Role" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the Role", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/rolebindings": { - "get": { - "description": "list or watch objects of kind RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "listRbacAuthorizationV1beta1RoleBindingForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleBindingList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/roles": { - "get": { - "description": "list or watch objects of kind Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "listRbacAuthorizationV1beta1RoleForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterrolebindings": { - "get": { - "description": "watch individual changes to a list of ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "watchRbacAuthorizationV1beta1ClusterRoleBindingList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterrolebindings/{name}": { - "get": { - "description": "watch changes to an object of kind ClusterRoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "watchRbacAuthorizationV1beta1ClusterRoleBinding", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ClusterRoleBinding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterroles": { - "get": { - "description": "watch individual changes to a list of ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "watchRbacAuthorizationV1beta1ClusterRoleList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/watch/clusterroles/{name}": { - "get": { - "description": "watch changes to an object of kind ClusterRole", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "watchRbacAuthorizationV1beta1ClusterRole", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the ClusterRole", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/rolebindings": { - "get": { - "description": "watch individual changes to a list of RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "watchRbacAuthorizationV1beta1NamespacedRoleBindingList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/rolebindings/{name}": { - "get": { - "description": "watch changes to an object of kind RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "watchRbacAuthorizationV1beta1NamespacedRoleBinding", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the RoleBinding", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/roles": { - "get": { - "description": "watch individual changes to a list of Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "watchRbacAuthorizationV1beta1NamespacedRoleList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/watch/namespaces/{namespace}/roles/{name}": { - "get": { - "description": "watch changes to an object of kind Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "watchRbacAuthorizationV1beta1NamespacedRole", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the Role", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/watch/rolebindings": { - "get": { - "description": "watch individual changes to a list of RoleBinding", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "watchRbacAuthorizationV1beta1RoleBindingListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/rbac.authorization.k8s.io/v1beta1/watch/roles": { - "get": { - "description": "watch individual changes to a list of Role", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "rbacAuthorization_v1beta1" - ], - "operationId": "watchRbacAuthorizationV1beta1RoleListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/scheduling.k8s.io/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "scheduling" - ], - "operationId": "getSchedulingAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/scheduling.k8s.io/v1alpha1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "scheduling_v1alpha1" - ], - "operationId": "getSchedulingV1alpha1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/scheduling.k8s.io/v1alpha1/priorityclasses": { - "get": { - "description": "list or watch objects of kind PriorityClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "scheduling_v1alpha1" - ], - "operationId": "listSchedulingV1alpha1PriorityClass", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.scheduling.v1alpha1.PriorityClassList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "scheduling.k8s.io", - "kind": "PriorityClass", - "version": "v1alpha1" - } - }, - "post": { - "description": "create a PriorityClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "scheduling_v1alpha1" - ], - "operationId": "createSchedulingV1alpha1PriorityClass", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.scheduling.v1alpha1.PriorityClass" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.scheduling.v1alpha1.PriorityClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "scheduling.k8s.io", - "kind": "PriorityClass", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete collection of PriorityClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "scheduling_v1alpha1" - ], - "operationId": "deleteSchedulingV1alpha1CollectionPriorityClass", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "scheduling.k8s.io", - "kind": "PriorityClass", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}": { - "get": { - "description": "read the specified PriorityClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "scheduling_v1alpha1" - ], - "operationId": "readSchedulingV1alpha1PriorityClass", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.scheduling.v1alpha1.PriorityClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "scheduling.k8s.io", - "kind": "PriorityClass", - "version": "v1alpha1" - } - }, - "put": { - "description": "replace the specified PriorityClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "scheduling_v1alpha1" - ], - "operationId": "replaceSchedulingV1alpha1PriorityClass", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.scheduling.v1alpha1.PriorityClass" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.scheduling.v1alpha1.PriorityClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "scheduling.k8s.io", - "kind": "PriorityClass", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete a PriorityClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "scheduling_v1alpha1" - ], - "operationId": "deleteSchedulingV1alpha1PriorityClass", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "scheduling.k8s.io", - "kind": "PriorityClass", - "version": "v1alpha1" - } - }, - "patch": { - "description": "partially update the specified PriorityClass", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "scheduling_v1alpha1" - ], - "operationId": "patchSchedulingV1alpha1PriorityClass", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.scheduling.v1alpha1.PriorityClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "scheduling.k8s.io", - "kind": "PriorityClass", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the PriorityClass", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/scheduling.k8s.io/v1alpha1/watch/priorityclasses": { - "get": { - "description": "watch individual changes to a list of PriorityClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "scheduling_v1alpha1" - ], - "operationId": "watchSchedulingV1alpha1PriorityClassList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "scheduling.k8s.io", - "kind": "PriorityClass", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/scheduling.k8s.io/v1alpha1/watch/priorityclasses/{name}": { - "get": { - "description": "watch changes to an object of kind PriorityClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "scheduling_v1alpha1" - ], - "operationId": "watchSchedulingV1alpha1PriorityClass", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "scheduling.k8s.io", - "kind": "PriorityClass", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the PriorityClass", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/settings.k8s.io/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings" - ], - "operationId": "getSettingsAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/settings.k8s.io/v1alpha1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings_v1alpha1" - ], - "operationId": "getSettingsV1alpha1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets": { - "get": { - "description": "list or watch objects of kind PodPreset", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings_v1alpha1" - ], - "operationId": "listSettingsV1alpha1NamespacedPodPreset", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPresetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "settings.k8s.io", - "kind": "PodPreset", - "version": "v1alpha1" - } - }, - "post": { - "description": "create a PodPreset", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings_v1alpha1" - ], - "operationId": "createSettingsV1alpha1NamespacedPodPreset", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPreset" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPreset" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "settings.k8s.io", - "kind": "PodPreset", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete collection of PodPreset", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings_v1alpha1" - ], - "operationId": "deleteSettingsV1alpha1CollectionNamespacedPodPreset", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "settings.k8s.io", - "kind": "PodPreset", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/settings.k8s.io/v1alpha1/namespaces/{namespace}/podpresets/{name}": { - "get": { - "description": "read the specified PodPreset", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings_v1alpha1" - ], - "operationId": "readSettingsV1alpha1NamespacedPodPreset", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPreset" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "settings.k8s.io", - "kind": "PodPreset", - "version": "v1alpha1" - } - }, - "put": { - "description": "replace the specified PodPreset", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings_v1alpha1" - ], - "operationId": "replaceSettingsV1alpha1NamespacedPodPreset", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPreset" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPreset" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "settings.k8s.io", - "kind": "PodPreset", - "version": "v1alpha1" - } - }, - "delete": { - "description": "delete a PodPreset", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings_v1alpha1" - ], - "operationId": "deleteSettingsV1alpha1NamespacedPodPreset", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "settings.k8s.io", - "kind": "PodPreset", - "version": "v1alpha1" - } - }, - "patch": { - "description": "partially update the specified PodPreset", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings_v1alpha1" - ], - "operationId": "patchSettingsV1alpha1NamespacedPodPreset", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPreset" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "settings.k8s.io", - "kind": "PodPreset", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the PodPreset", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/settings.k8s.io/v1alpha1/podpresets": { - "get": { - "description": "list or watch objects of kind PodPreset", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings_v1alpha1" - ], - "operationId": "listSettingsV1alpha1PodPresetForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPresetList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "settings.k8s.io", - "kind": "PodPreset", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/settings.k8s.io/v1alpha1/watch/namespaces/{namespace}/podpresets": { - "get": { - "description": "watch individual changes to a list of PodPreset", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings_v1alpha1" - ], - "operationId": "watchSettingsV1alpha1NamespacedPodPresetList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "settings.k8s.io", - "kind": "PodPreset", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/settings.k8s.io/v1alpha1/watch/namespaces/{namespace}/podpresets/{name}": { - "get": { - "description": "watch changes to an object of kind PodPreset", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings_v1alpha1" - ], - "operationId": "watchSettingsV1alpha1NamespacedPodPreset", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "settings.k8s.io", - "kind": "PodPreset", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the PodPreset", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "object name and auth scope, such as for teams and projects", - "name": "namespace", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/settings.k8s.io/v1alpha1/watch/podpresets": { - "get": { - "description": "watch individual changes to a list of PodPreset", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "settings_v1alpha1" - ], - "operationId": "watchSettingsV1alpha1PodPresetListForAllNamespaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "settings.k8s.io", - "kind": "PodPreset", - "version": "v1alpha1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/storage.k8s.io/": { - "get": { - "description": "get information of a group", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage" - ], - "operationId": "getStorageAPIGroup", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/storage.k8s.io/v1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1" - ], - "operationId": "getStorageV1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/storage.k8s.io/v1/storageclasses": { - "get": { - "description": "list or watch objects of kind StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1" - ], - "operationId": "listStorageV1StorageClass", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1.StorageClassList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1" - } - }, - "post": { - "description": "create a StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1" - ], - "operationId": "createStorageV1StorageClass", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1.StorageClass" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1.StorageClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1" - } - }, - "delete": { - "description": "delete collection of StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1" - ], - "operationId": "deleteStorageV1CollectionStorageClass", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/storage.k8s.io/v1/storageclasses/{name}": { - "get": { - "description": "read the specified StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1" - ], - "operationId": "readStorageV1StorageClass", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1.StorageClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1" - } - }, - "put": { - "description": "replace the specified StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1" - ], - "operationId": "replaceStorageV1StorageClass", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1.StorageClass" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1.StorageClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1" - } - }, - "delete": { - "description": "delete a StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1" - ], - "operationId": "deleteStorageV1StorageClass", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1" - } - }, - "patch": { - "description": "partially update the specified StorageClass", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1" - ], - "operationId": "patchStorageV1StorageClass", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1.StorageClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the StorageClass", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/storage.k8s.io/v1/watch/storageclasses": { - "get": { - "description": "watch individual changes to a list of StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1" - ], - "operationId": "watchStorageV1StorageClassList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/storage.k8s.io/v1/watch/storageclasses/{name}": { - "get": { - "description": "watch changes to an object of kind StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1" - ], - "operationId": "watchStorageV1StorageClass", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the StorageClass", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/storage.k8s.io/v1beta1/": { - "get": { - "description": "get available resources", - "consumes": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1beta1" - ], - "operationId": "getStorageV1beta1APIResources", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - }, - "/apis/storage.k8s.io/v1beta1/storageclasses": { - "get": { - "description": "list or watch objects of kind StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1beta1" - ], - "operationId": "listStorageV1beta1StorageClass", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1beta1.StorageClassList" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "list", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1beta1" - } - }, - "post": { - "description": "create a StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1beta1" - ], - "operationId": "createStorageV1beta1StorageClass", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1beta1.StorageClass" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1beta1.StorageClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "post", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete collection of StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1beta1" - ], - "operationId": "deleteStorageV1beta1CollectionStorageClass", - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "deletecollection", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/storage.k8s.io/v1beta1/storageclasses/{name}": { - "get": { - "description": "read the specified StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1beta1" - ], - "operationId": "readStorageV1beta1StorageClass", - "parameters": [ - { - "uniqueItems": true, - "type": "boolean", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", - "name": "exact", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "name": "export", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1beta1.StorageClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "get", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1beta1" - } - }, - "put": { - "description": "replace the specified StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1beta1" - ], - "operationId": "replaceStorageV1beta1StorageClass", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1beta1.StorageClass" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1beta1.StorageClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "put", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1beta1" - } - }, - "delete": { - "description": "delete a StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1beta1" - ], - "operationId": "deleteStorageV1beta1StorageClass", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - } - }, - { - "uniqueItems": true, - "type": "integer", - "description": "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.", - "name": "gracePeriodSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "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.", - "name": "orphanDependents", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "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.", - "name": "propagationPolicy", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "delete", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1beta1" - } - }, - "patch": { - "description": "partially update the specified StorageClass", - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1beta1" - ], - "operationId": "patchStorageV1beta1StorageClass", - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Patch" - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.api.storage.v1beta1.StorageClass" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "patch", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "name of the StorageClass", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - } - ] - }, - "/apis/storage.k8s.io/v1beta1/watch/storageclasses": { - "get": { - "description": "watch individual changes to a list of StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1beta1" - ], - "operationId": "watchStorageV1beta1StorageClassList", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watchlist", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/apis/storage.k8s.io/v1beta1/watch/storageclasses/{name}": { - "get": { - "description": "watch changes to an object of kind StorageClass", - "consumes": [ - "*/*" - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "schemes": [ - "https" - ], - "tags": [ - "storage_v1beta1" - ], - "operationId": "watchStorageV1beta1StorageClass", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent" - } - }, - "401": { - "description": "Unauthorized" - } - }, - "x-kubernetes-action": "watch", - "x-kubernetes-group-version-kind": { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1beta1" - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server the server will respond with a 410 ResourceExpired error indicating the client must restart their list without the continue field. This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.", - "name": "continue", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "name": "fieldSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "If true, partially initialized resources are included in the response.", - "name": "includeUninitialized", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "name": "labelSelector", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.", - "name": "limit", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "name of the StorageClass", - "name": "name", - "in": "path", - "required": true - }, - { - "uniqueItems": true, - "type": "string", - "description": "If 'true', then the output is pretty printed.", - "name": "pretty", - "in": "query" - }, - { - "uniqueItems": true, - "type": "string", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", - "name": "resourceVersion", - "in": "query" - }, - { - "uniqueItems": true, - "type": "integer", - "description": "Timeout for the list/watch call.", - "name": "timeoutSeconds", - "in": "query" - }, - { - "uniqueItems": true, - "type": "boolean", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "name": "watch", - "in": "query" - } - ] - }, - "/logs/": { - "get": { - "schemes": [ - "https" - ], - "tags": [ - "logs" - ], - "operationId": "logFileListHandler", - "responses": { - "401": { - "description": "Unauthorized" - } - } - } - }, - "/logs/{logpath}": { - "get": { - "schemes": [ - "https" - ], - "tags": [ - "logs" - ], - "operationId": "logFileHandler", - "responses": { - "401": { - "description": "Unauthorized" - } - } - }, - "parameters": [ - { - "uniqueItems": true, - "type": "string", - "description": "path to the log", - "name": "logpath", - "in": "path", - "required": true - } - ] - }, - "/version/": { - "get": { - "description": "get the code version", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "schemes": [ - "https" - ], - "tags": [ - "version" - ], - "operationId": "getCodeVersion", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.version.Info" - } - }, - "401": { - "description": "Unauthorized" - } - } - } - } - }, - "definitions": { - "io.k8s.api.admissionregistration.v1alpha1.AdmissionHookClientConfig": { - "description": "AdmissionHookClientConfig contains the information to make a TLS connection with the webhook", - "required": [ - "service", - "caBundle" - ], - "properties": { - "caBundle": { - "description": "CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required", - "type": "string", - "format": "byte" - }, - "service": { - "description": "Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ServiceReference" - } - } - }, - "io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHook": { - "description": "ExternalAdmissionHook describes an external admission webhook and the resources and operations it applies to.", - "required": [ - "name", - "clientConfig" - ], - "properties": { - "clientConfig": { - "description": "ClientConfig defines how to communicate with the hook. Required", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.AdmissionHookClientConfig" - }, - "failurePolicy": { - "description": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", - "type": "string" - }, - "name": { - "description": "The name of the external 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.", - "type": "string" - }, - "rules": { - "description": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.RuleWithOperations" - } - } - } - }, - "io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration": { - "description": "ExternalAdmissionHookConfiguration describes the configuration of initializers.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "externalAdmissionHooks": { - "description": "ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHook" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfiguration", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList": { - "description": "ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of ExternalAdmissionHookConfiguration.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "admissionregistration.k8s.io", - "kind": "ExternalAdmissionHookConfigurationList", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.admissionregistration.v1alpha1.Initializer": { - "description": "Initializer describes the name and the failure policy of an initializer, and what resources it applies to.", - "required": [ - "name" - ], - "properties": { - "name": { - "description": "Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where \"alwayspullimages\" is the name of the webhook, and kubernetes.io is the name of the organization. Required", - "type": "string" - }, - "rules": { - "description": "Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Rule" - } - } - } - }, - "io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration": { - "description": "InitializerConfiguration describes the configuration of initializers.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "initializers": { - "description": "Initializers is a list of resources and their default initializers Order-sensitive. When merging multiple InitializerConfigurations, we sort the initializers from different InitializerConfigurations by the name of the InitializerConfigurations; the order of the initializers from the same InitializerConfiguration is preserved.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Initializer" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfiguration", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.admissionregistration.v1alpha1.InitializerConfigurationList": { - "description": "InitializerConfigurationList is a list of InitializerConfiguration.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of InitializerConfiguration.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "admissionregistration.k8s.io", - "kind": "InitializerConfigurationList", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.admissionregistration.v1alpha1.Rule": { - "description": "Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.", - "properties": { - "apiGroups": { - "description": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", - "type": "array", - "items": { - "type": "string" - } - }, - "apiVersions": { - "description": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "description": "Resources is a list of resources this rule applies to.\n\nFor 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.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.admissionregistration.v1alpha1.RuleWithOperations": { - "description": "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.", - "properties": { - "apiGroups": { - "description": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", - "type": "array", - "items": { - "type": "string" - } - }, - "apiVersions": { - "description": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", - "type": "array", - "items": { - "type": "string" - } - }, - "operations": { - "description": "Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required.", - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "description": "Resources is a list of resources this rule applies to.\n\nFor 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.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.admissionregistration.v1alpha1.ServiceReference": { - "description": "ServiceReference holds a reference to Service.legacy.k8s.io", - "required": [ - "namespace", - "name" - ], - "properties": { - "name": { - "description": "Name is the name of the service Required", - "type": "string" - }, - "namespace": { - "description": "Namespace is the namespace of the service Required", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta1.ControllerRevision": { - "description": "DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. 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.", - "required": [ - "revision" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "data": { - "description": "Data is the serialized representation of the state.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "revision": { - "description": "Revision indicates the revision of the state represented by Data.", - "type": "integer", - "format": "int64" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.apps.v1beta1.ControllerRevisionList": { - "description": "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of ControllerRevisions", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevision" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "ControllerRevisionList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.apps.v1beta1.Deployment": { - "description": "DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of the Deployment.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentSpec" - }, - "status": { - "description": "Most recently observed status of the Deployment.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "Deployment", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.apps.v1beta1.DeploymentCondition": { - "description": "DeploymentCondition describes the state of a deployment at a certain point.", - "required": [ - "type", - "status" - ], - "properties": { - "lastTransitionTime": { - "description": "Last time the condition transitioned from one status to another.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "lastUpdateTime": { - "description": "The last time this condition was updated.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "A human readable message indicating details about the transition.", - "type": "string" - }, - "reason": { - "description": "The reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "Status of the condition, one of True, False, Unknown.", - "type": "string" - }, - "type": { - "description": "Type of deployment condition.", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta1.DeploymentList": { - "description": "DeploymentList is a list of Deployments.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of Deployments.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "DeploymentList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.apps.v1beta1.DeploymentRollback": { - "description": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.", - "required": [ - "name", - "rollbackTo" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "name": { - "description": "Required: This must match the Name of a deployment.", - "type": "string" - }, - "rollbackTo": { - "description": "The config of this deployment rollback.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.RollbackConfig" - }, - "updatedAnnotations": { - "description": "The annotations to be updated to a deployment", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "DeploymentRollback", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.apps.v1beta1.DeploymentSpec": { - "description": "DeploymentSpec is the specification of the desired behavior of the Deployment.", - "required": [ - "template" - ], - "properties": { - "minReadySeconds": { - "description": "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)", - "type": "integer", - "format": "int32" - }, - "paused": { - "description": "Indicates that the deployment is paused.", - "type": "boolean" - }, - "progressDeadlineSeconds": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - "type": "integer", - "format": "int32" - }, - "revisionHistoryLimit": { - "description": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 2.", - "type": "integer", - "format": "int32" - }, - "rollbackTo": { - "description": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.RollbackConfig" - }, - "selector": { - "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "strategy": { - "description": "The deployment strategy to use to replace existing pods with new ones.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentStrategy" - }, - "template": { - "description": "Template describes the pods that will be created.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - } - } - }, - "io.k8s.api.apps.v1beta1.DeploymentStatus": { - "description": "DeploymentStatus is the most recently observed status of the Deployment.", - "properties": { - "availableReplicas": { - "description": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", - "type": "integer", - "format": "int32" - }, - "collisionCount": { - "description": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", - "type": "integer", - "format": "int32" - }, - "conditions": { - "description": "Represents the latest available observations of a deployment's current state.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "observedGeneration": { - "description": "The generation observed by the deployment controller.", - "type": "integer", - "format": "int64" - }, - "readyReplicas": { - "description": "Total number of ready pods targeted by this deployment.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", - "type": "integer", - "format": "int32" - }, - "unavailableReplicas": { - "description": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - "type": "integer", - "format": "int32" - }, - "updatedReplicas": { - "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.apps.v1beta1.DeploymentStrategy": { - "description": "DeploymentStrategy describes how to replace existing pods with new ones.", - "properties": { - "rollingUpdate": { - "description": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.RollingUpdateDeployment" - }, - "type": { - "description": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta1.RollbackConfig": { - "description": "DEPRECATED.", - "properties": { - "revision": { - "description": "The revision to rollback to. If set to 0, rollback to the last revision.", - "type": "integer", - "format": "int64" - } - } - }, - "io.k8s.api.apps.v1beta1.RollingUpdateDeployment": { - "description": "Spec to control the desired behavior of rolling update.", - "properties": { - "maxSurge": { - "description": "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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - }, - "maxUnavailable": { - "description": "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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - } - } - }, - "io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy": { - "description": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", - "properties": { - "partition": { - "description": "Partition indicates the ordinal at which the StatefulSet should be partitioned.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.apps.v1beta1.Scale": { - "description": "Scale represents a scaling request for a resource.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ScaleSpec" - }, - "status": { - "description": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ScaleStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "Scale", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.apps.v1beta1.ScaleSpec": { - "description": "ScaleSpec describes the attributes of a scale subresource", - "properties": { - "replicas": { - "description": "desired number of instances for the scaled object.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.apps.v1beta1.ScaleStatus": { - "description": "ScaleStatus represents the current status of a scale subresource.", - "required": [ - "replicas" - ], - "properties": { - "replicas": { - "description": "actual number of observed instances of the scaled object.", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "targetSelector": { - "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta1.StatefulSet": { - "description": "DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec defines the desired identities of pods in this set.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSetSpec" - }, - "status": { - "description": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSetStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.apps.v1beta1.StatefulSetList": { - "description": "StatefulSetList is a collection of StatefulSets.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "StatefulSetList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.apps.v1beta1.StatefulSetSpec": { - "description": "A StatefulSetSpec is the specification of a StatefulSet.", - "required": [ - "template", - "serviceName" - ], - "properties": { - "podManagementPolicy": { - "description": "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.", - "type": "string" - }, - "replicas": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "revisionHistoryLimit": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "serviceName": { - "description": "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.", - "type": "string" - }, - "template": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - }, - "updateStrategy": { - "description": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy" - }, - "volumeClaimTemplates": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - } - } - }, - "io.k8s.api.apps.v1beta1.StatefulSetStatus": { - "description": "StatefulSetStatus represents the current state of a StatefulSet.", - "required": [ - "replicas" - ], - "properties": { - "collisionCount": { - "description": "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", - "type": "integer", - "format": "int32" - }, - "currentReplicas": { - "description": "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.", - "type": "integer", - "format": "int32" - }, - "currentRevision": { - "description": "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", - "type": "string" - }, - "observedGeneration": { - "description": "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.", - "type": "integer", - "format": "int64" - }, - "readyReplicas": { - "description": "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "replicas is the number of Pods created by the StatefulSet controller.", - "type": "integer", - "format": "int32" - }, - "updateRevision": { - "description": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", - "type": "string" - }, - "updatedReplicas": { - "description": "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy": { - "description": "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.", - "properties": { - "rollingUpdate": { - "description": "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy" - }, - "type": { - "description": "Type indicates the type of the StatefulSetUpdateStrategy.", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta2.ControllerRevision": { - "description": "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.", - "required": [ - "revision" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "data": { - "description": "Data is the serialized representation of the state.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "revision": { - "description": "Revision indicates the revision of the state represented by Data.", - "type": "integer", - "format": "int64" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "ControllerRevision", - "version": "v1beta2" - } - ] - }, - "io.k8s.api.apps.v1beta2.ControllerRevisionList": { - "description": "ControllerRevisionList is a resource containing a list of ControllerRevision objects.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of ControllerRevisions", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ControllerRevision" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "ControllerRevisionList", - "version": "v1beta2" - } - ] - }, - "io.k8s.api.apps.v1beta2.DaemonSet": { - "description": "DaemonSet represents the configuration of a daemon set.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSetSpec" - }, - "status": { - "description": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSetStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "DaemonSet", - "version": "v1beta2" - } - ] - }, - "io.k8s.api.apps.v1beta2.DaemonSetList": { - "description": "DaemonSetList is a collection of daemon sets.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "A list of daemon sets.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSet" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "DaemonSetList", - "version": "v1beta2" - } - ] - }, - "io.k8s.api.apps.v1beta2.DaemonSetSpec": { - "description": "DaemonSetSpec is the specification of a daemon set.", - "required": [ - "template" - ], - "properties": { - "minReadySeconds": { - "description": "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).", - "type": "integer", - "format": "int32" - }, - "revisionHistoryLimit": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "template": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - }, - "updateStrategy": { - "description": "An update strategy to replace existing DaemonSet pods with new pods.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DaemonSetUpdateStrategy" - } - } - }, - "io.k8s.api.apps.v1beta2.DaemonSetStatus": { - "description": "DaemonSetStatus represents the current status of a daemon set.", - "required": [ - "currentNumberScheduled", - "numberMisscheduled", - "desiredNumberScheduled", - "numberReady" - ], - "properties": { - "collisionCount": { - "description": "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", - "type": "integer", - "format": "int32" - }, - "currentNumberScheduled": { - "description": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - "type": "integer", - "format": "int32" - }, - "desiredNumberScheduled": { - "description": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - "type": "integer", - "format": "int32" - }, - "numberAvailable": { - "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", - "type": "integer", - "format": "int32" - }, - "numberMisscheduled": { - "description": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - "type": "integer", - "format": "int32" - }, - "numberReady": { - "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", - "type": "integer", - "format": "int32" - }, - "numberUnavailable": { - "description": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", - "type": "integer", - "format": "int32" - }, - "observedGeneration": { - "description": "The most recent generation observed by the daemon set controller.", - "type": "integer", - "format": "int64" - }, - "updatedNumberScheduled": { - "description": "The total number of nodes that are running updated daemon pod", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.apps.v1beta2.DaemonSetUpdateStrategy": { - "description": "DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.", - "properties": { - "rollingUpdate": { - "description": "Rolling update config params. Present only if type = \"RollingUpdate\".", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.RollingUpdateDaemonSet" - }, - "type": { - "description": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is RollingUpdate.", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta2.Deployment": { - "description": "Deployment enables declarative updates for Pods and ReplicaSets.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of the Deployment.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DeploymentSpec" - }, - "status": { - "description": "Most recently observed status of the Deployment.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DeploymentStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - ] - }, - "io.k8s.api.apps.v1beta2.DeploymentCondition": { - "description": "DeploymentCondition describes the state of a deployment at a certain point.", - "required": [ - "type", - "status" - ], - "properties": { - "lastTransitionTime": { - "description": "Last time the condition transitioned from one status to another.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "lastUpdateTime": { - "description": "The last time this condition was updated.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "A human readable message indicating details about the transition.", - "type": "string" - }, - "reason": { - "description": "The reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "Status of the condition, one of True, False, Unknown.", - "type": "string" - }, - "type": { - "description": "Type of deployment condition.", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta2.DeploymentList": { - "description": "DeploymentList is a list of Deployments.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of Deployments.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.Deployment" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "DeploymentList", - "version": "v1beta2" - } - ] - }, - "io.k8s.api.apps.v1beta2.DeploymentSpec": { - "description": "DeploymentSpec is the specification of the desired behavior of the Deployment.", - "required": [ - "template" - ], - "properties": { - "minReadySeconds": { - "description": "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)", - "type": "integer", - "format": "int32" - }, - "paused": { - "description": "Indicates that the deployment is paused.", - "type": "boolean" - }, - "progressDeadlineSeconds": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - "type": "integer", - "format": "int32" - }, - "revisionHistoryLimit": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "strategy": { - "description": "The deployment strategy to use to replace existing pods with new ones.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DeploymentStrategy" - }, - "template": { - "description": "Template describes the pods that will be created.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - } - } - }, - "io.k8s.api.apps.v1beta2.DeploymentStatus": { - "description": "DeploymentStatus is the most recently observed status of the Deployment.", - "properties": { - "availableReplicas": { - "description": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", - "type": "integer", - "format": "int32" - }, - "collisionCount": { - "description": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", - "type": "integer", - "format": "int32" - }, - "conditions": { - "description": "Represents the latest available observations of a deployment's current state.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DeploymentCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "observedGeneration": { - "description": "The generation observed by the deployment controller.", - "type": "integer", - "format": "int64" - }, - "readyReplicas": { - "description": "Total number of ready pods targeted by this deployment.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", - "type": "integer", - "format": "int32" - }, - "unavailableReplicas": { - "description": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - "type": "integer", - "format": "int32" - }, - "updatedReplicas": { - "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.apps.v1beta2.DeploymentStrategy": { - "description": "DeploymentStrategy describes how to replace existing pods with new ones.", - "properties": { - "rollingUpdate": { - "description": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.RollingUpdateDeployment" - }, - "type": { - "description": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta2.ReplicaSet": { - "description": "ReplicaSet represents the configuration of a ReplicaSet.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "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/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSetSpec" - }, - "status": { - "description": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSetStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "ReplicaSet", - "version": "v1beta2" - } - ] - }, - "io.k8s.api.apps.v1beta2.ReplicaSetCondition": { - "description": "ReplicaSetCondition describes the state of a replica set at a certain point.", - "required": [ - "type", - "status" - ], - "properties": { - "lastTransitionTime": { - "description": "The last time the condition transitioned from one status to another.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "A human readable message indicating details about the transition.", - "type": "string" - }, - "reason": { - "description": "The reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "Status of the condition, one of True, False, Unknown.", - "type": "string" - }, - "type": { - "description": "Type of replica set condition.", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta2.ReplicaSetList": { - "description": "ReplicaSetList is a collection of ReplicaSets.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSet" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "ReplicaSetList", - "version": "v1beta2" - } - ] - }, - "io.k8s.api.apps.v1beta2.ReplicaSetSpec": { - "description": "ReplicaSetSpec is the specification of a ReplicaSet.", - "properties": { - "minReadySeconds": { - "description": "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)", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "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", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "Selector is a label query over pods that should match the replica count. If the 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 replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "template": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - } - } - }, - "io.k8s.api.apps.v1beta2.ReplicaSetStatus": { - "description": "ReplicaSetStatus represents the current status of a ReplicaSet.", - "required": [ - "replicas" - ], - "properties": { - "availableReplicas": { - "description": "The number of available replicas (ready for at least minReadySeconds) for this replica set.", - "type": "integer", - "format": "int32" - }, - "conditions": { - "description": "Represents the latest available observations of a replica set's current state.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ReplicaSetCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "fullyLabeledReplicas": { - "description": "The number of pods that have labels matching the labels of the pod template of the replicaset.", - "type": "integer", - "format": "int32" - }, - "observedGeneration": { - "description": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", - "type": "integer", - "format": "int64" - }, - "readyReplicas": { - "description": "The number of ready replicas for this replica set.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.apps.v1beta2.RollingUpdateDaemonSet": { - "description": "Spec to control the desired behavior of daemon set rolling update.", - "properties": { - "maxUnavailable": { - "description": "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. 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.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - } - } - }, - "io.k8s.api.apps.v1beta2.RollingUpdateDeployment": { - "description": "Spec to control the desired behavior of rolling update.", - "properties": { - "maxSurge": { - "description": "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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - }, - "maxUnavailable": { - "description": "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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - } - } - }, - "io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy": { - "description": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", - "properties": { - "partition": { - "description": "Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.apps.v1beta2.Scale": { - "description": "Scale represents a scaling request for a resource.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ScaleSpec" - }, - "status": { - "description": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.ScaleStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "Scale", - "version": "v1beta2" - } - ] - }, - "io.k8s.api.apps.v1beta2.ScaleSpec": { - "description": "ScaleSpec describes the attributes of a scale subresource", - "properties": { - "replicas": { - "description": "desired number of instances for the scaled object.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.apps.v1beta2.ScaleStatus": { - "description": "ScaleStatus represents the current status of a scale subresource.", - "required": [ - "replicas" - ], - "properties": { - "replicas": { - "description": "actual number of observed instances of the scaled object.", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "targetSelector": { - "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta2.StatefulSet": { - "description": "StatefulSet represents a set of pods with consistent identities. Identities are defined as:\n - Network: A single stable DNS and hostname.\n - Storage: As many VolumeClaims as requested.\nThe StatefulSet guarantees that a given network identity will always map to the same storage identity.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec defines the desired identities of pods in this set.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSetSpec" - }, - "status": { - "description": "Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSetStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "StatefulSet", - "version": "v1beta2" - } - ] - }, - "io.k8s.api.apps.v1beta2.StatefulSetList": { - "description": "StatefulSetList is a collection of StatefulSets.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSet" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "StatefulSetList", - "version": "v1beta2" - } - ] - }, - "io.k8s.api.apps.v1beta2.StatefulSetSpec": { - "description": "A StatefulSetSpec is the specification of a StatefulSet.", - "required": [ - "template", - "serviceName" - ], - "properties": { - "podManagementPolicy": { - "description": "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.", - "type": "string" - }, - "replicas": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "revisionHistoryLimit": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "serviceName": { - "description": "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.", - "type": "string" - }, - "template": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - }, - "updateStrategy": { - "description": "updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.StatefulSetUpdateStrategy" - }, - "volumeClaimTemplates": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - } - } - }, - "io.k8s.api.apps.v1beta2.StatefulSetStatus": { - "description": "StatefulSetStatus represents the current state of a StatefulSet.", - "required": [ - "replicas" - ], - "properties": { - "collisionCount": { - "description": "collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", - "type": "integer", - "format": "int32" - }, - "currentReplicas": { - "description": "currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.", - "type": "integer", - "format": "int32" - }, - "currentRevision": { - "description": "currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).", - "type": "string" - }, - "observedGeneration": { - "description": "observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.", - "type": "integer", - "format": "int64" - }, - "readyReplicas": { - "description": "readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "replicas is the number of Pods created by the StatefulSet controller.", - "type": "integer", - "format": "int32" - }, - "updateRevision": { - "description": "updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)", - "type": "string" - }, - "updatedReplicas": { - "description": "updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.apps.v1beta2.StatefulSetUpdateStrategy": { - "description": "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.", - "properties": { - "rollingUpdate": { - "description": "RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy" - }, - "type": { - "description": "Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate.", - "type": "string" - } - } - }, - "io.k8s.api.authentication.v1.TokenReview": { - "description": "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.", - "required": [ - "spec" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec holds information about the request being evaluated", - "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReviewSpec" - }, - "status": { - "description": "Status is filled in by the server and indicates whether the request can be authenticated.", - "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReviewStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "authentication.k8s.io", - "kind": "TokenReview", - "version": "v1" - } - ] - }, - "io.k8s.api.authentication.v1.TokenReviewSpec": { - "description": "TokenReviewSpec is a description of the token authentication request.", - "properties": { - "token": { - "description": "Token is the opaque bearer token.", - "type": "string" - } - } - }, - "io.k8s.api.authentication.v1.TokenReviewStatus": { - "description": "TokenReviewStatus is the result of the token authentication request.", - "properties": { - "authenticated": { - "description": "Authenticated indicates that the token was associated with a known user.", - "type": "boolean" - }, - "error": { - "description": "Error indicates that the token couldn't be checked", - "type": "string" - }, - "user": { - "description": "User is the UserInfo associated with the provided token.", - "$ref": "#/definitions/io.k8s.api.authentication.v1.UserInfo" - } - } - }, - "io.k8s.api.authentication.v1.UserInfo": { - "description": "UserInfo holds the information about the user needed to implement the user.Info interface.", - "properties": { - "extra": { - "description": "Any additional information provided by the authenticator.", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "groups": { - "description": "The names of groups this user is a part of.", - "type": "array", - "items": { - "type": "string" - } - }, - "uid": { - "description": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", - "type": "string" - }, - "username": { - "description": "The name that uniquely identifies this user among all active users.", - "type": "string" - } - } - }, - "io.k8s.api.authentication.v1beta1.TokenReview": { - "description": "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.", - "required": [ - "spec" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec holds information about the request being evaluated", - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.TokenReviewSpec" - }, - "status": { - "description": "Status is filled in by the server and indicates whether the request can be authenticated.", - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.TokenReviewStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "authentication.k8s.io", - "kind": "TokenReview", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.authentication.v1beta1.TokenReviewSpec": { - "description": "TokenReviewSpec is a description of the token authentication request.", - "properties": { - "token": { - "description": "Token is the opaque bearer token.", - "type": "string" - } - } - }, - "io.k8s.api.authentication.v1beta1.TokenReviewStatus": { - "description": "TokenReviewStatus is the result of the token authentication request.", - "properties": { - "authenticated": { - "description": "Authenticated indicates that the token was associated with a known user.", - "type": "boolean" - }, - "error": { - "description": "Error indicates that the token couldn't be checked", - "type": "string" - }, - "user": { - "description": "User is the UserInfo associated with the provided token.", - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.UserInfo" - } - } - }, - "io.k8s.api.authentication.v1beta1.UserInfo": { - "description": "UserInfo holds the information about the user needed to implement the user.Info interface.", - "properties": { - "extra": { - "description": "Any additional information provided by the authenticator.", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "groups": { - "description": "The names of groups this user is a part of.", - "type": "array", - "items": { - "type": "string" - } - }, - "uid": { - "description": "A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs.", - "type": "string" - }, - "username": { - "description": "The name that uniquely identifies this user among all active users.", - "type": "string" - } - } - }, - "io.k8s.api.authorization.v1.LocalSubjectAccessReview": { - "description": "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.", - "required": [ - "spec" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewSpec" - }, - "status": { - "description": "Status is filled in by the server and indicates whether the request is allowed or not", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "authorization.k8s.io", - "kind": "LocalSubjectAccessReview", - "version": "v1" - } - ] - }, - "io.k8s.api.authorization.v1.NonResourceAttributes": { - "description": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", - "properties": { - "path": { - "description": "Path is the URL path of the request", - "type": "string" - }, - "verb": { - "description": "Verb is the standard HTTP verb", - "type": "string" - } - } - }, - "io.k8s.api.authorization.v1.NonResourceRule": { - "description": "NonResourceRule holds information that describes a rule for the non-resource", - "required": [ - "verbs" - ], - "properties": { - "nonResourceURLs": { - "description": "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. \"*\" means all.", - "type": "array", - "items": { - "type": "string" - } - }, - "verbs": { - "description": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.authorization.v1.ResourceAttributes": { - "description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", - "properties": { - "group": { - "description": "Group is the API Group of the Resource. \"*\" means all.", - "type": "string" - }, - "name": { - "description": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", - "type": "string" - }, - "namespace": { - "description": "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", - "type": "string" - }, - "resource": { - "description": "Resource is one of the existing resource types. \"*\" means all.", - "type": "string" - }, - "subresource": { - "description": "Subresource is one of the existing resource types. \"\" means none.", - "type": "string" - }, - "verb": { - "description": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", - "type": "string" - }, - "version": { - "description": "Version is the API Version of the Resource. \"*\" means all.", - "type": "string" - } - } - }, - "io.k8s.api.authorization.v1.ResourceRule": { - "description": "ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", - "required": [ - "verbs" - ], - "properties": { - "apiGroups": { - "description": "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. \"*\" means all.", - "type": "array", - "items": { - "type": "string" - } - }, - "resourceNames": { - "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.", - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources. \"*\" means all.", - "type": "array", - "items": { - "type": "string" - } - }, - "verbs": { - "description": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.authorization.v1.SelfSubjectAccessReview": { - "description": "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", - "required": [ - "spec" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec holds information about the request being evaluated. user and groups must be empty", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReviewSpec" - }, - "status": { - "description": "Status is filled in by the server and indicates whether the request is allowed or not", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "authorization.k8s.io", - "kind": "SelfSubjectAccessReview", - "version": "v1" - } - ] - }, - "io.k8s.api.authorization.v1.SelfSubjectAccessReviewSpec": { - "description": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", - "properties": { - "nonResourceAttributes": { - "description": "NonResourceAttributes describes information for a non-resource access request", - "$ref": "#/definitions/io.k8s.api.authorization.v1.NonResourceAttributes" - }, - "resourceAttributes": { - "description": "ResourceAuthorizationAttributes describes information for a resource access request", - "$ref": "#/definitions/io.k8s.api.authorization.v1.ResourceAttributes" - } - } - }, - "io.k8s.api.authorization.v1.SelfSubjectRulesReview": { - "description": "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.", - "required": [ - "spec" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec holds information about the request being evaluated.", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectRulesReviewSpec" - }, - "status": { - "description": "Status is filled in by the server and indicates the set of actions a user can perform.", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectRulesReviewStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "authorization.k8s.io", - "kind": "SelfSubjectRulesReview", - "version": "v1" - } - ] - }, - "io.k8s.api.authorization.v1.SelfSubjectRulesReviewSpec": { - "properties": { - "namespace": { - "description": "Namespace to evaluate rules for. Required.", - "type": "string" - } - } - }, - "io.k8s.api.authorization.v1.SubjectAccessReview": { - "description": "SubjectAccessReview checks whether or not a user or group can perform an action.", - "required": [ - "spec" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec holds information about the request being evaluated", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewSpec" - }, - "status": { - "description": "Status is filled in by the server and indicates whether the request is allowed or not", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "authorization.k8s.io", - "kind": "SubjectAccessReview", - "version": "v1" - } - ] - }, - "io.k8s.api.authorization.v1.SubjectAccessReviewSpec": { - "description": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", - "properties": { - "extra": { - "description": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "groups": { - "description": "Groups is the groups you're testing for.", - "type": "array", - "items": { - "type": "string" - } - }, - "nonResourceAttributes": { - "description": "NonResourceAttributes describes information for a non-resource access request", - "$ref": "#/definitions/io.k8s.api.authorization.v1.NonResourceAttributes" - }, - "resourceAttributes": { - "description": "ResourceAuthorizationAttributes describes information for a resource access request", - "$ref": "#/definitions/io.k8s.api.authorization.v1.ResourceAttributes" - }, - "uid": { - "description": "UID information about the requesting user.", - "type": "string" - }, - "user": { - "description": "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", - "type": "string" - } - } - }, - "io.k8s.api.authorization.v1.SubjectAccessReviewStatus": { - "description": "SubjectAccessReviewStatus", - "required": [ - "allowed" - ], - "properties": { - "allowed": { - "description": "Allowed is required. True if the action would be allowed, false otherwise.", - "type": "boolean" - }, - "evaluationError": { - "description": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", - "type": "string" - }, - "reason": { - "description": "Reason is optional. It indicates why a request was allowed or denied.", - "type": "string" - } - } - }, - "io.k8s.api.authorization.v1.SubjectRulesReviewStatus": { - "description": "SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.", - "required": [ - "resourceRules", - "nonResourceRules", - "incomplete" - ], - "properties": { - "evaluationError": { - "description": "EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.", - "type": "string" - }, - "incomplete": { - "description": "Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.", - "type": "boolean" - }, - "nonResourceRules": { - "description": "NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.NonResourceRule" - } - }, - "resourceRules": { - "description": "ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.authorization.v1.ResourceRule" - } - } - } - }, - "io.k8s.api.authorization.v1beta1.LocalSubjectAccessReview": { - "description": "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.", - "required": [ - "spec" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewSpec" - }, - "status": { - "description": "Status is filled in by the server and indicates whether the request is allowed or not", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "authorization.k8s.io", - "kind": "LocalSubjectAccessReview", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.authorization.v1beta1.NonResourceAttributes": { - "description": "NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface", - "properties": { - "path": { - "description": "Path is the URL path of the request", - "type": "string" - }, - "verb": { - "description": "Verb is the standard HTTP verb", - "type": "string" - } - } - }, - "io.k8s.api.authorization.v1beta1.NonResourceRule": { - "description": "NonResourceRule holds information that describes a rule for the non-resource", - "required": [ - "verbs" - ], - "properties": { - "nonResourceURLs": { - "description": "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. \"*\" means all.", - "type": "array", - "items": { - "type": "string" - } - }, - "verbs": { - "description": "Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. \"*\" means all.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.authorization.v1beta1.ResourceAttributes": { - "description": "ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface", - "properties": { - "group": { - "description": "Group is the API Group of the Resource. \"*\" means all.", - "type": "string" - }, - "name": { - "description": "Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all.", - "type": "string" - }, - "namespace": { - "description": "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", - "type": "string" - }, - "resource": { - "description": "Resource is one of the existing resource types. \"*\" means all.", - "type": "string" - }, - "subresource": { - "description": "Subresource is one of the existing resource types. \"\" means none.", - "type": "string" - }, - "verb": { - "description": "Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", - "type": "string" - }, - "version": { - "description": "Version is the API Version of the Resource. \"*\" means all.", - "type": "string" - } - } - }, - "io.k8s.api.authorization.v1beta1.ResourceRule": { - "description": "ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", - "required": [ - "verbs" - ], - "properties": { - "apiGroups": { - "description": "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. \"*\" means all.", - "type": "array", - "items": { - "type": "string" - } - }, - "resourceNames": { - "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. \"*\" means all.", - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources. \"*\" means all.", - "type": "array", - "items": { - "type": "string" - } - }, - "verbs": { - "description": "Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. \"*\" means all.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.authorization.v1beta1.SelfSubjectAccessReview": { - "description": "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", - "required": [ - "spec" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec holds information about the request being evaluated. user and groups must be empty", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectAccessReviewSpec" - }, - "status": { - "description": "Status is filled in by the server and indicates whether the request is allowed or not", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "authorization.k8s.io", - "kind": "SelfSubjectAccessReview", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.authorization.v1beta1.SelfSubjectAccessReviewSpec": { - "description": "SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", - "properties": { - "nonResourceAttributes": { - "description": "NonResourceAttributes describes information for a non-resource access request", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.NonResourceAttributes" - }, - "resourceAttributes": { - "description": "ResourceAuthorizationAttributes describes information for a resource access request", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.ResourceAttributes" - } - } - }, - "io.k8s.api.authorization.v1beta1.SelfSubjectRulesReview": { - "description": "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.", - "required": [ - "spec" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec holds information about the request being evaluated.", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectRulesReviewSpec" - }, - "status": { - "description": "Status is filled in by the server and indicates the set of actions a user can perform.", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectRulesReviewStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "authorization.k8s.io", - "kind": "SelfSubjectRulesReview", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.authorization.v1beta1.SelfSubjectRulesReviewSpec": { - "properties": { - "namespace": { - "description": "Namespace to evaluate rules for. Required.", - "type": "string" - } - } - }, - "io.k8s.api.authorization.v1beta1.SubjectAccessReview": { - "description": "SubjectAccessReview checks whether or not a user or group can perform an action.", - "required": [ - "spec" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec holds information about the request being evaluated", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewSpec" - }, - "status": { - "description": "Status is filled in by the server and indicates whether the request is allowed or not", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "authorization.k8s.io", - "kind": "SubjectAccessReview", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.authorization.v1beta1.SubjectAccessReviewSpec": { - "description": "SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set", - "properties": { - "extra": { - "description": "Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "group": { - "description": "Groups is the groups you're testing for.", - "type": "array", - "items": { - "type": "string" - } - }, - "nonResourceAttributes": { - "description": "NonResourceAttributes describes information for a non-resource access request", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.NonResourceAttributes" - }, - "resourceAttributes": { - "description": "ResourceAuthorizationAttributes describes information for a resource access request", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.ResourceAttributes" - }, - "uid": { - "description": "UID information about the requesting user.", - "type": "string" - }, - "user": { - "description": "User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups", - "type": "string" - } - } - }, - "io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus": { - "description": "SubjectAccessReviewStatus", - "required": [ - "allowed" - ], - "properties": { - "allowed": { - "description": "Allowed is required. True if the action would be allowed, false otherwise.", - "type": "boolean" - }, - "evaluationError": { - "description": "EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.", - "type": "string" - }, - "reason": { - "description": "Reason is optional. It indicates why a request was allowed or denied.", - "type": "string" - } - } - }, - "io.k8s.api.authorization.v1beta1.SubjectRulesReviewStatus": { - "description": "SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete.", - "required": [ - "resourceRules", - "nonResourceRules", - "incomplete" - ], - "properties": { - "evaluationError": { - "description": "EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete.", - "type": "string" - }, - "incomplete": { - "description": "Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation.", - "type": "boolean" - }, - "nonResourceRules": { - "description": "NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.NonResourceRule" - } - }, - "resourceRules": { - "description": "ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.ResourceRule" - } - } - } - }, - "io.k8s.api.autoscaling.v1.CrossVersionObjectReference": { - "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", - "required": [ - "kind", - "name" - ], - "properties": { - "apiVersion": { - "description": "API version of the referent", - "type": "string" - }, - "kind": { - "description": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"", - "type": "string" - }, - "name": { - "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", - "type": "string" - } - } - }, - "io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler": { - "description": "configuration of a horizontal pod autoscaler.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec" - }, - "status": { - "description": "current information about the autoscaler.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v1" - } - ] - }, - "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList": { - "description": "list of horizontal pod autoscaler objects.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "list of horizontal pod autoscaler objects.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "autoscaling", - "kind": "HorizontalPodAutoscalerList", - "version": "v1" - } - ] - }, - "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec": { - "description": "specification of a horizontal pod autoscaler.", - "required": [ - "scaleTargetRef", - "maxReplicas" - ], - "properties": { - "maxReplicas": { - "description": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas.", - "type": "integer", - "format": "int32" - }, - "minReplicas": { - "description": "lower limit for the number of pods that can be set by the autoscaler, default 1.", - "type": "integer", - "format": "int32" - }, - "scaleTargetRef": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.CrossVersionObjectReference" - }, - "targetCPUUtilizationPercentage": { - "description": "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.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus": { - "description": "current status of a horizontal pod autoscaler", - "required": [ - "currentReplicas", - "desiredReplicas" - ], - "properties": { - "currentCPUUtilizationPercentage": { - "description": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU.", - "type": "integer", - "format": "int32" - }, - "currentReplicas": { - "description": "current number of replicas of pods managed by this autoscaler.", - "type": "integer", - "format": "int32" - }, - "desiredReplicas": { - "description": "desired number of replicas of pods managed by this autoscaler.", - "type": "integer", - "format": "int32" - }, - "lastScaleTime": { - "description": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "observedGeneration": { - "description": "most recent generation observed by this autoscaler.", - "type": "integer", - "format": "int64" - } - } - }, - "io.k8s.api.autoscaling.v1.Scale": { - "description": "Scale represents a scaling request for a resource.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.ScaleSpec" - }, - "status": { - "description": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.ScaleStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "autoscaling", - "kind": "Scale", - "version": "v1" - } - ] - }, - "io.k8s.api.autoscaling.v1.ScaleSpec": { - "description": "ScaleSpec describes the attributes of a scale subresource.", - "properties": { - "replicas": { - "description": "desired number of instances for the scaled object.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.autoscaling.v1.ScaleStatus": { - "description": "ScaleStatus represents the current status of a scale subresource.", - "required": [ - "replicas" - ], - "properties": { - "replicas": { - "description": "actual number of observed instances of the scaled object.", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors", - "type": "string" - } - } - }, - "io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference": { - "description": "CrossVersionObjectReference contains enough information to let you identify the referred resource.", - "required": [ - "kind", - "name" - ], - "properties": { - "apiVersion": { - "description": "API version of the referent", - "type": "string" - }, - "kind": { - "description": "Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"", - "type": "string" - }, - "name": { - "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names", - "type": "string" - } - } - }, - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler": { - "description": "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.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec" - }, - "status": { - "description": "status is the current information about the autoscaler.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "autoscaling", - "kind": "HorizontalPodAutoscaler", - "version": "v2beta1" - } - ] - }, - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition": { - "description": "HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.", - "required": [ - "type", - "status" - ], - "properties": { - "lastTransitionTime": { - "description": "lastTransitionTime is the last time the condition transitioned from one status to another", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "message is a human-readable explanation containing details about the transition", - "type": "string" - }, - "reason": { - "description": "reason is the reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "status is the status of the condition (True, False, Unknown)", - "type": "string" - }, - "type": { - "description": "type describes the current condition", - "type": "string" - } - } - }, - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList": { - "description": "HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "items is the list of horizontal pod autoscaler objects.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "metadata is the standard list metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "autoscaling", - "kind": "HorizontalPodAutoscalerList", - "version": "v2beta1" - } - ] - }, - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec": { - "description": "HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.", - "required": [ - "scaleTargetRef", - "maxReplicas" - ], - "properties": { - "maxReplicas": { - "description": "maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.", - "type": "integer", - "format": "int32" - }, - "metrics": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.MetricSpec" - } - }, - "minReplicas": { - "description": "minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod.", - "type": "integer", - "format": "int32" - }, - "scaleTargetRef": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference" - } - } - }, - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus": { - "description": "HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.", - "required": [ - "currentReplicas", - "desiredReplicas", - "currentMetrics", - "conditions" - ], - "properties": { - "conditions": { - "description": "conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition" - } - }, - "currentMetrics": { - "description": "currentMetrics is the last read state of the metrics used by this autoscaler.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.MetricStatus" - } - }, - "currentReplicas": { - "description": "currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.", - "type": "integer", - "format": "int32" - }, - "desiredReplicas": { - "description": "desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.", - "type": "integer", - "format": "int32" - }, - "lastScaleTime": { - "description": "lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "observedGeneration": { - "description": "observedGeneration is the most recent generation observed by this autoscaler.", - "type": "integer", - "format": "int64" - } - } - }, - "io.k8s.api.autoscaling.v2beta1.MetricSpec": { - "description": "MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).", - "required": [ - "type" - ], - "properties": { - "object": { - "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ObjectMetricSource" - }, - "pods": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.PodsMetricSource" - }, - "resource": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ResourceMetricSource" - }, - "type": { - "description": "type is the type of metric source. It should match one of the fields below.", - "type": "string" - } - } - }, - "io.k8s.api.autoscaling.v2beta1.MetricStatus": { - "description": "MetricStatus describes the last-read state of a single metric.", - "required": [ - "type" - ], - "properties": { - "object": { - "description": "object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).", - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus" - }, - "pods": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.PodsMetricStatus" - }, - "resource": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus" - }, - "type": { - "description": "type is the type of metric source. It will match one of the fields below.", - "type": "string" - } - } - }, - "io.k8s.api.autoscaling.v2beta1.ObjectMetricSource": { - "description": "ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", - "required": [ - "target", - "metricName", - "targetValue" - ], - "properties": { - "metricName": { - "description": "metricName is the name of the metric in question.", - "type": "string" - }, - "target": { - "description": "target is the described Kubernetes object.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference" - }, - "targetValue": { - "description": "targetValue is the target value of the metric (as a quantity).", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - } - }, - "io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus": { - "description": "ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).", - "required": [ - "target", - "metricName", - "currentValue" - ], - "properties": { - "currentValue": { - "description": "currentValue is the current value of the metric (as a quantity).", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - }, - "metricName": { - "description": "metricName is the name of the metric in question.", - "type": "string" - }, - "target": { - "description": "target is the described Kubernetes object.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference" - } - } - }, - "io.k8s.api.autoscaling.v2beta1.PodsMetricSource": { - "description": "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.", - "required": [ - "metricName", - "targetAverageValue" - ], - "properties": { - "metricName": { - "description": "metricName is the name of the metric in question", - "type": "string" - }, - "targetAverageValue": { - "description": "targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity)", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - } - }, - "io.k8s.api.autoscaling.v2beta1.PodsMetricStatus": { - "description": "PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).", - "required": [ - "metricName", - "currentAverageValue" - ], - "properties": { - "currentAverageValue": { - "description": "currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity)", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - }, - "metricName": { - "description": "metricName is the name of the metric in question", - "type": "string" - } - } - }, - "io.k8s.api.autoscaling.v2beta1.ResourceMetricSource": { - "description": "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.", - "required": [ - "name" - ], - "properties": { - "name": { - "description": "name is the name of the resource in question.", - "type": "string" - }, - "targetAverageUtilization": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "targetAverageValue": { - "description": "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.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - } - }, - "io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus": { - "description": "ResourceMetricStatus indicates the current value of 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). 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.", - "required": [ - "name", - "currentAverageValue" - ], - "properties": { - "currentAverageUtilization": { - "description": "currentAverageUtilization is the current 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. It will only be present if `targetAverageValue` was set in the corresponding metric specification.", - "type": "integer", - "format": "int32" - }, - "currentAverageValue": { - "description": "currentAverageValue is the current 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. It will always be set, regardless of the corresponding metric specification.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - }, - "name": { - "description": "name is the name of the resource in question.", - "type": "string" - } - } - }, - "io.k8s.api.batch.v1.Job": { - "description": "Job represents the configuration of a single job.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec" - }, - "status": { - "description": "Current status of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.batch.v1.JobStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "batch", - "kind": "Job", - "version": "v1" - } - ] - }, - "io.k8s.api.batch.v1.JobCondition": { - "description": "JobCondition describes current state of a job.", - "required": [ - "type", - "status" - ], - "properties": { - "lastProbeTime": { - "description": "Last time the condition was checked.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "lastTransitionTime": { - "description": "Last time the condition transit from one status to another.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "Human readable message indicating details about last transition.", - "type": "string" - }, - "reason": { - "description": "(brief) reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "Status of the condition, one of True, False, Unknown.", - "type": "string" - }, - "type": { - "description": "Type of job condition, Complete or Failed.", - "type": "string" - } - } - }, - "io.k8s.api.batch.v1.JobList": { - "description": "JobList is a collection of jobs.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "items is the list of Jobs.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "batch", - "kind": "JobList", - "version": "v1" - } - ] - }, - "io.k8s.api.batch.v1.JobSpec": { - "description": "JobSpec describes how the job execution will look like.", - "required": [ - "template" - ], - "properties": { - "activeDeadlineSeconds": { - "description": "Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer", - "type": "integer", - "format": "int64" - }, - "backoffLimit": { - "description": "Specifies the number of retries before marking this job failed. Defaults to 6", - "type": "integer", - "format": "int32" - }, - "completions": { - "description": "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/", - "type": "integer", - "format": "int32" - }, - "manualSelector": { - "description": "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://git.k8s.io/community/contributors/design-proposals/selector-generation.md", - "type": "boolean" - }, - "parallelism": { - "description": "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) \u003c .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/", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "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", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "template": { - "description": "Describes the pod that will be created when executing a job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - } - } - }, - "io.k8s.api.batch.v1.JobStatus": { - "description": "JobStatus represents the current state of a Job.", - "properties": { - "active": { - "description": "The number of actively running pods.", - "type": "integer", - "format": "int32" - }, - "completionTime": { - "description": "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "conditions": { - "description": "The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.batch.v1.JobCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "failed": { - "description": "The number of pods which reached phase Failed.", - "type": "integer", - "format": "int32" - }, - "startTime": { - "description": "Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "succeeded": { - "description": "The number of pods which reached phase Succeeded.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.batch.v1beta1.CronJob": { - "description": "CronJob represents the configuration of a single cron job.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJobSpec" - }, - "status": { - "description": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJobStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "batch", - "kind": "CronJob", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.batch.v1beta1.CronJobList": { - "description": "CronJobList is a collection of cron jobs.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "items is the list of CronJobs.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.CronJob" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "batch", - "kind": "CronJobList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.batch.v1beta1.CronJobSpec": { - "description": "CronJobSpec describes how the job execution will look like and when it will actually run.", - "required": [ - "schedule", - "jobTemplate" - ], - "properties": { - "concurrencyPolicy": { - "description": "Specifies how to treat concurrent executions of a Job. Defaults to Allow.", - "type": "string" - }, - "failedJobsHistoryLimit": { - "description": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - "type": "integer", - "format": "int32" - }, - "jobTemplate": { - "description": "Specifies the job that will be created when executing a CronJob.", - "$ref": "#/definitions/io.k8s.api.batch.v1beta1.JobTemplateSpec" - }, - "schedule": { - "description": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", - "type": "string" - }, - "startingDeadlineSeconds": { - "description": "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.", - "type": "integer", - "format": "int64" - }, - "successfulJobsHistoryLimit": { - "description": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.", - "type": "integer", - "format": "int32" - }, - "suspend": { - "description": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", - "type": "boolean" - } - } - }, - "io.k8s.api.batch.v1beta1.CronJobStatus": { - "description": "CronJobStatus represents the current state of a cron job.", - "properties": { - "active": { - "description": "A list of pointers to currently running jobs.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" - } - }, - "lastScheduleTime": { - "description": "Information when was the last time the job was successfully scheduled.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - } - } - }, - "io.k8s.api.batch.v1beta1.JobTemplateSpec": { - "description": "JobTemplateSpec describes the data a Job should have when created from a template", - "properties": { - "metadata": { - "description": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec" - } - } - }, - "io.k8s.api.batch.v2alpha1.CronJob": { - "description": "CronJob represents the configuration of a single cron job.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJobSpec" - }, - "status": { - "description": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJobStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "batch", - "kind": "CronJob", - "version": "v2alpha1" - } - ] - }, - "io.k8s.api.batch.v2alpha1.CronJobList": { - "description": "CronJobList is a collection of cron jobs.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "items is the list of CronJobs.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJob" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "batch", - "kind": "CronJobList", - "version": "v2alpha1" - } - ] - }, - "io.k8s.api.batch.v2alpha1.CronJobSpec": { - "description": "CronJobSpec describes how the job execution will look like and when it will actually run.", - "required": [ - "schedule", - "jobTemplate" - ], - "properties": { - "concurrencyPolicy": { - "description": "Specifies how to treat concurrent executions of a Job. Defaults to Allow.", - "type": "string" - }, - "failedJobsHistoryLimit": { - "description": "The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", - "type": "integer", - "format": "int32" - }, - "jobTemplate": { - "description": "Specifies the job that will be created when executing a CronJob.", - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.JobTemplateSpec" - }, - "schedule": { - "description": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.", - "type": "string" - }, - "startingDeadlineSeconds": { - "description": "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.", - "type": "integer", - "format": "int64" - }, - "successfulJobsHistoryLimit": { - "description": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.", - "type": "integer", - "format": "int32" - }, - "suspend": { - "description": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.", - "type": "boolean" - } - } - }, - "io.k8s.api.batch.v2alpha1.CronJobStatus": { - "description": "CronJobStatus represents the current state of a cron job.", - "properties": { - "active": { - "description": "A list of pointers to currently running jobs.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" - } - }, - "lastScheduleTime": { - "description": "Information when was the last time the job was successfully scheduled.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - } - } - }, - "io.k8s.api.batch.v2alpha1.JobTemplateSpec": { - "description": "JobTemplateSpec describes the data a Job should have when created from a template", - "properties": { - "metadata": { - "description": "Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec" - } - } - }, - "io.k8s.api.certificates.v1beta1.CertificateSigningRequest": { - "description": "Describes a certificate signing request", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "The certificate request itself and any additional information.", - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec" - }, - "status": { - "description": "Derived information about the request.", - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequest", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition": { - "required": [ - "type" - ], - "properties": { - "lastUpdateTime": { - "description": "timestamp for the last update to this condition", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "human readable message with details about the request state", - "type": "string" - }, - "reason": { - "description": "brief reason for the request state", - "type": "string" - }, - "type": { - "description": "request approval state, currently Approved or Denied.", - "type": "string" - } - } - }, - "io.k8s.api.certificates.v1beta1.CertificateSigningRequestList": { - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "certificates.k8s.io", - "kind": "CertificateSigningRequestList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec": { - "description": "This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users.", - "required": [ - "request" - ], - "properties": { - "extra": { - "description": "Extra information about the requesting user. See user.Info interface for details.", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "groups": { - "description": "Group information about the requesting user. See user.Info interface for details.", - "type": "array", - "items": { - "type": "string" - } - }, - "request": { - "description": "Base64-encoded PKCS#10 CSR data", - "type": "string", - "format": "byte" - }, - "uid": { - "description": "UID information about the requesting user. See user.Info interface for details.", - "type": "string" - }, - "usages": { - "description": "allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3\n https://tools.ietf.org/html/rfc5280#section-4.2.1.12", - "type": "array", - "items": { - "type": "string" - } - }, - "username": { - "description": "Information about the requesting user. See user.Info interface for details.", - "type": "string" - } - } - }, - "io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus": { - "properties": { - "certificate": { - "description": "If request was approved, the controller will place the issued certificate here.", - "type": "string", - "format": "byte" - }, - "conditions": { - "description": "Conditions applied to the request, such as approval or denial.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition" - } - } - } - }, - "io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource": { - "description": "Represents a Persistent Disk resource in AWS.\n\nAn 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.", - "required": [ - "volumeID" - ], - "properties": { - "fsType": { - "description": "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", - "type": "string" - }, - "partition": { - "description": "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).", - "type": "integer", - "format": "int32" - }, - "readOnly": { - "description": "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", - "type": "boolean" - }, - "volumeID": { - "description": "Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.Affinity": { - "description": "Affinity is a group of affinity scheduling rules.", - "properties": { - "nodeAffinity": { - "description": "Describes node affinity scheduling rules for the pod.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeAffinity" - }, - "podAffinity": { - "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", - "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinity" - }, - "podAntiAffinity": { - "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", - "$ref": "#/definitions/io.k8s.api.core.v1.PodAntiAffinity" - } - } - }, - "io.k8s.api.core.v1.AttachedVolume": { - "description": "AttachedVolume describes a volume attached to a node", - "required": [ - "name", - "devicePath" - ], - "properties": { - "devicePath": { - "description": "DevicePath represents the device path where the volume should be available", - "type": "string" - }, - "name": { - "description": "Name of the attached volume", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.AzureDiskVolumeSource": { - "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - "required": [ - "diskName", - "diskURI" - ], - "properties": { - "cachingMode": { - "description": "Host Caching mode: None, Read Only, Read Write.", - "type": "string" - }, - "diskName": { - "description": "The Name of the data disk in the blob storage", - "type": "string" - }, - "diskURI": { - "description": "The URI the data disk in the blob storage", - "type": "string" - }, - "fsType": { - "description": "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.", - "type": "string" - }, - "kind": { - "description": "Expected values Shared: mulitple 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", - "type": "string" - }, - "readOnly": { - "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "type": "boolean" - } - } - }, - "io.k8s.api.core.v1.AzureFilePersistentVolumeSource": { - "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - "required": [ - "secretName", - "shareName" - ], - "properties": { - "readOnly": { - "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "type": "boolean" - }, - "secretName": { - "description": "the name of secret that contains Azure Storage Account Name and Key", - "type": "string" - }, - "secretNamespace": { - "description": "the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod", - "type": "string" - }, - "shareName": { - "description": "Share Name", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.AzureFileVolumeSource": { - "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - "required": [ - "secretName", - "shareName" - ], - "properties": { - "readOnly": { - "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "type": "boolean" - }, - "secretName": { - "description": "the name of secret that contains Azure Storage Account Name and Key", - "type": "string" - }, - "shareName": { - "description": "Share Name", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.Binding": { - "description": "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.", - "required": [ - "target" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "target": { - "description": "The target object that you want to bind to the standard object.", - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "Binding", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.Capabilities": { - "description": "Adds and removes POSIX capabilities from running containers.", - "properties": { - "add": { - "description": "Added capabilities", - "type": "array", - "items": { - "type": "string" - } - }, - "drop": { - "description": "Removed capabilities", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.core.v1.CephFSPersistentVolumeSource": { - "description": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", - "required": [ - "monitors" - ], - "properties": { - "monitors": { - "description": "Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - "type": "array", - "items": { - "type": "string" - } - }, - "path": { - "description": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", - "type": "string" - }, - "readOnly": { - "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - "type": "boolean" - }, - "secretFile": { - "description": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - "type": "string" - }, - "secretRef": { - "description": "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - "$ref": "#/definitions/io.k8s.api.core.v1.SecretReference" - }, - "user": { - "description": "Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.CephFSVolumeSource": { - "description": "Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.", - "required": [ - "monitors" - ], - "properties": { - "monitors": { - "description": "Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - "type": "array", - "items": { - "type": "string" - } - }, - "path": { - "description": "Optional: Used as the mounted root, rather than the full Ceph tree, default is /", - "type": "string" - }, - "readOnly": { - "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - "type": "boolean" - }, - "secretFile": { - "description": "Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - "type": "string" - }, - "secretRef": { - "description": "Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" - }, - "user": { - "description": "Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.CinderVolumeSource": { - "description": "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.", - "required": [ - "volumeID" - ], - "properties": { - "fsType": { - "description": "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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - "type": "string" - }, - "readOnly": { - "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - "type": "boolean" - }, - "volumeID": { - "description": "volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ClientIPConfig": { - "description": "ClientIPConfig represents the configurations of Client IP based session affinity.", - "properties": { - "timeoutSeconds": { - "description": "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be \u003e0 \u0026\u0026 \u003c=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.core.v1.ComponentCondition": { - "description": "Information about the condition of a component.", - "required": [ - "type", - "status" - ], - "properties": { - "error": { - "description": "Condition error code for a component. For example, a health check error code.", - "type": "string" - }, - "message": { - "description": "Message about the condition for a component. For example, information about a health check.", - "type": "string" - }, - "status": { - "description": "Status of the condition for a component. Valid values for \"Healthy\": \"True\", \"False\", or \"Unknown\".", - "type": "string" - }, - "type": { - "description": "Type of condition for a component. Valid value: \"Healthy\"", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ComponentStatus": { - "description": "ComponentStatus (and ComponentStatusList) holds the cluster validation info.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "conditions": { - "description": "List of component conditions observed", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ComponentCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "ComponentStatus", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.ComponentStatusList": { - "description": "Status of all the conditions for the component as a list of ComponentStatus objects.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of ComponentStatus objects.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ComponentStatus" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "ComponentStatusList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.ConfigMap": { - "description": "ConfigMap holds configuration data for pods to consume.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "data": { - "description": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "ConfigMap", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.ConfigMapEnvSource": { - "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", - "properties": { - "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - "type": "string" - }, - "optional": { - "description": "Specify whether the ConfigMap must be defined", - "type": "boolean" - } - } - }, - "io.k8s.api.core.v1.ConfigMapKeySelector": { - "description": "Selects a key from a ConfigMap.", - "required": [ - "key" - ], - "properties": { - "key": { - "description": "The key to select.", - "type": "string" - }, - "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - "type": "string" - }, - "optional": { - "description": "Specify whether the ConfigMap or it's key must be defined", - "type": "boolean" - } - } - }, - "io.k8s.api.core.v1.ConfigMapList": { - "description": "ConfigMapList is a resource containing a list of ConfigMap objects.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of ConfigMaps.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMap" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "ConfigMapList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.ConfigMapProjection": { - "description": "Adapts a ConfigMap into a projected volume.\n\nThe 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.", - "properties": { - "items": { - "description": "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 '..'.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" - } - }, - "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - "type": "string" - }, - "optional": { - "description": "Specify whether the ConfigMap or it's keys must be defined", - "type": "boolean" - } - } - }, - "io.k8s.api.core.v1.ConfigMapVolumeSource": { - "description": "Adapts a ConfigMap into a volume.\n\nThe 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.", - "properties": { - "defaultMode": { - "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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.", - "type": "integer", - "format": "int32" - }, - "items": { - "description": "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 '..'.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" - } - }, - "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - "type": "string" - }, - "optional": { - "description": "Specify whether the ConfigMap or it's keys must be defined", - "type": "boolean" - } - } - }, - "io.k8s.api.core.v1.Container": { - "description": "A single application container that you want to run within a pod.", - "required": [ - "name" - ], - "properties": { - "args": { - "description": "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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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", - "type": "array", - "items": { - "type": "string" - } - }, - "command": { - "description": "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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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", - "type": "array", - "items": { - "type": "string" - } - }, - "env": { - "description": "List of environment variables to set in the container. Cannot be updated.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.EnvVar" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "envFrom": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.EnvFromSource" - } - }, - "image": { - "description": "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.", - "type": "string" - }, - "imagePullPolicy": { - "description": "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", - "type": "string" - }, - "lifecycle": { - "description": "Actions that the management system should take in response to container lifecycle events. Cannot be updated.", - "$ref": "#/definitions/io.k8s.api.core.v1.Lifecycle" - }, - "livenessProbe": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.Probe" - }, - "name": { - "description": "Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.", - "type": "string" - }, - "ports": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerPort" - }, - "x-kubernetes-patch-merge-key": "containerPort", - "x-kubernetes-patch-strategy": "merge" - }, - "readinessProbe": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.Probe" - }, - "resources": { - "description": "Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements" - }, - "securityContext": { - "description": "Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md", - "$ref": "#/definitions/io.k8s.api.core.v1.SecurityContext" - }, - "stdin": { - "description": "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.", - "type": "boolean" - }, - "stdinOnce": { - "description": "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", - "type": "boolean" - }, - "terminationMessagePath": { - "description": "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.", - "type": "string" - }, - "terminationMessagePolicy": { - "description": "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.", - "type": "string" - }, - "tty": { - "description": "Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.", - "type": "boolean" - }, - "volumeMounts": { - "description": "Pod volumes to mount into the container's filesystem. Cannot be updated.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.VolumeMount" - }, - "x-kubernetes-patch-merge-key": "mountPath", - "x-kubernetes-patch-strategy": "merge" - }, - "workingDir": { - "description": "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.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ContainerImage": { - "description": "Describe a container image", - "required": [ - "names" - ], - "properties": { - "names": { - "description": "Names by which this image is known. e.g. [\"gcr.io/google_containers/hyperkube:v1.0.7\", \"dockerhub.io/google_containers/hyperkube:v1.0.7\"]", - "type": "array", - "items": { - "type": "string" - } - }, - "sizeBytes": { - "description": "The size of the image in bytes.", - "type": "integer", - "format": "int64" - } - } - }, - "io.k8s.api.core.v1.ContainerPort": { - "description": "ContainerPort represents a network port in a single container.", - "required": [ - "containerPort" - ], - "properties": { - "containerPort": { - "description": "Number of port to expose on the pod's IP address. This must be a valid port number, 0 \u003c x \u003c 65536.", - "type": "integer", - "format": "int32" - }, - "hostIP": { - "description": "What host IP to bind the external port to.", - "type": "string" - }, - "hostPort": { - "description": "Number of port to expose on the host. If specified, this must be a valid port number, 0 \u003c x \u003c 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.", - "type": "integer", - "format": "int32" - }, - "name": { - "description": "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.", - "type": "string" - }, - "protocol": { - "description": "Protocol for port. Must be UDP or TCP. Defaults to \"TCP\".", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ContainerState": { - "description": "ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting.", - "properties": { - "running": { - "description": "Details about a running container", - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStateRunning" - }, - "terminated": { - "description": "Details about a terminated container", - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStateTerminated" - }, - "waiting": { - "description": "Details about a waiting container", - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStateWaiting" - } - } - }, - "io.k8s.api.core.v1.ContainerStateRunning": { - "description": "ContainerStateRunning is a running state of a container.", - "properties": { - "startedAt": { - "description": "Time at which the container was last (re-)started", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - } - } - }, - "io.k8s.api.core.v1.ContainerStateTerminated": { - "description": "ContainerStateTerminated is a terminated state of a container.", - "required": [ - "exitCode" - ], - "properties": { - "containerID": { - "description": "Container's ID in the format 'docker://\u003ccontainer_id\u003e'", - "type": "string" - }, - "exitCode": { - "description": "Exit status from the last termination of the container", - "type": "integer", - "format": "int32" - }, - "finishedAt": { - "description": "Time at which the container last terminated", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "Message regarding the last termination of the container", - "type": "string" - }, - "reason": { - "description": "(brief) reason from the last termination of the container", - "type": "string" - }, - "signal": { - "description": "Signal from the last termination of the container", - "type": "integer", - "format": "int32" - }, - "startedAt": { - "description": "Time at which previous execution of the container started", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - } - } - }, - "io.k8s.api.core.v1.ContainerStateWaiting": { - "description": "ContainerStateWaiting is a waiting state of a container.", - "properties": { - "message": { - "description": "Message regarding why the container is not yet running.", - "type": "string" - }, - "reason": { - "description": "(brief) reason the container is not yet running.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ContainerStatus": { - "description": "ContainerStatus contains details for the current status of this container.", - "required": [ - "name", - "ready", - "restartCount", - "image", - "imageID" - ], - "properties": { - "containerID": { - "description": "Container's ID in the format 'docker://\u003ccontainer_id\u003e'.", - "type": "string" - }, - "image": { - "description": "The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images", - "type": "string" - }, - "imageID": { - "description": "ImageID of the container's image.", - "type": "string" - }, - "lastState": { - "description": "Details about the container's last termination condition.", - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerState" - }, - "name": { - "description": "This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated.", - "type": "string" - }, - "ready": { - "description": "Specifies whether the container has passed its readiness probe.", - "type": "boolean" - }, - "restartCount": { - "description": "The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC.", - "type": "integer", - "format": "int32" - }, - "state": { - "description": "Details about the container's current condition.", - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerState" - } - } - }, - "io.k8s.api.core.v1.DaemonEndpoint": { - "description": "DaemonEndpoint contains information about a single Daemon endpoint.", - "required": [ - "Port" - ], - "properties": { - "Port": { - "description": "Port number of the given endpoint.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.core.v1.DownwardAPIProjection": { - "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", - "properties": { - "items": { - "description": "Items is a list of DownwardAPIVolume file", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIVolumeFile" - } - } - } - }, - "io.k8s.api.core.v1.DownwardAPIVolumeFile": { - "description": "DownwardAPIVolumeFile represents information to create the file containing the pod field", - "required": [ - "path" - ], - "properties": { - "fieldRef": { - "description": "Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.", - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectFieldSelector" - }, - "mode": { - "description": "Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.", - "type": "integer", - "format": "int32" - }, - "path": { - "description": "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 '..'", - "type": "string" - }, - "resourceFieldRef": { - "description": "Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.", - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceFieldSelector" - } - } - }, - "io.k8s.api.core.v1.DownwardAPIVolumeSource": { - "description": "DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.", - "properties": { - "defaultMode": { - "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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.", - "type": "integer", - "format": "int32" - }, - "items": { - "description": "Items is a list of downward API volume file", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIVolumeFile" - } - } - } - }, - "io.k8s.api.core.v1.EmptyDirVolumeSource": { - "description": "Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.", - "properties": { - "medium": { - "description": "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", - "type": "string" - }, - "sizeLimit": { - "description": "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", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - } - }, - "io.k8s.api.core.v1.EndpointAddress": { - "description": "EndpointAddress is a tuple that describes single IP address.", - "required": [ - "ip" - ], - "properties": { - "hostname": { - "description": "The Hostname of this endpoint", - "type": "string" - }, - "ip": { - "description": "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.", - "type": "string" - }, - "nodeName": { - "description": "Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.", - "type": "string" - }, - "targetRef": { - "description": "Reference to object providing the endpoint.", - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" - } - } - }, - "io.k8s.api.core.v1.EndpointPort": { - "description": "EndpointPort is a tuple that describes a single port.", - "required": [ - "port" - ], - "properties": { - "name": { - "description": "The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined.", - "type": "string" - }, - "port": { - "description": "The port number of the endpoint.", - "type": "integer", - "format": "int32" - }, - "protocol": { - "description": "The IP protocol for this port. Must be UDP or TCP. Default is TCP.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.EndpointSubset": { - "description": "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:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]", - "properties": { - "addresses": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.EndpointAddress" - } - }, - "notReadyAddresses": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.EndpointAddress" - } - }, - "ports": { - "description": "Port numbers available on the related IP addresses.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.EndpointPort" - } - } - } - }, - "io.k8s.api.core.v1.Endpoints": { - "description": "Endpoints is a collection of endpoints that implement the actual service. Example:\n Name: \"mysvc\",\n Subsets: [\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n },\n {\n Addresses: [{\"ip\": \"10.10.3.3\"}],\n Ports: [{\"name\": \"a\", \"port\": 93}, {\"name\": \"b\", \"port\": 76}]\n },\n ]", - "required": [ - "subsets" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "subsets": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.EndpointSubset" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "Endpoints", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.EndpointsList": { - "description": "EndpointsList is a list of endpoints.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of endpoints.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Endpoints" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "EndpointsList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.EnvFromSource": { - "description": "EnvFromSource represents the source of a set of ConfigMaps", - "properties": { - "configMapRef": { - "description": "The ConfigMap to select from", - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapEnvSource" - }, - "prefix": { - "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", - "type": "string" - }, - "secretRef": { - "description": "The Secret to select from", - "$ref": "#/definitions/io.k8s.api.core.v1.SecretEnvSource" - } - } - }, - "io.k8s.api.core.v1.EnvVar": { - "description": "EnvVar represents an environment variable present in a Container.", - "required": [ - "name" - ], - "properties": { - "name": { - "description": "Name of the environment variable. Must be a C_IDENTIFIER.", - "type": "string" - }, - "value": { - "description": "Variable references $(VAR_NAME) are expanded using the previous 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", - "type": "string" - }, - "valueFrom": { - "description": "Source for the environment variable's value. Cannot be used if value is not empty.", - "$ref": "#/definitions/io.k8s.api.core.v1.EnvVarSource" - } - } - }, - "io.k8s.api.core.v1.EnvVarSource": { - "description": "EnvVarSource represents a source for the value of an EnvVar.", - "properties": { - "configMapKeyRef": { - "description": "Selects a key of a ConfigMap.", - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapKeySelector" - }, - "fieldRef": { - "description": "Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.", - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectFieldSelector" - }, - "resourceFieldRef": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceFieldSelector" - }, - "secretKeyRef": { - "description": "Selects a key of a secret in the pod's namespace", - "$ref": "#/definitions/io.k8s.api.core.v1.SecretKeySelector" - } - } - }, - "io.k8s.api.core.v1.Event": { - "description": "Event is a report of an event somewhere in the cluster.", - "required": [ - "metadata", - "involvedObject" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "count": { - "description": "The number of times this event has occurred.", - "type": "integer", - "format": "int32" - }, - "firstTimestamp": { - "description": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "involvedObject": { - "description": "The object that this event is about.", - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "lastTimestamp": { - "description": "The time at which the most recent occurrence of this event was recorded.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "A human-readable description of the status of this operation.", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "reason": { - "description": "This should be a short, machine understandable string that gives the reason for the transition into the object's current status.", - "type": "string" - }, - "source": { - "description": "The component reporting this event. Should be a short machine understandable string.", - "$ref": "#/definitions/io.k8s.api.core.v1.EventSource" - }, - "type": { - "description": "Type of this event (Normal, Warning), new types could be added in the future", - "type": "string" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "Event", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.EventList": { - "description": "EventList is a list of events.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of events", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Event" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "EventList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.EventSource": { - "description": "EventSource contains information for an event.", - "properties": { - "component": { - "description": "Component from which the event is generated.", - "type": "string" - }, - "host": { - "description": "Node name on which the event is generated.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ExecAction": { - "description": "ExecAction describes a \"run in container\" action.", - "properties": { - "command": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.core.v1.FCVolumeSource": { - "description": "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.", - "properties": { - "fsType": { - "description": "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.", - "type": "string" - }, - "lun": { - "description": "Optional: FC target lun number", - "type": "integer", - "format": "int32" - }, - "readOnly": { - "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "type": "boolean" - }, - "targetWWNs": { - "description": "Optional: FC target worldwide names (WWNs)", - "type": "array", - "items": { - "type": "string" - } - }, - "wwids": { - "description": "Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.core.v1.FlexVolumeSource": { - "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.", - "required": [ - "driver" - ], - "properties": { - "driver": { - "description": "Driver is the name of the driver to use for this volume.", - "type": "string" - }, - "fsType": { - "description": "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.", - "type": "string" - }, - "options": { - "description": "Optional: Extra command options if any.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "readOnly": { - "description": "Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "type": "boolean" - }, - "secretRef": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" - } - } - }, - "io.k8s.api.core.v1.FlockerVolumeSource": { - "description": "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.", - "properties": { - "datasetName": { - "description": "Name of the dataset stored as metadata -\u003e name on the dataset for Flocker should be considered as deprecated", - "type": "string" - }, - "datasetUUID": { - "description": "UUID of the dataset. This is unique identifier of a Flocker dataset", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.GCEPersistentDiskVolumeSource": { - "description": "Represents a Persistent Disk resource in Google Compute Engine.\n\nA 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.", - "required": [ - "pdName" - ], - "properties": { - "fsType": { - "description": "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", - "type": "string" - }, - "partition": { - "description": "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", - "type": "integer", - "format": "int32" - }, - "pdName": { - "description": "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", - "type": "string" - }, - "readOnly": { - "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk", - "type": "boolean" - } - } - }, - "io.k8s.api.core.v1.GitRepoVolumeSource": { - "description": "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.", - "required": [ - "repository" - ], - "properties": { - "directory": { - "description": "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.", - "type": "string" - }, - "repository": { - "description": "Repository URL", - "type": "string" - }, - "revision": { - "description": "Commit hash for the specified revision.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.GlusterfsVolumeSource": { - "description": "Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.", - "required": [ - "endpoints", - "path" - ], - "properties": { - "endpoints": { - "description": "EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", - "type": "string" - }, - "path": { - "description": "Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", - "type": "string" - }, - "readOnly": { - "description": "ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod", - "type": "boolean" - } - } - }, - "io.k8s.api.core.v1.HTTPGetAction": { - "description": "HTTPGetAction describes an action based on HTTP Get requests.", - "required": [ - "port" - ], - "properties": { - "host": { - "description": "Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", - "type": "string" - }, - "httpHeaders": { - "description": "Custom headers to set in the request. HTTP allows repeated headers.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.HTTPHeader" - } - }, - "path": { - "description": "Path to access on the HTTP server.", - "type": "string" - }, - "port": { - "description": "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.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - }, - "scheme": { - "description": "Scheme to use for connecting to the host. Defaults to HTTP.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.HTTPHeader": { - "description": "HTTPHeader describes a custom header to be used in HTTP probes", - "required": [ - "name", - "value" - ], - "properties": { - "name": { - "description": "The header field name", - "type": "string" - }, - "value": { - "description": "The header field value", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.Handler": { - "description": "Handler defines a specific action that should be taken", - "properties": { - "exec": { - "description": "One and only one of the following should be specified. Exec specifies the action to take.", - "$ref": "#/definitions/io.k8s.api.core.v1.ExecAction" - }, - "httpGet": { - "description": "HTTPGet specifies the http request to perform.", - "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction" - }, - "tcpSocket": { - "description": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", - "$ref": "#/definitions/io.k8s.api.core.v1.TCPSocketAction" - } - } - }, - "io.k8s.api.core.v1.HostAlias": { - "description": "HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.", - "properties": { - "hostnames": { - "description": "Hostnames for the above IP address.", - "type": "array", - "items": { - "type": "string" - } - }, - "ip": { - "description": "IP address of the host file entry.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.HostPathVolumeSource": { - "description": "Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.", - "required": [ - "path" - ], - "properties": { - "path": { - "description": "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", - "type": "string" - }, - "type": { - "description": "Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ISCSIVolumeSource": { - "description": "Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.", - "required": [ - "targetPortal", - "iqn", - "lun" - ], - "properties": { - "chapAuthDiscovery": { - "description": "whether support iSCSI Discovery CHAP authentication", - "type": "boolean" - }, - "chapAuthSession": { - "description": "whether support iSCSI Session CHAP authentication", - "type": "boolean" - }, - "fsType": { - "description": "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", - "type": "string" - }, - "initiatorName": { - "description": "Custom iSCSI initiator name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface \u003ctarget portal\u003e:\u003cvolume name\u003e will be created for the connection.", - "type": "string" - }, - "iqn": { - "description": "Target iSCSI Qualified Name.", - "type": "string" - }, - "iscsiInterface": { - "description": "Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport.", - "type": "string" - }, - "lun": { - "description": "iSCSI target lun number.", - "type": "integer", - "format": "int32" - }, - "portals": { - "description": "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).", - "type": "array", - "items": { - "type": "string" - } - }, - "readOnly": { - "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.", - "type": "boolean" - }, - "secretRef": { - "description": "CHAP secret for iSCSI target and initiator authentication", - "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" - }, - "targetPortal": { - "description": "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).", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.KeyToPath": { - "description": "Maps a string key to a path within a volume.", - "required": [ - "key", - "path" - ], - "properties": { - "key": { - "description": "The key to project.", - "type": "string" - }, - "mode": { - "description": "Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.", - "type": "integer", - "format": "int32" - }, - "path": { - "description": "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 '..'.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.Lifecycle": { - "description": "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.", - "properties": { - "postStart": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.Handler" - }, - "preStop": { - "description": "PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks", - "$ref": "#/definitions/io.k8s.api.core.v1.Handler" - } - } - }, - "io.k8s.api.core.v1.LimitRange": { - "description": "LimitRange sets resource usage limits for each kind of resource in a Namespace.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRangeSpec" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "LimitRange", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.LimitRangeItem": { - "description": "LimitRangeItem defines a min/max usage limit for any resource that matches on kind.", - "properties": { - "default": { - "description": "Default resource requirement limit value by resource name if resource limit is omitted.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - }, - "defaultRequest": { - "description": "DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - }, - "max": { - "description": "Max usage constraints on this kind by resource name.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - }, - "maxLimitRequestRatio": { - "description": "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.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - }, - "min": { - "description": "Min usage constraints on this kind by resource name.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - }, - "type": { - "description": "Type of resource that this limit applies to.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.LimitRangeList": { - "description": "LimitRangeList is a list of LimitRange items.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of LimitRange objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRange" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "LimitRangeList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.LimitRangeSpec": { - "description": "LimitRangeSpec defines a min/max usage limit for resources that match on kind.", - "required": [ - "limits" - ], - "properties": { - "limits": { - "description": "Limits is the list of LimitRangeItem objects that are enforced.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRangeItem" - } - } - } - }, - "io.k8s.api.core.v1.LoadBalancerIngress": { - "description": "LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.", - "properties": { - "hostname": { - "description": "Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers)", - "type": "string" - }, - "ip": { - "description": "IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers)", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.LoadBalancerStatus": { - "description": "LoadBalancerStatus represents the status of a load-balancer.", - "properties": { - "ingress": { - "description": "Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.LoadBalancerIngress" - } - } - } - }, - "io.k8s.api.core.v1.LocalObjectReference": { - "description": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", - "properties": { - "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.LocalVolumeSource": { - "description": "Local represents directly-attached storage with node affinity", - "required": [ - "path" - ], - "properties": { - "path": { - "description": "The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.NFSVolumeSource": { - "description": "Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.", - "required": [ - "server", - "path" - ], - "properties": { - "path": { - "description": "Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - "type": "string" - }, - "readOnly": { - "description": "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", - "type": "boolean" - }, - "server": { - "description": "Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.Namespace": { - "description": "Namespace provides a scope for Names. Use of multiple namespaces is optional.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.NamespaceSpec" - }, - "status": { - "description": "Status describes the current status of a Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.NamespaceStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "Namespace", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.NamespaceList": { - "description": "NamespaceList is a list of Namespaces.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "NamespaceList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.NamespaceSpec": { - "description": "NamespaceSpec describes the attributes on a Namespace.", - "properties": { - "finalizers": { - "description": "Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.core.v1.NamespaceStatus": { - "description": "NamespaceStatus is information about the current status of a Namespace.", - "properties": { - "phase": { - "description": "Phase is the current lifecycle phase of the namespace. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#phases", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.Node": { - "description": "Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSpec" - }, - "status": { - "description": "Most recently observed status of the node. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "Node", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.NodeAddress": { - "description": "NodeAddress contains information for the node's address.", - "required": [ - "type", - "address" - ], - "properties": { - "address": { - "description": "The node address.", - "type": "string" - }, - "type": { - "description": "Node address type, one of Hostname, ExternalIP or InternalIP.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.NodeAffinity": { - "description": "Node affinity is a group of node affinity scheduling rules.", - "properties": { - "preferredDuringSchedulingIgnoredDuringExecution": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PreferredSchedulingTerm" - } - }, - "requiredDuringSchedulingIgnoredDuringExecution": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector" - } - } - }, - "io.k8s.api.core.v1.NodeCondition": { - "description": "NodeCondition contains condition information for a node.", - "required": [ - "type", - "status" - ], - "properties": { - "lastHeartbeatTime": { - "description": "Last time we got an update on a given condition.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "lastTransitionTime": { - "description": "Last time the condition transit from one status to another.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "Human readable message indicating details about last transition.", - "type": "string" - }, - "reason": { - "description": "(brief) reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "Status of the condition, one of True, False, Unknown.", - "type": "string" - }, - "type": { - "description": "Type of node condition.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.NodeConfigSource": { - "description": "NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "configMapRef": { - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "NodeConfigSource", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.NodeDaemonEndpoints": { - "description": "NodeDaemonEndpoints lists ports opened by daemons running on the Node.", - "properties": { - "kubeletEndpoint": { - "description": "Endpoint on which Kubelet is listening.", - "$ref": "#/definitions/io.k8s.api.core.v1.DaemonEndpoint" - } - } - }, - "io.k8s.api.core.v1.NodeList": { - "description": "NodeList is the whole list of all Nodes which have been registered with master.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of nodes", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Node" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "NodeList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.NodeSelector": { - "description": "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.", - "required": [ - "nodeSelectorTerms" - ], - "properties": { - "nodeSelectorTerms": { - "description": "Required. A list of node selector terms. The terms are ORed.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorTerm" - } - } - } - }, - "io.k8s.api.core.v1.NodeSelectorRequirement": { - "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", - "required": [ - "key", - "operator" - ], - "properties": { - "key": { - "description": "The label key that the selector applies to.", - "type": "string" - }, - "operator": { - "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.", - "type": "string" - }, - "values": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.core.v1.NodeSelectorTerm": { - "description": "A null or empty node selector term matches no objects.", - "required": [ - "matchExpressions" - ], - "properties": { - "matchExpressions": { - "description": "Required. A list of node selector requirements. The requirements are ANDed.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorRequirement" - } - } - } - }, - "io.k8s.api.core.v1.NodeSpec": { - "description": "NodeSpec describes the attributes that a node is created with.", - "properties": { - "configSource": { - "description": "If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeConfigSource" - }, - "externalID": { - "description": "External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated.", - "type": "string" - }, - "podCIDR": { - "description": "PodCIDR represents the pod IP range assigned to the node.", - "type": "string" - }, - "providerID": { - "description": "ID of the node assigned by the cloud provider in the format: \u003cProviderName\u003e://\u003cProviderSpecificNodeID\u003e", - "type": "string" - }, - "taints": { - "description": "If specified, the node's taints.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Taint" - } - }, - "unschedulable": { - "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration", - "type": "boolean" - } - } - }, - "io.k8s.api.core.v1.NodeStatus": { - "description": "NodeStatus is information about the current status of a node.", - "properties": { - "addresses": { - "description": "List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.NodeAddress" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "allocatable": { - "description": "Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - }, - "capacity": { - "description": "Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - }, - "conditions": { - "description": "Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.NodeCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "daemonEndpoints": { - "description": "Endpoints of daemons running on the Node.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeDaemonEndpoints" - }, - "images": { - "description": "List of container images on this node", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerImage" - } - }, - "nodeInfo": { - "description": "Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSystemInfo" - }, - "phase": { - "description": "NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated.", - "type": "string" - }, - "volumesAttached": { - "description": "List of volumes that are attached to the node.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.AttachedVolume" - } - }, - "volumesInUse": { - "description": "List of attachable volumes in use (mounted) by the node.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.core.v1.NodeSystemInfo": { - "description": "NodeSystemInfo is a set of ids/uuids to uniquely identify the node.", - "required": [ - "machineID", - "systemUUID", - "bootID", - "kernelVersion", - "osImage", - "containerRuntimeVersion", - "kubeletVersion", - "kubeProxyVersion", - "operatingSystem", - "architecture" - ], - "properties": { - "architecture": { - "description": "The Architecture reported by the node", - "type": "string" - }, - "bootID": { - "description": "Boot ID reported by the node.", - "type": "string" - }, - "containerRuntimeVersion": { - "description": "ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).", - "type": "string" - }, - "kernelVersion": { - "description": "Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64).", - "type": "string" - }, - "kubeProxyVersion": { - "description": "KubeProxy Version reported by the node.", - "type": "string" - }, - "kubeletVersion": { - "description": "Kubelet Version reported by the node.", - "type": "string" - }, - "machineID": { - "description": "MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html", - "type": "string" - }, - "operatingSystem": { - "description": "The Operating System reported by the node", - "type": "string" - }, - "osImage": { - "description": "OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).", - "type": "string" - }, - "systemUUID": { - "description": "SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ObjectFieldSelector": { - "description": "ObjectFieldSelector selects an APIVersioned field of an object.", - "required": [ - "fieldPath" - ], - "properties": { - "apiVersion": { - "description": "Version of the schema the FieldPath is written in terms of, defaults to \"v1\".", - "type": "string" - }, - "fieldPath": { - "description": "Path of the field to select in the specified API version.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ObjectReference": { - "description": "ObjectReference contains enough information to let you inspect or modify the referred object.", - "properties": { - "apiVersion": { - "description": "API version of the referent.", - "type": "string" - }, - "fieldPath": { - "description": "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.", - "type": "string" - }, - "kind": { - "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "type": "string" - }, - "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - "type": "string" - }, - "namespace": { - "description": "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/", - "type": "string" - }, - "resourceVersion": { - "description": "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", - "type": "string" - }, - "uid": { - "description": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.PersistentVolume": { - "description": "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", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeSpec" - }, - "status": { - "description": "Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "PersistentVolume", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.PersistentVolumeClaim": { - "description": "PersistentVolumeClaim is a user's request for and claim to a persistent volume", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimSpec" - }, - "status": { - "description": "Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "PersistentVolumeClaim", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.PersistentVolumeClaimCondition": { - "description": "PersistentVolumeClaimCondition contails details about state of pvc", - "required": [ - "type", - "status" - ], - "properties": { - "lastProbeTime": { - "description": "Last time we probed the condition.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "lastTransitionTime": { - "description": "Last time the condition transitioned from one status to another.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "Human-readable message indicating details about last transition.", - "type": "string" - }, - "reason": { - "description": "Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.", - "type": "string" - }, - "status": { - "type": "string" - }, - "type": { - "type": "string" - } - } - }, - "io.k8s.api.core.v1.PersistentVolumeClaimList": { - "description": "PersistentVolumeClaimList is a list of PersistentVolumeClaim items.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "PersistentVolumeClaimList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.PersistentVolumeClaimSpec": { - "description": "PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes", - "properties": { - "accessModes": { - "description": "AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "description": "Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources", - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements" - }, - "selector": { - "description": "A label query over volumes to consider for binding.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "storageClassName": { - "description": "Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1", - "type": "string" - }, - "volumeName": { - "description": "VolumeName is the binding reference to the PersistentVolume backing this claim.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.PersistentVolumeClaimStatus": { - "description": "PersistentVolumeClaimStatus is the current status of a persistent volume claim.", - "properties": { - "accessModes": { - "description": "AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1", - "type": "array", - "items": { - "type": "string" - } - }, - "capacity": { - "description": "Represents the actual resources of the underlying volume.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - }, - "conditions": { - "description": "Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "phase": { - "description": "Phase represents the current phase of PersistentVolumeClaim.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource": { - "description": "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).", - "required": [ - "claimName" - ], - "properties": { - "claimName": { - "description": "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", - "type": "string" - }, - "readOnly": { - "description": "Will force the ReadOnly setting in VolumeMounts. Default false.", - "type": "boolean" - } - } - }, - "io.k8s.api.core.v1.PersistentVolumeList": { - "description": "PersistentVolumeList is a list of PersistentVolume items.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "PersistentVolumeList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.PersistentVolumeSpec": { - "description": "PersistentVolumeSpec is the specification of a persistent volume.", - "properties": { - "accessModes": { - "description": "AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes", - "type": "array", - "items": { - "type": "string" - } - }, - "awsElasticBlockStore": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource" - }, - "azureDisk": { - "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource" - }, - "azureFile": { - "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - "$ref": "#/definitions/io.k8s.api.core.v1.AzureFilePersistentVolumeSource" - }, - "capacity": { - "description": "A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - }, - "cephfs": { - "description": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - "$ref": "#/definitions/io.k8s.api.core.v1.CephFSPersistentVolumeSource" - }, - "cinder": { - "description": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - "$ref": "#/definitions/io.k8s.api.core.v1.CinderVolumeSource" - }, - "claimRef": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" - }, - "fc": { - "description": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - "$ref": "#/definitions/io.k8s.api.core.v1.FCVolumeSource" - }, - "flexVolume": { - "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.", - "$ref": "#/definitions/io.k8s.api.core.v1.FlexVolumeSource" - }, - "flocker": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource" - }, - "gcePersistentDisk": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource" - }, - "glusterfs": { - "description": "Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", - "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsVolumeSource" - }, - "hostPath": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.HostPathVolumeSource" - }, - "iscsi": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.core.v1.ISCSIVolumeSource" - }, - "local": { - "description": "Local represents directly-attached storage with node affinity", - "$ref": "#/definitions/io.k8s.api.core.v1.LocalVolumeSource" - }, - "mountOptions": { - "description": "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", - "type": "array", - "items": { - "type": "string" - } - }, - "nfs": { - "description": "NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - "$ref": "#/definitions/io.k8s.api.core.v1.NFSVolumeSource" - }, - "persistentVolumeReclaimPolicy": { - "description": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming", - "type": "string" - }, - "photonPersistentDisk": { - "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource" - }, - "portworxVolume": { - "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", - "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource" - }, - "quobyte": { - "description": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource" - }, - "rbd": { - "description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", - "$ref": "#/definitions/io.k8s.api.core.v1.RBDVolumeSource" - }, - "scaleIO": { - "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOVolumeSource" - }, - "storageClassName": { - "description": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass.", - "type": "string" - }, - "storageos": { - "description": "StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md", - "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSPersistentVolumeSource" - }, - "vsphereVolume": { - "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" - } - } - }, - "io.k8s.api.core.v1.PersistentVolumeStatus": { - "description": "PersistentVolumeStatus is the current status of a persistent volume.", - "properties": { - "message": { - "description": "A human-readable message indicating details about why the volume is in this state.", - "type": "string" - }, - "phase": { - "description": "Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase", - "type": "string" - }, - "reason": { - "description": "Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource": { - "description": "Represents a Photon Controller persistent disk resource.", - "required": [ - "pdID" - ], - "properties": { - "fsType": { - "description": "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.", - "type": "string" - }, - "pdID": { - "description": "ID that identifies Photon Controller persistent disk", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.Pod": { - "description": "Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.PodSpec" - }, - "status": { - "description": "Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.PodStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "Pod", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.PodAffinity": { - "description": "Pod affinity is a group of inter pod affinity scheduling rules.", - "properties": { - "preferredDuringSchedulingIgnoredDuringExecution": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.WeightedPodAffinityTerm" - } - }, - "requiredDuringSchedulingIgnoredDuringExecution": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinityTerm" - } - } - } - }, - "io.k8s.api.core.v1.PodAffinityTerm": { - "description": "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 \u003ctopologyKey\u003e tches that of any node on which a pod of the set of pods is running", - "properties": { - "labelSelector": { - "description": "A label query over a set of resources, in this case pods.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "namespaces": { - "description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"", - "type": "array", - "items": { - "type": "string" - } - }, - "topologyKey": { - "description": "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. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.PodAntiAffinity": { - "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", - "properties": { - "preferredDuringSchedulingIgnoredDuringExecution": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.WeightedPodAffinityTerm" - } - }, - "requiredDuringSchedulingIgnoredDuringExecution": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinityTerm" - } - } - } - }, - "io.k8s.api.core.v1.PodCondition": { - "description": "PodCondition contains details for the current condition of this pod.", - "required": [ - "type", - "status" - ], - "properties": { - "lastProbeTime": { - "description": "Last time we probed the condition.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "lastTransitionTime": { - "description": "Last time the condition transitioned from one status to another.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "Human-readable message indicating details about last transition.", - "type": "string" - }, - "reason": { - "description": "Unique, one-word, CamelCase reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - "type": "string" - }, - "type": { - "description": "Type is the type of the condition. Currently only Ready. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.PodList": { - "description": "PodList is a list of Pods.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Pod" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "PodList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.PodSecurityContext": { - "description": "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.", - "properties": { - "fsGroup": { - "description": "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:\n\n1. 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----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.", - "type": "integer", - "format": "int64" - }, - "runAsNonRoot": { - "description": "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.", - "type": "boolean" - }, - "runAsUser": { - "description": "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.", - "type": "integer", - "format": "int64" - }, - "seLinuxOptions": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.core.v1.SELinuxOptions" - }, - "supplementalGroups": { - "description": "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.", - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, - "io.k8s.api.core.v1.PodSpec": { - "description": "PodSpec is a description of a pod.", - "required": [ - "containers" - ], - "properties": { - "activeDeadlineSeconds": { - "description": "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.", - "type": "integer", - "format": "int64" - }, - "affinity": { - "description": "If specified, the pod's scheduling constraints", - "$ref": "#/definitions/io.k8s.api.core.v1.Affinity" - }, - "automountServiceAccountToken": { - "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", - "type": "boolean" - }, - "containers": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Container" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "dnsPolicy": { - "description": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", - "type": "string" - }, - "hostAliases": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.HostAlias" - }, - "x-kubernetes-patch-merge-key": "ip", - "x-kubernetes-patch-strategy": "merge" - }, - "hostIPC": { - "description": "Use the host's ipc namespace. Optional: Default to false.", - "type": "boolean" - }, - "hostNetwork": { - "description": "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.", - "type": "boolean" - }, - "hostPID": { - "description": "Use the host's pid namespace. Optional: Default to false.", - "type": "boolean" - }, - "hostname": { - "description": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", - "type": "string" - }, - "imagePullSecrets": { - "description": "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", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "initContainers": { - "description": "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, or Liveness 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/", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Container" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "nodeName": { - "description": "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.", - "type": "string" - }, - "nodeSelector": { - "description": "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/", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "priority": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "priorityClassName": { - "description": "If specified, indicates the pod's priority. \"SYSTEM\" is a special keyword which indicates 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.", - "type": "string" - }, - "restartPolicy": { - "description": "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", - "type": "string" - }, - "schedulerName": { - "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", - "type": "string" - }, - "securityContext": { - "description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext" - }, - "serviceAccount": { - "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", - "type": "string" - }, - "serviceAccountName": { - "description": "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/", - "type": "string" - }, - "subdomain": { - "description": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all.", - "type": "string" - }, - "terminationGracePeriodSeconds": { - "description": "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 delete immediately. 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.", - "type": "integer", - "format": "int64" - }, - "tolerations": { - "description": "If specified, the pod's tolerations.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Toleration" - } - }, - "volumes": { - "description": "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Volume" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge,retainKeys" - } - } - }, - "io.k8s.api.core.v1.PodStatus": { - "description": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.", - "properties": { - "conditions": { - "description": "Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "containerStatuses": { - "description": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStatus" - } - }, - "hostIP": { - "description": "IP address of the host to which the pod is assigned. Empty if not yet scheduled.", - "type": "string" - }, - "initContainerStatuses": { - "description": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStatus" - } - }, - "message": { - "description": "A human readable message indicating details about why the pod is in this condition.", - "type": "string" - }, - "phase": { - "description": "Current condition of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase", - "type": "string" - }, - "podIP": { - "description": "IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated.", - "type": "string" - }, - "qosClass": { - "description": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md", - "type": "string" - }, - "reason": { - "description": "A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted'", - "type": "string" - }, - "startTime": { - "description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - } - } - }, - "io.k8s.api.core.v1.PodTemplate": { - "description": "PodTemplate describes a template for creating copies of a predefined pod.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "template": { - "description": "Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "PodTemplate", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.PodTemplateList": { - "description": "PodTemplateList is a list of PodTemplates.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of pod templates", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplate" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "PodTemplateList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.PodTemplateSpec": { - "description": "PodTemplateSpec describes the data a pod should have when created from a template", - "properties": { - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.PodSpec" - } - } - }, - "io.k8s.api.core.v1.PortworxVolumeSource": { - "description": "PortworxVolumeSource represents a Portworx volume resource.", - "required": [ - "volumeID" - ], - "properties": { - "fsType": { - "description": "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.", - "type": "string" - }, - "readOnly": { - "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "type": "boolean" - }, - "volumeID": { - "description": "VolumeID uniquely identifies a Portworx volume", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.PreferredSchedulingTerm": { - "description": "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).", - "required": [ - "weight", - "preference" - ], - "properties": { - "preference": { - "description": "A node selector term, associated with the corresponding weight.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorTerm" - }, - "weight": { - "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.core.v1.Probe": { - "description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", - "properties": { - "exec": { - "description": "One and only one of the following should be specified. Exec specifies the action to take.", - "$ref": "#/definitions/io.k8s.api.core.v1.ExecAction" - }, - "failureThreshold": { - "description": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", - "type": "integer", - "format": "int32" - }, - "httpGet": { - "description": "HTTPGet specifies the http request to perform.", - "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction" - }, - "initialDelaySeconds": { - "description": "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", - "type": "integer", - "format": "int32" - }, - "periodSeconds": { - "description": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.", - "type": "integer", - "format": "int32" - }, - "successThreshold": { - "description": "Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.", - "type": "integer", - "format": "int32" - }, - "tcpSocket": { - "description": "TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported", - "$ref": "#/definitions/io.k8s.api.core.v1.TCPSocketAction" - }, - "timeoutSeconds": { - "description": "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", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.core.v1.ProjectedVolumeSource": { - "description": "Represents a projected volume source", - "required": [ - "sources" - ], - "properties": { - "defaultMode": { - "description": "Mode bits to use on created files by default. Must be a value between 0 and 0777. 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.", - "type": "integer", - "format": "int32" - }, - "sources": { - "description": "list of volume projections", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.VolumeProjection" - } - } - } - }, - "io.k8s.api.core.v1.QuobyteVolumeSource": { - "description": "Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.", - "required": [ - "registry", - "volume" - ], - "properties": { - "group": { - "description": "Group to map volume access to Default is no group", - "type": "string" - }, - "readOnly": { - "description": "ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.", - "type": "boolean" - }, - "registry": { - "description": "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", - "type": "string" - }, - "user": { - "description": "User to map volume access to Defaults to serivceaccount user", - "type": "string" - }, - "volume": { - "description": "Volume is a string that references an already created Quobyte volume by name.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.RBDVolumeSource": { - "description": "Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.", - "required": [ - "monitors", - "image" - ], - "properties": { - "fsType": { - "description": "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", - "type": "string" - }, - "image": { - "description": "The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - "type": "string" - }, - "keyring": { - "description": "Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - "type": "string" - }, - "monitors": { - "description": "A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - "type": "array", - "items": { - "type": "string" - } - }, - "pool": { - "description": "The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - "type": "string" - }, - "readOnly": { - "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - "type": "boolean" - }, - "secretRef": { - "description": "SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" - }, - "user": { - "description": "The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ReplicationController": { - "description": "ReplicationController represents the configuration of a replication controller.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "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/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerSpec" - }, - "status": { - "description": "Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "ReplicationController", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.ReplicationControllerCondition": { - "description": "ReplicationControllerCondition describes the state of a replication controller at a certain point.", - "required": [ - "type", - "status" - ], - "properties": { - "lastTransitionTime": { - "description": "The last time the condition transitioned from one status to another.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "A human readable message indicating details about the transition.", - "type": "string" - }, - "reason": { - "description": "The reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "Status of the condition, one of True, False, Unknown.", - "type": "string" - }, - "type": { - "description": "Type of replication controller condition.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ReplicationControllerList": { - "description": "ReplicationControllerList is a collection of replication controllers.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "ReplicationControllerList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.ReplicationControllerSpec": { - "description": "ReplicationControllerSpec is the specification of a replication controller.", - "properties": { - "minReadySeconds": { - "description": "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)", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "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", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "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", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "template": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - } - } - }, - "io.k8s.api.core.v1.ReplicationControllerStatus": { - "description": "ReplicationControllerStatus represents the current status of a replication controller.", - "required": [ - "replicas" - ], - "properties": { - "availableReplicas": { - "description": "The number of available replicas (ready for at least minReadySeconds) for this replication controller.", - "type": "integer", - "format": "int32" - }, - "conditions": { - "description": "Represents the latest available observations of a replication controller's current state.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "fullyLabeledReplicas": { - "description": "The number of pods that have labels matching the labels of the pod template of the replication controller.", - "type": "integer", - "format": "int32" - }, - "observedGeneration": { - "description": "ObservedGeneration reflects the generation of the most recently observed replication controller.", - "type": "integer", - "format": "int64" - }, - "readyReplicas": { - "description": "The number of ready replicas for this replication controller.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.core.v1.ResourceFieldSelector": { - "description": "ResourceFieldSelector represents container resources (cpu, memory) and their output format", - "required": [ - "resource" - ], - "properties": { - "containerName": { - "description": "Container name: required for volumes, optional for env vars", - "type": "string" - }, - "divisor": { - "description": "Specifies the output format of the exposed resources, defaults to \"1\"", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - }, - "resource": { - "description": "Required: resource to select", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ResourceQuota": { - "description": "ResourceQuota sets aggregate quota restrictions enforced per namespace", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuotaSpec" - }, - "status": { - "description": "Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuotaStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "ResourceQuota", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.ResourceQuotaList": { - "description": "ResourceQuotaList is a list of ResourceQuota items.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of ResourceQuota objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "ResourceQuotaList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.ResourceQuotaSpec": { - "description": "ResourceQuotaSpec defines the desired hard limits to enforce for Quota.", - "properties": { - "hard": { - "description": "Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - }, - "scopes": { - "description": "A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.core.v1.ResourceQuotaStatus": { - "description": "ResourceQuotaStatus defines the enforced hard limits and observed use.", - "properties": { - "hard": { - "description": "Hard is the set of enforced hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - }, - "used": { - "description": "Used is the current observed total usage of the resource in the namespace.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - } - } - }, - "io.k8s.api.core.v1.ResourceRequirements": { - "description": "ResourceRequirements describes the compute resource requirements.", - "properties": { - "limits": { - "description": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - }, - "requests": { - "description": "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-compute-resources-container/", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.api.resource.Quantity" - } - } - } - }, - "io.k8s.api.core.v1.SELinuxOptions": { - "description": "SELinuxOptions are the labels to be applied to the container", - "properties": { - "level": { - "description": "Level is SELinux level label that applies to the container.", - "type": "string" - }, - "role": { - "description": "Role is a SELinux role label that applies to the container.", - "type": "string" - }, - "type": { - "description": "Type is a SELinux type label that applies to the container.", - "type": "string" - }, - "user": { - "description": "User is a SELinux user label that applies to the container.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ScaleIOVolumeSource": { - "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", - "required": [ - "gateway", - "system", - "secretRef" - ], - "properties": { - "fsType": { - "description": "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.", - "type": "string" - }, - "gateway": { - "description": "The host address of the ScaleIO API Gateway.", - "type": "string" - }, - "protectionDomain": { - "description": "The name of the Protection Domain for the configured storage (defaults to \"default\").", - "type": "string" - }, - "readOnly": { - "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "type": "boolean" - }, - "secretRef": { - "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail.", - "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" - }, - "sslEnabled": { - "description": "Flag to enable/disable SSL communication with Gateway, default false", - "type": "boolean" - }, - "storageMode": { - "description": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\").", - "type": "string" - }, - "storagePool": { - "description": "The Storage Pool associated with the protection domain (defaults to \"default\").", - "type": "string" - }, - "system": { - "description": "The name of the storage system as configured in ScaleIO.", - "type": "string" - }, - "volumeName": { - "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.Secret": { - "description": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "data": { - "description": "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", - "type": "object", - "additionalProperties": { - "type": "string", - "format": "byte" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "stringData": { - "description": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "type": { - "description": "Used to facilitate programmatic handling of secret data.", - "type": "string" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "Secret", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.SecretEnvSource": { - "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", - "properties": { - "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - "type": "string" - }, - "optional": { - "description": "Specify whether the Secret must be defined", - "type": "boolean" - } - } - }, - "io.k8s.api.core.v1.SecretKeySelector": { - "description": "SecretKeySelector selects a key of a Secret.", - "required": [ - "key" - ], - "properties": { - "key": { - "description": "The key of the secret to select from. Must be a valid secret key.", - "type": "string" - }, - "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - "type": "string" - }, - "optional": { - "description": "Specify whether the Secret or it's key must be defined", - "type": "boolean" - } - } - }, - "io.k8s.api.core.v1.SecretList": { - "description": "SecretList is a list of Secret.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Secret" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "SecretList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.SecretProjection": { - "description": "Adapts a secret into a projected volume.\n\nThe 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.", - "properties": { - "items": { - "description": "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 '..'.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" - } - }, - "name": { - "description": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - "type": "string" - }, - "optional": { - "description": "Specify whether the Secret or its key must be defined", - "type": "boolean" - } - } - }, - "io.k8s.api.core.v1.SecretReference": { - "description": "SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace", - "properties": { - "name": { - "description": "Name is unique within a namespace to reference a secret resource.", - "type": "string" - }, - "namespace": { - "description": "Namespace defines the space within which the secret name must be unique.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.SecretVolumeSource": { - "description": "Adapts a Secret into a volume.\n\nThe 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.", - "properties": { - "defaultMode": { - "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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.", - "type": "integer", - "format": "int32" - }, - "items": { - "description": "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 '..'.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" - } - }, - "optional": { - "description": "Specify whether the Secret or it's keys must be defined", - "type": "boolean" - }, - "secretName": { - "description": "Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.SecurityContext": { - "description": "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.", - "properties": { - "allowPrivilegeEscalation": { - "description": "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", - "type": "boolean" - }, - "capabilities": { - "description": "The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.", - "$ref": "#/definitions/io.k8s.api.core.v1.Capabilities" - }, - "privileged": { - "description": "Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.", - "type": "boolean" - }, - "readOnlyRootFilesystem": { - "description": "Whether this container has a read-only root filesystem. Default is false.", - "type": "boolean" - }, - "runAsNonRoot": { - "description": "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.", - "type": "boolean" - }, - "runAsUser": { - "description": "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.", - "type": "integer", - "format": "int64" - }, - "seLinuxOptions": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.core.v1.SELinuxOptions" - } - } - }, - "io.k8s.api.core.v1.Service": { - "description": "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.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceSpec" - }, - "status": { - "description": "Most recently observed status of the service. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "Service", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.ServiceAccount": { - "description": "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", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "automountServiceAccountToken": { - "description": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level.", - "type": "boolean" - }, - "imagePullSecrets": { - "description": "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", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "secrets": { - "description": "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", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "ServiceAccount", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.ServiceAccountList": { - "description": "ServiceAccountList is a list of ServiceAccount objects", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccount" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "ServiceAccountList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.ServiceList": { - "description": "ServiceList holds a list of services.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of services", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Service" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "ServiceList", - "version": "v1" - } - ] - }, - "io.k8s.api.core.v1.ServicePort": { - "description": "ServicePort contains information on service's port.", - "required": [ - "port" - ], - "properties": { - "name": { - "description": "The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service.", - "type": "string" - }, - "nodePort": { - "description": "The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport", - "type": "integer", - "format": "int32" - }, - "port": { - "description": "The port that will be exposed by this service.", - "type": "integer", - "format": "int32" - }, - "protocol": { - "description": "The IP protocol for this port. Supports \"TCP\" and \"UDP\". Default is TCP.", - "type": "string" - }, - "targetPort": { - "description": "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", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - } - } - }, - "io.k8s.api.core.v1.ServiceSpec": { - "description": "ServiceSpec describes the attributes that a user creates on a service.", - "properties": { - "clusterIP": { - "description": "clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are \"None\", empty string (\"\"), or a valid IP address. \"None\" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", - "type": "string" - }, - "externalIPs": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - }, - "externalName": { - "description": "externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName.", - "type": "string" - }, - "externalTrafficPolicy": { - "description": "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.", - "type": "string" - }, - "healthCheckNodePort": { - "description": "healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local.", - "type": "integer", - "format": "int32" - }, - "loadBalancerIP": { - "description": "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.", - "type": "string" - }, - "loadBalancerSourceRanges": { - "description": "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/configure-cloud-provider-firewall/", - "type": "array", - "items": { - "type": "string" - } - }, - "ports": { - "description": "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", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.ServicePort" - }, - "x-kubernetes-patch-merge-key": "port", - "x-kubernetes-patch-strategy": "merge" - }, - "publishNotReadyAddresses": { - "description": "publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery. This field will replace the service.alpha.kubernetes.io/tolerate-unready-endpoints when that annotation is deprecated and all clients have been converted to use this field.", - "type": "boolean" - }, - "selector": { - "description": "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. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "sessionAffinity": { - "description": "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", - "type": "string" - }, - "sessionAffinityConfig": { - "description": "sessionAffinityConfig contains the configurations of session affinity.", - "$ref": "#/definitions/io.k8s.api.core.v1.SessionAffinityConfig" - }, - "type": { - "description": "type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. \"ExternalName\" maps to the specified externalName. \"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. If clusterIP is \"None\", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. \"NodePort\" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. \"LoadBalancer\" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.ServiceStatus": { - "description": "ServiceStatus represents the current status of a service.", - "properties": { - "loadBalancer": { - "description": "LoadBalancer contains the current status of the load-balancer, if one is present.", - "$ref": "#/definitions/io.k8s.api.core.v1.LoadBalancerStatus" - } - } - }, - "io.k8s.api.core.v1.SessionAffinityConfig": { - "description": "SessionAffinityConfig represents the configurations of session affinity.", - "properties": { - "clientIP": { - "description": "clientIP contains the configurations of Client IP based session affinity.", - "$ref": "#/definitions/io.k8s.api.core.v1.ClientIPConfig" - } - } - }, - "io.k8s.api.core.v1.StorageOSPersistentVolumeSource": { - "description": "Represents a StorageOS persistent volume resource.", - "properties": { - "fsType": { - "description": "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.", - "type": "string" - }, - "readOnly": { - "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "type": "boolean" - }, - "secretRef": { - "description": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" - }, - "volumeName": { - "description": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", - "type": "string" - }, - "volumeNamespace": { - "description": "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.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.StorageOSVolumeSource": { - "description": "Represents a StorageOS persistent volume resource.", - "properties": { - "fsType": { - "description": "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.", - "type": "string" - }, - "readOnly": { - "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.", - "type": "boolean" - }, - "secretRef": { - "description": "SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted.", - "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" - }, - "volumeName": { - "description": "VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.", - "type": "string" - }, - "volumeNamespace": { - "description": "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.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.TCPSocketAction": { - "description": "TCPSocketAction describes an action based on opening a socket", - "required": [ - "port" - ], - "properties": { - "host": { - "description": "Optional: Host name to connect to, defaults to the pod IP.", - "type": "string" - }, - "port": { - "description": "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.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - } - } - }, - "io.k8s.api.core.v1.Taint": { - "description": "The node this Taint is attached to has the \"effect\" on any pod that does not tolerate the Taint.", - "required": [ - "key", - "effect" - ], - "properties": { - "effect": { - "description": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.", - "type": "string" - }, - "key": { - "description": "Required. The taint key to be applied to a node.", - "type": "string" - }, - "timeAdded": { - "description": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "value": { - "description": "Required. The taint value corresponding to the taint key.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.Toleration": { - "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", - "properties": { - "effect": { - "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.", - "type": "string" - }, - "key": { - "description": "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.", - "type": "string" - }, - "operator": { - "description": "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.", - "type": "string" - }, - "tolerationSeconds": { - "description": "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.", - "type": "integer", - "format": "int64" - }, - "value": { - "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.Volume": { - "description": "Volume represents a named volume in a pod that may be accessed by any container in the pod.", - "required": [ - "name" - ], - "properties": { - "awsElasticBlockStore": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource" - }, - "azureDisk": { - "description": "AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.", - "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource" - }, - "azureFile": { - "description": "AzureFile represents an Azure File Service mount on the host and bind mount to the pod.", - "$ref": "#/definitions/io.k8s.api.core.v1.AzureFileVolumeSource" - }, - "cephfs": { - "description": "CephFS represents a Ceph FS mount on the host that shares a pod's lifetime", - "$ref": "#/definitions/io.k8s.api.core.v1.CephFSVolumeSource" - }, - "cinder": { - "description": "Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md", - "$ref": "#/definitions/io.k8s.api.core.v1.CinderVolumeSource" - }, - "configMap": { - "description": "ConfigMap represents a configMap that should populate this volume", - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapVolumeSource" - }, - "downwardAPI": { - "description": "DownwardAPI represents downward API about the pod that should populate this volume", - "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIVolumeSource" - }, - "emptyDir": { - "description": "EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", - "$ref": "#/definitions/io.k8s.api.core.v1.EmptyDirVolumeSource" - }, - "fc": { - "description": "FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.", - "$ref": "#/definitions/io.k8s.api.core.v1.FCVolumeSource" - }, - "flexVolume": { - "description": "FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future.", - "$ref": "#/definitions/io.k8s.api.core.v1.FlexVolumeSource" - }, - "flocker": { - "description": "Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running", - "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource" - }, - "gcePersistentDisk": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource" - }, - "gitRepo": { - "description": "GitRepo represents a git repository at a particular revision.", - "$ref": "#/definitions/io.k8s.api.core.v1.GitRepoVolumeSource" - }, - "glusterfs": { - "description": "Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md", - "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsVolumeSource" - }, - "hostPath": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.HostPathVolumeSource" - }, - "iscsi": { - "description": "ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md", - "$ref": "#/definitions/io.k8s.api.core.v1.ISCSIVolumeSource" - }, - "name": { - "description": "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", - "type": "string" - }, - "nfs": { - "description": "NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs", - "$ref": "#/definitions/io.k8s.api.core.v1.NFSVolumeSource" - }, - "persistentVolumeClaim": { - "description": "PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource" - }, - "photonPersistentDisk": { - "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine", - "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource" - }, - "portworxVolume": { - "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine", - "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource" - }, - "projected": { - "description": "Items for all in one resources secrets, configmaps, and downward API", - "$ref": "#/definitions/io.k8s.api.core.v1.ProjectedVolumeSource" - }, - "quobyte": { - "description": "Quobyte represents a Quobyte mount on the host that shares a pod's lifetime", - "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource" - }, - "rbd": { - "description": "RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md", - "$ref": "#/definitions/io.k8s.api.core.v1.RBDVolumeSource" - }, - "scaleIO": { - "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.", - "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOVolumeSource" - }, - "secret": { - "description": "Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - "$ref": "#/definitions/io.k8s.api.core.v1.SecretVolumeSource" - }, - "storageos": { - "description": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.", - "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSVolumeSource" - }, - "vsphereVolume": { - "description": "VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine", - "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" - } - } - }, - "io.k8s.api.core.v1.VolumeMount": { - "description": "VolumeMount describes a mounting of a Volume within a container.", - "required": [ - "name", - "mountPath" - ], - "properties": { - "mountPath": { - "description": "Path within the container at which the volume should be mounted. Must not contain ':'.", - "type": "string" - }, - "mountPropagation": { - "description": "mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release.", - "type": "string" - }, - "name": { - "description": "This must match the Name of a Volume.", - "type": "string" - }, - "readOnly": { - "description": "Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.", - "type": "boolean" - }, - "subPath": { - "description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.VolumeProjection": { - "description": "Projection that may be projected along with other supported volume types", - "properties": { - "configMap": { - "description": "information about the configMap data to project", - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapProjection" - }, - "downwardAPI": { - "description": "information about the downwardAPI data to project", - "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIProjection" - }, - "secret": { - "description": "information about the secret data to project", - "$ref": "#/definitions/io.k8s.api.core.v1.SecretProjection" - } - } - }, - "io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource": { - "description": "Represents a vSphere volume resource.", - "required": [ - "volumePath" - ], - "properties": { - "fsType": { - "description": "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.", - "type": "string" - }, - "storagePolicyID": { - "description": "Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.", - "type": "string" - }, - "storagePolicyName": { - "description": "Storage Policy Based Management (SPBM) profile name.", - "type": "string" - }, - "volumePath": { - "description": "Path that identifies vSphere volume vmdk", - "type": "string" - } - } - }, - "io.k8s.api.core.v1.WeightedPodAffinityTerm": { - "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", - "required": [ - "weight", - "podAffinityTerm" - ], - "properties": { - "podAffinityTerm": { - "description": "Required. A pod affinity term, associated with the corresponding weight.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinityTerm" - }, - "weight": { - "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.extensions.v1beta1.AllowedHostPath": { - "description": "defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.", - "properties": { - "pathPrefix": { - "description": "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.\n\nExamples: `/foo` would allow `/foo`, `/foo/` and `/foo/bar` `/foo` would not allow `/food` or `/etc/foo`", - "type": "string" - } - } - }, - "io.k8s.api.extensions.v1beta1.DaemonSet": { - "description": "DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSetSpec" - }, - "status": { - "description": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSetStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "DaemonSet", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.DaemonSetList": { - "description": "DaemonSetList is a collection of daemon sets.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "A list of daemon sets.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSet" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "DaemonSetList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.DaemonSetSpec": { - "description": "DaemonSetSpec is the specification of a daemon set.", - "required": [ - "template" - ], - "properties": { - "minReadySeconds": { - "description": "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).", - "type": "integer", - "format": "int32" - }, - "revisionHistoryLimit": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "template": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - }, - "templateGeneration": { - "description": "DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation.", - "type": "integer", - "format": "int64" - }, - "updateStrategy": { - "description": "An update strategy to replace existing DaemonSet pods with new pods.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSetUpdateStrategy" - } - } - }, - "io.k8s.api.extensions.v1beta1.DaemonSetStatus": { - "description": "DaemonSetStatus represents the current status of a daemon set.", - "required": [ - "currentNumberScheduled", - "numberMisscheduled", - "desiredNumberScheduled", - "numberReady" - ], - "properties": { - "collisionCount": { - "description": "Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.", - "type": "integer", - "format": "int32" - }, - "currentNumberScheduled": { - "description": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - "type": "integer", - "format": "int32" - }, - "desiredNumberScheduled": { - "description": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - "type": "integer", - "format": "int32" - }, - "numberAvailable": { - "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)", - "type": "integer", - "format": "int32" - }, - "numberMisscheduled": { - "description": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/", - "type": "integer", - "format": "int32" - }, - "numberReady": { - "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready.", - "type": "integer", - "format": "int32" - }, - "numberUnavailable": { - "description": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)", - "type": "integer", - "format": "int32" - }, - "observedGeneration": { - "description": "The most recent generation observed by the daemon set controller.", - "type": "integer", - "format": "int64" - }, - "updatedNumberScheduled": { - "description": "The total number of nodes that are running updated daemon pod", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.extensions.v1beta1.DaemonSetUpdateStrategy": { - "properties": { - "rollingUpdate": { - "description": "Rolling update config params. Present only if type = \"RollingUpdate\".", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet" - }, - "type": { - "description": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete.", - "type": "string" - } - } - }, - "io.k8s.api.extensions.v1beta1.Deployment": { - "description": "DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of the Deployment.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentSpec" - }, - "status": { - "description": "Most recently observed status of the Deployment.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "Deployment", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.DeploymentCondition": { - "description": "DeploymentCondition describes the state of a deployment at a certain point.", - "required": [ - "type", - "status" - ], - "properties": { - "lastTransitionTime": { - "description": "Last time the condition transitioned from one status to another.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "lastUpdateTime": { - "description": "The last time this condition was updated.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "A human readable message indicating details about the transition.", - "type": "string" - }, - "reason": { - "description": "The reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "Status of the condition, one of True, False, Unknown.", - "type": "string" - }, - "type": { - "description": "Type of deployment condition.", - "type": "string" - } - } - }, - "io.k8s.api.extensions.v1beta1.DeploymentList": { - "description": "DeploymentList is a list of Deployments.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of Deployments.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Deployment" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "DeploymentList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.DeploymentRollback": { - "description": "DEPRECATED. DeploymentRollback stores the information required to rollback a deployment.", - "required": [ - "name", - "rollbackTo" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "name": { - "description": "Required: This must match the Name of a deployment.", - "type": "string" - }, - "rollbackTo": { - "description": "The config of this deployment rollback.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.RollbackConfig" - }, - "updatedAnnotations": { - "description": "The annotations to be updated to a deployment", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "DeploymentRollback", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.DeploymentSpec": { - "description": "DeploymentSpec is the specification of the desired behavior of the Deployment.", - "required": [ - "template" - ], - "properties": { - "minReadySeconds": { - "description": "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)", - "type": "integer", - "format": "int32" - }, - "paused": { - "description": "Indicates that the deployment is paused and will not be processed by the deployment controller.", - "type": "boolean" - }, - "progressDeadlineSeconds": { - "description": "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. This is not set by default.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - "type": "integer", - "format": "int32" - }, - "revisionHistoryLimit": { - "description": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified.", - "type": "integer", - "format": "int32" - }, - "rollbackTo": { - "description": "DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.RollbackConfig" - }, - "selector": { - "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "strategy": { - "description": "The deployment strategy to use to replace existing pods with new ones.", - "x-kubernetes-patch-strategy": "retainKeys", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentStrategy" - }, - "template": { - "description": "Template describes the pods that will be created.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - } - } - }, - "io.k8s.api.extensions.v1beta1.DeploymentStatus": { - "description": "DeploymentStatus is the most recently observed status of the Deployment.", - "properties": { - "availableReplicas": { - "description": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", - "type": "integer", - "format": "int32" - }, - "collisionCount": { - "description": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", - "type": "integer", - "format": "int32" - }, - "conditions": { - "description": "Represents the latest available observations of a deployment's current state.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "observedGeneration": { - "description": "The generation observed by the deployment controller.", - "type": "integer", - "format": "int64" - }, - "readyReplicas": { - "description": "Total number of ready pods targeted by this deployment.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", - "type": "integer", - "format": "int32" - }, - "unavailableReplicas": { - "description": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - "type": "integer", - "format": "int32" - }, - "updatedReplicas": { - "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.extensions.v1beta1.DeploymentStrategy": { - "description": "DeploymentStrategy describes how to replace existing pods with new ones.", - "properties": { - "rollingUpdate": { - "description": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.RollingUpdateDeployment" - }, - "type": { - "description": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", - "type": "string" - } - } - }, - "io.k8s.api.extensions.v1beta1.FSGroupStrategyOptions": { - "description": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", - "properties": { - "ranges": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IDRange" - } - }, - "rule": { - "description": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.", - "type": "string" - } - } - }, - "io.k8s.api.extensions.v1beta1.HTTPIngressPath": { - "description": "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.", - "required": [ - "backend" - ], - "properties": { - "backend": { - "description": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressBackend" - }, - "path": { - "description": "Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) 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 '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.", - "type": "string" - } - } - }, - "io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue": { - "description": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://\u003chost\u003e/\u003cpath\u003e?\u003csearchpart\u003e -\u003e 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 '#'.", - "required": [ - "paths" - ], - "properties": { - "paths": { - "description": "A collection of paths that map requests to backends.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.HTTPIngressPath" - } - } - } - }, - "io.k8s.api.extensions.v1beta1.HostPortRange": { - "description": "Host Port Range 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.", - "required": [ - "min", - "max" - ], - "properties": { - "max": { - "description": "max is the end of the range, inclusive.", - "type": "integer", - "format": "int32" - }, - "min": { - "description": "min is the start of the range, inclusive.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.extensions.v1beta1.IDRange": { - "description": "ID Range provides a min/max of an allowed range of IDs.", - "required": [ - "min", - "max" - ], - "properties": { - "max": { - "description": "Max is the end of the range, inclusive.", - "type": "integer", - "format": "int64" - }, - "min": { - "description": "Min is the start of the range, inclusive.", - "type": "integer", - "format": "int64" - } - } - }, - "io.k8s.api.extensions.v1beta1.IPBlock": { - "description": "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") 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.", - "required": [ - "cidr" - ], - "properties": { - "cidr": { - "description": "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\"", - "type": "string" - }, - "except": { - "description": "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" Except values will be rejected if they are outside the CIDR range", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.extensions.v1beta1.Ingress": { - "description": "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.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressSpec" - }, - "status": { - "description": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "Ingress", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.IngressBackend": { - "description": "IngressBackend describes all endpoints for a given service and port.", - "required": [ - "serviceName", - "servicePort" - ], - "properties": { - "serviceName": { - "description": "Specifies the name of the referenced service.", - "type": "string" - }, - "servicePort": { - "description": "Specifies the port of the referenced service.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - } - } - }, - "io.k8s.api.extensions.v1beta1.IngressList": { - "description": "IngressList is a collection of Ingress.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of Ingress.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "IngressList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.IngressRule": { - "description": "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.", - "properties": { - "host": { - "description": "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 the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the\n\t IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth 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.", - "type": "string" - }, - "http": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue" - } - } - }, - "io.k8s.api.extensions.v1beta1.IngressSpec": { - "description": "IngressSpec describes the Ingress the user wishes to exist.", - "properties": { - "backend": { - "description": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressBackend" - }, - "rules": { - "description": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressRule" - } - }, - "tls": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressTLS" - } - } - } - }, - "io.k8s.api.extensions.v1beta1.IngressStatus": { - "description": "IngressStatus describe the current state of the Ingress.", - "properties": { - "loadBalancer": { - "description": "LoadBalancer contains the current status of the load-balancer.", - "$ref": "#/definitions/io.k8s.api.core.v1.LoadBalancerStatus" - } - } - }, - "io.k8s.api.extensions.v1beta1.IngressTLS": { - "description": "IngressTLS describes the transport layer security associated with an Ingress.", - "properties": { - "hosts": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - }, - "secretName": { - "description": "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL 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.", - "type": "string" - } - } - }, - "io.k8s.api.extensions.v1beta1.NetworkPolicy": { - "description": "NetworkPolicy describes what network traffic is allowed for a set of Pods", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior for this NetworkPolicy.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicySpec" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "NetworkPolicy", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule": { - "description": "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", - "properties": { - "ports": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicyPort" - } - }, - "to": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicyPeer" - } - } - } - }, - "io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule": { - "description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", - "properties": { - "from": { - "description": "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 on item, this rule allows traffic only if the traffic matches at least one item in the from list.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicyPeer" - } - }, - "ports": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicyPort" - } - } - } - }, - "io.k8s.api.extensions.v1beta1.NetworkPolicyList": { - "description": "Network Policy List is a list of NetworkPolicy objects.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of schema objects.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicy" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "NetworkPolicyList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.NetworkPolicyPeer": { - "properties": { - "ipBlock": { - "description": "IPBlock defines policy on a particular IPBlock", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IPBlock" - }, - "namespaceSelector": { - "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "podSelector": { - "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - } - } - }, - "io.k8s.api.extensions.v1beta1.NetworkPolicyPort": { - "properties": { - "port": { - "description": "If specified, 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.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - }, - "protocol": { - "description": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP.", - "type": "string" - } - } - }, - "io.k8s.api.extensions.v1beta1.NetworkPolicySpec": { - "required": [ - "podSelector" - ], - "properties": { - "egress": { - "description": "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", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule" - } - }, - "ingress": { - "description": "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 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).", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule" - } - }, - "podSelector": { - "description": "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.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "policyTypes": { - "description": "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", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.extensions.v1beta1.PodSecurityPolicy": { - "description": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "spec defines the policy enforced.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.PodSecurityPolicySpec" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "PodSecurityPolicy", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.PodSecurityPolicyList": { - "description": "Pod Security Policy List is a list of PodSecurityPolicy objects.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of schema objects.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.PodSecurityPolicy" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "PodSecurityPolicyList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.PodSecurityPolicySpec": { - "description": "Pod Security Policy Spec defines the policy enforced.", - "required": [ - "seLinux", - "runAsUser", - "supplementalGroups", - "fsGroup" - ], - "properties": { - "allowPrivilegeEscalation": { - "description": "AllowPrivilegeEscalation determines if a pod can request to allow privilege escalation.", - "type": "boolean" - }, - "allowedCapabilities": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - }, - "allowedHostPaths": { - "description": "is a white list of allowed host paths. Empty indicates that all host paths may be used.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.AllowedHostPath" - } - }, - "defaultAddCapabilities": { - "description": "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 capabiility in both DefaultAddCapabilities and RequiredDropCapabilities.", - "type": "array", - "items": { - "type": "string" - } - }, - "defaultAllowPrivilegeEscalation": { - "description": "DefaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", - "type": "boolean" - }, - "fsGroup": { - "description": "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.FSGroupStrategyOptions" - }, - "hostIPC": { - "description": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", - "type": "boolean" - }, - "hostNetwork": { - "description": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", - "type": "boolean" - }, - "hostPID": { - "description": "hostPID determines if the policy allows the use of HostPID in the pod spec.", - "type": "boolean" - }, - "hostPorts": { - "description": "hostPorts determines which host port ranges are allowed to be exposed.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.HostPortRange" - } - }, - "privileged": { - "description": "privileged determines if a pod can request to be run as privileged.", - "type": "boolean" - }, - "readOnlyRootFilesystem": { - "description": "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.", - "type": "boolean" - }, - "requiredDropCapabilities": { - "description": "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", - "type": "array", - "items": { - "type": "string" - } - }, - "runAsUser": { - "description": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.RunAsUserStrategyOptions" - }, - "seLinux": { - "description": "seLinux is the strategy that will dictate the allowable labels that may be set.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.SELinuxStrategyOptions" - }, - "supplementalGroups": { - "description": "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.SupplementalGroupsStrategyOptions" - }, - "volumes": { - "description": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.extensions.v1beta1.ReplicaSet": { - "description": "DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for more information. ReplicaSet represents the configuration of a ReplicaSet.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "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/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSetSpec" - }, - "status": { - "description": "Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSetStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "ReplicaSet", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.ReplicaSetCondition": { - "description": "ReplicaSetCondition describes the state of a replica set at a certain point.", - "required": [ - "type", - "status" - ], - "properties": { - "lastTransitionTime": { - "description": "The last time the condition transitioned from one status to another.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "A human readable message indicating details about the transition.", - "type": "string" - }, - "reason": { - "description": "The reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "Status of the condition, one of True, False, Unknown.", - "type": "string" - }, - "type": { - "description": "Type of replica set condition.", - "type": "string" - } - } - }, - "io.k8s.api.extensions.v1beta1.ReplicaSetList": { - "description": "ReplicaSetList is a collection of ReplicaSets.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSet" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "ReplicaSetList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.ReplicaSetSpec": { - "description": "ReplicaSetSpec is the specification of a ReplicaSet.", - "properties": { - "minReadySeconds": { - "description": "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)", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "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", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "Selector is a label query over pods that should match the replica count. If the 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 replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "template": { - "description": "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", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - } - } - }, - "io.k8s.api.extensions.v1beta1.ReplicaSetStatus": { - "description": "ReplicaSetStatus represents the current status of a ReplicaSet.", - "required": [ - "replicas" - ], - "properties": { - "availableReplicas": { - "description": "The number of available replicas (ready for at least minReadySeconds) for this replica set.", - "type": "integer", - "format": "int32" - }, - "conditions": { - "description": "Represents the latest available observations of a replica set's current state.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSetCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "fullyLabeledReplicas": { - "description": "The number of pods that have labels matching the labels of the pod template of the replicaset.", - "type": "integer", - "format": "int32" - }, - "observedGeneration": { - "description": "ObservedGeneration reflects the generation of the most recently observed ReplicaSet.", - "type": "integer", - "format": "int64" - }, - "readyReplicas": { - "description": "The number of ready replicas for this replica set.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.extensions.v1beta1.RollbackConfig": { - "description": "DEPRECATED.", - "properties": { - "revision": { - "description": "The revision to rollback to. If set to 0, rollback to the last revision.", - "type": "integer", - "format": "int64" - } - } - }, - "io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet": { - "description": "Spec to control the desired behavior of daemon set rolling update.", - "properties": { - "maxUnavailable": { - "description": "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. 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.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - } - } - }, - "io.k8s.api.extensions.v1beta1.RollingUpdateDeployment": { - "description": "Spec to control the desired behavior of rolling update.", - "properties": { - "maxSurge": { - "description": "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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - }, - "maxUnavailable": { - "description": "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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - } - } - }, - "io.k8s.api.extensions.v1beta1.RunAsUserStrategyOptions": { - "description": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.", - "required": [ - "rule" - ], - "properties": { - "ranges": { - "description": "Ranges are the allowed ranges of uids that may be used.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IDRange" - } - }, - "rule": { - "description": "Rule is the strategy that will dictate the allowable RunAsUser values that may be set.", - "type": "string" - } - } - }, - "io.k8s.api.extensions.v1beta1.SELinuxStrategyOptions": { - "description": "SELinux Strategy Options defines the strategy type and any options used to create the strategy.", - "required": [ - "rule" - ], - "properties": { - "rule": { - "description": "type is the strategy that will dictate the allowable labels that may be set.", - "type": "string" - }, - "seLinuxOptions": { - "description": "seLinuxOptions required to run as; required for MustRunAs More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md", - "$ref": "#/definitions/io.k8s.api.core.v1.SELinuxOptions" - } - } - }, - "io.k8s.api.extensions.v1beta1.Scale": { - "description": "represents a scaling request for a resource.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ScaleSpec" - }, - "status": { - "description": "current status of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. Read-only.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ScaleStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "extensions", - "kind": "Scale", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.extensions.v1beta1.ScaleSpec": { - "description": "describes the attributes of a scale subresource", - "properties": { - "replicas": { - "description": "desired number of instances for the scaled object.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.api.extensions.v1beta1.ScaleStatus": { - "description": "represents the current status of a scale subresource.", - "required": [ - "replicas" - ], - "properties": { - "replicas": { - "description": "actual number of observed instances of the scaled object.", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "targetSelector": { - "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "type": "string" - } - } - }, - "io.k8s.api.extensions.v1beta1.SupplementalGroupsStrategyOptions": { - "description": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", - "properties": { - "ranges": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IDRange" - } - }, - "rule": { - "description": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.", - "type": "string" - } - } - }, - "io.k8s.api.networking.v1.IPBlock": { - "description": "IPBlock describes a particular CIDR (Ex. \"192.168.1.1/24\") 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.", - "required": [ - "cidr" - ], - "properties": { - "cidr": { - "description": "CIDR is a string representing the IP Block Valid examples are \"192.168.1.1/24\"", - "type": "string" - }, - "except": { - "description": "Except is a slice of CIDRs that should not be included within an IP Block Valid examples are \"192.168.1.1/24\" Except values will be rejected if they are outside the CIDR range", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.networking.v1.NetworkPolicy": { - "description": "NetworkPolicy describes what network traffic is allowed for a set of Pods", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior for this NetworkPolicy.", - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicySpec" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "networking.k8s.io", - "kind": "NetworkPolicy", - "version": "v1" - } - ] - }, - "io.k8s.api.networking.v1.NetworkPolicyEgressRule": { - "description": "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", - "properties": { - "ports": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPort" - } - }, - "to": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPeer" - } - } - } - }, - "io.k8s.api.networking.v1.NetworkPolicyIngressRule": { - "description": "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.", - "properties": { - "from": { - "description": "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 on item, this rule allows traffic only if the traffic matches at least one item in the from list.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPeer" - } - }, - "ports": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPort" - } - } - } - }, - "io.k8s.api.networking.v1.NetworkPolicyList": { - "description": "NetworkPolicyList is a list of NetworkPolicy objects.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of schema objects.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "networking.k8s.io", - "kind": "NetworkPolicyList", - "version": "v1" - } - ] - }, - "io.k8s.api.networking.v1.NetworkPolicyPeer": { - "description": "NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields must be specified.", - "properties": { - "ipBlock": { - "description": "IPBlock defines policy on a particular IPBlock", - "$ref": "#/definitions/io.k8s.api.networking.v1.IPBlock" - }, - "namespaceSelector": { - "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "podSelector": { - "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - } - } - }, - "io.k8s.api.networking.v1.NetworkPolicyPort": { - "description": "NetworkPolicyPort describes a port to allow traffic on", - "properties": { - "port": { - "description": "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.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - }, - "protocol": { - "description": "The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP.", - "type": "string" - } - } - }, - "io.k8s.api.networking.v1.NetworkPolicySpec": { - "description": "NetworkPolicySpec provides the specification of a NetworkPolicy", - "required": [ - "podSelector" - ], - "properties": { - "egress": { - "description": "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", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyEgressRule" - } - }, - "ingress": { - "description": "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)", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyIngressRule" - } - }, - "podSelector": { - "description": "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.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "policyTypes": { - "description": "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", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.policy.v1beta1.Eviction": { - "description": "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/\u003cpod name\u003e/evictions.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "deleteOptions": { - "description": "DeleteOptions may be provided", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "ObjectMeta describes the pod that is being evicted.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "policy", - "kind": "Eviction", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.policy.v1beta1.PodDisruptionBudget": { - "description": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of the PodDisruptionBudget.", - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec" - }, - "status": { - "description": "Most recently observed status of the PodDisruptionBudget.", - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "policy", - "kind": "PodDisruptionBudget", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.policy.v1beta1.PodDisruptionBudgetList": { - "description": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "policy", - "kind": "PodDisruptionBudgetList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec": { - "description": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", - "properties": { - "maxUnavailable": { - "description": "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\".", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - }, - "minAvailable": { - "description": "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%\".", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - }, - "selector": { - "description": "Label query over pods whose evictions are managed by the disruption budget.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - } - } - }, - "io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus": { - "description": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", - "required": [ - "disruptedPods", - "disruptionsAllowed", - "currentHealthy", - "desiredHealthy", - "expectedPods" - ], - "properties": { - "currentHealthy": { - "description": "current number of healthy pods", - "type": "integer", - "format": "int32" - }, - "desiredHealthy": { - "description": "minimum desired number of healthy pods", - "type": "integer", - "format": "int32" - }, - "disruptedPods": { - "description": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - } - }, - "disruptionsAllowed": { - "description": "Number of pod disruptions that are currently allowed.", - "type": "integer", - "format": "int32" - }, - "expectedPods": { - "description": "total number of pods counted by this disruption budget", - "type": "integer", - "format": "int32" - }, - "observedGeneration": { - "description": "Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status informatio is valid only if observedGeneration equals to PDB's object generation.", - "type": "integer", - "format": "int64" - } - } - }, - "io.k8s.api.rbac.v1.ClusterRole": { - "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", - "required": [ - "rules" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "rules": { - "description": "Rules holds all the PolicyRules for this ClusterRole", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.PolicyRule" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1" - } - ] - }, - "io.k8s.api.rbac.v1.ClusterRoleBinding": { - "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", - "required": [ - "subjects", - "roleRef" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "roleRef": { - "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleRef" - }, - "subjects": { - "description": "Subjects holds references to the objects the role applies to.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Subject" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1" - } - ] - }, - "io.k8s.api.rbac.v1.ClusterRoleBindingList": { - "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of ClusterRoleBindings", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRoleBinding" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBindingList", - "version": "v1" - } - ] - }, - "io.k8s.api.rbac.v1.ClusterRoleList": { - "description": "ClusterRoleList is a collection of ClusterRoles", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of ClusterRoles", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.ClusterRole" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleList", - "version": "v1" - } - ] - }, - "io.k8s.api.rbac.v1.PolicyRule": { - "description": "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.", - "required": [ - "verbs" - ], - "properties": { - "apiGroups": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - }, - "nonResourceURLs": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - }, - "resourceNames": { - "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", - "type": "array", - "items": { - "type": "string" - } - }, - "verbs": { - "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.rbac.v1.Role": { - "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", - "required": [ - "rules" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "rules": { - "description": "Rules holds all the PolicyRules for this Role", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.PolicyRule" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1" - } - ] - }, - "io.k8s.api.rbac.v1.RoleBinding": { - "description": "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.", - "required": [ - "subjects", - "roleRef" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "roleRef": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleRef" - }, - "subjects": { - "description": "Subjects holds references to the objects the role applies to.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Subject" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1" - } - ] - }, - "io.k8s.api.rbac.v1.RoleBindingList": { - "description": "RoleBindingList is a collection of RoleBindings", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of RoleBindings", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.RoleBinding" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBindingList", - "version": "v1" - } - ] - }, - "io.k8s.api.rbac.v1.RoleList": { - "description": "RoleList is a collection of Roles", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of Roles", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1.Role" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "RoleList", - "version": "v1" - } - ] - }, - "io.k8s.api.rbac.v1.RoleRef": { - "description": "RoleRef contains information that points to the role being used", - "required": [ - "apiGroup", - "kind", - "name" - ], - "properties": { - "apiGroup": { - "description": "APIGroup is the group for the resource being referenced", - "type": "string" - }, - "kind": { - "description": "Kind is the type of resource being referenced", - "type": "string" - }, - "name": { - "description": "Name is the name of resource being referenced", - "type": "string" - } - } - }, - "io.k8s.api.rbac.v1.Subject": { - "description": "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.", - "required": [ - "kind", - "name" - ], - "properties": { - "apiGroup": { - "description": "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.", - "type": "string" - }, - "kind": { - "description": "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.", - "type": "string" - }, - "name": { - "description": "Name of the object being referenced.", - "type": "string" - }, - "namespace": { - "description": "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.", - "type": "string" - } - } - }, - "io.k8s.api.rbac.v1alpha1.ClusterRole": { - "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", - "required": [ - "rules" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "rules": { - "description": "Rules holds all the PolicyRules for this ClusterRole", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.PolicyRule" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.rbac.v1alpha1.ClusterRoleBinding": { - "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", - "required": [ - "subjects", - "roleRef" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "roleRef": { - "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleRef" - }, - "subjects": { - "description": "Subjects holds references to the objects the role applies to.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.Subject" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.rbac.v1alpha1.ClusterRoleBindingList": { - "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of ClusterRoleBindings", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRoleBinding" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBindingList", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.rbac.v1alpha1.ClusterRoleList": { - "description": "ClusterRoleList is a collection of ClusterRoles", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of ClusterRoles", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRole" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleList", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.rbac.v1alpha1.PolicyRule": { - "description": "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.", - "required": [ - "verbs" - ], - "properties": { - "apiGroups": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - }, - "nonResourceURLs": { - "description": "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 This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. 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.", - "type": "array", - "items": { - "type": "string" - } - }, - "resourceNames": { - "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", - "type": "array", - "items": { - "type": "string" - } - }, - "verbs": { - "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.rbac.v1alpha1.Role": { - "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", - "required": [ - "rules" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "rules": { - "description": "Rules holds all the PolicyRules for this Role", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.PolicyRule" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.rbac.v1alpha1.RoleBinding": { - "description": "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.", - "required": [ - "subjects", - "roleRef" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "roleRef": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleRef" - }, - "subjects": { - "description": "Subjects holds references to the objects the role applies to.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.Subject" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.rbac.v1alpha1.RoleBindingList": { - "description": "RoleBindingList is a collection of RoleBindings", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of RoleBindings", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleBinding" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBindingList", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.rbac.v1alpha1.RoleList": { - "description": "RoleList is a collection of Roles", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of Roles", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.Role" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "RoleList", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.rbac.v1alpha1.RoleRef": { - "description": "RoleRef contains information that points to the role being used", - "required": [ - "apiGroup", - "kind", - "name" - ], - "properties": { - "apiGroup": { - "description": "APIGroup is the group for the resource being referenced", - "type": "string" - }, - "kind": { - "description": "Kind is the type of resource being referenced", - "type": "string" - }, - "name": { - "description": "Name is the name of resource being referenced", - "type": "string" - } - } - }, - "io.k8s.api.rbac.v1alpha1.Subject": { - "description": "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.", - "required": [ - "kind", - "name" - ], - "properties": { - "apiVersion": { - "description": "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.", - "type": "string" - }, - "kind": { - "description": "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.", - "type": "string" - }, - "name": { - "description": "Name of the object being referenced.", - "type": "string" - }, - "namespace": { - "description": "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.", - "type": "string" - } - } - }, - "io.k8s.api.rbac.v1beta1.ClusterRole": { - "description": "ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.", - "required": [ - "rules" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "rules": { - "description": "Rules holds all the PolicyRules for this ClusterRole", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.PolicyRule" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRole", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.rbac.v1beta1.ClusterRoleBinding": { - "description": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.", - "required": [ - "subjects", - "roleRef" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "roleRef": { - "description": "RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleRef" - }, - "subjects": { - "description": "Subjects holds references to the objects the role applies to.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Subject" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBinding", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.rbac.v1beta1.ClusterRoleBindingList": { - "description": "ClusterRoleBindingList is a collection of ClusterRoleBindings", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of ClusterRoleBindings", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleBinding" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleBindingList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.rbac.v1beta1.ClusterRoleList": { - "description": "ClusterRoleList is a collection of ClusterRoles", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of ClusterRoles", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRole" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "ClusterRoleList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.rbac.v1beta1.PolicyRule": { - "description": "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.", - "required": [ - "verbs" - ], - "properties": { - "apiGroups": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - }, - "nonResourceURLs": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - }, - "resourceNames": { - "description": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "type": "array", - "items": { - "type": "string" - } - }, - "resources": { - "description": "Resources is a list of resources this rule applies to. ResourceAll represents all resources.", - "type": "array", - "items": { - "type": "string" - } - }, - "verbs": { - "description": "Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.api.rbac.v1beta1.Role": { - "description": "Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.", - "required": [ - "rules" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "rules": { - "description": "Rules holds all the PolicyRules for this Role", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.PolicyRule" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "Role", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.rbac.v1beta1.RoleBinding": { - "description": "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.", - "required": [ - "subjects", - "roleRef" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "roleRef": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleRef" - }, - "subjects": { - "description": "Subjects holds references to the objects the role applies to.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Subject" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBinding", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.rbac.v1beta1.RoleBindingList": { - "description": "RoleBindingList is a collection of RoleBindings", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of RoleBindings", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleBinding" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "RoleBindingList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.rbac.v1beta1.RoleList": { - "description": "RoleList is a collection of Roles", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of Roles", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Role" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "rbac.authorization.k8s.io", - "kind": "RoleList", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.rbac.v1beta1.RoleRef": { - "description": "RoleRef contains information that points to the role being used", - "required": [ - "apiGroup", - "kind", - "name" - ], - "properties": { - "apiGroup": { - "description": "APIGroup is the group for the resource being referenced", - "type": "string" - }, - "kind": { - "description": "Kind is the type of resource being referenced", - "type": "string" - }, - "name": { - "description": "Name is the name of resource being referenced", - "type": "string" - } - } - }, - "io.k8s.api.rbac.v1beta1.Subject": { - "description": "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.", - "required": [ - "kind", - "name" - ], - "properties": { - "apiGroup": { - "description": "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.", - "type": "string" - }, - "kind": { - "description": "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.", - "type": "string" - }, - "name": { - "description": "Name of the object being referenced.", - "type": "string" - }, - "namespace": { - "description": "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.", - "type": "string" - } - } - }, - "io.k8s.api.scheduling.v1alpha1.PriorityClass": { - "description": "PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.", - "required": [ - "value" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "description": { - "description": "description is an arbitrary string that usually provides guidelines on when this priority class should be used.", - "type": "string" - }, - "globalDefault": { - "description": "globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class.", - "type": "boolean" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "value": { - "description": "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.", - "type": "integer", - "format": "int32" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "scheduling.k8s.io", - "kind": "PriorityClass", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.scheduling.v1alpha1.PriorityClassList": { - "description": "PriorityClassList is a collection of priority classes.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "items is the list of PriorityClasses", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.scheduling.v1alpha1.PriorityClass" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "scheduling.k8s.io", - "kind": "PriorityClassList", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.settings.v1alpha1.PodPreset": { - "description": "PodPreset is a policy resource that defines additional runtime requirements for a Pod.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPresetSpec" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "settings.k8s.io", - "kind": "PodPreset", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.settings.v1alpha1.PodPresetList": { - "description": "PodPresetList is a list of PodPreset objects.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is a list of schema objects.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPreset" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "settings.k8s.io", - "kind": "PodPresetList", - "version": "v1alpha1" - } - ] - }, - "io.k8s.api.settings.v1alpha1.PodPresetSpec": { - "description": "PodPresetSpec is a description of a pod preset.", - "properties": { - "env": { - "description": "Env defines the collection of EnvVar to inject into containers.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.EnvVar" - } - }, - "envFrom": { - "description": "EnvFrom defines the collection of EnvFromSource to inject into containers.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.EnvFromSource" - } - }, - "selector": { - "description": "Selector is a label query over a set of resources, in this case pods. Required.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "volumeMounts": { - "description": "VolumeMounts defines the collection of VolumeMount to inject into containers.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.VolumeMount" - } - }, - "volumes": { - "description": "Volumes defines the collection of Volume to inject into the pod.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Volume" - } - } - } - }, - "io.k8s.api.storage.v1.StorageClass": { - "description": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", - "required": [ - "provisioner" - ], - "properties": { - "allowVolumeExpansion": { - "description": "AllowVolumeExpansion shows whether the storage class allow volume expand", - "type": "boolean" - }, - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "mountOptions": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - }, - "parameters": { - "description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "provisioner": { - "description": "Provisioner indicates the type of the provisioner.", - "type": "string" - }, - "reclaimPolicy": { - "description": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", - "type": "string" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1" - } - ] - }, - "io.k8s.api.storage.v1.StorageClassList": { - "description": "StorageClassList is a collection of storage classes.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of StorageClasses", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.storage.v1.StorageClass" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "storage.k8s.io", - "kind": "StorageClassList", - "version": "v1" - } - ] - }, - "io.k8s.api.storage.v1beta1.StorageClass": { - "description": "StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.\n\nStorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.", - "required": [ - "provisioner" - ], - "properties": { - "allowVolumeExpansion": { - "description": "AllowVolumeExpansion shows whether the storage class allow volume expand", - "type": "boolean" - }, - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "mountOptions": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - } - }, - "parameters": { - "description": "Parameters holds the parameters for the provisioner that should create volumes of this storage class.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "provisioner": { - "description": "Provisioner indicates the type of the provisioner.", - "type": "string" - }, - "reclaimPolicy": { - "description": "Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete.", - "type": "string" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "storage.k8s.io", - "kind": "StorageClass", - "version": "v1beta1" - } - ] - }, - "io.k8s.api.storage.v1beta1.StorageClassList": { - "description": "StorageClassList is a collection of storage classes.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items is the list of StorageClasses", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.storage.v1beta1.StorageClass" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "storage.k8s.io", - "kind": "StorageClassList", - "version": "v1beta1" - } - ] - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition": { - "description": "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format \u003c.spec.name\u003e.\u003c.spec.group\u003e.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec describes how the user wants the resources to appear", - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec" - }, - "status": { - "description": "Status indicates the actual state of the CustomResourceDefinition", - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus" - } - } - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionCondition": { - "description": "CustomResourceDefinitionCondition contains details for the current condition of this pod.", - "required": [ - "type", - "status" - ], - "properties": { - "lastTransitionTime": { - "description": "Last time the condition transitioned from one status to another.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "Human-readable message indicating details about last transition.", - "type": "string" - }, - "reason": { - "description": "Unique, one-word, CamelCase reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "Status is the status of the condition. Can be True, False, Unknown.", - "type": "string" - }, - "type": { - "description": "Type is the type of the condition.", - "type": "string" - } - } - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionList": { - "description": "CustomResourceDefinitionList is a list of CustomResourceDefinition objects.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "description": "Items individual CustomResourceDefinitions", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - } - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames": { - "description": "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition", - "required": [ - "plural", - "kind" - ], - "properties": { - "kind": { - "description": "Kind is the serialized kind of the resource. It is normally CamelCase and singular.", - "type": "string" - }, - "listKind": { - "description": "ListKind is the serialized kind of the list for this resource. Defaults to \u003ckind\u003eList.", - "type": "string" - }, - "plural": { - "description": "Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase.", - "type": "string" - }, - "shortNames": { - "description": "ShortNames are short names for the resource. It must be all lowercase.", - "type": "array", - "items": { - "type": "string" - } - }, - "singular": { - "description": "Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased \u003ckind\u003e", - "type": "string" - } - } - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec": { - "description": "CustomResourceDefinitionSpec describes how a user wants their resource to appear", - "required": [ - "group", - "version", - "names", - "scope" - ], - "properties": { - "group": { - "description": "Group is the group this resource belongs in", - "type": "string" - }, - "names": { - "description": "Names are the names used to describe this custom resource", - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames" - }, - "scope": { - "description": "Scope indicates whether this resource is cluster or namespace scoped. Default is namespaced", - "type": "string" - }, - "validation": { - "description": "Validation describes the validation methods for CustomResources This field is alpha-level and should only be sent to servers that enable the CustomResourceValidation feature.", - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation" - }, - "version": { - "description": "Version is the version this resource belongs in", - "type": "string" - } - } - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus": { - "description": "CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition", - "required": [ - "conditions", - "acceptedNames" - ], - "properties": { - "acceptedNames": { - "description": "AcceptedNames are the names that are actually being used to serve discovery They may be different than the names in spec.", - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames" - }, - "conditions": { - "description": "Conditions indicate state for particular aspects of a CustomResourceDefinition", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionCondition" - } - } - } - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation": { - "description": "CustomResourceValidation is a list of validation methods for CustomResources.", - "properties": { - "openAPIV3Schema": { - "description": "OpenAPIV3Schema is the OpenAPI v3 schema to be validated against.", - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" - } - } - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation": { - "description": "ExternalDocumentation allows referencing an external resource for extended documentation.", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string" - } - } - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON": { - "description": "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.", - "required": [ - "Raw" - ], - "properties": { - "Raw": { - "type": "string", - "format": "byte" - } - } - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps": { - "description": "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).", - "properties": { - "$ref": { - "type": "string" - }, - "$schema": { - "type": "string" - }, - "additionalItems": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool" - }, - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool" - }, - "allOf": { - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" - } - }, - "anyOf": { - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" - } - }, - "default": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON" - }, - "definitions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" - } - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrStringArray" - } - }, - "description": { - "type": "string" - }, - "enum": { - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON" - } - }, - "example": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON" - }, - "exclusiveMaximum": { - "type": "boolean" - }, - "exclusiveMinimum": { - "type": "boolean" - }, - "externalDocs": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation" - }, - "format": { - "type": "string" - }, - "id": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray" - }, - "maxItems": { - "type": "integer", - "format": "int64" - }, - "maxLength": { - "type": "integer", - "format": "int64" - }, - "maxProperties": { - "type": "integer", - "format": "int64" - }, - "maximum": { - "type": "number", - "format": "double" - }, - "minItems": { - "type": "integer", - "format": "int64" - }, - "minLength": { - "type": "integer", - "format": "int64" - }, - "minProperties": { - "type": "integer", - "format": "int64" - }, - "minimum": { - "type": "number", - "format": "double" - }, - "multipleOf": { - "type": "number", - "format": "double" - }, - "not": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" - }, - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" - } - }, - "pattern": { - "type": "string" - }, - "patternProperties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" - } - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" - } - }, - "required": { - "type": "array", - "items": { - "type": "string" - } - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - }, - "uniqueItems": { - "type": "boolean" - } - } - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray": { - "description": "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes.", - "required": [ - "Schema", - "JSONSchemas" - ], - "properties": { - "JSONSchemas": { - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" - } - }, - "Schema": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" - } - } - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool": { - "description": "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property.", - "required": [ - "Allows", - "Schema" - ], - "properties": { - "Allows": { - "type": "boolean" - }, - "Schema": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" - } - } - }, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrStringArray": { - "description": "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", - "required": [ - "Schema", - "Property" - ], - "properties": { - "Property": { - "type": "array", - "items": { - "type": "string" - } - }, - "Schema": { - "$ref": "#/definitions/io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" - } - } - }, - "io.k8s.apimachinery.pkg.api.resource.Quantity": { - "type": "string" - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup": { - "description": "APIGroup contains the name, the supported versions, and the preferred version of a group.", - "required": [ - "name", - "versions", - "serverAddressByClientCIDRs" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "name": { - "description": "name is the name of the group.", - "type": "string" - }, - "preferredVersion": { - "description": "preferredVersion is the version preferred by the API server, which probably is the storage version.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery" - }, - "serverAddressByClientCIDRs": { - "description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR" - } - }, - "versions": { - "description": "versions are the versions supported in this group.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "APIGroup", - "version": "v1" - } - ] - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroupList": { - "description": "APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.", - "required": [ - "groups" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "groups": { - "description": "groups is a list of APIGroup.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "APIGroupList", - "version": "v1" - } - ] - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource": { - "description": "APIResource specifies the name of a resource and whether it is namespaced.", - "required": [ - "name", - "singularName", - "namespaced", - "kind", - "verbs" - ], - "properties": { - "categories": { - "description": "categories is a list of the grouped resources this resource belongs to (e.g. 'all')", - "type": "array", - "items": { - "type": "string" - } - }, - "group": { - "description": "group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale\".", - "type": "string" - }, - "kind": { - "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", - "type": "string" - }, - "name": { - "description": "name is the plural name of the resource.", - "type": "string" - }, - "namespaced": { - "description": "namespaced indicates if a resource is namespaced or not.", - "type": "boolean" - }, - "shortNames": { - "description": "shortNames is a list of suggested short names of the resource.", - "type": "array", - "items": { - "type": "string" - } - }, - "singularName": { - "description": "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", - "type": "string" - }, - "verbs": { - "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)", - "type": "array", - "items": { - "type": "string" - } - }, - "version": { - "description": "version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)\".", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList": { - "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", - "required": [ - "groupVersion", - "resources" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "groupVersion": { - "description": "groupVersion is the group and version this APIResourceList is for.", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "resources": { - "description": "resources contains the name of the resources and if they are namespaced.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.APIResource" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "APIResourceList", - "version": "v1" - } - ] - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.APIVersions": { - "description": "APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.", - "required": [ - "versions", - "serverAddressByClientCIDRs" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "serverAddressByClientCIDRs": { - "description": "a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR" - } - }, - "versions": { - "description": "versions are the api versions that are available.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "APIVersions", - "version": "v1" - } - ] - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions": { - "description": "DeleteOptions may be provided when deleting an API object.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "gracePeriodSeconds": { - "description": "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.", - "type": "integer", - "format": "int64" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "orphanDependents": { - "description": "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.", - "type": "boolean" - }, - "preconditions": { - "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions" - }, - "propagationPolicy": { - "description": "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.", - "type": "string" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "DeleteOptions", - "version": "v1" - }, - { - "group": "admission.k8s.io", - "kind": "DeleteOptions", - "version": "v1alpha1" - }, - { - "group": "admissionregistration.k8s.io", - "kind": "DeleteOptions", - "version": "v1alpha1" - }, - { - "group": "apps", - "kind": "DeleteOptions", - "version": "v1beta1" - }, - { - "group": "apps", - "kind": "DeleteOptions", - "version": "v1beta2" - }, - { - "group": "authentication.k8s.io", - "kind": "DeleteOptions", - "version": "v1" - }, - { - "group": "authentication.k8s.io", - "kind": "DeleteOptions", - "version": "v1beta1" - }, - { - "group": "authorization.k8s.io", - "kind": "DeleteOptions", - "version": "v1" - }, - { - "group": "authorization.k8s.io", - "kind": "DeleteOptions", - "version": "v1beta1" - }, - { - "group": "autoscaling", - "kind": "DeleteOptions", - "version": "v1" - }, - { - "group": "autoscaling", - "kind": "DeleteOptions", - "version": "v2beta1" - }, - { - "group": "batch", - "kind": "DeleteOptions", - "version": "v1" - }, - { - "group": "batch", - "kind": "DeleteOptions", - "version": "v1beta1" - }, - { - "group": "batch", - "kind": "DeleteOptions", - "version": "v2alpha1" - }, - { - "group": "certificates.k8s.io", - "kind": "DeleteOptions", - "version": "v1beta1" - }, - { - "group": "extensions", - "kind": "DeleteOptions", - "version": "v1beta1" - }, - { - "group": "federation", - "kind": "DeleteOptions", - "version": "v1beta1" - }, - { - "group": "imagepolicy.k8s.io", - "kind": "DeleteOptions", - "version": "v1alpha1" - }, - { - "group": "networking.k8s.io", - "kind": "DeleteOptions", - "version": "v1" - }, - { - "group": "policy", - "kind": "DeleteOptions", - "version": "v1beta1" - }, - { - "group": "rbac.authorization.k8s.io", - "kind": "DeleteOptions", - "version": "v1" - }, - { - "group": "rbac.authorization.k8s.io", - "kind": "DeleteOptions", - "version": "v1alpha1" - }, - { - "group": "rbac.authorization.k8s.io", - "kind": "DeleteOptions", - "version": "v1beta1" - }, - { - "group": "scheduling.k8s.io", - "kind": "DeleteOptions", - "version": "v1alpha1" - }, - { - "group": "settings.k8s.io", - "kind": "DeleteOptions", - "version": "v1alpha1" - }, - { - "group": "storage.k8s.io", - "kind": "DeleteOptions", - "version": "v1" - }, - { - "group": "storage.k8s.io", - "kind": "DeleteOptions", - "version": "v1beta1" - } - ] - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery": { - "description": "GroupVersion contains the \"group/version\" and \"version\" string of a version. It is made a struct to keep extensibility.", - "required": [ - "groupVersion", - "version" - ], - "properties": { - "groupVersion": { - "description": "groupVersion specifies the API group and version in the form \"group/version\"", - "type": "string" - }, - "version": { - "description": "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Initializer": { - "description": "Initializer is information about an initializer that has not yet completed.", - "required": [ - "name" - ], - "properties": { - "name": { - "description": "name of the process that is responsible for initializing this object.", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Initializers": { - "description": "Initializers tracks the progress of initialization.", - "required": [ - "pending" - ], - "properties": { - "pending": { - "description": "Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Initializer" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "result": { - "description": "If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector": { - "description": "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.", - "properties": { - "matchExpressions": { - "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement" - } - }, - "matchLabels": { - "description": "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.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement": { - "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", - "required": [ - "key", - "operator" - ], - "properties": { - "key": { - "description": "key is the label key that the selector applies to.", - "type": "string", - "x-kubernetes-patch-merge-key": "key", - "x-kubernetes-patch-strategy": "merge" - }, - "operator": { - "description": "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", - "type": "string" - }, - "values": { - "description": "values is an array of string values. If the operator is In or NotIn, 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.", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta": { - "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", - "properties": { - "continue": { - "description": "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 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.", - "type": "string" - }, - "resourceVersion": { - "description": "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/api-conventions.md#concurrency-control-and-consistency", - "type": "string" - }, - "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta": { - "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", - "properties": { - "annotations": { - "description": "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", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "clusterName": { - "description": "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.", - "type": "string" - }, - "creationTimestamp": { - "description": "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.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "deletionGracePeriodSeconds": { - "description": "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.", - "type": "integer", - "format": "int64" - }, - "deletionTimestamp": { - "description": "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 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.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "finalizers": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - }, - "x-kubernetes-patch-strategy": "merge" - }, - "generateName": { - "description": "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.\n\nIf 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).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency", - "type": "string" - }, - "generation": { - "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", - "type": "integer", - "format": "int64" - }, - "initializers": { - "description": "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Initializers" - }, - "labels": { - "description": "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", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "name": { - "description": "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", - "type": "string" - }, - "namespace": { - "description": "Namespace defines the space within 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.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", - "type": "string" - }, - "ownerReferences": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" - }, - "x-kubernetes-patch-merge-key": "uid", - "x-kubernetes-patch-strategy": "merge" - }, - "resourceVersion": { - "description": "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.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", - "type": "string" - }, - "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.", - "type": "string" - }, - "uid": { - "description": "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.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference": { - "description": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", - "required": [ - "apiVersion", - "kind", - "name", - "uid" - ], - "properties": { - "apiVersion": { - "description": "API version of the referent.", - "type": "string" - }, - "blockOwnerDeletion": { - "description": "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.", - "type": "boolean" - }, - "controller": { - "description": "If true, this reference points to the managing controller.", - "type": "boolean" - }, - "kind": { - "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "type": "string" - }, - "name": { - "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", - "type": "string" - }, - "uid": { - "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Patch": { - "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body." - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions": { - "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", - "properties": { - "uid": { - "description": "Specifies the target UID.", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR": { - "description": "ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.", - "required": [ - "clientCIDR", - "serverAddress" - ], - "properties": { - "clientCIDR": { - "description": "The CIDR with which clients can match their IP to figure out the server address that they should use.", - "type": "string" - }, - "serverAddress": { - "description": "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Status": { - "description": "Status is a return value for calls that don't return other objects.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "code": { - "description": "Suggested HTTP return code for this status, 0 if not set.", - "type": "integer", - "format": "int32" - }, - "details": { - "description": "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.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "message": { - "description": "A human-readable description of the status of this operation.", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - }, - "reason": { - "description": "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.", - "type": "string" - }, - "status": { - "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "type": "string" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "Status", - "version": "v1" - } - ] - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause": { - "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", - "properties": { - "field": { - "description": "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.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", - "type": "string" - }, - "message": { - "description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", - "type": "string" - }, - "reason": { - "description": "A machine-readable description of the cause of the error. If this value is empty there is no information available.", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails": { - "description": "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.", - "properties": { - "causes": { - "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause" - } - }, - "group": { - "description": "The group attribute of the resource associated with the status StatusReason.", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "name": { - "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", - "type": "string" - }, - "retryAfterSeconds": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "uid": { - "description": "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Time": { - "type": "string", - "format": "date-time" - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent": { - "description": "Event represents a single event to a watched resource.", - "required": [ - "type", - "object" - ], - "properties": { - "object": { - "description": "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.runtime.RawExtension" - }, - "type": { - "type": "string" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "WatchEvent", - "version": "v1" - }, - { - "group": "admission.k8s.io", - "kind": "WatchEvent", - "version": "v1alpha1" - }, - { - "group": "admissionregistration.k8s.io", - "kind": "WatchEvent", - "version": "v1alpha1" - }, - { - "group": "apps", - "kind": "WatchEvent", - "version": "v1beta1" - }, - { - "group": "apps", - "kind": "WatchEvent", - "version": "v1beta2" - }, - { - "group": "authentication.k8s.io", - "kind": "WatchEvent", - "version": "v1" - }, - { - "group": "authentication.k8s.io", - "kind": "WatchEvent", - "version": "v1beta1" - }, - { - "group": "authorization.k8s.io", - "kind": "WatchEvent", - "version": "v1" - }, - { - "group": "authorization.k8s.io", - "kind": "WatchEvent", - "version": "v1beta1" - }, - { - "group": "autoscaling", - "kind": "WatchEvent", - "version": "v1" - }, - { - "group": "autoscaling", - "kind": "WatchEvent", - "version": "v2beta1" - }, - { - "group": "batch", - "kind": "WatchEvent", - "version": "v1" - }, - { - "group": "batch", - "kind": "WatchEvent", - "version": "v1beta1" - }, - { - "group": "batch", - "kind": "WatchEvent", - "version": "v2alpha1" - }, - { - "group": "certificates.k8s.io", - "kind": "WatchEvent", - "version": "v1beta1" - }, - { - "group": "extensions", - "kind": "WatchEvent", - "version": "v1beta1" - }, - { - "group": "federation", - "kind": "WatchEvent", - "version": "v1beta1" - }, - { - "group": "imagepolicy.k8s.io", - "kind": "WatchEvent", - "version": "v1alpha1" - }, - { - "group": "networking.k8s.io", - "kind": "WatchEvent", - "version": "v1" - }, - { - "group": "policy", - "kind": "WatchEvent", - "version": "v1beta1" - }, - { - "group": "rbac.authorization.k8s.io", - "kind": "WatchEvent", - "version": "v1" - }, - { - "group": "rbac.authorization.k8s.io", - "kind": "WatchEvent", - "version": "v1alpha1" - }, - { - "group": "rbac.authorization.k8s.io", - "kind": "WatchEvent", - "version": "v1beta1" - }, - { - "group": "scheduling.k8s.io", - "kind": "WatchEvent", - "version": "v1alpha1" - }, - { - "group": "settings.k8s.io", - "kind": "WatchEvent", - "version": "v1alpha1" - }, - { - "group": "storage.k8s.io", - "kind": "WatchEvent", - "version": "v1" - }, - { - "group": "storage.k8s.io", - "kind": "WatchEvent", - "version": "v1beta1" - } - ] - }, - "io.k8s.apimachinery.pkg.runtime.RawExtension": { - "description": "RawExtension is used to hold extensions in external versions.\n\nTo use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.\n\n// Internal package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.Object `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// External package: type MyAPIObject struct {\n\truntime.TypeMeta `json:\",inline\"`\n\tMyPlugin runtime.RawExtension `json:\"myPlugin\"`\n} type PluginA struct {\n\tAOption string `json:\"aOption\"`\n}\n\n// On the wire, the JSON will look something like this: {\n\t\"kind\":\"MyAPIObject\",\n\t\"apiVersion\":\"v1\",\n\t\"myPlugin\": {\n\t\t\"kind\":\"PluginA\",\n\t\t\"aOption\":\"foo\",\n\t},\n}\n\nSo what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)", - "required": [ - "Raw" - ], - "properties": { - "Raw": { - "description": "Raw is the underlying serialization of this object.", - "type": "string", - "format": "byte" - } - } - }, - "io.k8s.apimachinery.pkg.util.intstr.IntOrString": { - "type": "string", - "format": "int-or-string" - }, - "io.k8s.apimachinery.pkg.version.Info": { - "description": "Info contains versioning information. how we'll want to distribute that information.", - "required": [ - "major", - "minor", - "gitVersion", - "gitCommit", - "gitTreeState", - "buildDate", - "goVersion", - "compiler", - "platform" - ], - "properties": { - "buildDate": { - "type": "string" - }, - "compiler": { - "type": "string" - }, - "gitCommit": { - "type": "string" - }, - "gitTreeState": { - "type": "string" - }, - "gitVersion": { - "type": "string" - }, - "goVersion": { - "type": "string" - }, - "major": { - "type": "string" - }, - "minor": { - "type": "string" - }, - "platform": { - "type": "string" - } - } - }, - "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService": { - "description": "APIService represents a server for a particular GroupVersion. Name must be \"version.group\".", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Spec contains information for locating and communicating with a server", - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceSpec" - }, - "status": { - "description": "Status contains derived information about an API server", - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceStatus" - } - } - }, - "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition": { - "required": [ - "type", - "status" - ], - "properties": { - "lastTransitionTime": { - "description": "Last time the condition transitioned from one status to another.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "message": { - "description": "Human-readable message indicating details about last transition.", - "type": "string" - }, - "reason": { - "description": "Unique, one-word, CamelCase reason for the condition's last transition.", - "type": "string" - }, - "status": { - "description": "Status is the status of the condition. Can be True, False, Unknown.", - "type": "string" - }, - "type": { - "description": "Type is the type of the condition.", - "type": "string" - } - } - }, - "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceList": { - "description": "APIServiceList is a list of APIService objects.", - "required": [ - "items" - ], - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService" - } - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - } - }, - "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceSpec": { - "description": "APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.", - "required": [ - "service", - "caBundle", - "groupPriorityMinimum", - "versionPriority" - ], - "properties": { - "caBundle": { - "description": "CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate.", - "type": "string", - "format": "byte" - }, - "group": { - "description": "Group is the API group name this server hosts", - "type": "string" - }, - "groupPriorityMinimum": { - "description": "GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is prefered 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", - "type": "integer", - "format": "int32" - }, - "insecureSkipTLSVerify": { - "description": "InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead.", - "type": "boolean" - }, - "service": { - "description": "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.", - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.ServiceReference" - }, - "version": { - "description": "Version is the API version this server hosts. For example, \"v1\"", - "type": "string" - }, - "versionPriority": { - "description": "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). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) Since it's inside of a group, the number can be small, probably in the 10s.", - "type": "integer", - "format": "int32" - } - } - }, - "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceStatus": { - "description": "APIServiceStatus contains derived information about an API server", - "properties": { - "conditions": { - "description": "Current service state of apiService.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - } - } - }, - "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.ServiceReference": { - "description": "ServiceReference holds a reference to Service.legacy.k8s.io", - "properties": { - "name": { - "description": "Name is the name of the service", - "type": "string" - }, - "namespace": { - "description": "Namespace is the namespace of the service", - "type": "string" - } - } - }, - "io.k8s.kubernetes.pkg.api.v1.AWSElasticBlockStoreVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.Affinity": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Affinity instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Affinity" - }, - "io.k8s.kubernetes.pkg.api.v1.AttachedVolume": { - "description": "Deprecated. Please use io.k8s.api.core.v1.AttachedVolume instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.AttachedVolume" - }, - "io.k8s.kubernetes.pkg.api.v1.AzureDiskVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.AzureDiskVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.AzureDiskVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.AzureFileVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.AzureFileVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.AzureFileVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.Binding": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Binding instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Binding" - }, - "io.k8s.kubernetes.pkg.api.v1.Capabilities": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Capabilities instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Capabilities" - }, - "io.k8s.kubernetes.pkg.api.v1.CephFSVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.CephFSVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.CephFSVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.CinderVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.CinderVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.CinderVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.ComponentCondition": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ComponentCondition instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ComponentCondition" - }, - "io.k8s.kubernetes.pkg.api.v1.ComponentStatus": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ComponentStatus instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ComponentStatus" - }, - "io.k8s.kubernetes.pkg.api.v1.ComponentStatusList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ComponentStatusList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ComponentStatusList" - }, - "io.k8s.kubernetes.pkg.api.v1.ConfigMap": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ConfigMap instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMap" - }, - "io.k8s.kubernetes.pkg.api.v1.ConfigMapEnvSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ConfigMapEnvSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapEnvSource" - }, - "io.k8s.kubernetes.pkg.api.v1.ConfigMapKeySelector": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ConfigMapKeySelector instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapKeySelector" - }, - "io.k8s.kubernetes.pkg.api.v1.ConfigMapList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ConfigMapList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapList" - }, - "io.k8s.kubernetes.pkg.api.v1.ConfigMapProjection": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ConfigMapProjection instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapProjection" - }, - "io.k8s.kubernetes.pkg.api.v1.ConfigMapVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ConfigMapVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ConfigMapVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.Container": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Container instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Container" - }, - "io.k8s.kubernetes.pkg.api.v1.ContainerImage": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ContainerImage instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerImage" - }, - "io.k8s.kubernetes.pkg.api.v1.ContainerPort": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ContainerPort instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerPort" - }, - "io.k8s.kubernetes.pkg.api.v1.ContainerState": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ContainerState instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerState" - }, - "io.k8s.kubernetes.pkg.api.v1.ContainerStateRunning": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ContainerStateRunning instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStateRunning" - }, - "io.k8s.kubernetes.pkg.api.v1.ContainerStateTerminated": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ContainerStateTerminated instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStateTerminated" - }, - "io.k8s.kubernetes.pkg.api.v1.ContainerStateWaiting": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ContainerStateWaiting instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStateWaiting" - }, - "io.k8s.kubernetes.pkg.api.v1.ContainerStatus": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ContainerStatus instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ContainerStatus" - }, - "io.k8s.kubernetes.pkg.api.v1.DaemonEndpoint": { - "description": "Deprecated. Please use io.k8s.api.core.v1.DaemonEndpoint instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.DaemonEndpoint" - }, - "io.k8s.kubernetes.pkg.api.v1.DownwardAPIProjection": { - "description": "Deprecated. Please use io.k8s.api.core.v1.DownwardAPIProjection instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIProjection" - }, - "io.k8s.kubernetes.pkg.api.v1.DownwardAPIVolumeFile": { - "description": "Deprecated. Please use io.k8s.api.core.v1.DownwardAPIVolumeFile instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIVolumeFile" - }, - "io.k8s.kubernetes.pkg.api.v1.DownwardAPIVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.DownwardAPIVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.DownwardAPIVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.EmptyDirVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.EmptyDirVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.EmptyDirVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.EndpointAddress": { - "description": "Deprecated. Please use io.k8s.api.core.v1.EndpointAddress instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.EndpointAddress" - }, - "io.k8s.kubernetes.pkg.api.v1.EndpointPort": { - "description": "Deprecated. Please use io.k8s.api.core.v1.EndpointPort instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.EndpointPort" - }, - "io.k8s.kubernetes.pkg.api.v1.EndpointSubset": { - "description": "Deprecated. Please use io.k8s.api.core.v1.EndpointSubset instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.EndpointSubset" - }, - "io.k8s.kubernetes.pkg.api.v1.Endpoints": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Endpoints instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Endpoints" - }, - "io.k8s.kubernetes.pkg.api.v1.EndpointsList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.EndpointsList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.EndpointsList" - }, - "io.k8s.kubernetes.pkg.api.v1.EnvFromSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.EnvFromSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.EnvFromSource" - }, - "io.k8s.kubernetes.pkg.api.v1.EnvVar": { - "description": "Deprecated. Please use io.k8s.api.core.v1.EnvVar instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.EnvVar" - }, - "io.k8s.kubernetes.pkg.api.v1.EnvVarSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.EnvVarSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.EnvVarSource" - }, - "io.k8s.kubernetes.pkg.api.v1.Event": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Event instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Event" - }, - "io.k8s.kubernetes.pkg.api.v1.EventList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.EventList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.EventList" - }, - "io.k8s.kubernetes.pkg.api.v1.EventSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.EventSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.EventSource" - }, - "io.k8s.kubernetes.pkg.api.v1.ExecAction": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ExecAction instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ExecAction" - }, - "io.k8s.kubernetes.pkg.api.v1.FCVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.FCVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.FCVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.FlexVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.FlexVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.FlexVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.FlockerVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.FlockerVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.FlockerVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.GCEPersistentDiskVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.GCEPersistentDiskVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.GCEPersistentDiskVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.GitRepoVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.GitRepoVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.GitRepoVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.GlusterfsVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.GlusterfsVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.GlusterfsVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.HTTPGetAction": { - "description": "Deprecated. Please use io.k8s.api.core.v1.HTTPGetAction instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.HTTPGetAction" - }, - "io.k8s.kubernetes.pkg.api.v1.HTTPHeader": { - "description": "Deprecated. Please use io.k8s.api.core.v1.HTTPHeader instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.HTTPHeader" - }, - "io.k8s.kubernetes.pkg.api.v1.Handler": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Handler instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Handler" - }, - "io.k8s.kubernetes.pkg.api.v1.HostAlias": { - "description": "Deprecated. Please use io.k8s.api.core.v1.HostAlias instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.HostAlias" - }, - "io.k8s.kubernetes.pkg.api.v1.HostPathVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.HostPathVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.HostPathVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.ISCSIVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ISCSIVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ISCSIVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.KeyToPath": { - "description": "Deprecated. Please use io.k8s.api.core.v1.KeyToPath instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.KeyToPath" - }, - "io.k8s.kubernetes.pkg.api.v1.Lifecycle": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Lifecycle instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Lifecycle" - }, - "io.k8s.kubernetes.pkg.api.v1.LimitRange": { - "description": "Deprecated. Please use io.k8s.api.core.v1.LimitRange instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRange" - }, - "io.k8s.kubernetes.pkg.api.v1.LimitRangeItem": { - "description": "Deprecated. Please use io.k8s.api.core.v1.LimitRangeItem instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRangeItem" - }, - "io.k8s.kubernetes.pkg.api.v1.LimitRangeList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.LimitRangeList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRangeList" - }, - "io.k8s.kubernetes.pkg.api.v1.LimitRangeSpec": { - "description": "Deprecated. Please use io.k8s.api.core.v1.LimitRangeSpec instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.LimitRangeSpec" - }, - "io.k8s.kubernetes.pkg.api.v1.LoadBalancerIngress": { - "description": "Deprecated. Please use io.k8s.api.core.v1.LoadBalancerIngress instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.LoadBalancerIngress" - }, - "io.k8s.kubernetes.pkg.api.v1.LoadBalancerStatus": { - "description": "Deprecated. Please use io.k8s.api.core.v1.LoadBalancerStatus instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.LoadBalancerStatus" - }, - "io.k8s.kubernetes.pkg.api.v1.LocalObjectReference": { - "description": "Deprecated. Please use io.k8s.api.core.v1.LocalObjectReference instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" - }, - "io.k8s.kubernetes.pkg.api.v1.LocalVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.LocalVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.LocalVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.NFSVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NFSVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NFSVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.Namespace": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Namespace instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Namespace" - }, - "io.k8s.kubernetes.pkg.api.v1.NamespaceList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NamespaceList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NamespaceList" - }, - "io.k8s.kubernetes.pkg.api.v1.NamespaceSpec": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NamespaceSpec instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NamespaceSpec" - }, - "io.k8s.kubernetes.pkg.api.v1.NamespaceStatus": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NamespaceStatus instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NamespaceStatus" - }, - "io.k8s.kubernetes.pkg.api.v1.Node": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Node instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Node" - }, - "io.k8s.kubernetes.pkg.api.v1.NodeAddress": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NodeAddress instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeAddress" - }, - "io.k8s.kubernetes.pkg.api.v1.NodeAffinity": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NodeAffinity instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeAffinity" - }, - "io.k8s.kubernetes.pkg.api.v1.NodeCondition": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NodeCondition instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeCondition" - }, - "io.k8s.kubernetes.pkg.api.v1.NodeDaemonEndpoints": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NodeDaemonEndpoints instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeDaemonEndpoints" - }, - "io.k8s.kubernetes.pkg.api.v1.NodeList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NodeList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeList" - }, - "io.k8s.kubernetes.pkg.api.v1.NodeSelector": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NodeSelector instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector" - }, - "io.k8s.kubernetes.pkg.api.v1.NodeSelectorRequirement": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NodeSelectorRequirement instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorRequirement" - }, - "io.k8s.kubernetes.pkg.api.v1.NodeSelectorTerm": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NodeSelectorTerm instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorTerm" - }, - "io.k8s.kubernetes.pkg.api.v1.NodeSpec": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NodeSpec instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSpec" - }, - "io.k8s.kubernetes.pkg.api.v1.NodeStatus": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NodeStatus instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeStatus" - }, - "io.k8s.kubernetes.pkg.api.v1.NodeSystemInfo": { - "description": "Deprecated. Please use io.k8s.api.core.v1.NodeSystemInfo instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSystemInfo" - }, - "io.k8s.kubernetes.pkg.api.v1.ObjectFieldSelector": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ObjectFieldSelector instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectFieldSelector" - }, - "io.k8s.kubernetes.pkg.api.v1.ObjectReference": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ObjectReference instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" - }, - "io.k8s.kubernetes.pkg.api.v1.PersistentVolume": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PersistentVolume instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolume" - }, - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaim": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PersistentVolumeClaim instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaim" - }, - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaimList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PersistentVolumeClaimList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimList" - }, - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaimSpec": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PersistentVolumeClaimSpec instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimSpec" - }, - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaimStatus": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PersistentVolumeClaimStatus instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimStatus" - }, - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaimVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PersistentVolumeList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeList" - }, - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeSpec": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PersistentVolumeSpec instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeSpec" - }, - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeStatus": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PersistentVolumeStatus instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PersistentVolumeStatus" - }, - "io.k8s.kubernetes.pkg.api.v1.PhotonPersistentDiskVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.Pod": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Pod instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Pod" - }, - "io.k8s.kubernetes.pkg.api.v1.PodAffinity": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PodAffinity instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinity" - }, - "io.k8s.kubernetes.pkg.api.v1.PodAffinityTerm": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PodAffinityTerm instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinityTerm" - }, - "io.k8s.kubernetes.pkg.api.v1.PodAntiAffinity": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PodAntiAffinity instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodAntiAffinity" - }, - "io.k8s.kubernetes.pkg.api.v1.PodCondition": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PodCondition instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodCondition" - }, - "io.k8s.kubernetes.pkg.api.v1.PodList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PodList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodList" - }, - "io.k8s.kubernetes.pkg.api.v1.PodSecurityContext": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PodSecurityContext instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext" - }, - "io.k8s.kubernetes.pkg.api.v1.PodSpec": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PodSpec instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodSpec" - }, - "io.k8s.kubernetes.pkg.api.v1.PodStatus": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PodStatus instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodStatus" - }, - "io.k8s.kubernetes.pkg.api.v1.PodTemplate": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PodTemplate instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplate" - }, - "io.k8s.kubernetes.pkg.api.v1.PodTemplateList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PodTemplateList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateList" - }, - "io.k8s.kubernetes.pkg.api.v1.PodTemplateSpec": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PodTemplateSpec instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - }, - "io.k8s.kubernetes.pkg.api.v1.PortworxVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PortworxVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PortworxVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.PreferredSchedulingTerm": { - "description": "Deprecated. Please use io.k8s.api.core.v1.PreferredSchedulingTerm instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.PreferredSchedulingTerm" - }, - "io.k8s.kubernetes.pkg.api.v1.Probe": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Probe instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Probe" - }, - "io.k8s.kubernetes.pkg.api.v1.ProjectedVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ProjectedVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ProjectedVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.QuobyteVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.QuobyteVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.QuobyteVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.RBDVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.RBDVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.RBDVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.ReplicationController": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ReplicationController instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationController" - }, - "io.k8s.kubernetes.pkg.api.v1.ReplicationControllerCondition": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ReplicationControllerCondition instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerCondition" - }, - "io.k8s.kubernetes.pkg.api.v1.ReplicationControllerList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ReplicationControllerList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerList" - }, - "io.k8s.kubernetes.pkg.api.v1.ReplicationControllerSpec": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ReplicationControllerSpec instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerSpec" - }, - "io.k8s.kubernetes.pkg.api.v1.ReplicationControllerStatus": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ReplicationControllerStatus instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ReplicationControllerStatus" - }, - "io.k8s.kubernetes.pkg.api.v1.ResourceFieldSelector": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ResourceFieldSelector instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceFieldSelector" - }, - "io.k8s.kubernetes.pkg.api.v1.ResourceQuota": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ResourceQuota instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuota" - }, - "io.k8s.kubernetes.pkg.api.v1.ResourceQuotaList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ResourceQuotaList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuotaList" - }, - "io.k8s.kubernetes.pkg.api.v1.ResourceQuotaSpec": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ResourceQuotaSpec instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuotaSpec" - }, - "io.k8s.kubernetes.pkg.api.v1.ResourceQuotaStatus": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ResourceQuotaStatus instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceQuotaStatus" - }, - "io.k8s.kubernetes.pkg.api.v1.ResourceRequirements": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ResourceRequirements instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ResourceRequirements" - }, - "io.k8s.kubernetes.pkg.api.v1.SELinuxOptions": { - "description": "Deprecated. Please use io.k8s.api.core.v1.SELinuxOptions instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.SELinuxOptions" - }, - "io.k8s.kubernetes.pkg.api.v1.ScaleIOVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ScaleIOVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ScaleIOVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.Secret": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Secret instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Secret" - }, - "io.k8s.kubernetes.pkg.api.v1.SecretEnvSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.SecretEnvSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.SecretEnvSource" - }, - "io.k8s.kubernetes.pkg.api.v1.SecretKeySelector": { - "description": "Deprecated. Please use io.k8s.api.core.v1.SecretKeySelector instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.SecretKeySelector" - }, - "io.k8s.kubernetes.pkg.api.v1.SecretList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.SecretList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.SecretList" - }, - "io.k8s.kubernetes.pkg.api.v1.SecretProjection": { - "description": "Deprecated. Please use io.k8s.api.core.v1.SecretProjection instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.SecretProjection" - }, - "io.k8s.kubernetes.pkg.api.v1.SecretVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.SecretVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.SecretVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.SecurityContext": { - "description": "Deprecated. Please use io.k8s.api.core.v1.SecurityContext instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.SecurityContext" - }, - "io.k8s.kubernetes.pkg.api.v1.Service": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Service instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Service" - }, - "io.k8s.kubernetes.pkg.api.v1.ServiceAccount": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ServiceAccount instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccount" - }, - "io.k8s.kubernetes.pkg.api.v1.ServiceAccountList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ServiceAccountList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceAccountList" - }, - "io.k8s.kubernetes.pkg.api.v1.ServiceList": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ServiceList instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceList" - }, - "io.k8s.kubernetes.pkg.api.v1.ServicePort": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ServicePort instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ServicePort" - }, - "io.k8s.kubernetes.pkg.api.v1.ServiceSpec": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ServiceSpec instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceSpec" - }, - "io.k8s.kubernetes.pkg.api.v1.ServiceStatus": { - "description": "Deprecated. Please use io.k8s.api.core.v1.ServiceStatus instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.ServiceStatus" - }, - "io.k8s.kubernetes.pkg.api.v1.StorageOSPersistentVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.StorageOSPersistentVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSPersistentVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.StorageOSVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.StorageOSVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.StorageOSVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.TCPSocketAction": { - "description": "Deprecated. Please use io.k8s.api.core.v1.TCPSocketAction instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.TCPSocketAction" - }, - "io.k8s.kubernetes.pkg.api.v1.Taint": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Taint instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Taint" - }, - "io.k8s.kubernetes.pkg.api.v1.Toleration": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Toleration instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Toleration" - }, - "io.k8s.kubernetes.pkg.api.v1.Volume": { - "description": "Deprecated. Please use io.k8s.api.core.v1.Volume instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.Volume" - }, - "io.k8s.kubernetes.pkg.api.v1.VolumeMount": { - "description": "Deprecated. Please use io.k8s.api.core.v1.VolumeMount instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.VolumeMount" - }, - "io.k8s.kubernetes.pkg.api.v1.VolumeProjection": { - "description": "Deprecated. Please use io.k8s.api.core.v1.VolumeProjection instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.VolumeProjection" - }, - "io.k8s.kubernetes.pkg.api.v1.VsphereVirtualDiskVolumeSource": { - "description": "Deprecated. Please use io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource" - }, - "io.k8s.kubernetes.pkg.api.v1.WeightedPodAffinityTerm": { - "description": "Deprecated. Please use io.k8s.api.core.v1.WeightedPodAffinityTerm instead.", - "$ref": "#/definitions/io.k8s.api.core.v1.WeightedPodAffinityTerm" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.AdmissionHookClientConfig": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.AdmissionHookClientConfig instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.AdmissionHookClientConfig" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.ExternalAdmissionHook": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHook instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHook" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfiguration" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.Initializer": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.Initializer instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Initializer" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.InitializerConfiguration": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfiguration" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.InitializerConfigurationList": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.InitializerConfigurationList instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.InitializerConfigurationList" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.Rule": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.Rule instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.Rule" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.RuleWithOperations": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.RuleWithOperations instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.RuleWithOperations" - }, - "io.k8s.kubernetes.pkg.apis.admissionregistration.v1alpha1.ServiceReference": { - "description": "Deprecated. Please use io.k8s.api.admissionregistration.v1alpha1.ServiceReference instead.", - "$ref": "#/definitions/io.k8s.api.admissionregistration.v1alpha1.ServiceReference" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.ControllerRevision": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.ControllerRevision instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevision" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.ControllerRevisionList": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.ControllerRevisionList instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ControllerRevisionList" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.Deployment": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.Deployment instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Deployment" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentCondition": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.DeploymentCondition instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentCondition" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentList": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.DeploymentList instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentList" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentRollback": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.DeploymentRollback instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentRollback" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentSpec": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.DeploymentSpec instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentSpec" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentStatus": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.DeploymentStatus instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentStatus" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentStrategy": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.DeploymentStrategy instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.DeploymentStrategy" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.RollbackConfig": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.RollbackConfig instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.RollbackConfig" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.RollingUpdateDeployment": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.RollingUpdateDeployment instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.RollingUpdateDeployment" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.RollingUpdateStatefulSetStrategy": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.Scale": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.Scale instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.Scale" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.ScaleSpec": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.ScaleSpec instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ScaleSpec" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.ScaleStatus": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.ScaleStatus instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.ScaleStatus" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSet": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.StatefulSet instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSet" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSetList": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.StatefulSetList instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSetList" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSetSpec": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.StatefulSetSpec instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSetSpec" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSetStatus": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.StatefulSetStatus instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSetStatus" - }, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSetUpdateStrategy": { - "description": "Deprecated. Please use io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy instead.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy" - }, - "io.k8s.kubernetes.pkg.apis.authentication.v1.TokenReview": { - "description": "Deprecated. Please use io.k8s.api.authentication.v1.TokenReview instead.", - "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReview" - }, - "io.k8s.kubernetes.pkg.apis.authentication.v1.TokenReviewSpec": { - "description": "Deprecated. Please use io.k8s.api.authentication.v1.TokenReviewSpec instead.", - "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReviewSpec" - }, - "io.k8s.kubernetes.pkg.apis.authentication.v1.TokenReviewStatus": { - "description": "Deprecated. Please use io.k8s.api.authentication.v1.TokenReviewStatus instead.", - "$ref": "#/definitions/io.k8s.api.authentication.v1.TokenReviewStatus" - }, - "io.k8s.kubernetes.pkg.apis.authentication.v1.UserInfo": { - "description": "Deprecated. Please use io.k8s.api.authentication.v1.UserInfo instead.", - "$ref": "#/definitions/io.k8s.api.authentication.v1.UserInfo" - }, - "io.k8s.kubernetes.pkg.apis.authentication.v1beta1.TokenReview": { - "description": "Deprecated. Please use io.k8s.api.authentication.v1beta1.TokenReview instead.", - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.TokenReview" - }, - "io.k8s.kubernetes.pkg.apis.authentication.v1beta1.TokenReviewSpec": { - "description": "Deprecated. Please use io.k8s.api.authentication.v1beta1.TokenReviewSpec instead.", - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.TokenReviewSpec" - }, - "io.k8s.kubernetes.pkg.apis.authentication.v1beta1.TokenReviewStatus": { - "description": "Deprecated. Please use io.k8s.api.authentication.v1beta1.TokenReviewStatus instead.", - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.TokenReviewStatus" - }, - "io.k8s.kubernetes.pkg.apis.authentication.v1beta1.UserInfo": { - "description": "Deprecated. Please use io.k8s.api.authentication.v1beta1.UserInfo instead.", - "$ref": "#/definitions/io.k8s.api.authentication.v1beta1.UserInfo" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1.LocalSubjectAccessReview": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1.LocalSubjectAccessReview instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1.LocalSubjectAccessReview" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1.NonResourceAttributes": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1.NonResourceAttributes instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1.NonResourceAttributes" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1.ResourceAttributes": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1.ResourceAttributes instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1.ResourceAttributes" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1.SelfSubjectAccessReview": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1.SelfSubjectAccessReview instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReview" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1.SelfSubjectAccessReviewSpec": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1.SelfSubjectAccessReviewSpec instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SelfSubjectAccessReviewSpec" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1.SubjectAccessReview": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1.SubjectAccessReview instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReview" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1.SubjectAccessReviewSpec": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1.SubjectAccessReviewSpec instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewSpec" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1.SubjectAccessReviewStatus": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1.SubjectAccessReviewStatus instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1.SubjectAccessReviewStatus" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.LocalSubjectAccessReview": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1beta1.LocalSubjectAccessReview instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.LocalSubjectAccessReview" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.NonResourceAttributes": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1beta1.NonResourceAttributes instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.NonResourceAttributes" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.ResourceAttributes": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1beta1.ResourceAttributes instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.ResourceAttributes" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.SelfSubjectAccessReview": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1beta1.SelfSubjectAccessReview instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectAccessReview" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.SelfSubjectAccessReviewSpec": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1beta1.SelfSubjectAccessReviewSpec instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SelfSubjectAccessReviewSpec" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.SubjectAccessReview": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1beta1.SubjectAccessReview instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReview" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.SubjectAccessReviewSpec": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1beta1.SubjectAccessReviewSpec instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewSpec" - }, - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.SubjectAccessReviewStatus": { - "description": "Deprecated. Please use io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus instead.", - "$ref": "#/definitions/io.k8s.api.authorization.v1beta1.SubjectAccessReviewStatus" - }, - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.CrossVersionObjectReference": { - "description": "Deprecated. Please use io.k8s.api.autoscaling.v1.CrossVersionObjectReference instead.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.CrossVersionObjectReference" - }, - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscaler": { - "description": "Deprecated. Please use io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler instead.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" - }, - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerList": { - "description": "Deprecated. Please use io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList instead.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" - }, - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerSpec": { - "description": "Deprecated. Please use io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec instead.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec" - }, - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerStatus": { - "description": "Deprecated. Please use io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus instead.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus" - }, - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.Scale": { - "description": "Deprecated. Please use io.k8s.api.autoscaling.v1.Scale instead.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.Scale" - }, - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.ScaleSpec": { - "description": "Deprecated. Please use io.k8s.api.autoscaling.v1.ScaleSpec instead.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.ScaleSpec" - }, - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.ScaleStatus": { - "description": "Deprecated. Please use io.k8s.api.autoscaling.v1.ScaleStatus instead.", - "$ref": "#/definitions/io.k8s.api.autoscaling.v1.ScaleStatus" - }, - "io.k8s.kubernetes.pkg.apis.batch.v1.Job": { - "description": "Deprecated. Please use io.k8s.api.batch.v1.Job instead.", - "$ref": "#/definitions/io.k8s.api.batch.v1.Job" - }, - "io.k8s.kubernetes.pkg.apis.batch.v1.JobCondition": { - "description": "Deprecated. Please use io.k8s.api.batch.v1.JobCondition instead.", - "$ref": "#/definitions/io.k8s.api.batch.v1.JobCondition" - }, - "io.k8s.kubernetes.pkg.apis.batch.v1.JobList": { - "description": "Deprecated. Please use io.k8s.api.batch.v1.JobList instead.", - "$ref": "#/definitions/io.k8s.api.batch.v1.JobList" - }, - "io.k8s.kubernetes.pkg.apis.batch.v1.JobSpec": { - "description": "Deprecated. Please use io.k8s.api.batch.v1.JobSpec instead.", - "$ref": "#/definitions/io.k8s.api.batch.v1.JobSpec" - }, - "io.k8s.kubernetes.pkg.apis.batch.v1.JobStatus": { - "description": "Deprecated. Please use io.k8s.api.batch.v1.JobStatus instead.", - "$ref": "#/definitions/io.k8s.api.batch.v1.JobStatus" - }, - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.CronJob": { - "description": "Deprecated. Please use io.k8s.api.batch.v2alpha1.CronJob instead.", - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJob" - }, - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.CronJobList": { - "description": "Deprecated. Please use io.k8s.api.batch.v2alpha1.CronJobList instead.", - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJobList" - }, - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.CronJobSpec": { - "description": "Deprecated. Please use io.k8s.api.batch.v2alpha1.CronJobSpec instead.", - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJobSpec" - }, - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.CronJobStatus": { - "description": "Deprecated. Please use io.k8s.api.batch.v2alpha1.CronJobStatus instead.", - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.CronJobStatus" - }, - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.JobTemplateSpec": { - "description": "Deprecated. Please use io.k8s.api.batch.v2alpha1.JobTemplateSpec instead.", - "$ref": "#/definitions/io.k8s.api.batch.v2alpha1.JobTemplateSpec" - }, - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequest": { - "description": "Deprecated. Please use io.k8s.api.certificates.v1beta1.CertificateSigningRequest instead.", - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequest" - }, - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestCondition": { - "description": "Deprecated. Please use io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition instead.", - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition" - }, - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestList": { - "description": "Deprecated. Please use io.k8s.api.certificates.v1beta1.CertificateSigningRequestList instead.", - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequestList" - }, - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestSpec": { - "description": "Deprecated. Please use io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec instead.", - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec" - }, - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestStatus": { - "description": "Deprecated. Please use io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus instead.", - "$ref": "#/definitions/io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSet": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.DaemonSet instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSet" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetList": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.DaemonSetList instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSetList" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetSpec": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.DaemonSetSpec instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSetSpec" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetStatus": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.DaemonSetStatus instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSetStatus" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetUpdateStrategy": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.DaemonSetUpdateStrategy instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DaemonSetUpdateStrategy" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.Deployment": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.Deployment instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Deployment" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentCondition": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.DeploymentCondition instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentCondition" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentList": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.DeploymentList instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentList" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentRollback": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.DeploymentRollback instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentRollback" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentSpec": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.DeploymentSpec instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentSpec" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentStatus": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.DeploymentStatus instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentStatus" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentStrategy": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.DeploymentStrategy instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.DeploymentStrategy" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.FSGroupStrategyOptions": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.FSGroupStrategyOptions instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.FSGroupStrategyOptions" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.HTTPIngressPath": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.HTTPIngressPath instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.HTTPIngressPath" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.HTTPIngressRuleValue": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.HostPortRange": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.HostPortRange instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.HostPortRange" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IDRange": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.IDRange instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IDRange" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.Ingress": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.Ingress instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Ingress" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressBackend": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.IngressBackend instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressBackend" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressList": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.IngressList instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressList" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressRule": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.IngressRule instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressRule" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressSpec": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.IngressSpec instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressSpec" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressStatus": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.IngressStatus instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressStatus" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressTLS": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.IngressTLS instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.IngressTLS" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicy": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.NetworkPolicy instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicy" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyIngressRule": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyList": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.NetworkPolicyList instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicyList" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyPeer": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.NetworkPolicyPeer instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicyPeer" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyPort": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.NetworkPolicyPort instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicyPort" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicySpec": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.NetworkPolicySpec instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.NetworkPolicySpec" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.PodSecurityPolicy": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.PodSecurityPolicy instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.PodSecurityPolicy" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.PodSecurityPolicyList": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.PodSecurityPolicyList instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.PodSecurityPolicyList" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.PodSecurityPolicySpec": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.PodSecurityPolicySpec instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.PodSecurityPolicySpec" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSet": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.ReplicaSet instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSet" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetCondition": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.ReplicaSetCondition instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSetCondition" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetList": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.ReplicaSetList instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSetList" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetSpec": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.ReplicaSetSpec instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSetSpec" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetStatus": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.ReplicaSetStatus instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ReplicaSetStatus" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.RollbackConfig": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.RollbackConfig instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.RollbackConfig" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.RollingUpdateDaemonSet": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.RollingUpdateDeployment": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.RollingUpdateDeployment instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.RollingUpdateDeployment" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.RunAsUserStrategyOptions": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.RunAsUserStrategyOptions instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.RunAsUserStrategyOptions" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.SELinuxStrategyOptions": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.SELinuxStrategyOptions instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.SELinuxStrategyOptions" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.Scale": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.Scale instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.Scale" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ScaleSpec": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.ScaleSpec instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ScaleSpec" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ScaleStatus": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.ScaleStatus instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.ScaleStatus" - }, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.SupplementalGroupsStrategyOptions": { - "description": "Deprecated. Please use io.k8s.api.extensions.v1beta1.SupplementalGroupsStrategyOptions instead.", - "$ref": "#/definitions/io.k8s.api.extensions.v1beta1.SupplementalGroupsStrategyOptions" - }, - "io.k8s.kubernetes.pkg.apis.networking.v1.NetworkPolicy": { - "description": "Deprecated. Please use io.k8s.api.networking.v1.NetworkPolicy instead.", - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicy" - }, - "io.k8s.kubernetes.pkg.apis.networking.v1.NetworkPolicyIngressRule": { - "description": "Deprecated. Please use io.k8s.api.networking.v1.NetworkPolicyIngressRule instead.", - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyIngressRule" - }, - "io.k8s.kubernetes.pkg.apis.networking.v1.NetworkPolicyList": { - "description": "Deprecated. Please use io.k8s.api.networking.v1.NetworkPolicyList instead.", - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyList" - }, - "io.k8s.kubernetes.pkg.apis.networking.v1.NetworkPolicyPeer": { - "description": "Deprecated. Please use io.k8s.api.networking.v1.NetworkPolicyPeer instead.", - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPeer" - }, - "io.k8s.kubernetes.pkg.apis.networking.v1.NetworkPolicyPort": { - "description": "Deprecated. Please use io.k8s.api.networking.v1.NetworkPolicyPort instead.", - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicyPort" - }, - "io.k8s.kubernetes.pkg.apis.networking.v1.NetworkPolicySpec": { - "description": "Deprecated. Please use io.k8s.api.networking.v1.NetworkPolicySpec instead.", - "$ref": "#/definitions/io.k8s.api.networking.v1.NetworkPolicySpec" - }, - "io.k8s.kubernetes.pkg.apis.policy.v1beta1.Eviction": { - "description": "Deprecated. Please use io.k8s.api.policy.v1beta1.Eviction instead.", - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.Eviction" - }, - "io.k8s.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudget": { - "description": "Deprecated. Please use io.k8s.api.policy.v1beta1.PodDisruptionBudget instead.", - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudget" - }, - "io.k8s.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudgetList": { - "description": "Deprecated. Please use io.k8s.api.policy.v1beta1.PodDisruptionBudgetList instead.", - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudgetList" - }, - "io.k8s.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudgetSpec": { - "description": "Deprecated. Please use io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec instead.", - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec" - }, - "io.k8s.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudgetStatus": { - "description": "Deprecated. Please use io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus instead.", - "$ref": "#/definitions/io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRole": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1alpha1.ClusterRole instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRole" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleBinding": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1alpha1.ClusterRoleBinding instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRoleBinding" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleBindingList": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1alpha1.ClusterRoleBindingList instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRoleBindingList" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleList": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1alpha1.ClusterRoleList instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.ClusterRoleList" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.PolicyRule": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1alpha1.PolicyRule instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.PolicyRule" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.Role": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1alpha1.Role instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.Role" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.RoleBinding": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1alpha1.RoleBinding instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleBinding" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.RoleBindingList": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1alpha1.RoleBindingList instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleBindingList" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.RoleList": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1alpha1.RoleList instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleList" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.RoleRef": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1alpha1.RoleRef instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.RoleRef" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.Subject": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1alpha1.Subject instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1alpha1.Subject" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.ClusterRole": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1beta1.ClusterRole instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRole" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleBinding": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1beta1.ClusterRoleBinding instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleBinding" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleBindingList": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1beta1.ClusterRoleBindingList instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleBindingList" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleList": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1beta1.ClusterRoleList instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.ClusterRoleList" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.PolicyRule": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1beta1.PolicyRule instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.PolicyRule" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.Role": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1beta1.Role instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Role" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.RoleBinding": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1beta1.RoleBinding instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleBinding" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.RoleBindingList": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1beta1.RoleBindingList instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleBindingList" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.RoleList": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1beta1.RoleList instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleList" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.RoleRef": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1beta1.RoleRef instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.RoleRef" - }, - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.Subject": { - "description": "Deprecated. Please use io.k8s.api.rbac.v1beta1.Subject instead.", - "$ref": "#/definitions/io.k8s.api.rbac.v1beta1.Subject" - }, - "io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPreset": { - "description": "Deprecated. Please use io.k8s.api.settings.v1alpha1.PodPreset instead.", - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPreset" - }, - "io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPresetList": { - "description": "Deprecated. Please use io.k8s.api.settings.v1alpha1.PodPresetList instead.", - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPresetList" - }, - "io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPresetSpec": { - "description": "Deprecated. Please use io.k8s.api.settings.v1alpha1.PodPresetSpec instead.", - "$ref": "#/definitions/io.k8s.api.settings.v1alpha1.PodPresetSpec" - }, - "io.k8s.kubernetes.pkg.apis.storage.v1.StorageClass": { - "description": "Deprecated. Please use io.k8s.api.storage.v1.StorageClass instead.", - "$ref": "#/definitions/io.k8s.api.storage.v1.StorageClass" - }, - "io.k8s.kubernetes.pkg.apis.storage.v1.StorageClassList": { - "description": "Deprecated. Please use io.k8s.api.storage.v1.StorageClassList instead.", - "$ref": "#/definitions/io.k8s.api.storage.v1.StorageClassList" - }, - "io.k8s.kubernetes.pkg.apis.storage.v1beta1.StorageClass": { - "description": "Deprecated. Please use io.k8s.api.storage.v1beta1.StorageClass instead.", - "$ref": "#/definitions/io.k8s.api.storage.v1beta1.StorageClass" - }, - "io.k8s.kubernetes.pkg.apis.storage.v1beta1.StorageClassList": { - "description": "Deprecated. Please use io.k8s.api.storage.v1beta1.StorageClassList instead.", - "$ref": "#/definitions/io.k8s.api.storage.v1beta1.StorageClassList" - } - }, - "securityDefinitions": { - "BearerToken": { - "description": "Bearer Token authentication", - "type": "apiKey", - "name": "authorization", - "in": "header" - } - }, - "security": [ - { - "BearerToken": [] - } - ] - } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/type.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/type.go deleted file mode 100644 index 96c06204..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/type.go +++ /dev/null @@ -1,74 +0,0 @@ -package ksonnet - -// Type is a Kubernetes kind. -type Type struct { - description string - properties map[string]Property - component Component - group string - codebase string - identifier string -} - -var _ Object = (*Type)(nil) - -// NewType creates an instance of Type. -func NewType(identifier, description, codebase, group string, component Component, props map[string]Property) Type { - return Type{ - description: description, - group: group, - codebase: codebase, - component: component, - properties: props, - identifier: identifier, - } -} - -// Kind is the kind for this type -func (t *Type) Kind() string { - return t.component.Kind -} - -// Version is the version for this type -func (t *Type) Version() string { - return t.component.Version -} - -// Codebase is the codebase for this field. -func (t *Type) Codebase() string { - return t.codebase -} - -// Group is the group for this type -func (t *Type) Group() string { - if t.group == "" { - return "core" - } - - return t.group -} - -// QualifiedGroup is the group for this type -func (t *Type) QualifiedGroup() string { - return t.component.Group -} - -// Description is description for this type -func (t *Type) Description() string { - return t.description -} - -// Identifier is identifier for this type -func (t *Type) Identifier() string { - return t.identifier -} - -// IsType returns if this item is a type. It always returns true. -func (t *Type) IsType() bool { - return true -} - -// Properties are the properties for this type. -func (t *Type) Properties() map[string]Property { - return t.properties -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/type_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/type_test.go deleted file mode 100644 index 607ff632..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/type_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package ksonnet - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestType(t *testing.T) { - props := make(map[string]Property) - props["foo"] = NewLiteralField("name", "integer", "desc", "ref") - - c := Component{ - Group: "group2", - Version: "ver", - Kind: "kind", - } - - r := NewType("id", "desc", "codebase", "group1", c, props) - - assert.Equal(t, "id", r.Identifier()) - assert.Equal(t, "desc", r.Description()) - assert.Equal(t, "group1", r.Group()) - assert.Equal(t, "ver", r.Version()) - assert.Equal(t, "kind", r.Kind()) - assert.Equal(t, "group2", r.QualifiedGroup()) - assert.True(t, r.IsType()) - - assert.Len(t, r.Properties(), 1) -} - -func TestType_no_group(t *testing.T) { - props := make(map[string]Property) - props["foo"] = NewLiteralField("name", "integer", "desc", "ref") - - c := Component{ - Group: "group2", - Version: "ver", - Kind: "kind", - } - - r := NewType("id", "desc", "codebase", "", c, props) - - assert.Equal(t, "core", r.Group()) - assert.Equal(t, "group2", r.QualifiedGroup()) - -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/util.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/util.go deleted file mode 100644 index 06cb4148..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/util.go +++ /dev/null @@ -1,27 +0,0 @@ -package ksonnet - -import ( - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/kubespec" -) - -const constructorName = "new" - -var ( - specialProperties = map[kubespec.PropertyName]kubespec.PropertyName{ - "apiVersion": "apiVersion", - "kind": "kind", - } - - specialPropertiesList []string -) - -func init() { - for k := range specialProperties { - specialPropertiesList = append(specialPropertiesList, string(k)) - } -} - -func isSpecialProperty(pn kubespec.PropertyName) bool { - _, ok := specialProperties[pn] - return ok -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/version.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/version.go deleted file mode 100644 index 8c2809a6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/version.go +++ /dev/null @@ -1,78 +0,0 @@ -package ksonnet - -import ( - "fmt" - "sort" - - "github.com/google/go-jsonnet/ast" - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" -) - -// Version is an API version. -type Version struct { - name string - group string - - resources []*APIObject -} - -// NewVersion creates an instance of Version. -func NewVersion(name, group string) *Version { - v := &Version{ - name: name, - group: group, - resources: make([]*APIObject, 0), - } - - return v -} - -// APIObjects returns a slice of APIObjects sorted by name. -func (v *Version) APIObjects() []APIObject { - var objects []APIObject - for _, resource := range v.resources { - objects = append(objects, *resource) - } - - sort.Slice(objects, func(i, j int) bool { - return objects[i].Kind() < objects[j].Kind() - }) - - return objects -} - -// Name is the name of the version. -func (v *Version) Name() string { - return v.name -} - -// AddResource adds a resource to the version. -func (v *Version) AddResource(resource Object) { - ao := NewAPIObject(resource) - v.resources = append(v.resources, ao) -} - -// APIVersion returns the version. -func (v *Version) APIVersion() string { - if v.group == "core" || v.group == "" { - return v.name - } - return fmt.Sprintf("%s/%s", v.group, v.name) -} - -// Node returns an ast node for this version. -func (v *Version) Node() *nm.Object { - o := nm.NewObject() - - avo := nm.OnelineObject() - avo.Set( - nm.NewKey( - "apiVersion", - nm.KeyOptCategory(ast.ObjectFieldID), - nm.KeyOptVisibility(ast.ObjectFieldInherit)), - nm.NewStringDouble(v.APIVersion())) - - o.Set(nm.LocalKey("apiVersion"), avo) - - return o -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/version_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/version_test.go deleted file mode 100644 index 4a60f9b4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/ksonnet/version_test.go +++ /dev/null @@ -1,73 +0,0 @@ -package ksonnet - -import ( - "testing" - - nm "github.com/ksonnet/ksonnet-lib/ksonnet-gen/nodemaker" - "github.com/stretchr/testify/require" -) - -func TestVersion_Name(t *testing.T) { - v := NewVersion("v1", "groupName") - require.Equal(t, "v1", v.Name()) -} - -func TestVersion_APIVersion(t *testing.T) { - cases := []struct { - name string - groupName string - expected string - }{ - { - name: "groupName group", - groupName: "groupName", - expected: "groupName/v1", - }, - { - name: "core group", - groupName: "core", - expected: "v1", - }, - { - name: "empty group", - groupName: "", - expected: "v1", - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - v := NewVersion("v1", tc.groupName) - require.Equal(t, tc.expected, v.APIVersion()) - }) - } -} - -func TestVersion_AddResource(t *testing.T) { - v := NewVersion("v1", "groupName") - - c1 := Component{Group: "group2", Version: "v1", Kind: "kind1"} - o1 := NewType("alpha", "desc", "codebase", "group", c1, nil) - v.AddResource(&o1) - - c2 := Component{Group: "group2", Version: "v1", Kind: "kind2"} - o2 := NewType("beta", "desc", "codebase", "group", c2, nil) - v.AddResource(&o2) - - require.Len(t, v.APIObjects(), 2) -} - -func TestVersion_Node(t *testing.T) { - v := NewVersion("v1", "groupName") - - n := v.Node() - require.NotNil(t, n) - - av, ok := n.Get("apiVersion").(*nm.Object) - require.True(t, ok) - - vStr, ok := av.Get("apiVersion").(*nm.StringDouble) - require.True(t, ok) - - require.Equal(t, nm.NewStringDouble(v.APIVersion()), vStr) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/importer.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/importer.go deleted file mode 100644 index c03c99ff..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/importer.go +++ /dev/null @@ -1,41 +0,0 @@ -package kubespec - -import ( - "crypto/sha256" - "encoding/json" - "fmt" - - "github.com/go-openapi/spec" - "github.com/go-openapi/swag" - "github.com/pkg/errors" -) - -// Import imports an OpenAPI swagger schema. -func Import(path string) (*spec.Swagger, string, error) { - b, err := swag.LoadFromFileOrHTTP(path) - if err != nil { - return nil, "", errors.Wrap(err, "load schema from path") - } - - h := sha256.New() - h.Write(b) - - checksum := fmt.Sprintf("%x", h.Sum(nil)) - - spec, err := CreateAPISpec(b) - if err != nil { - return nil, "", err - } - - return spec, checksum, nil -} - -// CreateAPISpec a swagger file into a *spec.Swagger. -func CreateAPISpec(b []byte) (*spec.Swagger, error) { - var apiSpec spec.Swagger - if err := json.Unmarshal(b, &apiSpec); err != nil { - return nil, errors.Wrap(err, "parse swagger JSON") - } - - return &apiSpec, nil -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/importer_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/importer_test.go deleted file mode 100644 index b60a4dbc..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/importer_test.go +++ /dev/null @@ -1,66 +0,0 @@ -package kubespec_test - -import ( - "fmt" - "net/http" - "net/http/httptest" - "path/filepath" - "testing" - - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/kubespec" - - "github.com/stretchr/testify/require" -) - -func testdata(name string) string { - return filepath.Join("testdata", name) -} - -func TestImporter_Import(t *testing.T) { - cases := []struct { - name string - location string - checksum string - isErr bool - }{ - { - name: "missing file", - location: "missing.json", - isErr: true, - }, - { - name: "invalid file", - location: testdata("invalid.json"), - isErr: true, - }, - { - name: "valid file", - location: testdata("deployment.json"), - checksum: "0958866ac95c381dc661136396c73456038854df20b06688332a91a463857135", - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - t.Logf("path = %s", r.URL.Path) - if r.URL.Path != "/swagger.json" { - http.NotFound(w, r) - return - } - - fmt.Fprintln(w, `{"swagger": "2.0", "info": {"title": "Kubernetes"}}`) - })) - defer ts.Close() - - apiSpec, checksum, err := kubespec.Import(tc.location) - if tc.isErr { - require.Error(t, err) - } else { - require.NoError(t, err) - require.NotNil(t, apiSpec) - require.Equal(t, tc.checksum, checksum) - } - }) - } -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/new.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/new.go deleted file mode 100644 index 00824d50..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/new.go +++ /dev/null @@ -1,90 +0,0 @@ -package kubespec - -import ( - "fmt" - "regexp" -) - -var ( - regexes = []*regexp.Regexp{ - // Core API, pre-1.8 Kubernetes OR non-Kubernetes codebase APIs - regexp.MustCompile(`io\.k8s\.(?P\S+)\.pkg\.api\.(?P\S+)\.(?P\S+)`), - // Core API, 1.8+ Kubernetes - regexp.MustCompile(`io\.k8s\.api\.(?Pcore)\.(?P\S+)\.(?P\S+)`), - // Other APIs, pre-1.8 Kubernetes OR non-Kubernetes codebase APIs - regexp.MustCompile(`io\.k8s\.(?P\S+)\.pkg\.(?Papis)\.(?P\S+)\.(?P\S+)\.(?P\S+)`), - // Other APIs, 1.8+ Kubernetes - regexp.MustCompile(`io\.k8s\.api\.(?P\S+)\.(?P\S+)\.(?P\S+)`), - // Util packageType - regexp.MustCompile(`io\.k8s\.(?P\S+)\.pkg\.(?Putil)\.(?P\S+)\.(?P\S+)`), - // Version packageType - regexp.MustCompile(`io\.k8s\.(?P\S+)\.pkg\.(?Pversion)\.(?P\S+)`), - // Runtime packageType - regexp.MustCompile(`io\.k8s\.(?P\S+)\.pkg\.(?Pruntime)\.(?P\S+)`), - } -) - -var ( - packageTypeMap = map[string]Package{ - "core": Core, - "apis": APIs, - "util": Util, - "runtime": Runtime, - "version": Version, - } -) - -type description struct { - name string - codebase string - version string - kind ObjectKind - packageType Package - group string -} - -func (d *description) Validate() error { - if d.version == "" { - return fmt.Errorf("version is nil for %q", d.name) - } - - return nil -} - -func describeDefinition(name string) (*description, error) { - for _, r := range regexes { - if match := r.FindStringSubmatch(name); len(match) > 0 { - - result := make(map[string]string) - for i, name := range r.SubexpNames() { - if i != 0 { - result[name] = match[i] - } - } - - // Hacky heuristics to fix missing fields - if result["codebase"] == "" { - result["codebase"] = "kubernetes" - } - if result["packageType"] == "" && result["group"] == "" { - result["packageType"] = "core" - } - if result["packageType"] == "" && result["group"] != "" { - result["packageType"] = "apis" - } - - d := &description{ - name: name, - codebase: result["codebase"], - version: result["version"], - kind: ObjectKind(result["kind"]), - packageType: packageTypeMap[result["packageType"]], - group: result["group"], - } - - return d, nil - } - } - - return nil, fmt.Errorf("unknown definition %q", name) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/parsing.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/parsing.go deleted file mode 100644 index 53e9519c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/parsing.go +++ /dev/null @@ -1,201 +0,0 @@ -package kubespec - -import ( - "fmt" - "log" - "strings" -) - -//----------------------------------------------------------------------------- -// Utility methods for `DefinitionName` and `ObjectRef`. -//----------------------------------------------------------------------------- - -// Parse will parse a `DefinitionName` into a structured -// `ParsedDefinitionName`. -func (dn *DefinitionName) Parse() (*ParsedDefinitionName, error) { - name := string(*dn) - - desc, err := describeDefinition(name) - if err != nil { - return nil, fmt.Errorf("describe definition: %#v", err) - } - - pd := ParsedDefinitionName{ - Codebase: desc.codebase, - Kind: desc.kind, - PackageType: desc.packageType, - } - - if desc.group != "" { - group := GroupName(desc.group) - pd.Group = &group - } - - if desc.version != "" { - version := VersionString(desc.version) - pd.Version = &version - } - - return &pd, nil -} - -// Name parses a `DefinitionName` from an `ObjectRef`. `ObjectRef`s -// that refer to a definition contain two parts: (1) a special prefix, -// and (2) a `DefinitionName`, so this function simply strips the -// prefix off. -func (or *ObjectRef) Name() *DefinitionName { - defn := "#/definitions/" - ref := string(*or) - if !strings.HasPrefix(ref, defn) { - log.Fatalln(ref) - } - name := DefinitionName(strings.TrimPrefix(ref, defn)) - return &name -} - -func (dn DefinitionName) AsObjectRef() *ObjectRef { - or := ObjectRef("#/definitions/" + dn) - return &or -} - -//----------------------------------------------------------------------------- -// Parsed definition name. -//----------------------------------------------------------------------------- - -// Package represents the type of the definition, either `APIs`, which -// have API groups (e.g., extensions, apps, meta, and so on), or -// `Core`, which does not. -type Package int - -const ( - // Core is a package that contains the Kubernetes Core objects. - Core Package = iota - - // APIs is a set of non-core packages grouped loosely by semantic - // functionality (e.g., apps, extensions, and so on). - APIs - - // - // Internal packages. - // - - // Util is a package that contains utilities used for both testing - // and running Kubernetes. - Util - - // Runtime is a package that contains various utilities used in the - // Kubernetes runtime. - Runtime - - // Version is a package that supplies version information collected - // at build time. - Version -) - -// ParsedDefinitionName is a parsed version of a fully-qualified -// OpenAPI spec name. For example, -// `io.k8s.kubernetes.pkg.api.v1.Container` would parse into an -// instance of the struct below. -type ParsedDefinitionName struct { - PackageType Package - Codebase string - Group *GroupName // Pointer because it's optional. - Version *VersionString // Pointer because it's optional. - Kind ObjectKind -} - -// GroupName represetents a Kubernetes group name (e.g., apps, -// extensions, etc.) -type GroupName string - -func (gn GroupName) String() string { - return string(gn) -} - -// ObjectKind represents the `kind` of a Kubernetes API object (e.g., -// Service, Deployment, etc.) -type ObjectKind string - -func (ok ObjectKind) String() string { - return string(ok) -} - -// VersionString is the string representation of an API version (e.g., -// v1, v1beta1, etc.) -type VersionString string - -func (vs VersionString) String() string { - return string(vs) -} - -// Unparse transforms a `ParsedDefinitionName` back into its -// corresponding string, e.g., -// `io.k8s.kubernetes.pkg.api.v1.Container`. -func (p *ParsedDefinitionName) Unparse(isLegacySchema bool) (DefinitionName, error) { - withNewSchema := !isLegacySchema - - k8s := "kubernetes" - switch p.PackageType { - case Core: - { - if withNewSchema && p.Codebase == k8s { - return DefinitionName(fmt.Sprintf( - "io.k8s.api.core.%s.%s", - *p.Version, - p.Kind)), nil - } - - return DefinitionName(fmt.Sprintf( - "io.k8s.%s.pkg.api.%s.%s", - p.Codebase, - *p.Version, - p.Kind)), nil - } - case Util: - { - return DefinitionName(fmt.Sprintf( - "io.k8s.%s.pkg.util.%s.%s", - p.Codebase, - *p.Version, - p.Kind)), nil - } - case APIs: - { - if withNewSchema && p.Codebase == k8s { - return DefinitionName(fmt.Sprintf( - "io.k8s.api.%s.%s.%s", - *p.Group, - *p.Version, - p.Kind)), nil - } - return DefinitionName(fmt.Sprintf( - "io.k8s.%s.pkg.apis.%s.%s.%s", - p.Codebase, - *p.Group, - *p.Version, - p.Kind)), nil - } - case Version: - { - return DefinitionName(fmt.Sprintf( - "io.k8s.%s.pkg.version.%s", - p.Codebase, - p.Kind)), nil - } - case Runtime: - { - return DefinitionName(fmt.Sprintf( - "io.k8s.%s.pkg.runtime.%s", - p.Codebase, - p.Kind)), nil - } - default: - { - return "", - fmt.Errorf( - "Failed to unparse definition name, did not recognize kind '%d'", - p.PackageType) - } - } - -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/parsing_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/parsing_test.go deleted file mode 100644 index 8c5e8166..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/parsing_test.go +++ /dev/null @@ -1,382 +0,0 @@ -package kubespec - -import ( - "fmt" - "testing" -) - -var legacyNamespaces = []string{ - "io.k8s.kubernetes.pkg.api.v1.NodeAffinity", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerStatus", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ThirdPartyResource", - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.RoleRef", - "io.k8s.kubernetes.pkg.api.v1.ConfigMapKeySelector", - "io.k8s.kubernetes.pkg.api.v1.LimitRangeItem", - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaimStatus", - "io.k8s.kubernetes.pkg.api.v1.PodTemplateList", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetSpec", - "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta", - "io.k8s.kubernetes.pkg.api.v1.LocalObjectReference", - "io.k8s.kubernetes.pkg.api.v1.FlockerVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.PersistentVolume", - "io.k8s.kubernetes.pkg.api.v1.Toleration", - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerStatus", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscaler", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.PodSecurityPolicy", - "io.k8s.kubernetes.pkg.api.v1.ConfigMapProjection", - "io.k8s.kubernetes.pkg.api.v1.ContainerStatus", - "io.k8s.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudget", - "io.k8s.kubernetes.pkg.api.v1.GitRepoVolumeSource", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentList", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentSpec", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetList", - "io.k8s.apimachinery.pkg.apis.meta.v1.ServerAddressByClientCIDR", - "io.k8s.kubernetes.pkg.api.v1.Binding", - "io.k8s.kubernetes.pkg.api.v1.Pod", - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.CronJob", - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.RoleBindingList", - "io.k8s.kubernetes.pkg.apis.storage.v1.StorageClass", - "io.k8s.kubernetes.pkg.api.v1.LimitRange", - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaimList", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentRollback", - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.SubjectAccessReview", - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.PolicyRule", - "io.k8s.kubernetes.pkg.api.v1.Affinity", - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaimSpec", - "io.k8s.kubernetes.pkg.apis.authorization.v1.SubjectAccessReviewStatus", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicySpec", - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaimVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.ResourceQuotaSpec", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.Deployment", - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.Role", - "io.k8s.kubernetes.pkg.apis.storage.v1beta1.StorageClassList", - "io.k8s.kubernetes.pkg.api.v1.LoadBalancerStatus", - "io.k8s.kubernetes.pkg.api.v1.Probe", - "io.k8s.kubernetes.pkg.api.v1.GlusterfsVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeList", - "io.k8s.kubernetes.pkg.apis.authorization.v1.SubjectAccessReviewSpec", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.CrossVersionObjectReference", - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequest", - "io.k8s.apimachinery.pkg.apis.meta.v1.APIVersions", - "io.k8s.kubernetes.pkg.api.v1.ConfigMap", - "io.k8s.kubernetes.pkg.api.v1.NodeList", - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleBinding", - "io.k8s.apimachinery.pkg.apis.meta.v1.GroupVersionForDiscovery", - "io.k8s.kubernetes.pkg.api.v1.NodeAddress", - "io.k8s.kubernetes.pkg.apis.storage.v1.StorageClassList", - "io.k8s.apimachinery.pkg.apis.meta.v1.WatchEvent", - "io.k8s.kubernetes.pkg.api.v1.ReplicationControllerStatus", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentCondition", - "io.k8s.kubernetes.pkg.apis.authentication.v1.TokenReviewSpec", - "io.k8s.kubernetes.pkg.api.v1.AzureFileVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.EnvFromSource", - "io.k8s.kubernetes.pkg.api.v1.Node", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSetSpec", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyPort", - "io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause", - "io.k8s.kubernetes.pkg.api.v1.ContainerState", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressStatus", - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.ClusterRole", - "io.k8s.kubernetes.pkg.api.v1.ResourceQuota", - "io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPresetSpec", - "io.k8s.kubernetes.pkg.api.v1.Service", - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.ResourceAttributes", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.RollingUpdateDaemonSet", - "io.k8s.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudgetSpec", - "io.k8s.kubernetes.pkg.api.v1.PodAntiAffinity", - "io.k8s.kubernetes.pkg.api.v1.PortworxVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.RBDVolumeSource", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentStatus", - "io.k8s.kubernetes.pkg.apis.authorization.v1.LocalSubjectAccessReview", - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.LocalSubjectAccessReview", - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.NonResourceAttributes", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.MetricStatus", - "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta", - "io.k8s.kubernetes.pkg.api.v1.FlexVolumeSource", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressBackend", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressList", - "io.k8s.kubernetes.pkg.api.v1.ComponentCondition", - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaim", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.SELinuxStrategyOptions", - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.Role", - "io.k8s.kubernetes.pkg.api.v1.Container", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.ResourceMetricSource", - "io.k8s.kubernetes.pkg.api.v1.HostAlias", - "io.k8s.kubernetes.pkg.api.v1.NodeSystemInfo", - "io.k8s.kubernetes.pkg.api.v1.ResourceRequirements", - "io.k8s.kubernetes.pkg.api.v1.ScaleIOVolumeSource", - "io.k8s.kubernetes.pkg.apis.authentication.v1.UserInfo", - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerSpec", - "io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions", - "io.k8s.apimachinery.pkg.version.Info", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.HTTPIngressPath", - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestList", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.HostPortRange", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetStatus", - "io.k8s.kubernetes.pkg.api.v1.Lifecycle", - "io.k8s.kubernetes.pkg.api.v1.VolumeMount", - "io.k8s.kubernetes.pkg.api.v1.SecretEnvSource", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetCondition", - "io.k8s.kubernetes.pkg.api.v1.ComponentStatusList", - "io.k8s.kubernetes.pkg.api.v1.Secret", - "io.k8s.kubernetes.pkg.api.v1.ObjectFieldSelector", - "io.k8s.kubernetes.pkg.api.v1.PodTemplate", - "io.k8s.kubernetes.pkg.api.v1.SecretProjection", - "io.k8s.kubernetes.pkg.apis.authorization.v1.SubjectAccessReview", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerList", - "io.k8s.kubernetes.pkg.api.v1.EndpointsList", - "io.k8s.kubernetes.pkg.api.v1.ExecAction", - "io.k8s.kubernetes.pkg.apis.authentication.v1beta1.TokenReview", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyIngressRule", - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleList", - "io.k8s.kubernetes.pkg.api.v1.ObjectReference", - "io.k8s.kubernetes.pkg.api.v1.SecurityContext", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.MetricSpec", - "io.k8s.apimachinery.pkg.apis.meta.v1.Status", - "io.k8s.kubernetes.pkg.api.v1.NodeCondition", - "io.k8s.kubernetes.pkg.apis.authorization.v1.SelfSubjectAccessReview", - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.ScaleSpec", - "io.k8s.kubernetes.pkg.api.v1.Namespace", - "io.k8s.kubernetes.pkg.api.v1.ServiceStatus", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.RollingUpdateDeployment", - "io.k8s.kubernetes.pkg.api.v1.FCVolumeSource", - "io.k8s.kubernetes.pkg.apis.authorization.v1.ResourceAttributes", - "io.k8s.kubernetes.pkg.api.v1.ProjectedVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.VsphereVirtualDiskVolumeSource", - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.RoleBindingList", - "io.k8s.kubernetes.pkg.apis.storage.v1beta1.StorageClass", - "io.k8s.kubernetes.pkg.api.v1.EnvVarSource", - "io.k8s.kubernetes.pkg.api.v1.PhotonPersistentDiskVolumeSource", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.ObjectMetricSource", - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.RoleRef", - "io.k8s.apimachinery.pkg.apis.meta.v1.Initializer", - "io.k8s.kubernetes.pkg.api.v1.Event", - "io.k8s.kubernetes.pkg.api.v1.ResourceQuotaStatus", - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.SelfSubjectAccessReviewSpec", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.ScaleSpec", - "io.k8s.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudgetStatus", - "io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPresetList", - "io.k8s.kubernetes.pkg.api.v1.ConfigMapEnvSource", - "io.k8s.kubernetes.pkg.api.v1.NodeSelectorRequirement", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerSpec", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentList", - "io.k8s.kubernetes.pkg.api.v1.Endpoints", - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscaler", - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.SelfSubjectAccessReview", - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.JobTemplateSpec", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.APIVersion", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.PodSecurityPolicyList", - "io.k8s.kubernetes.pkg.api.v1.DaemonEndpoint", - "io.k8s.kubernetes.pkg.api.v1.ISCSIVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.GCEPersistentDiskVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.NodeSelector", - "io.k8s.kubernetes.pkg.apis.authentication.v1.TokenReviewStatus", - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.CronJobStatus", - "io.k8s.apimachinery.pkg.runtime.RawExtension", - "io.k8s.kubernetes.pkg.api.v1.ContainerImage", - "io.k8s.kubernetes.pkg.api.v1.SecretKeySelector", - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.CronJobList", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyPeer", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.PodSecurityPolicySpec", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ScaleSpec", - "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroupList", - "io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions", - "io.k8s.kubernetes.pkg.api.v1.ReplicationController", - "io.k8s.kubernetes.pkg.api.v1.TCPSocketAction", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSetList", - "io.k8s.kubernetes.pkg.apis.authorization.v1.SelfSubjectAccessReviewSpec", - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.SubjectAccessReviewStatus", - "io.k8s.kubernetes.pkg.api.v1.AttachedVolume", - "io.k8s.kubernetes.pkg.api.v1.KeyToPath", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.ObjectMetricStatus", - "io.k8s.apimachinery.pkg.apis.meta.v1.Patch", - "io.k8s.kubernetes.pkg.api.v1.SecretList", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.ScaleStatus", - "io.k8s.kubernetes.pkg.apis.authentication.v1.TokenReview", - "io.k8s.kubernetes.pkg.apis.batch.v1.JobStatus", - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.Subject", - "io.k8s.apimachinery.pkg.api.resource.Quantity", - "io.k8s.kubernetes.pkg.api.v1.ReplicationControllerList", - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.CronJobSpec", - "io.k8s.kubernetes.pkg.api.v1.EnvVar", - "io.k8s.kubernetes.pkg.api.v1.PodStatus", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetList", - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.RoleBinding", - "io.k8s.kubernetes.pkg.api.v1.EndpointAddress", - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.ScaleStatus", - "io.k8s.kubernetes.pkg.apis.batch.v1.JobCondition", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.FSGroupStrategyOptions", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.Ingress", - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRole", - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleBinding", - "io.k8s.kubernetes.pkg.api.v1.NodeDaemonEndpoints", - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.CrossVersionObjectReference", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.ResourceMetricStatus", - "io.k8s.kubernetes.pkg.api.v1.AzureDiskVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.ResourceQuotaList", - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.RoleList", - "io.k8s.kubernetes.pkg.api.v1.PodCondition", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ThirdPartyResourceList", - "io.k8s.apimachinery.pkg.util.intstr.IntOrString", - "io.k8s.kubernetes.pkg.api.v1.LoadBalancerIngress", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.RollbackConfig", - "io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPreset", - "io.k8s.kubernetes.pkg.api.v1.Taint", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressSpec", - "io.k8s.kubernetes.pkg.api.v1.ContainerStateRunning", - "io.k8s.kubernetes.pkg.api.v1.VolumeProjection", - "io.k8s.kubernetes.pkg.api.v1.PreferredSchedulingTerm", - "io.k8s.kubernetes.pkg.api.v1.SecretVolumeSource", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentCondition", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentSpec", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentStatus", - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleBindingList", - "io.k8s.apimachinery.pkg.apis.meta.v1.APIGroup", - "io.k8s.kubernetes.pkg.api.v1.ConfigMapList", - "io.k8s.kubernetes.pkg.api.v1.ServicePort", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSet", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentStrategy", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressTLS", - "io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference", - "io.k8s.kubernetes.pkg.api.v1.ContainerStateTerminated", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetUpdateStrategy", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyList", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.Scale", - "io.k8s.kubernetes.pkg.api.v1.ReplicationControllerSpec", - "io.k8s.kubernetes.pkg.apis.authentication.v1beta1.UserInfo", - "io.k8s.kubernetes.pkg.api.v1.NodeStatus", - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeSpec", - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestStatus", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.HTTPIngressRuleValue", - "io.k8s.kubernetes.pkg.apis.policy.v1beta1.Eviction", - "io.k8s.kubernetes.pkg.api.v1.DownwardAPIVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.NamespaceSpec", - "io.k8s.kubernetes.pkg.api.v1.ComponentStatus", - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeStatus", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.SupplementalGroupsStrategyOptions", - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleList", - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.PolicyRule", - "io.k8s.kubernetes.pkg.api.v1.NamespaceStatus", - "io.k8s.kubernetes.pkg.api.v1.NodeSpec", - "io.k8s.kubernetes.pkg.api.v1.DownwardAPIVolumeFile", - "io.k8s.kubernetes.pkg.api.v1.EndpointSubset", - "io.k8s.kubernetes.pkg.api.v1.Handler", - "io.k8s.kubernetes.pkg.api.v1.WeightedPodAffinityTerm", - "io.k8s.kubernetes.pkg.apis.batch.v1.JobList", - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleBindingList", - "io.k8s.apimachinery.pkg.apis.meta.v1.APIResource", - "io.k8s.kubernetes.pkg.api.v1.AWSElasticBlockStoreVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.NFSVolumeSource", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentStrategy", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSetStatus", - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerList", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentRollback", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetSpec", - "io.k8s.kubernetes.pkg.api.v1.CinderVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.EmptyDirVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.PodTemplateSpec", - "io.k8s.kubernetes.pkg.api.v1.SELinuxOptions", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.RollingUpdateDeployment", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.PodsMetricStatus", - "io.k8s.kubernetes.pkg.api.v1.Capabilities", - "io.k8s.kubernetes.pkg.api.v1.PodSecurityContext", - "io.k8s.kubernetes.pkg.api.v1.ContainerPort", - "io.k8s.kubernetes.pkg.api.v1.EventSource", - "io.k8s.kubernetes.pkg.api.v1.HostPathVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.PodAffinity", - "io.k8s.kubernetes.pkg.api.v1.PodSpec", - "io.k8s.kubernetes.pkg.api.v1.ReplicationControllerCondition", - "io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails", - "io.k8s.kubernetes.pkg.api.v1.CephFSVolumeSource", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.Scale", - "io.k8s.kubernetes.pkg.apis.batch.v1.Job", - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.RoleBinding", - "io.k8s.kubernetes.pkg.api.v1.ServiceList", - "io.k8s.kubernetes.pkg.api.v1.ServiceSpec", - "io.k8s.kubernetes.pkg.apis.authentication.v1beta1.TokenReviewSpec", - "io.k8s.kubernetes.pkg.apis.batch.v1.JobSpec", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetStatus", - "io.k8s.kubernetes.pkg.api.v1.NamespaceList", - "io.k8s.kubernetes.pkg.api.v1.ServiceAccountList", - "io.k8s.kubernetes.pkg.apis.authorization.v1.NonResourceAttributes", - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.SubjectAccessReviewSpec", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSet", - "io.k8s.kubernetes.pkg.api.v1.HTTPGetAction", - "io.k8s.kubernetes.pkg.api.v1.LimitRangeList", - "io.k8s.kubernetes.pkg.api.v1.ContainerStateWaiting", - "io.k8s.kubernetes.pkg.api.v1.HTTPHeader", - "io.k8s.kubernetes.pkg.api.v1.QuobyteVolumeSource", - "io.k8s.kubernetes.pkg.api.v1.ResourceFieldSelector", - "io.k8s.kubernetes.pkg.api.v1.Volume", - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestCondition", - "io.k8s.apimachinery.pkg.apis.meta.v1.Initializers", - "io.k8s.apimachinery.pkg.apis.meta.v1.Time", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.RunAsUserStrategyOptions", - "io.k8s.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudgetList", - "io.k8s.kubernetes.pkg.api.v1.LimitRangeSpec", - "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector", - "io.k8s.kubernetes.pkg.api.v1.DownwardAPIProjection", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.RollbackConfig", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IDRange", - "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement", - "io.k8s.kubernetes.pkg.api.v1.NodeSelectorTerm", - "io.k8s.kubernetes.pkg.api.v1.EventList", - "io.k8s.kubernetes.pkg.api.v1.PodAffinityTerm", - "io.k8s.kubernetes.pkg.api.v1.ServiceAccount", - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSet", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ScaleStatus", - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.Subject", - "io.k8s.apimachinery.pkg.apis.meta.v1.APIResourceList", - "io.k8s.kubernetes.pkg.api.v1.ConfigMapVolumeSource", - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestSpec", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.Deployment", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressRule", - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicy", - "io.k8s.kubernetes.pkg.api.v1.PodList", - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.Scale", - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.PodsMetricSource", - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.RoleList", - "io.k8s.kubernetes.pkg.api.v1.EndpointPort", - "io.k8s.kubernetes.pkg.apis.authentication.v1beta1.TokenReviewStatus", -} - -// Definition naming schema for Kubernetes 1.8.x+ -var newSchemaNamespaces = []string{ - "io.k8s.api.core.v1.ConfigMapList", - "io.k8s.api.policy.v1beta1.Eviction", - "io.k8s.api.apps.v1beta2.ControllerRevision", - "io.k8s.api.batch.v2alpha1.CronJobList", - "io.k8s.apimachinery.pkg.apis.meta.v1.Status", -} - -func testDefinitionName(namespace string, withNewSchema bool, t *testing.T) { - dn := DefinitionName(namespace) - parsed, err := dn.Parse() - if err != nil { - t.Fatalf("Unexpected error while parsing: %v", err) - } - - unparsed, err := parsed.Unparse(withNewSchema) - if err != nil { - t.Fatalf("Unexpected error while unparsing: %v", err) - } - - if dn != unparsed { - t.Errorf("Expected '%s' got '%s'", string(dn), unparsed) - } -} - -func TestNamespaceParser(t *testing.T) { - for _, namespace := range legacyNamespaces { - t.Run(fmt.Sprintf("legacy namespace: %s", namespace), func(t *testing.T) { - testDefinitionName(namespace, true, t) - }) - } - - for _, namespace := range newSchemaNamespaces { - t.Run(fmt.Sprintf("namespace: %s", namespace), func(t *testing.T) { - testDefinitionName(namespace, false, t) - }) - } - -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/swagger.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/swagger.go deleted file mode 100644 index 74f6b9c8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/swagger.go +++ /dev/null @@ -1,165 +0,0 @@ -package kubespec - -import ( - "strings" -) - -// APISpec represents an OpenAPI specification of an API. -type APISpec struct { - SwaggerVersion string `json:"swagger"` - Info *SchemaInfo `json:"info"` - Definitions SchemaDefinitions `json:"definitions"` - - // Fields we currently ignore: - // - paths - // - securityDefinitions - // - security - - // Not part of the OpenAPI spec. Filled in later. - FilePath string - Text []byte -} - -// SchemaInfo contains information about the the API represented with -// `APISpec`. For example, `title` might be `"Kubernetes"`, and -// `version` might be `"v1.7.0"`. -type SchemaInfo struct { - Title string `json:"title"` - Version string `json:"version"` -} - -// SchemaDefinition is an API object definition. For example, this -// might contain a name (e.g., `v1.APIGroup`), a set of properties -// (e.g., `apiVersion`, `kind`, and so on), and the names of required -// properties. -type SchemaDefinition struct { - Type *SchemaType `json:"type"` - Description string `json:"description"` // nullable. - Required []string `json:"required"` // nullable. - Properties Properties `json:"properties"` // nullable. - TopLevelSpecs TopLevelSpecs `json:"x-kubernetes-group-version-kind"` - Ref string `json:"$ref,omitempty"` -} - -// IsDeprecated returns true if the definition has a description -// that starts with "Deprecated" and a $ref that is not empty. -func (sd *SchemaDefinition) IsDeprecated() bool { - if strings.HasPrefix(sd.Description, "Deprecated") { - if sd.Ref != "" { - return true - } - } - - return false -} - -// IsCRD returns true if the definition represents a CRD. -func (sd *SchemaDefinition) IsCRD() bool { - _, ok := sd.Properties["Schema"] - return ok -} - -// QualifiedGroupName is the qualified group name. It is retrieved -// from the x-kubernetes-group-version-kind field. If it doesn't -// exist, the group name is returned. -func (sd *SchemaDefinition) QualifiedGroupName(groupName string) string { - if len(sd.TopLevelSpecs) > 0 && sd.TopLevelSpecs[0].Group != "" { - return string(sd.TopLevelSpecs[0].Group) - } - - return groupName -} - -// TopLevelSpec is a property that exists on `SchemaDefinition`s for -// top-level API objects. -type TopLevelSpec struct { - Group GroupName `json:"Group"` - Version VersionString `json:"Version"` - Kind ObjectKind `json:"Kind"` -} -type TopLevelSpecs []*TopLevelSpec - -// SchemaDefinitions is a named collection of `SchemaDefinition`s, -// represented as a collection mapping definition name -> -// `SchemaDefinition`. -type SchemaDefinitions map[DefinitionName]*SchemaDefinition - -// Property represents an object property for some API object. For -// example, `v1.APIGroup` might contain a property called -// `apiVersion`, which would be specifid by a `Property`. -type Property struct { - Description string `json:"description"` - Type *SchemaType `json:"type"` - Ref *ObjectRef `json:"$ref"` - Items Items `json:"items"` // nil unless Type == "array". -} - -// Properties is a named collection of `Properties`s, represented as a -// collection mapping definition name -> `Properties`. -type Properties map[PropertyName]*Property - -// Items represents the type of an element in an array. Usually this -// is used to fully specify a `Property` object whose `type` field is -// `"array"`. -type Items struct { - Ref *ObjectRef `json:"$ref"` - - // Ignored fields: - // - Type *SchemaType `json:"type"` - // - Format *string `json:"format"` -} - -// SchemaType represents the type of some object in an API spec. For -// example, a property might have type `string`. -type SchemaType string - -func (st SchemaType) String() string { - return string(st) -} - -// ObjectRef represents a reference to some API object. For example, -// `#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta` -type ObjectRef string - -func (or ObjectRef) String() string { - return string(or) -} - -// IsMixinRef will check whether a `ObjectRef` refers to an API object -// that can be turned into a mixin. This should be true of the vast -// majority of non-nil `ObjectRef`s. The most common exception is -// `IntOrString`, which should not be turned into a mixin, and should -// instead by transformed into a property method that behaves -// identically to one taking an int or a ref as argument. -func (or *ObjectRef) IsMixinRef() bool { - if or == nil { - return false - } - - return *or != "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" -} - -func stringInSlice(a string, list []string) bool { - for _, b := range list { - if b == a { - return true - } - } - return false -} - -// PropertyName represents the name of a property. For example, -// `apiVersion` or `kind`. -type PropertyName string - -func (pn PropertyName) String() string { - return string(pn) -} - -// DefinitionName represents the name of a definition. For example, -// `v1.APIGroup`. -type DefinitionName string - -func (dn DefinitionName) String() string { - return string(dn) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/testdata/deployment.json b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/testdata/deployment.json deleted file mode 100644 index 54fe609a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/testdata/deployment.json +++ /dev/null @@ -1,678 +0,0 @@ -{ - "swagger": "2.0", - "definitions": { - "io.k8s.api.apps.v1beta2.Deployment": { - "description": "Deployment enables declarative updates for Pods and ReplicaSets.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "metadata": { - "description": "Standard object metadata.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of the Deployment.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DeploymentSpec" - }, - "status": { - "description": "Most recently observed status of the Deployment.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DeploymentStatus" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "apps", - "kind": "Deployment", - "version": "v1beta2" - } - ] - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta": { - "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", - "properties": { - "annotations": { - "description": "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", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "clusterName": { - "description": "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.", - "type": "string" - }, - "creationTimestamp": { - "description": "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.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "deletionGracePeriodSeconds": { - "description": "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.", - "type": "integer", - "format": "int64" - }, - "deletionTimestamp": { - "description": "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 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.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Time" - }, - "finalizers": { - "description": "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.", - "type": "array", - "items": { - "type": "string" - }, - "x-kubernetes-patch-strategy": "merge" - }, - "generateName": { - "description": "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.\n\nIf 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).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency", - "type": "string" - }, - "generation": { - "description": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", - "type": "integer", - "format": "int64" - }, - "initializers": { - "description": "An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects.\n\nWhen an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Initializers" - }, - "labels": { - "description": "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", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "name": { - "description": "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", - "type": "string" - }, - "namespace": { - "description": "Namespace defines the space within 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.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", - "type": "string" - }, - "ownerReferences": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference" - }, - "x-kubernetes-patch-merge-key": "uid", - "x-kubernetes-patch-strategy": "merge" - }, - "resourceVersion": { - "description": "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.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency", - "type": "string" - }, - "selfLink": { - "description": "SelfLink is a URL representing this object. Populated by the system. Read-only.", - "type": "string" - }, - "uid": { - "description": "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.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Time": { - "type": "string", - "format": "date-time" - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Initializers": { - "description": "Initializers tracks the progress of initialization.", - "required": [ - "pending" - ], - "properties": { - "pending": { - "description": "Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Initializer" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "result": { - "description": "If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.Status" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.Status": { - "description": "Status is a return value for calls that don't return other objects.", - "properties": { - "apiVersion": { - "description": "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/api-conventions.md#resources", - "type": "string" - }, - "code": { - "description": "Suggested HTTP return code for this status, 0 if not set.", - "type": "integer", - "format": "int32" - }, - "details": { - "description": "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.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "message": { - "description": "A human-readable description of the status of this operation.", - "type": "string" - }, - "metadata": { - "description": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - }, - "reason": { - "description": "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.", - "type": "string" - }, - "status": { - "description": "Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "type": "string" - } - }, - "x-kubernetes-group-version-kind": [ - { - "group": "", - "kind": "Status", - "version": "v1" - } - ] - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails": { - "description": "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.", - "properties": { - "causes": { - "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause" - } - }, - "group": { - "description": "The group attribute of the resource associated with the status StatusReason.", - "type": "string" - }, - "kind": { - "description": "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/api-conventions.md#types-kinds", - "type": "string" - }, - "name": { - "description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", - "type": "string" - }, - "retryAfterSeconds": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "uid": { - "description": "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids", - "type": "string" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta": { - "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", - "properties": { - "continue": { - "description": "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 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.", - "type": "string" - }, - "resourceVersion": { - "description": "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/api-conventions.md#concurrency-control-and-consistency", - "type": "string" - }, - "selfLink": { - "description": "selfLink is a URL representing this object. Populated by the system. Read-only.", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta2.DeploymentSpec": { - "description": "DeploymentSpec is the specification of the desired behavior of the Deployment.", - "required": [ - "template" - ], - "properties": { - "minReadySeconds": { - "description": "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)", - "type": "integer", - "format": "int32" - }, - "paused": { - "description": "Indicates that the deployment is paused.", - "type": "boolean" - }, - "progressDeadlineSeconds": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", - "type": "integer", - "format": "int32" - }, - "revisionHistoryLimit": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "selector": { - "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector" - }, - "strategy": { - "description": "The deployment strategy to use to replace existing pods with new ones.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DeploymentStrategy" - }, - "template": { - "description": "Template describes the pods that will be created.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodTemplateSpec" - } - } - }, - "io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector": { - "description": "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.", - "properties": { - "matchExpressions": { - "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement" - } - }, - "matchLabels": { - "description": "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.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "io.k8s.api.apps.v1beta2.DeploymentStrategy": { - "description": "DeploymentStrategy describes how to replace existing pods with new ones.", - "properties": { - "rollingUpdate": { - "description": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.RollingUpdateDeployment" - }, - "type": { - "description": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta2.RollingUpdateDeployment": { - "description": "Spec to control the desired behavior of rolling update.", - "properties": { - "maxSurge": { - "description": "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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - }, - "maxUnavailable": { - "description": "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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString" - } - } - }, - "io.k8s.apimachinery.pkg.util.intstr.IntOrString": { - "type": "string", - "format": "int-or-string" - }, - "io.k8s.api.core.v1.PodTemplateSpec": { - "description": "PodTemplateSpec describes the data a pod should have when created from a template", - "properties": { - "metadata": { - "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "description": "Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status", - "$ref": "#/definitions/io.k8s.api.core.v1.PodSpec" - } - } - }, - "io.k8s.api.core.v1.PodSpec": { - "description": "PodSpec is a description of a pod.", - "required": [ - "containers" - ], - "properties": { - "activeDeadlineSeconds": { - "description": "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.", - "type": "integer", - "format": "int64" - }, - "affinity": { - "description": "If specified, the pod's scheduling constraints", - "$ref": "#/definitions/io.k8s.api.core.v1.Affinity" - }, - "automountServiceAccountToken": { - "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.", - "type": "boolean" - }, - "containers": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Container" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "dnsPolicy": { - "description": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'.", - "type": "string" - }, - "hostAliases": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.HostAlias" - }, - "x-kubernetes-patch-merge-key": "ip", - "x-kubernetes-patch-strategy": "merge" - }, - "hostIPC": { - "description": "Use the host's ipc namespace. Optional: Default to false.", - "type": "boolean" - }, - "hostNetwork": { - "description": "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.", - "type": "boolean" - }, - "hostPID": { - "description": "Use the host's pid namespace. Optional: Default to false.", - "type": "boolean" - }, - "hostname": { - "description": "Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value.", - "type": "string" - }, - "imagePullSecrets": { - "description": "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", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "initContainers": { - "description": "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, or Liveness 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/", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Container" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge" - }, - "nodeName": { - "description": "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.", - "type": "string" - }, - "nodeSelector": { - "description": "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/", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "priority": { - "description": "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.", - "type": "integer", - "format": "int32" - }, - "priorityClassName": { - "description": "If specified, indicates the pod's priority. \"SYSTEM\" is a special keyword which indicates 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.", - "type": "string" - }, - "restartPolicy": { - "description": "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", - "type": "string" - }, - "schedulerName": { - "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler.", - "type": "string" - }, - "securityContext": { - "description": "SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field.", - "$ref": "#/definitions/io.k8s.api.core.v1.PodSecurityContext" - }, - "serviceAccount": { - "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.", - "type": "string" - }, - "serviceAccountName": { - "description": "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/", - "type": "string" - }, - "subdomain": { - "description": "If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all.", - "type": "string" - }, - "terminationGracePeriodSeconds": { - "description": "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 delete immediately. 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.", - "type": "integer", - "format": "int64" - }, - "tolerations": { - "description": "If specified, the pod's tolerations.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Toleration" - } - }, - "volumes": { - "description": "List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.Volume" - }, - "x-kubernetes-patch-merge-key": "name", - "x-kubernetes-patch-strategy": "merge,retainKeys" - } - } - }, - "io.k8s.api.core.v1.Affinity": { - "description": "Affinity is a group of affinity scheduling rules.", - "properties": { - "nodeAffinity": { - "description": "Describes node affinity scheduling rules for the pod.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeAffinity" - }, - "podAffinity": { - "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).", - "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinity" - }, - "podAntiAffinity": { - "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).", - "$ref": "#/definitions/io.k8s.api.core.v1.PodAntiAffinity" - } - } - }, - "io.k8s.api.core.v1.NodeAffinity": { - "description": "Node affinity is a group of node affinity scheduling rules.", - "properties": { - "preferredDuringSchedulingIgnoredDuringExecution": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PreferredSchedulingTerm" - } - }, - "requiredDuringSchedulingIgnoredDuringExecution": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelector" - } - } - }, - "io.k8s.api.core.v1.NodeSelector": { - "description": "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.", - "required": [ - "nodeSelectorTerms" - ], - "properties": { - "nodeSelectorTerms": { - "description": "Required. A list of node selector terms. The terms are ORed.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.NodeSelectorTerm" - } - } - } - }, - "io.k8s.api.core.v1.PodAffinity": { - "description": "Pod affinity is a group of inter pod affinity scheduling rules.", - "properties": { - "preferredDuringSchedulingIgnoredDuringExecution": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.WeightedPodAffinityTerm" - } - }, - "requiredDuringSchedulingIgnoredDuringExecution": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinityTerm" - } - } - } - }, - "io.k8s.api.core.v1.PodAntiAffinity": { - "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", - "properties": { - "preferredDuringSchedulingIgnoredDuringExecution": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.WeightedPodAffinityTerm" - } - }, - "requiredDuringSchedulingIgnoredDuringExecution": { - "description": "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.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.core.v1.PodAffinityTerm" - } - } - } - }, - "io.k8s.api.core.v1.PodSecurityContext": { - "description": "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.", - "properties": { - "fsGroup": { - "description": "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:\n\n1. 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----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.", - "type": "integer", - "format": "int64" - }, - "runAsNonRoot": { - "description": "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.", - "type": "boolean" - }, - "runAsUser": { - "description": "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.", - "type": "integer", - "format": "int64" - }, - "seLinuxOptions": { - "description": "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.", - "$ref": "#/definitions/io.k8s.api.core.v1.SELinuxOptions" - }, - "supplementalGroups": { - "description": "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.", - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - } - }, - "io.k8s.api.core.v1.SELinuxOptions": { - "description": "SELinuxOptions are the labels to be applied to the container", - "properties": { - "level": { - "description": "Level is SELinux level label that applies to the container.", - "type": "string" - }, - "role": { - "description": "Role is a SELinux role label that applies to the container.", - "type": "string" - }, - "type": { - "description": "Type is a SELinux type label that applies to the container.", - "type": "string" - }, - "user": { - "description": "User is a SELinux user label that applies to the container.", - "type": "string" - } - } - }, - "io.k8s.api.apps.v1beta2.DeploymentStatus": { - "description": "DeploymentStatus is the most recently observed status of the Deployment.", - "properties": { - "availableReplicas": { - "description": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", - "type": "integer", - "format": "int32" - }, - "collisionCount": { - "description": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", - "type": "integer", - "format": "int32" - }, - "conditions": { - "description": "Represents the latest available observations of a deployment's current state.", - "type": "array", - "items": { - "$ref": "#/definitions/io.k8s.api.apps.v1beta2.DeploymentCondition" - }, - "x-kubernetes-patch-merge-key": "type", - "x-kubernetes-patch-strategy": "merge" - }, - "observedGeneration": { - "description": "The generation observed by the deployment controller.", - "type": "integer", - "format": "int64" - }, - "readyReplicas": { - "description": "Total number of ready pods targeted by this deployment.", - "type": "integer", - "format": "int32" - }, - "replicas": { - "description": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", - "type": "integer", - "format": "int32" - }, - "unavailableReplicas": { - "description": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", - "type": "integer", - "format": "int32" - }, - "updatedReplicas": { - "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", - "type": "integer", - "format": "int32" - } - } - } - } -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/testdata/invalid.json b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/testdata/invalid.json deleted file mode 100644 index 9716234c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubespec/testdata/invalid.json +++ /dev/null @@ -1 +0,0 @@ -////// invalid \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubeversion/blacklist.jq b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubeversion/blacklist.jq deleted file mode 100755 index 99bcca7e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubeversion/blacklist.jq +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env jq -S -f - - -# ----------------------------------------------------------------------------- -# USAGE NOTES. -# -# This `jq` script will generate a list of top-level Kubernetes API -# objects that contain either (or both of): -# -# 1. a property with the name `"status"`, or -# 2. a property whose type is `meta.v1.ListMeta`. -# -# For example: -# -# { -# "io.k8s.apimachinery.pkg.apis.meta.v1.Status": [ -# "status", "metadata" -# ] -# } -# -# This would indicate that the fields `metadata` and `status` are to -# be blacklisted in the object `meta.v1.Status`. -# -# -# Usage: -# cat swagger.json | jq -S -f blacklist.jq -# -# Or, if you are on an OS with jq > v1.4 -# cat swagger.json | ./blacklist.jq -# -# NOTE: It is very important to pass the -S flag here, because sorting -# the object keys makes the output diffable. -# ----------------------------------------------------------------------------- - - -# has_status_prop takes an Kubernetes API object definition from the -# swagger spec, and outputs a boolean indicating whether that API -# object has a property called `status`. -# -# For example, the input might be a -# `io.k8s.kubernetes.pkg.apis.apps.v1beta1.Deployment` object, which -# does indeed have a `status` field. -def has_status_prop: - . as $definition - | if $definition.properties.status != null then true else false end; - -# property_has_listmeta_type takes the property of a Kubernetes API -# object definition, and returns a bool indicating whether its type is -# a `$ref` of `meta.v1.ListMeta`. -# -# For example, `io.k8s.kubernetes.pkg.apis.apps.v1beta1.Deployment` -# does not have a property with a type that is a `$ref` to -# `meta.v1.ListMeta`. -def property_has_listmeta_type: - . as $property - | $property["$ref"] != null and - $property["$ref"] == "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta"; - -# props_with_listmeta_type returns the names of all properties in some -# Kubernetes API object definition whose type is `meta.v1.ListMeta`. -# -# For example, `io.k8s.kubernetes.pkg.apis.apps.v1beta1.Deployment` -# does not contain any properties with this type, so we would return -# an empty array, while another object might return a list of names. -def props_with_listmeta_type: [ - . as $definition - | select($definition.properties != null) - | $definition.properties - | to_entries[] - | select(.value | property_has_listmeta_type) - | .key -]; - -# entry_blacklist_props takes a key/value pair representing a -# Kubernetes API object and its name, and returns a list of properties -# that are blacklisted. -# -# For example, `.key` might be -# `io.k8s.kubernetes.pkg.apis.apps.v1beta1.Deployment`, while `.value` -# woudl be the actual swagger specification of the `Deployment` -# object. -def entry_blacklist_props: - .value as $definition - | ($definition | has_status_prop) as $has_status_prop - | ($definition | props_with_listmeta_type) as $props_with_listmeta_type - | ($props_with_listmeta_type | length > 0) as $has_listmeta_type_props - | if $has_status_prop and $has_listmeta_type_props - then {(.key): (["status"] | .+ $props_with_listmeta_type)} - elif $has_status_prop - then {(.key): ["status"]} - elif $has_listmeta_type_props - then {(.key): $props_with_listmeta_type} - else {(.key): []} - end; - -def create_blacklist: - [ .definitions | to_entries[] | entry_blacklist_props ] - | add - | with_entries(select(.value | length > 0)); - - -# Execute. -create_blacklist diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubeversion/data.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubeversion/data.go deleted file mode 100644 index f6c06995..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubeversion/data.go +++ /dev/null @@ -1,951 +0,0 @@ -package kubeversion - -//----------------------------------------------------------------------------- -// Kubernetes version-specific data for customizing code that's -// emitted. -//----------------------------------------------------------------------------- - -var versions = map[string]versionData{ - "v1.7.0": versionData{ - beta: false, - idAliases: map[string]string{ - // Properties of objects. Stuff like `cinder.volumeId`. - "hostIPC": "hostIpc", - "hostPID": "hostPid", - "targetCPUUtilizationPercentage": "targetCpuUtilizationPercentage", - "externalID": "externalId", - "podCIDR": "podCidr", - "providerID": "providerId", - "bootID": "bootId", - "machineID": "machineId", - "systemUUID": "systemUuid", - "volumeID": "volumeId", - "diskURI": "diskUri", - "targetWWNs": "targetWwns", - "datasetUUID": "datasetUuid", - "pdID": "pdId", - "scaleIO": "scaleIo", - "podIP": "podIp", - "hostIP": "hostIp", - "clusterIP": "clusterIp", - "externalIPs": "externalIps", - "loadBalancerIP": "loadBalancerIp", - "containerID": "containerId", - "imageID": "imageId", - "serverAddressByClientCIDRs": "serverAddressByClientCidrs", - "clientCIDR": "clientCidr", - "nonResourceURLs": "nonResourceUrls", - "currentCPUUtilizationPercentage": "currentCpuUtilizationPercentage", - "downwardAPI": "downwardApi", - - // Types. These have capitalized first letters, and exist in - // places like `core.v1.AWSElasticBlockStoreVolumeSource`. - "AWSElasticBlockStoreVolumeSource": "awsElasticBlockStoreVolumeSource", - "CephFSVolumeSource": "cephFsVolumeSource", - "DownwardAPIProjection": "downwardApiProjection", - "DownwardAPIVolumeFile": "downwardApiVolumeFile", - "DownwardAPIVolumeSource": "downwardApiVolumeSource", - "FCVolumeSource": "fcVolumeSource", - "GCEPersistentDiskVolumeSource": "gcePersistentDiskVolumeSource", - "HTTPGetAction": "httpGetAction", - "HTTPHeader": "httpHeader", - "ISCSIVolumeSource": "iscsiVolumeSource", - "NFSVolumeSource": "nfsVolumeSource", - "RBDVolumeSource": "rbdVolumeSource", - "SELinuxOptions": "seLinuxOptions", - "ScaleIOVolumeSource": "scaleIoVolumeSource", - "TCPSocketAction": "tcpSocketAction", - "APIVersion": "apiVersion", - "FSGroupStrategyOptions": "fsGroupStrategyOptions", - "HTTPIngressPath": "httpIngressPath", - "HTTPIngressRuleValue": "httpIngressRuleValue", - "IDRange": "idRange", - "IngressTLS": "ingressTls", - "SELinuxStrategyOptions": "seLinuxStrategyOptions", - "APIGroup": "apiGroup", - "APIGroupList": "apiGroupList", - "APIResource": "apiResource", - "APIResourceList": "apiResourceList", - "APIVersions": "apiVersions", - "ServerAddressByClientCIDR": "serverAddressByClientCidr", - - // Collisions with Jsonnet keywords. - "local": "localStorage", - }, - constructorSpecs: map[string][]CustomConstructorSpec{ - // - // Apps namespace. - // - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.Deployment": deploymentCtor, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentList": objectList, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentRollback": deploymentRollbackCtor, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.Scale": scaleCtor, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSet": statefulSetCtor, - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSetList": objectList, - - // - // Extensions namespace. - // - - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.Deployment": deploymentCtor, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentList": objectList, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentRollback": deploymentRollbackCtor, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.Scale": scaleCtor, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.StatefulSet": statefulSetCtor, - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.StatefulSetList": objectList, - - // - // Authentication namespace. - // - - "io.k8s.kubernetes.pkg.apis.authentication.v1.TokenReview": []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("token", "mixin.spec.withToken")), - }, - "io.k8s.kubernetes.pkg.apis.authentication.v1beta1.TokenReview": []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("token", "mixin.spec.withToken")), - }, - - // - // Autoscaling namespace. - // - - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerList": objectList, - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.Scale": scaleCtor, - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerList": objectList, - - // - // Batch namespace. - // - - "io.k8s.kubernetes.pkg.apis.batch.v1.JobList": objectList, - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.CronJobList": objectList, - - // - // Certificates namespace. - // - - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestList": objectList, - - // - // Core namespace. - // - - "io.k8s.kubernetes.pkg.api.v1.ConfigMap": []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("name", "mixin.metadata.withName"), - newParam("data")), - }, - "io.k8s.kubernetes.pkg.api.v1.ConfigMapList": objectList, - "io.k8s.kubernetes.pkg.api.v1.Container": []CustomConstructorSpec{ - newConstructor("new", newParam("name"), newParam("image")), - }, - "io.k8s.kubernetes.pkg.api.v1.ContainerPort": []CustomConstructorSpec{ - newConstructor("new", newParam("containerPort")), - newConstructor("newNamed", newParam("name"), newParam("containerPort")), - }, - "io.k8s.kubernetes.pkg.api.v1.EndpointsList": objectList, - "io.k8s.kubernetes.pkg.api.v1.EnvVar": []CustomConstructorSpec{ - newConstructor("new", newParam("name"), newParam("value")), - newConstructor( - "fromSecretRef", - newParam("name"), - newParamNestedRef("secretRefName", "mixin.valueFrom.secretKeyRef.withName"), - newParamNestedRef("secretRefKey", "mixin.valueFrom.secretKeyRef.withKey")), - newConstructor( - "fromFieldPath", - newParam("name"), - newParamNestedRef("fieldPath", "mixin.valueFrom.fieldRef.withFieldPath")), - }, - "io.k8s.kubernetes.pkg.api.v1.EventList": objectList, - "io.k8s.kubernetes.pkg.api.v1.KeyToPath": []CustomConstructorSpec{ - newConstructor("new", newParam("key"), newParam("path")), - }, - "io.k8s.kubernetes.pkg.api.v1.LimitRangeList": objectList, - "io.k8s.kubernetes.pkg.api.v1.Namespace": []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("name", "mixin.metadata.withName")), - }, - "io.k8s.kubernetes.pkg.api.v1.NamespaceList": objectList, - "io.k8s.kubernetes.pkg.api.v1.NodeList": objectList, - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaimList": objectList, - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeList": objectList, - "io.k8s.kubernetes.pkg.api.v1.PodList": objectList, - "io.k8s.kubernetes.pkg.api.v1.PodTemplateList": objectList, - "io.k8s.kubernetes.pkg.api.v1.ReplicationControllerList": objectList, - "io.k8s.kubernetes.pkg.api.v1.ResourceQuotaList": objectList, - "io.k8s.kubernetes.pkg.api.v1.Secret": []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("name", "mixin.metadata.withName"), - newParam("data"), - newParamWithDefault("type", "\"Opaque\"")), - newConstructor( - "fromString", - newParamNestedRef("name", "mixin.metadata.withName"), - newParam("stringData"), - newParamWithDefault("type", "\"Opaque\"")), - }, - "io.k8s.kubernetes.pkg.api.v1.SecretList": objectList, - "io.k8s.kubernetes.pkg.api.v1.Service": []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("name", "mixin.metadata.withName"), - newParamNestedRef("selector", "mixin.spec.withSelector"), - newParamNestedRef("ports", "mixin.spec.withPorts")), - }, - "io.k8s.kubernetes.pkg.api.v1.ServiceAccount": []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("name", "mixin.metadata.withName")), - }, - "io.k8s.kubernetes.pkg.api.v1.ServiceAccountList": objectList, - "io.k8s.kubernetes.pkg.api.v1.ServiceList": objectList, - "io.k8s.kubernetes.pkg.api.v1.ServicePort": []CustomConstructorSpec{ - newConstructor("new", newParam("port"), newParam("targetPort")), - newConstructor("newNamed", newParam("name"), newParam("port"), newParam("targetPort")), - }, - "io.k8s.kubernetes.pkg.api.v1.Volume": []CustomConstructorSpec{ - newConstructor( - "fromConfigMap", - newParam("name"), - newParamNestedRef("configMapName", "mixin.configMap.withName"), - newParamNestedRef("configMapItems", "mixin.configMap.withItems")), - newConstructor( - "fromEmptyDir", - newParam("name"), - newParamNestedRefDefault("emptyDir", "mixin.emptyDir.mixinInstance", "{}")), - newConstructor( - "fromPersistentVolumeClaim", - newParam("name"), - newParamNestedRef("claimName", "mixin.persistentVolumeClaim.withClaimName")), - newConstructor( - "fromHostPath", - newParam("name"), - newParamNestedRef("hostPath", "mixin.hostPath.withPath")), - newConstructor( - "fromSecret", - newParam("name"), - newParamNestedRef("secretName", "mixin.secret.withSecretName")), - }, - "io.k8s.kubernetes.pkg.api.v1.VolumeMount": []CustomConstructorSpec{ - newConstructor("new", newParam("name"), newParam("mountPath"), newParamWithDefault("readOnly", "false")), - }, - }, - - propertyBlacklist: map[string]propertySet{ - // Metadata fields. - "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta": newPropertySet( - "creationTimestamp", "deletionTimestamp", "generation", - "ownerReferences", "resourceVersion", "selfLink", "uid", - ), - - // Fields whose types are - // `io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta`. - "io.k8s.kubernetes.pkg.api.v1.ComponentStatusList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.ConfigMapList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.EndpointsList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.EventList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.LimitRangeList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.NamespaceList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.NodeList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaimList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.PodList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.PodTemplateList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.ReplicationControllerList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.ResourceQuotaList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.SecretList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.ServiceAccountList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.api.v1.ServiceList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSetList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscalerList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscalerList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.batch.v1.JobList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.CronJobList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequestList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.IngressList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.NetworkPolicyList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.PodSecurityPolicyList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ThirdPartyResourceList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudgetList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleBindingList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.ClusterRoleList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.RoleBindingList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.rbac.v1alpha1.RoleList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleBindingList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.ClusterRoleList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.RoleBindingList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.rbac.v1beta1.RoleList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.settings.v1alpha1.PodPresetList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.storage.v1.StorageClassList": newPropertySet("metadata"), - "io.k8s.kubernetes.pkg.apis.storage.v1beta1.StorageClassList": newPropertySet("metadata"), - - // Status fields. - "io.k8s.kubernetes.pkg.api.v1.Namespace": newPropertySet("status"), - "io.k8s.kubernetes.pkg.api.v1.Node": newPropertySet("status"), - "io.k8s.kubernetes.pkg.api.v1.NodeCondition": newPropertySet("status"), - "io.k8s.kubernetes.pkg.api.v1.PersistentVolume": newPropertySet("status"), - "io.k8s.kubernetes.pkg.api.v1.PersistentVolumeClaim": newPropertySet("status"), - "io.k8s.kubernetes.pkg.api.v1.Pod": newPropertySet("status"), - "io.k8s.kubernetes.pkg.api.v1.PodCondition": newPropertySet("status"), - "io.k8s.kubernetes.pkg.api.v1.ReplicationController": newPropertySet("status"), - "io.k8s.kubernetes.pkg.api.v1.ReplicationControllerCondition": newPropertySet("status"), - "io.k8s.kubernetes.pkg.api.v1.ResourceQuota": newPropertySet("status"), - "io.k8s.kubernetes.pkg.api.v1.Service": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.Deployment": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.DeploymentCondition": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.Scale": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.apps.v1beta1.StatefulSet": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.authentication.v1.TokenReview": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.authentication.v1beta1.TokenReview": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.authorization.v1.LocalSubjectAccessReview": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.authorization.v1.SelfSubjectAccessReview": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.authorization.v1.SubjectAccessReview": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.LocalSubjectAccessReview": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.SelfSubjectAccessReview": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.authorization.v1beta1.SubjectAccessReview": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.HorizontalPodAutoscaler": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.autoscaling.v1.Scale": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.autoscaling.v2alpha1.HorizontalPodAutoscaler": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.batch.v1.Job": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.batch.v1.JobCondition": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.batch.v2alpha1.CronJob": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.certificates.v1beta1.CertificateSigningRequest": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSet": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.Deployment": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DeploymentCondition": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.Ingress": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSet": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.ReplicaSetCondition": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.Scale": newPropertySet("status"), - "io.k8s.kubernetes.pkg.apis.policy.v1beta1.PodDisruptionBudget": newPropertySet("status"), - - // TODO: Find a more principled way to omit "status" types. - // Currently we emit these in the `local hidden` in the `root`, - // so that we can type aliases. To get around the fact that some - // of their function names collide with Jsonnet keywords, we - // simply choose not to emit them. Eventually we will approach - // this problem in a more principled manner. - "io.k8s.kubernetes.pkg.api.v1.ComponentCondition": newPropertySet("error", "status"), - "io.k8s.kubernetes.pkg.apis.authentication.v1.TokenReviewStatus": newPropertySet("error"), - "io.k8s.kubernetes.pkg.apis.authentication.v1beta1.TokenReviewStatus": newPropertySet("error"), - - // Has both status and a property with type - // `io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta`. - "io.k8s.apimachinery.pkg.apis.meta.v1.Status": newPropertySet("status", "metadata"), - - // Misc. - "io.k8s.kubernetes.pkg.apis.extensions.v1beta1.DaemonSetSpec": newPropertySet("templateGeneration"), - }, - kSource: `local k8s = import "k8s.libsonnet"; - -local apps = k8s.apps; -local core = k8s.core; -local extensions = k8s.extensions; - -local hidden = { - mapContainers(f):: { - local podContainers = super.spec.template.spec.containers, - spec+: { - template+: { - spec+: { - // IMPORTANT: This overwrites the 'containers' field - // for this deployment. - containers: std.map(f, podContainers), - }, - }, - }, - }, - - mapContainersWithName(names, f) :: - local nameSet = - if std.type(names) == "array" - then std.set(names) - else std.set([names]); - local inNameSet(name) = std.length(std.setInter(nameSet, std.set([name]))) > 0; - self.mapContainers( - function(c) - if std.objectHas(c, "name") && inNameSet(c.name) - then f(c) - else c - ), -}; - -k8s + { - apps:: apps + { - v1beta1:: apps.v1beta1 + { - local v1beta1 = apps.v1beta1, - - daemonSet:: v1beta1.daemonSet + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - - deployment:: v1beta1.deployment + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - }, - }, - - core:: core + { - v1:: core.v1 + { - list:: { - new(items):: - {apiVersion: "v1"} + - {kind: "List"} + - self.items(items), - - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - }, - }, - }, - - extensions:: extensions + { - v1beta1:: extensions.v1beta1 + { - local v1beta1 = extensions.v1beta1, - - daemonSet:: v1beta1.daemonSet + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - - deployment:: v1beta1.deployment + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - }, - }, -} -`, - }, - "v1.8.0": versionData{ - beta: true, - idAliases: map[string]string{ - // Properties of objects. Stuff like `cinder.volumeId`. - "hostIPC": "hostIpc", - "hostPID": "hostPid", - "targetCPUUtilizationPercentage": "targetCpuUtilizationPercentage", - "externalID": "externalId", - "podCIDR": "podCidr", - "providerID": "providerId", - "bootID": "bootId", - "machineID": "machineId", - "systemUUID": "systemUuid", - "volumeID": "volumeId", - "diskURI": "diskUri", - "targetWWNs": "targetWwns", - "datasetUUID": "datasetUuid", - "pdID": "pdId", - "scaleIO": "scaleIo", - "podIP": "podIp", - "hostIP": "hostIp", - "clusterIP": "clusterIp", - "externalIPs": "externalIps", - "loadBalancerIP": "loadBalancerIp", - "containerID": "containerId", - "imageID": "imageId", - "serverAddressByClientCIDRs": "serverAddressByClientCidrs", - "clientCIDR": "clientCidr", - "nonResourceURLs": "nonResourceUrls", - "currentCPUUtilizationPercentage": "currentCpuUtilizationPercentage", - "downwardAPI": "downwardApi", - "storagePolicyID": "storagePolicyId", - "clientIP": "clientIp", - "insecureSkipTLSVerify": "insecureSkipTlsVerify", - "cephFSPersistentVolumeSource": "cephFsPersistentVolumeSource", - "clientIPConfig": "clientIpConfig", - "storageOSPersistentVolumeSource": "storageOsPersistentVolumeSource", - "storageOSVolumeSource": "storageOsVolumeSource", - - // Types. These have capitalized first letters, and exist in - // places like `core.v1.AWSElasticBlockStoreVolumeSource`. - "AWSElasticBlockStoreVolumeSource": "awsElasticBlockStoreVolumeSource", - "CephFSVolumeSource": "cephFsVolumeSource", - "DownwardAPIProjection": "downwardApiProjection", - "DownwardAPIVolumeFile": "downwardApiVolumeFile", - "DownwardAPIVolumeSource": "downwardApiVolumeSource", - "FCVolumeSource": "fcVolumeSource", - "GCEPersistentDiskVolumeSource": "gcePersistentDiskVolumeSource", - "HTTPGetAction": "httpGetAction", - "HTTPHeader": "httpHeader", - "ISCSIVolumeSource": "iscsiVolumeSource", - "NFSVolumeSource": "nfsVolumeSource", - "RBDVolumeSource": "rbdVolumeSource", - "SELinuxOptions": "seLinuxOptions", - "ScaleIOVolumeSource": "scaleIoVolumeSource", - "TCPSocketAction": "tcpSocketAction", - "APIVersion": "apiVersion", - "FSGroupStrategyOptions": "fsGroupStrategyOptions", - "HTTPIngressPath": "httpIngressPath", - "HTTPIngressRuleValue": "httpIngressRuleValue", - "IDRange": "idRange", - "IngressTLS": "ingressTls", - "SELinuxStrategyOptions": "seLinuxStrategyOptions", - "APIGroup": "apiGroup", - "APIGroupList": "apiGroupList", - "APIResource": "apiResource", - "APIResourceList": "apiResourceList", - "APIVersions": "apiVersions", - "ServerAddressByClientCIDR": "serverAddressByClientCidr", - "APIServiceCondition": "apiServiceCondition", - "APIServiceList": "apiServiceList", - "APIServiceSpec": "apiServiceSpec", - "APIServiceStatus": "apiServiceStatus", - "IPBlock": "ipBlock", - "JSON": "json", - "APIService": "apiService", - - // Collisions with Jsonnet keywords. - "local": "localStorage", - }, - constructorSpecs: map[string][]CustomConstructorSpec{ - "io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList": objectList, - "io.k8s.api.admissionregistration.v1alpha1.InitializerConfigurationList": objectList, - - "io.k8s.api.apps.v1beta1.ControllerRevisionList": objectList, - "io.k8s.api.apps.v1beta1.Deployment": deploymentCtor, - "io.k8s.api.apps.v1beta1.DeploymentList": objectList, - "io.k8s.api.apps.v1beta1.DeploymentRollback": deploymentRollbackCtor, - "io.k8s.api.apps.v1beta1.Scale": scaleCtor, - "io.k8s.api.apps.v1beta1.StatefulSet": statefulSetCtor, - "io.k8s.api.apps.v1beta1.StatefulSetList": objectList, - - "io.k8s.api.apps.v1beta2.ControllerRevisionList": objectList, - "io.k8s.api.apps.v1beta2.DaemonSetList": objectList, - "io.k8s.api.apps.v1beta2.Deployment": deploymentCtor, - "io.k8s.api.apps.v1beta2.DeploymentList": objectList, - "io.k8s.api.apps.v1beta2.ReplicaSetList": objectList, - "io.k8s.api.apps.v1beta2.Scale": scaleCtor, - "io.k8s.api.apps.v1beta2.StatefulSet": statefulSetCtor, - "io.k8s.api.apps.v1beta2.StatefulSetList": objectList, - - "io.k8s.api.authentication.v1.TokenReview": tokenReviewCtor, - "io.k8s.api.authentication.v1beta1.TokenReview": tokenReviewCtor, - - "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList": objectList, - "io.k8s.api.autoscaling.v1.Scale": scaleCtor, - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList": objectList, - - "io.k8s.api.batch.v1.JobList": objectList, - "io.k8s.api.batch.v1beta1.CronJobList": objectList, - "io.k8s.api.batch.v2alpha1.CronJobList": objectList, - - "io.k8s.api.certificates.v1beta1.CertificateSigningRequestList": objectList, - - "io.k8s.api.extensions.v1beta1.DaemonSetList": objectList, - "io.k8s.api.extensions.v1beta1.Deployment": deploymentCtor, - "io.k8s.api.extensions.v1beta1.DeploymentList": objectList, - "io.k8s.api.extensions.v1beta1.DeploymentRollback": deploymentRollbackCtor, - "io.k8s.api.extensions.v1beta1.IngressList": objectList, - "io.k8s.api.extensions.v1beta1.NetworkPolicyList": objectList, - "io.k8s.api.extensions.v1beta1.PodSecurityPolicyList": objectList, - "io.k8s.api.extensions.v1beta1.ReplicaSetList": objectList, - "io.k8s.api.extensions.v1beta1.Scale": scaleCtor, - - "io.k8s.api.networking.v1.NetworkPolicyList": objectList, - - "io.k8s.api.policy.v1beta1.PodDisruptionBudgetList": objectList, - - "io.k8s.api.rbac.v1.ClusterRoleBindingList": objectList, - "io.k8s.api.rbac.v1.ClusterRoleList": objectList, - "io.k8s.api.rbac.v1.RoleBindingList": objectList, - "io.k8s.api.rbac.v1.RoleList": objectList, - "io.k8s.api.rbac.v1beta1.ClusterRoleBindingList": objectList, - "io.k8s.api.rbac.v1beta1.ClusterRoleList": objectList, - "io.k8s.api.rbac.v1beta1.RoleBindingList": objectList, - "io.k8s.api.rbac.v1beta1.RoleList": objectList, - - "io.k8s.api.scheduling.v1alpha1.PriorityClassList": objectList, - - "io.k8s.api.settings.v1alpha1.PodPresetList": objectList, - - "io.k8s.api.storage.v1.StorageClassList": objectList, - "io.k8s.api.storage.v1beta1.StorageClassList": objectList, - - // - // Core. - // - - "io.k8s.api.core.v1.ConfigMap": []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("name", "mixin.metadata.withName"), - newParam("data")), - }, - "io.k8s.api.core.v1.ConfigMapList": objectList, - "io.k8s.api.core.v1.Container": []CustomConstructorSpec{ - newConstructor("new", newParam("name"), newParam("image")), - }, - "io.k8s.api.core.v1.ContainerPort": []CustomConstructorSpec{ - newConstructor("new", newParam("containerPort")), - newConstructor("newNamed", newParam("name"), newParam("containerPort")), - }, - "io.k8s.api.core.v1.EndpointsList": objectList, - "io.k8s.api.core.v1.EnvVar": []CustomConstructorSpec{ - newConstructor("new", newParam("name"), newParam("value")), - newConstructor( - "fromSecretRef", - newParam("name"), - newParamNestedRef("secretRefName", "mixin.valueFrom.secretKeyRef.withName"), - newParamNestedRef("secretRefKey", "mixin.valueFrom.secretKeyRef.withKey")), - newConstructor( - "fromFieldPath", - newParam("name"), - newParamNestedRef("fieldPath", "mixin.valueFrom.fieldRef.withFieldPath")), - }, - "io.k8s.api.core.v1.EventList": objectList, - "io.k8s.api.core.v1.KeyToPath": []CustomConstructorSpec{ - newConstructor("new", newParam("key"), newParam("path")), - }, - "io.k8s.api.core.v1.LimitRangeList": objectList, - "io.k8s.api.core.v1.Namespace": []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("name", "mixin.metadata.withName")), - }, - "io.k8s.api.core.v1.NamespaceList": objectList, - "io.k8s.api.core.v1.NodeList": objectList, - "io.k8s.api.core.v1.PersistentVolumeClaimList": objectList, - "io.k8s.api.core.v1.PersistentVolumeList": objectList, - "io.k8s.api.core.v1.PodList": objectList, - "io.k8s.api.core.v1.PodTemplateList": objectList, - "io.k8s.api.core.v1.ReplicationControllerList": objectList, - "io.k8s.api.core.v1.ResourceQuotaList": objectList, - "io.k8s.api.core.v1.Secret": []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("name", "mixin.metadata.withName"), - newParam("data"), - newParamWithDefault("type", "\"Opaque\"")), - newConstructor( - "fromString", - newParamNestedRef("name", "mixin.metadata.withName"), - newParam("stringData"), - newParamWithDefault("type", "\"Opaque\"")), - }, - "io.k8s.api.core.v1.SecretList": objectList, - "io.k8s.api.core.v1.Service": []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("name", "mixin.metadata.withName"), - newParamNestedRef("selector", "mixin.spec.withSelector"), - newParamNestedRef("ports", "mixin.spec.withPorts")), - }, - "io.k8s.api.core.v1.ServiceAccount": []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("name", "mixin.metadata.withName")), - }, - "io.k8s.api.core.v1.ServiceAccountList": objectList, - "io.k8s.api.core.v1.ServiceList": objectList, - "io.k8s.api.core.v1.ServicePort": []CustomConstructorSpec{ - newConstructor("new", newParam("port"), newParam("targetPort")), - newConstructor("newNamed", newParam("name"), newParam("port"), newParam("targetPort")), - }, - "io.k8s.api.core.v1.Volume": []CustomConstructorSpec{ - newConstructor( - "fromConfigMap", - newParam("name"), - newParamNestedRef("configMapName", "mixin.configMap.withName"), - newParamNestedRef("configMapItems", "mixin.configMap.withItems")), - newConstructor( - "fromEmptyDir", - newParam("name"), - newParamNestedRefDefault("emptyDir", "mixin.emptyDir.mixinInstance", "{}")), - newConstructor( - "fromPersistentVolumeClaim", - newParam("name"), - newParamNestedRef("claimName", "mixin.persistentVolumeClaim.withClaimName")), - newConstructor( - "fromHostPath", - newParam("name"), - newParamNestedRef("hostPath", "mixin.hostPath.withPath")), - newConstructor( - "fromSecret", - newParam("name"), - newParamNestedRef("secretName", "mixin.secret.withSecretName")), - }, - "io.k8s.api.core.v1.VolumeMount": []CustomConstructorSpec{ - newConstructor("new", newParam("name"), newParam("mountPath"), newParamWithDefault("readOnly", "false")), - }, - }, - idBlacklist: map[string]interface{}{ - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec": false, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition": false, - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation": false, - }, - propertyBlacklist: map[string]propertySet{ - // Metadata fields. - "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta": newPropertySet( - "creationTimestamp", "deletionTimestamp", "generation", - "ownerReferences", "resourceVersion", "selfLink", "uid", - ), - - // Fields whose types are - // `io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta`. - "io.k8s.api.admissionregistration.v1alpha1.ExternalAdmissionHookConfigurationList": newPropertySet("metadata"), - "io.k8s.api.admissionregistration.v1alpha1.InitializerConfigurationList": newPropertySet("metadata"), - "io.k8s.api.apps.v1beta1.ControllerRevisionList": newPropertySet("metadata"), - "io.k8s.api.apps.v1beta1.DeploymentList": newPropertySet("metadata"), - "io.k8s.api.apps.v1beta1.StatefulSetList": newPropertySet("metadata"), - "io.k8s.api.apps.v1beta2.ControllerRevisionList": newPropertySet("metadata"), - "io.k8s.api.apps.v1beta2.DaemonSetList": newPropertySet("metadata"), - "io.k8s.api.apps.v1beta2.DeploymentList": newPropertySet("metadata"), - "io.k8s.api.apps.v1beta2.ReplicaSetList": newPropertySet("metadata"), - "io.k8s.api.apps.v1beta2.StatefulSetList": newPropertySet("metadata"), - "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList": newPropertySet("metadata"), - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerList": newPropertySet("metadata"), - "io.k8s.api.batch.v1.JobList": newPropertySet("metadata"), - "io.k8s.api.batch.v1beta1.CronJobList": newPropertySet("metadata"), - "io.k8s.api.batch.v2alpha1.CronJobList": newPropertySet("metadata"), - "io.k8s.api.certificates.v1beta1.CertificateSigningRequestList": newPropertySet("metadata"), - "io.k8s.api.core.v1.ComponentStatusList": newPropertySet("metadata"), - "io.k8s.api.core.v1.ConfigMapList": newPropertySet("metadata"), - "io.k8s.api.core.v1.EndpointsList": newPropertySet("metadata"), - "io.k8s.api.core.v1.EventList": newPropertySet("metadata"), - "io.k8s.api.core.v1.LimitRangeList": newPropertySet("metadata"), - "io.k8s.api.core.v1.NamespaceList": newPropertySet("metadata"), - "io.k8s.api.core.v1.NodeList": newPropertySet("metadata"), - "io.k8s.api.core.v1.PersistentVolumeClaimList": newPropertySet("metadata"), - "io.k8s.api.core.v1.PersistentVolumeList": newPropertySet("metadata"), - "io.k8s.api.core.v1.PodList": newPropertySet("metadata"), - "io.k8s.api.core.v1.PodTemplateList": newPropertySet("metadata"), - "io.k8s.api.core.v1.ReplicationControllerList": newPropertySet("metadata"), - "io.k8s.api.core.v1.ResourceQuotaList": newPropertySet("metadata"), - "io.k8s.api.core.v1.SecretList": newPropertySet("metadata"), - "io.k8s.api.core.v1.ServiceAccountList": newPropertySet("metadata"), - "io.k8s.api.core.v1.ServiceList": newPropertySet("metadata"), - "io.k8s.api.extensions.v1beta1.DaemonSetList": newPropertySet("metadata"), - "io.k8s.api.extensions.v1beta1.DeploymentList": newPropertySet("metadata"), - "io.k8s.api.extensions.v1beta1.IngressList": newPropertySet("metadata"), - "io.k8s.api.extensions.v1beta1.NetworkPolicyList": newPropertySet("metadata"), - "io.k8s.api.extensions.v1beta1.PodSecurityPolicyList": newPropertySet("metadata"), - "io.k8s.api.extensions.v1beta1.ReplicaSetList": newPropertySet("metadata"), - "io.k8s.api.networking.v1.NetworkPolicyList": newPropertySet("metadata"), - "io.k8s.api.policy.v1beta1.PodDisruptionBudgetList": newPropertySet("metadata"), - "io.k8s.api.rbac.v1.ClusterRoleBindingList": newPropertySet("metadata"), - "io.k8s.api.rbac.v1.ClusterRoleList": newPropertySet("metadata"), - "io.k8s.api.rbac.v1.RoleBindingList": newPropertySet("metadata"), - "io.k8s.api.rbac.v1.RoleList": newPropertySet("metadata"), - "io.k8s.api.rbac.v1alpha1.ClusterRoleBindingList": newPropertySet("metadata"), - "io.k8s.api.rbac.v1alpha1.ClusterRoleList": newPropertySet("metadata"), - "io.k8s.api.rbac.v1alpha1.RoleBindingList": newPropertySet("metadata"), - "io.k8s.api.rbac.v1alpha1.RoleList": newPropertySet("metadata"), - "io.k8s.api.rbac.v1beta1.ClusterRoleBindingList": newPropertySet("metadata"), - "io.k8s.api.rbac.v1beta1.ClusterRoleList": newPropertySet("metadata"), - "io.k8s.api.rbac.v1beta1.RoleBindingList": newPropertySet("metadata"), - "io.k8s.api.rbac.v1beta1.RoleList": newPropertySet("metadata"), - "io.k8s.api.scheduling.v1alpha1.PriorityClassList": newPropertySet("metadata"), - "io.k8s.api.settings.v1alpha1.PodPresetList": newPropertySet("metadata"), - "io.k8s.api.storage.v1.StorageClassList": newPropertySet("metadata"), - "io.k8s.api.storage.v1beta1.StorageClassList": newPropertySet("metadata"), - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionList": newPropertySet("metadata"), - "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceList": newPropertySet("metadata"), - - // Status fields. - "io.k8s.api.apps.v1beta1.Deployment": newPropertySet("status"), - "io.k8s.api.apps.v1beta1.DeploymentCondition": newPropertySet("status"), - "io.k8s.api.apps.v1beta1.Scale": newPropertySet("status"), - "io.k8s.api.apps.v1beta1.StatefulSet": newPropertySet("status"), - "io.k8s.api.apps.v1beta2.DaemonSet": newPropertySet("status"), - "io.k8s.api.apps.v1beta2.Deployment": newPropertySet("status"), - "io.k8s.api.apps.v1beta2.DeploymentCondition": newPropertySet("status"), - "io.k8s.api.apps.v1beta2.ReplicaSet": newPropertySet("status"), - "io.k8s.api.apps.v1beta2.ReplicaSetCondition": newPropertySet("status"), - "io.k8s.api.apps.v1beta2.Scale": newPropertySet("status"), - "io.k8s.api.apps.v1beta2.StatefulSet": newPropertySet("status"), - "io.k8s.api.authentication.v1.TokenReview": newPropertySet("status"), - "io.k8s.api.authentication.v1beta1.TokenReview": newPropertySet("status"), - "io.k8s.api.authorization.v1.LocalSubjectAccessReview": newPropertySet("status"), - "io.k8s.api.authorization.v1.SelfSubjectAccessReview": newPropertySet("status"), - "io.k8s.api.authorization.v1.SelfSubjectRulesReview": newPropertySet("status"), - "io.k8s.api.authorization.v1.SubjectAccessReview": newPropertySet("status"), - "io.k8s.api.authorization.v1beta1.LocalSubjectAccessReview": newPropertySet("status"), - "io.k8s.api.authorization.v1beta1.SelfSubjectAccessReview": newPropertySet("status"), - "io.k8s.api.authorization.v1beta1.SelfSubjectRulesReview": newPropertySet("status"), - "io.k8s.api.authorization.v1beta1.SubjectAccessReview": newPropertySet("status"), - "io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler": newPropertySet("status"), - "io.k8s.api.autoscaling.v1.Scale": newPropertySet("status"), - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler": newPropertySet("status"), - "io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition": newPropertySet("status"), - "io.k8s.api.batch.v1.Job": newPropertySet("status"), - "io.k8s.api.batch.v1.JobCondition": newPropertySet("status"), - "io.k8s.api.batch.v1beta1.CronJob": newPropertySet("status"), - "io.k8s.api.batch.v2alpha1.CronJob": newPropertySet("status"), - "io.k8s.api.certificates.v1beta1.CertificateSigningRequest": newPropertySet("status"), - "io.k8s.api.core.v1.ComponentCondition": newPropertySet("status"), - "io.k8s.api.core.v1.Namespace": newPropertySet("status"), - "io.k8s.api.core.v1.Node": newPropertySet("status"), - "io.k8s.api.core.v1.NodeCondition": newPropertySet("status"), - "io.k8s.api.core.v1.PersistentVolume": newPropertySet("status"), - "io.k8s.api.core.v1.PersistentVolumeClaim": newPropertySet("status"), - "io.k8s.api.core.v1.PersistentVolumeClaimCondition": newPropertySet("status"), - "io.k8s.api.core.v1.Pod": newPropertySet("status"), - "io.k8s.api.core.v1.PodCondition": newPropertySet("status"), - "io.k8s.api.core.v1.ReplicationController": newPropertySet("status"), - "io.k8s.api.core.v1.ReplicationControllerCondition": newPropertySet("status"), - "io.k8s.api.core.v1.ResourceQuota": newPropertySet("status"), - "io.k8s.api.core.v1.Service": newPropertySet("status"), - "io.k8s.api.extensions.v1beta1.DaemonSet": newPropertySet("status"), - "io.k8s.api.extensions.v1beta1.Deployment": newPropertySet("status"), - "io.k8s.api.extensions.v1beta1.DeploymentCondition": newPropertySet("status"), - "io.k8s.api.extensions.v1beta1.Ingress": newPropertySet("status"), - "io.k8s.api.extensions.v1beta1.ReplicaSet": newPropertySet("status"), - "io.k8s.api.extensions.v1beta1.ReplicaSetCondition": newPropertySet("status"), - "io.k8s.api.extensions.v1beta1.Scale": newPropertySet("status"), - "io.k8s.api.policy.v1beta1.PodDisruptionBudget": newPropertySet("status"), - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition": newPropertySet("status"), - "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionCondition": newPropertySet("status"), - "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService": newPropertySet("status"), - "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition": newPropertySet("status"), - - // Has both status and a property with type - // `io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta`. - "io.k8s.apimachinery.pkg.apis.meta.v1.Status": newPropertySet("status", "metadata"), - - // Misc. - "io.k8s.api.extensions.v1beta1.DaemonSetSpec": newPropertySet("templateGeneration"), - }, - kSource: `local k8s = import "k8s.libsonnet"; - -local apps = k8s.apps; -local core = k8s.core; -local extensions = k8s.extensions; - -local hidden = { - mapContainers(f):: { - local podContainers = super.spec.template.spec.containers, - spec+: { - template+: { - spec+: { - // IMPORTANT: This overwrites the 'containers' field - // for this deployment. - containers: std.map(f, podContainers), - }, - }, - }, - }, - - mapContainersWithName(names, f) :: - local nameSet = - if std.type(names) == "array" - then std.set(names) - else std.set([names]); - local inNameSet(name) = std.length(std.setInter(nameSet, std.set([name]))) > 0; - self.mapContainers( - function(c) - if std.objectHas(c, "name") && inNameSet(c.name) - then f(c) - else c - ), -}; - -k8s + { - apps:: apps + { - v1beta1:: apps.v1beta1 + { - local v1beta1 = apps.v1beta1, - - daemonSet:: v1beta1.daemonSet + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - - deployment:: v1beta1.deployment + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - }, - }, - - core:: core + { - v1:: core.v1 + { - list:: { - new(items):: - {apiVersion: "v1"} + - {kind: "List"} + - self.items(items), - - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - }, - }, - }, - - extensions:: extensions + { - v1beta1:: extensions.v1beta1 + { - local v1beta1 = extensions.v1beta1, - - daemonSet:: v1beta1.daemonSet + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - - deployment:: v1beta1.deployment + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - }, - }, -} -`, - }, -} - -//----------------------------------------------------------------------------- -// Utility specs, for duplicated objects. -//----------------------------------------------------------------------------- - -var objectList = []CustomConstructorSpec{ - newConstructor( - "new", - newParam("items")), -} -var deploymentCtor = []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("name", "mixin.metadata.withName"), - newParamNestedRef("replicas", "mixin.spec.withReplicas"), - newParamNestedRef("containers", "mixin.spec.template.spec.withContainers"), - newParamNestedRefDefault( - "podLabels", - "mixin.spec.template.metadata.withLabels", - "{app: name}")), -} -var deploymentRollbackCtor = []CustomConstructorSpec{ - newConstructor( - "new", - newParam("name")), -} -var scaleCtor = []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("replicas", "mixin.spec.withReplicas")), -} -var statefulSetCtor = []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("name", "mixin.metadata.withName"), - newParamNestedRef("replicas", "mixin.spec.withReplicas"), - newParamNestedRef("containers", "mixin.spec.template.spec.withContainers"), - newParamNestedRef("volumeClaims", "mixin.spec.withVolumeClaimTemplates"), - newParamNestedRefDefault( - "podLabels", - "mixin.spec.template.metadata.withLabels", - "{app: name}")), -} - -var tokenReviewCtor = []CustomConstructorSpec{ - newConstructor( - "new", - newParamNestedRef("token", "mixin.spec.withToken")), -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubeversion/version.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubeversion/version.go deleted file mode 100644 index 4887ec16..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubeversion/version.go +++ /dev/null @@ -1,242 +0,0 @@ -// Package kubeversion contains a collection of helper methods that -// help to customize the code generated for ksonnet-lib to suit -// different Kubernetes versions. -// -// For example, we may choose not to emit certain properties for some -// objects in Kubernetes v1.7.0; or, we might want to rename a -// property method. This package contains both the helper methods that -// perform such transformations, as well as the data for the -// transformations we use for each version. -package kubeversion - -import ( - "log" - "strings" - - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/kubespec" -) - -// KSource returns the source of `k.libsonnet` for a specific version -// of Kubernetes. -func KSource(k8sVersion string) string { - var verStrs []string - for k := range versions { - verStrs = append(verStrs, k) - } - - verData, ok := versions[k8sVersion] - if !ok { - log.Fatalf("Unrecognized Kubernetes version %q. Currently accepts %q", - k8sVersion, strings.Join(verStrs, ", ")) - } - - return verData.kSource -} - -// Beta returns the beta status of the version. -func Beta(k8sVersion string) bool { - k8sVersion = strings.TrimLeft(k8sVersion, "v") - ver := strings.Split(k8sVersion, ".") - if len(ver) >= 2 { - if ver[0] == "1" { - if ver[1] == "8" { - k8sVersion = "v1.8.0" - } else if ver[1] == "7" { - k8sVersion = "v1.7.0" - } - } - } - - verData, ok := versions[k8sVersion] - if !ok { - return false - } - - return verData.beta -} - -// MapIdentifier takes a text identifier and maps it to a -// Jsonnet-appropriate identifier, for some version of Kubernetes. For -// example, in Kubernetes v1.7.0, we might map `clusterIP` -> -// `clusterIp`. -func MapIdentifier(k8sVersion, id string) string { - verData, ok := versions[k8sVersion] - if !ok { - log.Fatalf("Unrecognized Kubernetes version '%s'", k8sVersion) - } - - if alias, ok := verData.idAliases[id]; ok { - return alias - } - return id -} - -// IsBlacklistedProperty taks a definition name (e.g., -// `io.k8s.kubernetes.pkg.apis.apps.v1beta1.Deployment`), a property -// name (e.g., `status`), and reports whether it is blacklisted for -// some Kubernetes version. This is particularly useful when deciding -// whether or not to generate mixins and property methods for a given -// property (as we likely wouldn't in the case of, say, `status`). -func IsBlacklistedID(k8sVersion string, path kubespec.DefinitionName) bool { - verData, ok := versions[k8sVersion] - if !ok { - return false - } - - _, ok = verData.idBlacklist[string(path)] - return ok -} - -// IsBlacklistedProperty taks a definition name (e.g., -// `io.k8s.kubernetes.pkg.apis.apps.v1beta1.Deployment`), a property -// name (e.g., `status`), and reports whether it is blacklisted for -// some Kubernetes version. This is particularly useful when deciding -// whether or not to generate mixins and property methods for a given -// property (as we likely wouldn't in the case of, say, `status`). -func IsBlacklistedProperty( - k8sVersion string, path kubespec.DefinitionName, - propertyName kubespec.PropertyName, -) bool { - verData, ok := versions[k8sVersion] - if !ok { - return false - } - - bl, ok := verData.propertyBlacklist[string(path)] - if !ok { - return false - } - - _, ok = bl[string(propertyName)] - return ok -} - -func ConstructorSpec( - k8sVersion string, path kubespec.DefinitionName, -) ([]CustomConstructorSpec, bool) { - verData, ok := versions[k8sVersion] - if !ok { - log.Fatalf("Unrecognized Kubernetes version '%s'", k8sVersion) - } - - spec, ok := verData.constructorSpecs[string(path)] - return spec, ok -} - -//----------------------------------------------------------------------------- -// Core data structures for specifying version information. -//----------------------------------------------------------------------------- - -type versionData struct { - idAliases map[string]string - constructorSpecs map[string][]CustomConstructorSpec - idBlacklist map[string]interface{} - propertyBlacklist map[string]propertySet - kSource string - beta bool -} - -type propertySet map[string]bool - -func newPropertySet(strings ...string) propertySet { - ps := make(propertySet) - for _, s := range strings { - ps[s] = true - } - - return ps -} - -//----------------------------------------------------------------------------- -// Public Data structures for specifying custom constructors for API -// objects. -//----------------------------------------------------------------------------- - -// CustomConstructorSpec specifies a custom constructor for -// `ksonnet-gen` to emit as part of ksonnet-lib. In particular, this -// specifies a constructor of the form: -// -// foo(bar, baz):: self.bar(bar) + self.baz(baz) -// -// The parameter list and the body are all generated from the `Params` -// field. -// -// DESIGN NOTES: -// -// * If the user specifies a custom constructor, we will not emit the -// default zero-argument constructor, `new()`. This is a purposeful -// decision which we make because we are typically customizing the -// constructors precisely because the zero-argument constructor is -// not meaninful for a given API object. -// * We currently do not check that parameter names are unique. -// Duplicate identifiers in a parameter list results in a Jsonnet -// compiler error, though, so this should be caught by review and -// CI, and it is hence not important for this case to be covered by -// this code. -type CustomConstructorSpec struct { - ID string - Params []CustomConstructorParam -} - -func newConstructor( - id string, params ...CustomConstructorParam, -) CustomConstructorSpec { - return CustomConstructorSpec{ - ID: id, - Params: params, - } -} - -// CustomConstructorParam specifies a parameter for a -// `CustomConstructorSpec`. This class allows users to specify -// constructors of various forms, including: -// -// * The "normal" form, e.g., `foo(bar):: self.bar(bar)`, -// * Parameters with default values, e.g., `foo(bar="baz"):: -// self.bar(bar)`, and -// * Parameters that are nested inside the object, e.g., `foo(bar):: -// self.baz.bat.bar(bar)` -// -// DESIGN NOTES: -// -// * For constructors that use nested paths, we do not currently check -// that the path is valid. So for example, `self.baz.bat.bar` in the -// example above may not correspond to a real property. We make this -// decision because it complicates the code, and it doesn't seem -// worth it since this feature is used relatively rarely. -type CustomConstructorParam struct { - ID string - DefaultValue *string - RelativePath *string -} - -func newParam(name string) CustomConstructorParam { - return CustomConstructorParam{ - ID: name, - DefaultValue: nil, - } -} - -func newParamWithDefault(name, def string) CustomConstructorParam { - return CustomConstructorParam{ - ID: name, - DefaultValue: &def, - } -} - -func newParamNestedRef(name, relativePath string) CustomConstructorParam { - return CustomConstructorParam{ - ID: name, - RelativePath: &relativePath, - } -} - -func newParamNestedRefDefault( - name, relativePath, def string, -) CustomConstructorParam { - return CustomConstructorParam{ - ID: name, - RelativePath: &relativePath, - DefaultValue: &def, - } -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubeversion/version_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubeversion/version_test.go deleted file mode 100644 index 2c067175..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/kubeversion/version_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package kubeversion - -import "testing" - -func TestBeta(t *testing.T) { - cases := []struct { - expected bool - in string - }{ - {expected: true, in: "1.8.0"}, - {expected: true, in: "v1.8.0"}, - {expected: true, in: "1.8"}, - {expected: true, in: "1.8.4"}, - {expected: true, in: "1.8.5"}, - {expected: false, in: "1.7"}, - {expected: false, in: "1.9.0"}, - {expected: false, in: "1.6.0"}, - } - - for _, tc := range cases { - t.Run(tc.in, func(t *testing.T) { - b := Beta(tc.in) - if b != tc.expected { - t.Errorf("Beta() got %v; expected %v", b, tc.expected) - } - }) - } - -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/main.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/main.go deleted file mode 100644 index 4fe54cc7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/main.go +++ /dev/null @@ -1,88 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "log" - "os" - "os/exec" - "path/filepath" - "strings" - - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/ksonnet" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/kubespec" -) - -var usage = "Usage: ksonnet-gen [path to k8s OpenAPI swagger.json] [output dir]" - -func main() { - if len(os.Args) != 3 { - log.Fatal(usage) - } - - swaggerPath := os.Args[1] - text, err := ioutil.ReadFile(swaggerPath) - if err != nil { - log.Fatalf("Could not read file at '%s':\n%v", swaggerPath, err) - } - - // Deserialize the API object. - s := kubespec.APISpec{} - err = json.Unmarshal(text, &s) - if err != nil { - log.Fatalf("Could not deserialize schema:\n%v", err) - } - s.Text = text - s.FilePath = filepath.Dir(swaggerPath) - - // Emit Jsonnet code. - ksonnetLibSHA := getSHARevision(".") - k8sSHA := getSHARevision(s.FilePath) - kBytes, k8sBytes, err := ksonnet.Emit(&s, &ksonnetLibSHA, &k8sSHA) - if err != nil { - log.Fatalf("Could not write ksonnet library:\n%v", err) - } - - // Write out. - k8sOutfile := fmt.Sprintf("%s/%s", os.Args[2], "k8s.libsonnet") - err = ioutil.WriteFile(k8sOutfile, k8sBytes, 0644) - if err != nil { - log.Fatalf("Could not write `k8s.libsonnet`:\n%v", err) - } - - kOutfile := fmt.Sprintf("%s/%s", os.Args[2], "k.libsonnet") - err = ioutil.WriteFile(kOutfile, kBytes, 0644) - if err != nil { - log.Fatalf("Could not write `k.libsonnet`:\n%v", err) - } -} - -func getSHARevision(dir string) string { - cwd, err := os.Getwd() - if err != nil { - log.Fatalf("Could get working directory:\n%v", err) - } - - err = os.Chdir(dir) - if err != nil { - log.Fatalf("Could cd to directory of repository at '%s':\n%v", dir, err) - } - - sha, err := exec.Command("sh", "-c", "git rev-parse HEAD").Output() - if err != nil { - log.Fatalf("Could not find SHA of HEAD:\n%v", err) - } - - err = os.Chdir(cwd) - if err != nil { - log.Fatalf("Could cd back to current directory '%s':\n%v", cwd, err) - } - - return strings.TrimSpace(string(sha)) -} - -func init() { - // Get rid of time in logs. - log.SetFlags(0) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/nodemaker/nodemaker.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/nodemaker/nodemaker.go deleted file mode 100644 index 84407347..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/nodemaker/nodemaker.go +++ /dev/null @@ -1,974 +0,0 @@ -package nodemaker - -import ( - "fmt" - "regexp" - "sort" - "strconv" - "strings" - - "github.com/google/go-jsonnet/ast" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/astext" - "github.com/pkg/errors" -) - -// Noder is an entity that can be converted to a jsonnet node. -type Noder interface { - Node() ast.Node -} - -type field struct { - key Key - value Noder -} - -// ObjectOptOneline is a functional option which sets the object's oneline status. -func ObjectOptOneline(oneline bool) ObjectOpt { - return func(o *Object) { - o.Oneline = oneline - } -} - -// ObjectOpt is a functional option for Object. -type ObjectOpt func(*Object) - -// Object is an item that can have multiple keys with values. -type Object struct { - Oneline bool - fields map[string]Noder - keys map[string]Key - keyList []string -} - -var _ Noder = (*Object)(nil) - -// KVFromMap creates a object using a map. -func KVFromMap(m map[string]interface{}) (*Object, error) { - if m == nil { - return nil, errors.New("map is nil") - } - - var names []string - for name := range m { - names = append(names, name) - } - sort.Strings(names) - - o := NewObject() - - for _, name := range names { - child, err := ValueToNoder(m[name]) - if err != nil { - return nil, errors.Wrap(err, "convert value to noder") - } - - o.Set(InheritedKey(name), child) - } - - return o, nil -} - -// ValueToNoder converts a value to a Noder. -func ValueToNoder(v interface{}) (Noder, error) { - if v == nil { - return nil, errors.New("value is nil") - } - - switch t := v.(type) { - case string, float64, int, bool: - return convertValueToNoder(t) - case []interface{}: - var elements []Noder - for _, val := range t { - noder, err := convertValueToNoder(val) - if err != nil { - return nil, err - } - - elements = append(elements, noder) - } - array := NewArray(elements) - return array, nil - case map[interface{}]interface{}: - newMap, err := convertMapToStringKey(t) - if err != nil { - return nil, err - } - return KVFromMap(newMap) - case map[string]interface{}: - return KVFromMap(t) - default: - return nil, errors.Errorf("unsupported type %T", t) - - } -} - -func convertMapToStringKey(m map[interface{}]interface{}) (map[string]interface{}, error) { - newMap := make(map[string]interface{}) - for k := range m { - s, ok := k.(string) - if !ok { - return nil, errors.New("map key is not a string") - } - - newMap[s] = m[s] - } - - return newMap, nil -} - -func convertValueToNoder(val interface{}) (Noder, error) { - switch t := val.(type) { - case string: - return NewStringDouble(t), nil - case float64: - return NewFloat(t), nil - case int: - return NewInt(t), nil - case bool: - return NewBoolean(t), nil - case map[string]interface{}: - return ValueToNoder(t) - default: - return nil, errors.Errorf("unsupported type %T", t) - } -} - -// NewObject creates an Object. ObjectOpt functional arguments can be used to configure the -// newly generated key. -func NewObject(opts ...ObjectOpt) *Object { - o := &Object{ - fields: make(map[string]Noder), - keys: make(map[string]Key), - keyList: make([]string, 0), - } - - for _, opt := range opts { - opt(o) - } - - return o -} - -// OnelineObject is a convenience method for creating a online object. -func OnelineObject(opts ...ObjectOpt) *Object { - opts = append(opts, ObjectOptOneline(true)) - return NewObject(opts...) -} - -// Set sets a field with a value. -func (o *Object) Set(key Key, value Noder) error { - name := key.name - - if _, ok := o.keys[name]; ok { - return errors.Errorf("field %q already exists in the object", name) - } - - o.keys[name] = key - o.fields[name] = value - o.keyList = append(o.keyList, name) - - return nil - -} - -// Get retrieves a field by name. -func (o *Object) Get(keyName string) Noder { - return o.fields[keyName] -} - -// Keys returns a slice of keys in the object. -func (o *Object) Keys() []Key { - var keys []Key - - for _, name := range o.keyList { - keys = append(keys, o.keys[name]) - } - - return keys -} - -var ( - reField = regexp.MustCompile(`^[A-Za-z]+[A-Za-z0-9]*$`) -) - -// Node converts the object to a jsonnet node. -func (o *Object) Node() ast.Node { - ao := &astext.Object{ - Oneline: o.Oneline, - } - - for _, name := range o.keyList { - k := o.keys[name] - v := o.fields[name] - - of := astext.ObjectField{ - Comment: o.generateComment(k.comment), - } - - if k.category == ast.ObjectLocal { - of.Id = newIdentifier(name) - of.Kind = k.category - } else if stringInSlice(name, jsonnetReservedWords) { - of.Expr1 = NewStringDouble(name).Node() - of.Kind = ast.ObjectFieldStr - } else if reField.MatchString(name) { - id := ast.Identifier(name) - of.Kind = ast.ObjectFieldID - of.Id = &id - } else { - of.Expr1 = NewStringDouble(name).Node() - of.Kind = ast.ObjectFieldStr - } - - of.Hide = k.visibility - of.Expr2 = v.Node() - of.Method = k.Method() - of.SuperSugar = k.Mixin() - - ao.Fields = append(ao.Fields, of) - } - - return ao -} - -func (o *Object) generateComment(text string) *astext.Comment { - if text != "" { - return &astext.Comment{Text: text} - } - - return nil -} - -// Boolean is a boolean. -type Boolean struct { - value bool -} - -// NewBoolean creates an instance of Boolean. -func NewBoolean(value bool) *Boolean { - return &Boolean{ - value: value, - } -} - -// Node converts Boolean to a jsonnet node. -func (b *Boolean) Node() ast.Node { - return &ast.LiteralBoolean{ - Value: b.value, - } -} - -// StringDouble is double quoted string. -type StringDouble struct { - text string -} - -// NewStringDouble creates an instance of StringDouble. -func NewStringDouble(text string) *StringDouble { - return &StringDouble{ - text: text, - } -} - -func (t *StringDouble) node() *ast.LiteralString { - return &ast.LiteralString{ - Kind: ast.StringDouble, - Value: t.text, - } -} - -// Node converts the StringDouble to a jsonnet node. -func (t *StringDouble) Node() ast.Node { - return t.node() -} - -// Number is an a number. -type Number struct { - number float64 - value string -} - -var _ Noder = (*Number)(nil) - -// NewInt creates an integer number. -func NewInt(i int) *Number { - return &Number{ - number: float64(i), - value: strconv.Itoa(i), - } -} - -// NewFloat creates a float instance of a number. -func NewFloat(f float64) *Number { - return &Number{ - number: f, - value: strconv.FormatFloat(f, 'f', -1, 64), - } -} - -// Node converts the Number to a jsonnet node. -func (t *Number) Node() ast.Node { - return &ast.LiteralNumber{ - Value: t.number, - OriginalString: t.value, - } -} - -// Array is an an array. -type Array struct { - elements []Noder -} - -var _ Noder = (*Array)(nil) - -// NewArray creates an instance of Array. -func NewArray(elements []Noder) *Array { - return &Array{ - elements: elements, - } -} - -// Node converts the Array to a jsonnet node. -func (t *Array) Node() ast.Node { - var nodes []ast.Node - for _, element := range t.elements { - nodes = append(nodes, element.Node()) - } - - return &ast.Array{ - Elements: nodes, - } -} - -// KeyOptCategory is a functional option for setting key category -func KeyOptCategory(kc ast.ObjectFieldKind) KeyOpt { - return func(k *Key) { - k.category = kc - } -} - -// KeyOptVisibility is a functional option for setting key visibility -func KeyOptVisibility(kv ast.ObjectFieldHide) KeyOpt { - return func(k *Key) { - k.visibility = kv - } -} - -// KeyOptComment is a functional option for setting a comment on a key -func KeyOptComment(text string) KeyOpt { - return func(k *Key) { - k.comment = text - } -} - -// KeyOptMixin is a functional option for setting this key as a mixin -func KeyOptMixin(b bool) KeyOpt { - return func(k *Key) { - k.mixin = b - } -} - -// KeyOptParams is functional option for setting params for a key. If there are no required -// parameters, pass an empty []string. -func KeyOptParams(params []string) KeyOpt { - return func(k *Key) { - k.params = params - } -} - -// KeyOptNamedParams is a functional option for setting named params for a key. -func KeyOptNamedParams(params ...OptionalArg) KeyOpt { - return func(k *Key) { - k.namedParams = params - } -} - -// KeyOpt is a functional option for configuring Key. -type KeyOpt func(k *Key) - -var ( - jsonnetReservedWords = []string{"assert", "else", "error", "false", "for", "function", "if", - "import", "importstr", "in", "local", "null", "tailstrict", "then", "self", "super", "true"} -) - -// Key names a fields in an object. -type Key struct { - name string - category ast.ObjectFieldKind - visibility ast.ObjectFieldHide - comment string - params []string - namedParams []OptionalArg - mixin bool -} - -var ( - reStartsWithNonAlpha = regexp.MustCompile(`^[^A-Za-z]`) -) - -// NewKey creates an instance of Key. KeyOpt functional options can be used to configure the -// newly generated key. -func NewKey(name string, opts ...KeyOpt) Key { - - category := ast.ObjectFieldID - for _, s := range jsonnetReservedWords { - if s == name { - category = ast.ObjectFieldStr - } - } - - if reStartsWithNonAlpha.Match([]byte(name)) { - category = ast.ObjectFieldStr - } - - k := Key{ - name: name, - category: category, - } - for _, opt := range opts { - opt(&k) - } - - return k -} - -// InheritedKey is a convenience method for creating an inherited key. -func InheritedKey(name string, opts ...KeyOpt) Key { - opts = append(opts, KeyOptVisibility(ast.ObjectFieldInherit)) - return NewKey(name, opts...) -} - -// LocalKey is a convenience method for creating a local key. -func LocalKey(name string, opts ...KeyOpt) Key { - opts = append(opts, KeyOptCategory(ast.ObjectLocal)) - return NewKey(name, opts...) -} - -// FunctionKey is a convenience method for creating a function key. -func FunctionKey(name string, args []string, opts ...KeyOpt) Key { - opts = append(opts, KeyOptParams(args), KeyOptCategory(ast.ObjectFieldID)) - return NewKey(name, opts...) -} - -// Method returns the jsonnet AST object file method parameter. -func (k *Key) Method() *ast.Function { - if k.params == nil { - return nil - } - - f := &ast.Function{ - Parameters: ast.Parameters{ - Required: ast.Identifiers{}, - }, - } - - for _, p := range k.params { - f.Parameters.Required = append(f.Parameters.Required, *newIdentifier(p)) - } - - for _, p := range k.namedParams { - f.Parameters.Optional = append(f.Parameters.Optional, p.NamedParameter()) - } - - return f -} - -// Mixin returns true if the jsonnet object should be super sugared. -func (k Key) Mixin() bool { - return k.mixin -} - -// BinaryOp is a binary operation. -type BinaryOp string - -const ( - // BopPlus is + - BopPlus BinaryOp = "+" - // BopEqual is == - BopEqual = "==" - // BopGreater is > - BopGreater = ">" - // BopAnd is && - BopAnd = "&&" -) - -// Binary represents a binary operation -type Binary struct { - Left Noder - Right Noder - Op BinaryOp - Chainer -} - -var _ Noder = (*Binary)(nil) - -// NewBinary creates an instance of Binary. -func NewBinary(left, right Noder, op BinaryOp) *Binary { - return &Binary{ - Left: left, - Right: right, - Op: op, - } -} - -// Node converts a BinaryOp into an ast node. This will panic if the binary operator -// is unknown. -func (b *Binary) Node() ast.Node { - op, ok := ast.BopMap[string(b.Op)] - if !ok { - panic(fmt.Sprintf("%q is an invalid binary operation", b.Op)) - } - - return &ast.Binary{ - Left: b.Left.Node(), - Right: b.Right.Node(), - Op: op, - } -} - -// Var represents a variable. -type Var struct { - ID string - Chainer -} - -var _ Noder = (*Binary)(nil) - -// NewVar creates an instance of Var. -func NewVar(id string) *Var { - return &Var{ - ID: id, - } -} - -// Node converts the var to a jsonnet ast node. -func (v *Var) Node() ast.Node { - return &ast.Var{ - Id: *newIdentifier(v.ID), - } -} - -// Self represents self. -type Self struct{} - -var _ Noder = (*Self)(nil) - -// Node converts self to a jsonnet self node. -func (s *Self) Node() ast.Node { - return &ast.Self{} -} - -// Conditional represents a conditional -type Conditional struct { - Cond Noder - BranchTrue Noder - BranchFalse Noder - Chainer -} - -var _ Noder = (*Conditional)(nil) - -// NewConditional creates an instance of Conditional. -func NewConditional(cond, tbranch, fbranch Noder) *Conditional { - return &Conditional{ - Cond: cond, - BranchTrue: tbranch, - BranchFalse: fbranch, - } -} - -// Node converts the Conditional to a jsonnet ast node. -func (c *Conditional) Node() ast.Node { - cond := &ast.Conditional{ - Cond: c.Cond.Node(), - BranchTrue: c.BranchTrue.Node(), - } - - if c.BranchFalse != nil { - cond.BranchFalse = c.BranchFalse.Node() - } - - return cond -} - -// OptionalArg is an optional argument. -type OptionalArg struct { - Name string - Default Noder -} - -// NamedArgument converts the OptionalArgument to a jsonnet NamedArgument. -func (oa *OptionalArg) NamedArgument() ast.NamedArgument { - na := ast.NamedArgument{ - Name: *newIdentifier(oa.Name), - } - - if oa.Default == nil { - na.Arg = NewStringDouble("").Node() - } else { - na.Arg = oa.Default.Node() - } - - return na -} - -// NamedParameter converts the OptionalArgument to a jsonnet NamedParameter. -func (oa *OptionalArg) NamedParameter() ast.NamedParameter { - np := ast.NamedParameter{ - Name: *newIdentifier(oa.Name), - } - - if oa.Default != nil { - np.DefaultArg = oa.Default.Node() - } - - return np -} - -// Apply represents an application of a function. -type Apply struct { - target Chainable - positionalArgs []Noder - optionalArgs []OptionalArg - Chainer -} - -var _ Targetable = (*Apply)(nil) - -// NewApply creates an instance of Apply. -func NewApply(target Chainable, positionalArgs []Noder, optionalArgs []OptionalArg) *Apply { - return &Apply{ - target: target, - positionalArgs: positionalArgs, - optionalArgs: optionalArgs, - } -} - -// ApplyCall creates an Apply using a method string. -func ApplyCall(method string, args ...Noder) *Apply { - return NewApply(NewCall(method), args, nil) -} - -// SetTarget sets the target of this Apply. -func (a *Apply) SetTarget(c Chainable) { - a.target = c -} - -// Node converts the Apply to a jsonnet ast node. -func (a *Apply) Node() ast.Node { - apply := &ast.Apply{ - Target: a.target.Node(), - } - - for _, arg := range a.positionalArgs { - apply.Arguments.Positional = append(apply.Arguments.Positional, arg.Node()) - } - - for _, arg := range a.optionalArgs { - apply.Arguments.Named = append(apply.Arguments.Named, arg.NamedArgument()) - } - - return apply -} - -// Call is a function call. -type Call struct { - parts []string - target Chainable - Chainer -} - -var _ Targetable = (*Call)(nil) - -// NewCall creates an instance of Call. -func NewCall(method string) *Call { - parts := strings.Split(method, ".") - - return &Call{ - parts: parts, - } -} - -// SetTarget sets the target of this Call. -func (c *Call) SetTarget(chainable Chainable) { - c.target = chainable -} - -// Node converts the Call to a jsonnet ast node. -func (c *Call) Node() ast.Node { - parts := c.parts - - if len(parts) == 1 { - return NewVar(parts[0]).Node() - } - - var theVar *Var - var cur *Index - - switch t := c.target.(type) { - case *Var: - theVar = t - case *Index: - cur = t - } - - for i := range parts { - part := parts[i] - if i == 0 && theVar == nil { - v := NewVar(part) - theVar = v - continue - } - idx := NewIndex(part) - if theVar != nil { - idx.SetTarget(theVar) - theVar = nil - } else if cur != nil { - idx.SetTarget(cur) - } - - cur = idx - } - - if theVar != nil { - return theVar.Node() - } - - return cur.Node() -} - -// Index is an index type. -type Index struct { - ID string - Target Chainable - Chainer -} - -var _ Targetable = (*Index)(nil) - -// NewIndex creates an instance of Index. -func NewIndex(id string) *Index { - return &Index{ - ID: id, - } -} - -// SetTarget sets the target for this Index. -func (i *Index) SetTarget(c Chainable) { - i.Target = c -} - -// Node converts the Index to a Jsonnet AST node. -func (i *Index) Node() ast.Node { - astIndex := &ast.Index{Id: newIdentifier(i.ID)} - - if i.Target != nil { - astIndex.Target = i.Target.Node() - } - - return astIndex -} - -// Chainable is an interface that signifies this object can be -// used in CallChain. -type Chainable interface { - Chainable() - Node() ast.Node -} - -// Targetable is a Chainable that allows you to set a target. -// Can be used with Calls, Indexes, and Applies. -type Targetable interface { - Chainable - SetTarget(Chainable) -} - -// Chainer is an extension struct to bring the Chainable -// function into a type. -type Chainer struct{} - -// Chainable implements the Chainable interface. -func (c *Chainer) Chainable() {} - -// CallChain creates a call chain. It allows you to string -// an arbitrary amount of Chainables together. -type CallChain struct { - links []Chainable -} - -var _ Noder = (*CallChain)(nil) - -// NewCallChain creates an instance of CallChain. -func NewCallChain(links ...Chainable) *CallChain { - - return &CallChain{ - links: links, - } -} - -// Node converts the CallChain to a Jsonnet AST node. -// nolint: gocyclo -func (cc *CallChain) Node() ast.Node { - if len(cc.links) == 1 { - return cc.links[0].Node() - } - - var previous Chainable - - for i := range cc.links { - switch t := cc.links[i].(type) { - default: - panic(fmt.Sprintf("unhandled node type %T", t)) - case *Var: - previous = t - case *Index: - if previous != nil { - t.SetTarget(previous) - } - - previous = t - case *Apply: - if previous != nil { - if targetable, ok := t.target.(Targetable); ok { - targetable.SetTarget(previous) - } - } - - previous = t - case *Call: - if previous != nil { - t.SetTarget(previous) - } - - previous = t - } - } - - return previous.Node() -} - -// Local is a local declaration. -type Local struct { - name string - value Noder - Body Noder -} - -var _ Noder = (*Local)(nil) - -// NewLocal creates an instance of Local. -func NewLocal(name string, value, body Noder) *Local { - return &Local{name: name, value: value, Body: body} -} - -// Node converts the Local to a jsonnet ast node. -func (l *Local) Node() ast.Node { - id := *newIdentifier(l.name) - - local := &ast.Local{ - Binds: ast.LocalBinds{ - { - Variable: id, - Body: l.value.Node(), - }, - }, - } - - if l.Body != nil { - local.Body = l.Body.Node() - } - - return local -} - -// Import is an import declaration. -type Import struct { - name string -} - -var _ Noder = (*Import)(nil) - -// NewImport creates an instance of Import. -func NewImport(name string) *Import { - return &Import{name: name} -} - -// Node converts the Import to a jsonnet ast node. -func (i *Import) Node() ast.Node { - file := NewStringDouble(i.name) - - return &ast.Import{ - File: file.node(), - } -} - -// Function is a function. -type Function struct { - req []string - body Noder -} - -var _ Noder = (*Function)(nil) - -// NewFunction creates an instance of Function. -func NewFunction(req []string, body Noder) *Function { - return &Function{ - req: req, - body: body, - } -} - -// Node converts the Function to a jsonnet ast node. -func (f *Function) Node() ast.Node { - fun := &ast.Function{ - Parameters: ast.Parameters{}, - Body: f.body.Node(), - } - - var ids ast.Identifiers - for _, param := range f.req { - ids = append(ids, *newIdentifier(param)) - } - fun.Parameters.Required = ids - - return fun -} - -// Combine combines multiple nodes into a single node. If one argument is passed, -// it is returned. If two or more arguments are passed, they are combined using a -// Binary. -func Combine(nodes ...Noder) Noder { - l := len(nodes) - - switch { - case l == 1: - return nodes[0] - case l >= 2: - sum := NewBinary(nodes[0], nodes[1], BopPlus) - - for i := 2; i < l; i++ { - sum = NewBinary(sum, nodes[i], BopPlus) - } - - return sum - } - - return NewObject() -} - -// newIdentifier creates an identifier. -func newIdentifier(value string) *ast.Identifier { - id := ast.Identifier(value) - return &id -} - -func stringInSlice(s string, sl []string) bool { - for i := range sl { - if sl[i] == s { - return true - } - } - - return false -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/nodemaker/nodemaker_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/nodemaker/nodemaker_test.go deleted file mode 100644 index be5dc04f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/nodemaker/nodemaker_test.go +++ /dev/null @@ -1,1345 +0,0 @@ -package nodemaker - -import ( - "bytes" - "fmt" - "os" - "testing" - - "github.com/google/go-jsonnet/ast" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/astext" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/printer" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func ExampleApply() { - o := NewObject() - k := LocalKey("foo") - - arg1 := NewStringDouble("arg1") - - a := ApplyCall("alpha.beta.charlie", arg1) - - if err := o.Set(k, a); err != nil { - fmt.Printf("error: %#v\n", err) - } - - if err := printer.Fprint(os.Stdout, o.Node()); err != nil { - fmt.Printf("error: %#v\n", err) - } - - // Output: - // { - // local foo = alpha.beta.charlie('arg1'), - // } -} - -func ExampleArray() { - o := NewObject() - - nodes := []Noder{NewStringDouble("hello")} - - t := NewArray(nodes) - k := InheritedKey("foo") - if err := o.Set(k, t); err != nil { - fmt.Printf("error: %#v\n", err) - } - - if err := printer.Fprint(os.Stdout, o.Node()); err != nil { - fmt.Printf("error: %#v\n", err) - } - - // Output: - // { - // foo: ['hello'], - // } -} - -func ExampleBinary() { - o := NewObject() - k := NewKey("foo") - b := NewBinary(NewVar("alpha"), NewVar("beta"), BopPlus) - - if err := o.Set(k, b); err != nil { - fmt.Printf("error: %#v\n", err) - } - - if err := printer.Fprint(os.Stdout, o.Node()); err != nil { - fmt.Printf("error: %#v\n", err) - } - - // Output: - // { - // foo:: alpha + beta, - // } -} - -func ExampleCall() { - o := NewObject() - k := NewKey("foo") - - c := NewCall("a.b.c.d") - - if err := o.Set(k, c); err != nil { - fmt.Printf("error: %#v\n", err) - } - - if err := printer.Fprint(os.Stdout, o.Node()); err != nil { - fmt.Printf("error: %#v\n", err) - } - - // Output: - // { - // foo:: a.b.c.d, - // } -} - -func ExampleObject() { - o := NewObject() - - k := NewKey("foo") - o2 := NewObject() - - if err := o.Set(k, o2); err != nil { - fmt.Printf("error: %#v\n", err) - } - - if err := printer.Fprint(os.Stdout, o.Node()); err != nil { - fmt.Printf("error: %#v\n", err) - } - - // Output: - // { - // foo:: {}, - // } -} - -func ExampleConditional() { - o := NewObject() - k := NewKey("foo") - - cond := NewBinary( - NewVar("alpha"), - NewVar("beta"), - BopEqual, - ) - trueBranch := NewObject() - trueBranch.Set( - NewKey( - "foo", - KeyOptCategory(ast.ObjectFieldID), - KeyOptVisibility(ast.ObjectFieldInherit)), - NewStringDouble("1"), - ) - - falseBranch := NewObject() - falseBranch.Set( - NewKey( - "foo", - KeyOptCategory(ast.ObjectFieldID), - KeyOptVisibility(ast.ObjectFieldInherit)), - NewStringDouble("2"), - ) - - c := NewConditional(cond, trueBranch, falseBranch) - - if err := o.Set(k, c); err != nil { - fmt.Printf("error: %#v\n", err) - } - - if err := printer.Fprint(os.Stdout, o.Node()); err != nil { - fmt.Printf("error: %#v\n", err) - } - - // Output: - // { - // foo:: if alpha == beta then { - // foo: '1', - // } else { - // foo: '2', - // }, - // } -} - -func TestObject(t *testing.T) { - cases := []struct { - name string - object func(*testing.T) (Noder, ast.Node) - }{ - { - name: "empty", - object: newObject, - }, - { - name: "with a single key", - object: objectWithKeys, - }, - { - name: "with a reserved word as the key", - object: objectWithReservedWordKey, - }, - { - name: "with a string that needs to be quoted as the key", - object: objectWithQuotedWordKey, - }, - { - name: "inline", - object: inline, - }, - { - name: "local field", - object: localField, - }, - { - name: "text field", - object: textField, - }, - { - name: "mixin field", - object: mixinField, - }, - { - name: "number field", - object: numberField, - }, - { - name: "self field", - object: selfField, - }, - { - name: "array field", - object: arrayField, - }, - { - name: "comment field", - object: commentedField, - }, - { - name: "function", - object: functionField, - }, - { - name: "function with args", - object: functionFieldArg, - }, - { - name: "function with optional args", - object: functionFieldOptionalArguments, - }, - { - name: "binary operation", - object: binaryOp, - }, - { - name: "conditional", - object: conditional, - }, - { - name: "conditional without false branch", - object: conditionalNoFalse, - }, - { - name: "local apply", - object: localApply, - }, - { - name: "local apply with an index", - object: localApplyWithAnIndex, - }, - { - name: "local", - object: local, - }, - { - name: "optional arguments", - object: optionalArguments, - }, - { - name: "combine 0 nodes", - object: combine0, - }, - { - name: "combine 1 nodes", - object: combine1, - }, - { - name: "combine 2 nodes", - object: combine2, - }, - { - name: "combine 3 nodes", - object: combine3, - }, - { - name: "kv from map", - object: kvFromMap1, - }, - { - name: "kv from map invalid value", - object: kvFromMap2, - }, - { - name: "kv from map invalid map", - object: kvFromMap3, - }, - { - name: "create function", - object: function, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - node, expected := tc.object(t) - if node != nil && expected != nil { - if !assert.Equal(t, expected, node.Node()) { - printer.Fprint(os.Stdout, node.Node()) - } - } - }) - } -} - -func newObject(t *testing.T) (Noder, ast.Node) { - return NewObject(), &astext.Object{} -} - -func objectWithKeys(t *testing.T) (Noder, ast.Node) { - o := NewObject() - k := NewKey("foo") - o2 := NewObject() - o.Set(k, o2) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Hide: ast.ObjectFieldHidden, - Kind: ast.ObjectFieldID, - Expr2: &astext.Object{}, - }, - }, - }, - } - - return o, ao -} - -func objectWithReservedWordKey(t *testing.T) (Noder, ast.Node) { - o := NewObject() - k := NewKey("error") - o2 := NewObject() - o.Set(k, o2) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Hide: ast.ObjectFieldHidden, - Kind: ast.ObjectFieldStr, - Expr1: NewStringDouble("error").Node(), - Expr2: &astext.Object{}, - }, - }, - }, - } - - return o, ao -} - -func objectWithQuotedWordKey(t *testing.T) (Noder, ast.Node) { - o := NewObject() - k := NewKey("$foo") - o2 := NewObject() - o.Set(k, o2) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Hide: ast.ObjectFieldHidden, - Kind: ast.ObjectFieldStr, - Expr1: &ast.LiteralString{ - Value: "$foo", - Kind: ast.StringDouble, - }, - Expr2: &astext.Object{}, - }, - }, - }, - } - - return o, ao -} - -func inline(t *testing.T) (Noder, ast.Node) { - o := OnelineObject() - k := NewKey("foo") - o2 := NewObject() - o.Set(k, o2) - - ao := &astext.Object{ - Oneline: true, - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Hide: ast.ObjectFieldHidden, - Kind: ast.ObjectFieldID, - Expr2: &astext.Object{}, - }, - }, - }, - } - - return o, ao -} - -func localField(t *testing.T) (Noder, ast.Node) { - o := NewObject() - k := LocalKey("foo") - o.Set(k, NewObject()) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Kind: ast.ObjectLocal, - Hide: ast.ObjectFieldHidden, - Expr2: &astext.Object{}, - }, - }, - }, - } - - return o, ao -} - -func textField(t *testing.T) (Noder, ast.Node) { - o := NewObject() - sd := NewStringDouble("bar") - k := InheritedKey("foo") - o.Set(k, sd) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Hide: ast.ObjectFieldInherit, - Kind: ast.ObjectFieldID, - Expr2: &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "bar", - }, - }, - }, - }, - } - - return o, ao -} - -func mixinField(t *testing.T) (Noder, ast.Node) { - o := NewObject() - sd := NewStringDouble("bar") - k := NewKey("foo", - KeyOptVisibility(ast.ObjectFieldInherit), - KeyOptMixin(true)) - o.Set(k, sd) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - SuperSugar: true, - Id: newIdentifier("foo"), - Hide: ast.ObjectFieldInherit, - Kind: ast.ObjectFieldID, - Expr2: &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "bar", - }, - }, - }, - }, - } - - return o, ao -} - -func numberField(t *testing.T) (Noder, ast.Node) { - o := NewObject() - i := NewInt(1) - k := InheritedKey("foo") - o.Set(k, i) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Hide: ast.ObjectFieldInherit, - Kind: ast.ObjectFieldID, - Expr2: &ast.LiteralNumber{ - Value: 1, - OriginalString: "1", - }, - }, - }, - }, - } - - return o, ao -} - -func selfField(t *testing.T) (Noder, ast.Node) { - o := NewObject() - s := &Self{} - k := InheritedKey("foo") - o.Set(k, s) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Hide: ast.ObjectFieldInherit, - Kind: ast.ObjectFieldID, - Expr2: &ast.Self{}, - }, - }, - }, - } - - return o, ao -} - -func arrayField(t *testing.T) (Noder, ast.Node) { - o := NewObject() - nodes := []Noder{NewStringDouble("hello")} - a := NewArray(nodes) - k := InheritedKey("foo") - o.Set(k, a) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Hide: ast.ObjectFieldInherit, - Kind: ast.ObjectFieldID, - Expr2: &ast.Array{ - Elements: []ast.Node{ - &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "hello", - }, - }, - }, - }, - }, - }, - } - - return o, ao -} - -func commentedField(t *testing.T) (Noder, ast.Node) { - o := NewObject() - k := NewKey("foo", KeyOptComment("a comment")) - o2 := NewObject() - o.Set(k, o2) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Hide: ast.ObjectFieldHidden, - Kind: ast.ObjectFieldID, - Expr2: &astext.Object{}, - }, - Comment: &astext.Comment{Text: "a comment"}, - }, - }, - } - - return o, ao -} - -func functionField(t *testing.T) (Noder, ast.Node) { - o := NewObject() - k := FunctionKey("foo", []string{}) - o.Set(k, NewObject()) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Kind: ast.ObjectFieldID, - Method: &ast.Function{ - Parameters: ast.Parameters{ - Required: ast.Identifiers{}, - }, - }, - Expr2: &astext.Object{}, - }, - }, - }, - } - - return o, ao -} - -func functionFieldArg(t *testing.T) (Noder, ast.Node) { - o := NewObject() - k := FunctionKey("foo", []string{"arg1"}) - o.Set(k, NewObject()) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Kind: ast.ObjectFieldID, - Method: &ast.Function{ - Parameters: ast.Parameters{ - Required: ast.Identifiers{ - *newIdentifier("arg1"), - }, - }, - }, - Expr2: &astext.Object{}, - }, - }, - }, - } - - return o, ao -} - -func functionFieldOptionalArguments(t *testing.T) (Noder, ast.Node) { - oa1 := OptionalArg{Name: "opt1"} - oa2 := OptionalArg{Name: "opt2", Default: NewVar("val")} - - o := NewObject() - k := FunctionKey("foo", []string{"arg1"}, KeyOptNamedParams(oa1, oa2)) - o.Set(k, NewObject()) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Kind: ast.ObjectFieldID, - Method: &ast.Function{ - Parameters: ast.Parameters{ - Required: ast.Identifiers{ - *newIdentifier("arg1"), - }, - Optional: []ast.NamedParameter{ - {Name: *newIdentifier("opt1")}, - {Name: *newIdentifier("opt2"), DefaultArg: &ast.Var{Id: *newIdentifier("val")}}, - }, - }, - }, - Expr2: &astext.Object{}, - }, - }, - }, - } - - return o, ao -} - -func binaryOp(t *testing.T) (Noder, ast.Node) { - o := NewObject() - k := NewKey("foo") - b := NewBinary(NewVar("alpha"), NewVar("beta"), BopPlus) - o.Set(k, b) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Hide: ast.ObjectFieldHidden, - Kind: ast.ObjectFieldID, - Expr2: &ast.Binary{ - Left: &ast.Var{Id: *newIdentifier("alpha")}, - Op: ast.BopPlus, - Right: &ast.Var{Id: *newIdentifier("beta")}, - }, - }, - }, - }, - } - - return o, ao -} - -func conditional(t *testing.T) (Noder, ast.Node) { - o := NewObject() - k := NewKey("foo") - - cond := NewBinary( - NewVar("alpha"), - NewVar("beta"), - BopEqual, - ) - trueBranch := NewObject() - trueBranch.Set( - NewKey( - "foo", - KeyOptCategory(ast.ObjectFieldID), - KeyOptVisibility(ast.ObjectFieldInherit)), - NewStringDouble("1"), - ) - - falseBranch := NewObject() - falseBranch.Set( - NewKey( - "foo", - KeyOptCategory(ast.ObjectFieldID), - KeyOptVisibility(ast.ObjectFieldInherit)), - NewStringDouble("2"), - ) - - c := NewConditional(cond, trueBranch, falseBranch) - - o.Set(k, c) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Hide: ast.ObjectFieldHidden, - Kind: ast.ObjectFieldID, - Expr2: &ast.Conditional{ - Cond: &ast.Binary{ - Left: &ast.Var{Id: *newIdentifier("alpha")}, - Op: ast.BopManifestEqual, - Right: &ast.Var{Id: *newIdentifier("beta")}, - }, - BranchTrue: &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("foo"), - Expr2: &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "1", - }, - }, - }, - }, - }, - BranchFalse: &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("foo"), - Expr2: &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "2", - }, - }, - }, - }, - }, - }, - }, - }, - }, - } - - return o, ao -} - -func conditionalNoFalse(t *testing.T) (Noder, ast.Node) { - o := NewObject() - k := NewKey("foo") - - cond := NewBinary( - NewVar("alpha"), - NewVar("beta"), - BopEqual, - ) - trueBranch := NewObject() - trueBranch.Set( - NewKey( - "foo", - KeyOptCategory(ast.ObjectFieldID), - KeyOptVisibility(ast.ObjectFieldInherit)), - NewStringDouble("1"), - ) - - c := NewConditional(cond, trueBranch, nil) - - o.Set(k, c) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Hide: ast.ObjectFieldHidden, - Kind: ast.ObjectFieldID, - Expr2: &ast.Conditional{ - Cond: &ast.Binary{ - Left: &ast.Var{Id: *newIdentifier("alpha")}, - Op: ast.BopManifestEqual, - Right: &ast.Var{Id: *newIdentifier("beta")}, - }, - BranchTrue: &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("foo"), - Expr2: &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "1", - }, - }, - }, - }, - }, - }, - }, - }, - }, - } - - return o, ao -} - -func localApply(t *testing.T) (Noder, ast.Node) { - o := NewObject() - k := LocalKey("foo") - - call := NewCall("alpha") - arg1 := NewStringDouble("arg1") - a := NewApply(call, []Noder{arg1}, nil) - - o.Set(k, a) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Kind: ast.ObjectLocal, - Expr2: &ast.Apply{ - Target: &ast.Var{ - Id: *newIdentifier("alpha"), - }, - Arguments: ast.Arguments{ - Positional: ast.Nodes{ - &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "arg1", - }, - }, - }, - }, - }, - }, - }, - } - - return o, ao -} - -func localApplyWithAnIndex(t *testing.T) (Noder, ast.Node) { - o := NewObject() - k := LocalKey("foo") - - arg1 := NewStringDouble("arg1") - a := ApplyCall("alpha.beta.charlie", arg1) - - o.Set(k, a) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Kind: ast.ObjectLocal, - Expr2: &ast.Apply{ - Target: &ast.Index{ - Id: newIdentifier("charlie"), - Target: &ast.Index{ - Id: newIdentifier("beta"), - Target: &ast.Var{ - Id: *newIdentifier("alpha"), - }, - }, - }, - Arguments: ast.Arguments{ - Positional: ast.Nodes{ - &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "arg1", - }, - }, - }, - }, - }, - }, - }, - } - - return o, ao -} - -func local(t *testing.T) (Noder, ast.Node) { - i := NewImport("value") - l := NewLocal("value", i, nil) - - ao := &ast.Local{ - Binds: ast.LocalBinds{ - { - Variable: *newIdentifier("value"), - Body: &ast.Import{ - File: &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "value", - }, - }, - }, - }, - } - - return l, ao -} - -func optionalArguments(t *testing.T) (Noder, ast.Node) { - apply := NewApply( - NewVar("thing"), []Noder{NewVar("arg1")}, - []OptionalArg{{Name: "opt1"}, {Name: "opt2", Default: NewStringDouble("val")}}) - - ao := &ast.Apply{ - Target: &ast.Var{Id: *newIdentifier("thing")}, - Arguments: ast.Arguments{ - Positional: ast.Nodes{&ast.Var{Id: *newIdentifier("arg1")}}, - Named: []ast.NamedArgument{ - {Name: *newIdentifier("opt1"), Arg: &ast.LiteralString{Kind: ast.StringDouble}}, - {Name: *newIdentifier("opt2"), Arg: &ast.LiteralString{Value: "val", Kind: ast.StringDouble}}, - }, - }, - } - - return apply, ao -} - -func combine0(t *testing.T) (Noder, ast.Node) { - c := Combine() - - ao := &astext.Object{} - - return c, ao -} - -func combine1(t *testing.T) (Noder, ast.Node) { - c := Combine(NewVar("var1")) - - ao := &ast.Var{Id: *newIdentifier("var1")} - - return c, ao -} - -func combine2(t *testing.T) (Noder, ast.Node) { - c := Combine(NewVar("var1"), NewVar("var2")) - - ao := &ast.Binary{ - Left: &ast.Var{Id: *newIdentifier("var1")}, - Right: &ast.Var{Id: *newIdentifier("var2")}, - Op: ast.BopPlus, - } - - return c, ao -} - -func combine3(t *testing.T) (Noder, ast.Node) { - c := Combine(NewVar("var1"), NewVar("var2"), NewVar("var3")) - - ao := &ast.Binary{ - Left: &ast.Binary{ - Left: &ast.Var{Id: *newIdentifier("var1")}, - Right: &ast.Var{Id: *newIdentifier("var2")}, - Op: ast.BopPlus, - }, - Right: &ast.Var{Id: *newIdentifier("var3")}, - Op: ast.BopPlus, - } - - return c, ao -} - -func kvFromMap1(t *testing.T) (Noder, ast.Node) { - m := map[string]interface{}{ - "string": "string", - "float64": 1.0, - "int": 1, - "bool": true, - "obj": map[interface{}]interface{}{ - "a": "a", - "b": 2, - }, - "obj2": map[string]interface{}{ - "a": "a", - "b": 2, - }, - "array": []interface{}{"a", "b"}, - "arraywithmap": []interface{}{ - map[string]interface{}{ - "a": "a", - }, - }, - } - - o, err := KVFromMap(m) - require.NoError(t, err) - - arrayWithMapObject := NewObject() - arrayWithMapObject.Set(InheritedKey("a"), NewStringDouble("a")) - - ao := &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("array"), - Expr2: NewArray([]Noder{ - NewStringDouble("a"), - NewStringDouble("b"), - }).Node(), - }, - }, - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("arraywithmap"), - Expr2: NewArray([]Noder{ - arrayWithMapObject, - }).Node(), - }, - }, - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("bool"), - Expr2: &ast.LiteralBoolean{Value: true}, - }, - }, - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("float64"), - Expr2: &ast.LiteralNumber{Value: 1, OriginalString: "1"}, - }, - }, - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("int"), - Expr2: &ast.LiteralNumber{Value: 1, OriginalString: "1"}, - }, - }, - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("obj"), - Expr2: &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("a"), - Expr2: &ast.LiteralString{Value: "a", Kind: ast.StringDouble}, - }, - }, - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("b"), - Expr2: NewInt(2).Node(), - }, - }, - }, - }, - }, - }, - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("obj2"), - Expr2: &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("a"), - Expr2: &ast.LiteralString{Value: "a", Kind: ast.StringDouble}, - }, - }, - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("b"), - Expr2: NewInt(2).Node(), - }, - }, - }, - }, - }, - }, - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("string"), - Expr2: &ast.LiteralString{Value: "string", Kind: ast.StringDouble}, - }, - }, - }, - } - - return o, ao -} - -func kvFromMap2(t *testing.T) (Noder, ast.Node) { - m := map[string]interface{}{ - "invalid": nil, - } - - _, err := KVFromMap(m) - require.Error(t, err) - - return nil, nil -} - -func kvFromMap3(t *testing.T) (Noder, ast.Node) { - _, err := KVFromMap(nil) - require.Error(t, err) - - return nil, nil -} - -func function(t *testing.T) (Noder, ast.Node) { - body := NewStringDouble("a") - f := NewFunction([]string{"option"}, body) - - ao := &ast.Function{ - Parameters: ast.Parameters{ - Required: ast.Identifiers{*newIdentifier("option")}, - }, - Body: &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "a", - }, - } - - return f, ao -} - -func TestObject_Get(t *testing.T) { - o := NewObject() - v := NewObject() - - o.Set(NewKey("item"), v) - - if expected, got := v, o.Get("item"); got != expected { - t.Fatalf("Get() got = %#v; expected = %#v", got, expected) - } - - noder := o.Get("missing") - if noder != nil { - t.Fatalf("Get() nonexistant key should return nil") - } -} - -func TestBinary_UnknownOperator(t *testing.T) { - left := NewInt(1) - right := NewFloat(2) - - b := NewBinary(left, right, BinaryOp("☃")) - - defer func() { - if r := recover(); r == nil { - t.Errorf("expected unknown binary operator to panic") - } - }() - - b.Node() -} - -func TestObject_HasUniqueKeys(t *testing.T) { - o := NewObject() - - var err error - err = o.Set(NewKey("foo"), NewStringDouble("text")) - if err != nil { - t.Errorf("Set() returned unexpected error: %v", err) - } - - err = o.Set(NewKey("foo"), NewStringDouble("text")) - if err == nil { - t.Errorf("Set() expected error and there as now") - } -} - -func TestObject_RetrieveKeys(t *testing.T) { - o := NewObject() - - err := o.Set(NewKey("foo"), NewStringDouble("text")) - require.NoError(t, err) - - err = o.Set(NewKey("bar"), NewStringDouble("text")) - require.NoError(t, err) - - keys := o.Keys() - - expected := []Key{NewKey("foo"), NewKey("bar")} - require.Equal(t, expected, keys) -} - -func TestCallChain(t *testing.T) { - cases := []struct { - name string - noders []Chainable - expected ast.Node - }{ - { - name: "var", - noders: []Chainable{ - NewVar("alpha"), - }, - expected: NewVar("alpha").Node(), - }, - { - name: "indexed var", - noders: []Chainable{ - NewVar("foo"), - NewIndex("bar"), - }, - expected: &ast.Index{ - Id: newIdentifier("bar"), - Target: NewVar("foo").Node(), - }, - }, - { - name: "apply with index with var", - noders: []Chainable{ - NewVar("std"), - NewApply(NewIndex("extVar"), []Noder{ - NewStringDouble("__ksonnet/params"), - }, nil), - NewIndex("components"), - NewIndex("certificateCrd"), - }, - expected: &ast.Index{ - Id: newIdentifier("certificateCrd"), - Target: &ast.Index{ - Id: newIdentifier("components"), - Target: &ast.Apply{ - Target: &ast.Index{ - Id: newIdentifier("extVar"), - Target: &ast.Var{Id: *newIdentifier("std")}, - }, - Arguments: ast.Arguments{ - Positional: ast.Nodes{ - NewStringDouble("__ksonnet/params").Node(), - }, - }, - }, - }, - }, - }, - { - name: "call with apply", - noders: []Chainable{ - NewCall("a.b.c.d"), - NewApply(NewIndex("fn"), []Noder{ - NewVar("arg"), - }, nil), - }, - expected: &ast.Apply{ - Target: &ast.Index{ - Id: newIdentifier("fn"), - Target: &ast.Index{ - Id: newIdentifier("d"), - Target: &ast.Index{ - Id: newIdentifier("c"), - Target: &ast.Index{ - Id: newIdentifier("b"), - Target: &ast.Var{ - Id: *newIdentifier("a"), - }, - }, - }, - }, - }, - Arguments: ast.Arguments{ - Positional: ast.Nodes{ - NewVar("arg").Node(), - }, - }, - }, - }, - { - name: "var with call", - noders: []Chainable{ - NewVar("a"), - NewCall("b.c.d"), - }, - expected: &ast.Index{ - Id: newIdentifier("d"), - Target: &ast.Index{ - Id: newIdentifier("c"), - Target: &ast.Index{ - Id: newIdentifier("b"), - Target: &ast.Var{ - Id: *newIdentifier("a"), - }, - }, - }, - }, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - cc := NewCallChain(tc.noders...) - - var buf bytes.Buffer - err := printer.Fprint(&buf, cc.Node()) - require.NoError(t, err) - - assert.Equal(t, tc.expected, cc.Node()) - }) - } -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/doc.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/doc.go deleted file mode 100644 index 8053704f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package printer implements printing of jsonnet AST nodes. -package printer diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/printer.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/printer.go deleted file mode 100644 index b4d05ae9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/printer.go +++ /dev/null @@ -1,1075 +0,0 @@ -package printer - -import ( - "bytes" - "fmt" - "io" - "regexp" - "strconv" - "strings" - "unicode/utf8" - - "github.com/google/go-jsonnet/ast" - "github.com/google/go-jsonnet/parser" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/astext" - "github.com/pkg/errors" -) - -const ( - space = byte(' ') - tab = byte('\t') - newline = byte('\n') - comma = byte(',') - doubleQuote = byte('"') - singleQuote = byte('\'') - - syntaxSugar = '+' -) - -// quoteMode is an enumeration specifying how a jsonnet string should be quoted. -type quoteMode int - -const ( - quoteModeNone quoteMode = iota - quoteModeSingle - quoteModeDouble - quoteModeBlock -) - -// Fprint prints a node to the supplied writer using the default -// configuration. -func Fprint(output io.Writer, node ast.Node) error { - return DefaultConfig.Fprint(output, node) -} - -// DefaultConfig is a default configuration. -var DefaultConfig = Config{ - IndentSize: 2, - PadArrays: false, - PadObjects: true, - SortImports: true, -} - -// IndentMode is the indent mode for Config. -type IndentMode int - -const ( - // IndentModeSpace indents with spaces. - IndentModeSpace IndentMode = iota - // IndentModeTab indents with tabs. - IndentModeTab -) - -// Config is a configuration for the printer. -type Config struct { - IndentSize int - IndentMode IndentMode - PadArrays bool - PadObjects bool - SortImports bool -} - -// Fprint prints a node to the supplied writer. -func (c *Config) Fprint(output io.Writer, node ast.Node) error { - p := printer{cfg: *c} - - p.print(node) - - if p.err != nil { - return errors.Wrap(p.err, "output") - } - - _, err := output.Write(p.output) - return err -} - -type printer struct { - cfg Config - - output []byte - indentLevel int - inFunction bool - - err error -} - -func (p *printer) indent() { - if len(p.output) == 0 { - return - } - - r := p.indentLevel - var ch byte - if p.cfg.IndentMode == IndentModeTab { - ch = tab - } else { - ch = space - r = r * p.cfg.IndentSize - } - - last := p.output[len(p.output)-1] - if last == newline { - pre := bytes.Repeat([]byte{ch}, r) - p.output = append(p.output, pre...) - } -} - -func (p *printer) writeByte(ch byte, n int) { - if p.err != nil { - return - } - - for i := 0; i < n; i++ { - p.output = append(p.output, ch) - } - - p.indent() -} - -func (p *printer) writeString(s string) { - for _, b := range []byte(s) { - p.writeByte(b, 1) - } -} - -func (p *printer) writeStringNoIndent(s string) { - for _, b := range []byte(s) { - p.output = append(p.output, b) - } -} - -// detectQuoteMode decides what quote style to use for serializing -// a jsonnet string, with logic similar to that of `jsonnet fmt`. -// -// Briefly, single quotes are preferred, unless escaping can be avoided -// by using double quotes. -// In cases where both single and double quotes are detected, -// the status-quo is preferred (as specificed by `kind`). -func detectQuoteMode(s string, kind ast.LiteralStringKind) quoteMode { - hasSingle := strings.ContainsRune(s, '\'') - hasDouble := strings.ContainsRune(s, '"') - - switch kind { - default: - return quoteModeNone - case ast.StringSingle: - // Go with single unless there's only single quotes already. - useSingle := !(hasSingle && !hasDouble) - if useSingle { - return quoteModeSingle - } - - case ast.StringDouble: - // Cases: - // 1. [" 'abc' "] -> [" 'abc' "] - // 2. [" \"abc\" "] -> [' "abc" '] - // 3. [" 'abc' \"123\" "] -> [" 'abc' \"123\" "] - // 4. [" abc "] -> [' abc '] - useDouble := (hasSingle && !hasDouble) || - (hasSingle && hasDouble) - if useDouble { - return quoteModeDouble - } - case ast.StringBlock: - return quoteModeBlock - } - - return quoteModeNone -} - -func unquote(s string) string { - if !strings.ContainsRune(s, '\\') { - return s - } - - sb := strings.Builder{} - sb.Grow(len(s)) - - tail := s - for len(tail) > 0 { - c, width := utf8.DecodeRuneInString(tail) - - switch c { - case utf8.RuneError: - tail = tail[width:] - continue // Skip this character - case '"': - // strconv.UnquoteChar won't allow a bare quote in double-quote mode, but we will - sb.WriteRune(c) - tail = tail[width:] - default: - c, _, t2, err := strconv.UnquoteChar(tail, byte('"')) - if err != nil { - // Skip character. Ensure we move forward. - tail = tail[width:] - continue - } - tail = t2 - sb.WriteRune(c) - } - } - - return sb.String() -} - -// quote returns a single or double quoted string, escaped for jsonnet. -// This function does *not* protect against double-escaping. Instead use `stringQuote`. -func quote(s string, useSingle bool) string { - var quote rune - if useSingle { - quote = '\'' - } else { - quote = '"' - } - - sb := strings.Builder{} - sb.Grow(len(s) + 2) - - sb.WriteRune(quote) - - for _, c := range s { - switch c { - case '\'': - if useSingle { - sb.WriteString("\\'") - } else { - sb.WriteRune(c) - } - case '"': - if !useSingle { - sb.WriteString("\\\"") - } else { - sb.WriteRune(c) - } - default: - q := strconv.QuoteRune(c) // This is returned with unneeded quotes - sb.WriteString(q[1 : len(q)-1]) - } - } - - sb.WriteRune(quote) - return sb.String() -} - -// stringQuote returns a quoted jsonnet string ready for serialization. -// Appropriate measures are taken to avoid double-escaping any control characters. -// `useSingle` specifies whether to use single quotes, otherwise double-quotes are used. -// Note the following characters will be escaped (with leading backslash): "'\/bfnrt -// Quotes (single or double) will only be escaped to avoid conflict with the enclosing quote type. -func stringQuote(s string, useSingle bool) string { - unquoted := unquote(s) // Avoid double-escaping control characters - - return quote(unquoted, useSingle) -} - -// printer prints a node. -// nolint: gocyclo -func (p *printer) print(n interface{}) { - if p.err != nil { - return - } - - if n == nil { - return - } - - switch t := n.(type) { - default: - p.err = errors.Errorf("unknown node type: (%T) %#v", n, n) - return - case *ast.Apply: - p.handleApply(t) - case ast.Arguments: - p.handleArguments(t) - case *ast.ApplyBrace: - p.print(t.Left) - p.writeByte(space, 1) - p.print(t.Right) - case *ast.Array: - oneLine := false - if loc := t.NodeBase.Loc(); loc != nil && loc.Begin.Line == loc.End.Line { - oneLine = true - } - shouldPad := oneLine && p.cfg.PadArrays && len(t.Elements) > 0 - - p.writeString("[") - if !oneLine { - p.indentLevel++ - p.writeByte(newline, 1) - } - if shouldPad { - p.writeByte(space, 1) - } - - for i := 0; i < len(t.Elements); i++ { - p.print(t.Elements[i]) - - if i < len(t.Elements)-1 { - if oneLine { - p.writeString(", ") - } else { - p.writeString(",") - p.writeByte(newline, 1) - } - } - } - - // Trailing comma - if !oneLine && len(t.Elements) > 0 { - p.writeByte(comma, 1) - } - - if !oneLine { - p.indentLevel-- - p.writeByte(newline, 1) - } - if shouldPad { - p.writeByte(space, 1) - } - - p.writeString("]") - case *ast.ArrayComp: - p.handleArrayComp(t) - case *ast.Assert: - p.writeString("assert ") - p.print(t.Cond) - - if t.Message != nil { - p.writeString(" : ") - p.print(t.Message) - } - - p.writeString("; ") - p.print(t.Rest) - case *ast.Binary: - oneLine := true - leftLoc := t.Left.Loc() - rightLoc := t.Right.Loc() - - if leftLoc != nil && rightLoc != nil { - oneLine = leftLoc.End.Line == rightLoc.Begin.Line - } - - p.print(t.Left) - p.writeByte(space, 1) - - p.writeString(t.Op.String()) - - if !oneLine { - p.writeByte(newline, 1) - } else { - p.writeByte(space, 1) - } - - p.print(t.Right) - case *ast.Conditional: - p.handleConditional(t) - case *ast.Dollar: - p.writeString("$") - case *ast.Error: - p.writeString("error ") - p.print(t.Expr) - case *ast.Function: - p.writeString("function") - p.addMethodSignature(t) - p.writeString(" ") - p.print(t.Body) - case ast.IfSpec: - p.writeString("if ") - p.print(t.Expr) - case *ast.Import: - p.writeString("import ") - p.print(t.File) - case *ast.ImportStr: - p.writeString("importstr ") - p.print(t.File) - case *ast.Index: - p.handleIndex(t) - case *ast.InSuper: - p.print(t.Index) - p.writeString(" in super") - case *ast.Local: - p.handleLocal(t) - case *ast.Object: - isSingleLine := p.isObjectSingleLine(t) - shouldPad := isSingleLine && p.cfg.PadObjects && len(t.Fields) > 0 - needTrailingComma := !isSingleLine && len(t.Fields) > 0 - p.writeString("{") - if shouldPad { - p.writeByte(space, 1) - } - - for i, field := range t.Fields { - if !p.isObjectSingleLine(t) { - p.indentLevel++ - p.writeByte(newline, 1) - } - - p.print(field) - if i < len(t.Fields)-1 { - p.writeByte(comma, 1) - if p.isObjectSingleLine(t) { - p.writeByte(space, 1) - } - } - - if !p.isObjectSingleLine(t) { - p.indentLevel-- - } - } - - if needTrailingComma { - p.writeByte(comma, 1) - } - - // write an extra newline at the end - if !p.isObjectSingleLine(t) { - p.writeByte(newline, 1) - } - - if shouldPad { - p.writeByte(space, 1) - } - p.writeString("}") - case *astext.Object: - isSingleLine := p.isObjectSingleLine(t) - shouldPad := isSingleLine && p.cfg.PadObjects && len(t.Fields) > 0 - needTrailingComma := !isSingleLine && len(t.Fields) > 0 - p.writeString("{") - if shouldPad { - p.writeByte(space, 1) - } - - for i, field := range t.Fields { - if !p.isObjectSingleLine(t) { - p.indentLevel++ - p.writeByte(newline, 1) - } - - p.print(field) - if i < len(t.Fields)-1 { - p.writeByte(comma, 1) - if p.isObjectSingleLine(t) { - p.writeByte(space, 1) - } - } - - if !p.isObjectSingleLine(t) { - p.indentLevel-- - } - } - - if needTrailingComma { - p.writeByte(comma, 1) - } - - // write an extra newline at the end - if !p.isObjectSingleLine(t) { - p.writeByte(newline, 1) - } - - if shouldPad { - p.writeByte(space, 1) - } - p.writeString("}") - case *ast.ObjectComp: - p.handleObjectComp(t) - case astext.ObjectField, ast.ObjectField: - p.handleObjectField(t) - case *ast.LiteralBoolean: - if t.Value { - p.writeString("true") - } else { - p.writeString("false") - } - case *ast.LiteralString: - qm := detectQuoteMode(t.Value, t.Kind) - - switch t.Kind { - default: - p.err = errors.Errorf("unknown string literal kind %#v", t.Kind) - return - case ast.StringSingle, ast.StringDouble: - useSingle := (qm != quoteModeDouble) - - // Unescape newlines and tabs. The jsonnet parser will escape - // these during parsing. - val := strings.Replace(t.Value, "\\n", "\n", -1) - val = strings.Replace(val, "\\t", "\t", -1) - - quoted := stringQuote(val, useSingle) - p.writeString(quoted) - case ast.StringBlock: - p.writeString("|||") - p.writeByte(newline, 1) - p.writeString(t.Value) - p.writeStringNoIndent("\n|||") - case ast.VerbatimStringDouble: - p.writeString("@") - p.writeByte(doubleQuote, 1) - p.writeString(t.Value) - p.writeByte(doubleQuote, 1) - case ast.VerbatimStringSingle: - p.writeString("@") - p.writeByte(singleQuote, 1) - p.writeString(t.Value) - p.writeByte(singleQuote, 1) - } - - case *ast.LiteralNumber: - - p.writeString(t.OriginalString) - case *ast.Parens: - p.writeString("(") - p.print(t.Inner) - p.writeString(")") - case *ast.Self: - p.writeString("self") - case *ast.Slice: - p.print(t.Target) - p.writeString("[") - if t.BeginIndex != nil { - p.print(t.BeginIndex) - } - p.writeString(":") - if t.EndIndex != nil { - p.print(t.EndIndex) - } - if t.Step != nil { - p.writeString(":") - p.print(t.Step) - } - p.writeString("]") - case *ast.Unary: - p.writeString(t.Op.String()) - p.print(t.Expr) - case *ast.Var: - p.writeString(string(t.Id)) - case *ast.LiteralNull: - p.writeString("null") - case *ast.SuperIndex: - p.writeString("super.") - p.writeString(string(*t.Id)) - } -} - -func (p *printer) handleApply(a *ast.Apply) { - switch a.Target.(type) { - default: - p.writeString("function") - p.writeString("(") - p.print(a.Arguments) - p.writeString(")") - p.writeByte(space, 1) - p.print(a.Target) - if a.TailStrict { - p.writeString(" tailstrict") - } - case *ast.Apply, *ast.Index, *ast.Self, *ast.Var, *ast.Parens: - p.print(a.Target) - p.writeString("(") - p.print(a.Arguments) - p.writeString(")") - if a.TailStrict { - p.writeString(" tailstrict") - } - } -} - -func (p *printer) handleArguments(a ast.Arguments) { - argCount := 0 - - for i, arg := range a.Positional { - argCount++ - p.print(arg) - if i < len(a.Positional)-1 { - p.writeByte(comma, 1) - p.writeByte(space, 1) - } - } - - if argCount > 0 && len(a.Named) > 0 { - p.writeByte(comma, 1) - p.writeByte(space, 1) - } - - for i, named := range a.Named { - p.writeString(string(named.Name)) - p.writeString("=") - p.print(named.Arg) - if i < len(a.Named)-1 { - p.writeByte(comma, 1) - p.writeByte(space, 1) - } - } -} - -func (p *printer) handleConditional(c *ast.Conditional) { - p.writeString("if ") - p.print(c.Cond) - - p.writeString(" then ") - p.print(c.BranchTrue) - - if c.BranchFalse != nil { - p.writeString(" else ") - p.print(c.BranchFalse) - } -} - -func (p *printer) writeComment(c *astext.Comment) { - if c == nil { - return - } - - lines := strings.Split(c.Text, "\n") - for _, line := range lines { - p.writeString("//") - if len(line) > 0 { - p.writeByte(space, 1) - } - p.writeString(strings.TrimSpace(line)) - p.writeByte(newline, 1) - } -} - -func (p *printer) handleIndex(i *ast.Index) { - if i == nil { - p.err = errors.New("index is nil") - return - } - - p.print(i.Target) - p.indexID(i) -} - -func (p *printer) handleLocal(l *ast.Local) { - p.writeString("local ") - - for i, bind := range l.Binds { - p.writeString(string(bind.Variable)) - p.addMethodSignature(bind.Fun) - - switch t := bind.Body.(type) { - default: - p.writeString(" = ") - p.print(bind.Body) - case *ast.Function: - p.addMethodSignature(t) - p.writeString(" =") - - switch t.Body.(type) { - default: - p.writeString(" ") - p.print(t.Body) - case *ast.Local: - p.indentLevel++ - p.writeByte(newline, 1) - p.print(t.Body) - p.indentLevel-- - } - } - - if l := len(l.Binds); l > 1 { - if i < l-1 { - p.writeString(", ") - } - } - } - - c := 1 - if _, ok := l.Body.(*ast.Local); !ok { - c = 2 - } - p.writeString(";") - p.writeByte(newline, c) - - p.print(l.Body) -} - -func (p *printer) handleLocalFunction(f *ast.Function) { - p.addMethodSignature(f) - p.writeString(" =") - switch f.Body.(type) { - default: - p.writeByte(space, 1) - p.print(f.Body) - case *ast.Local: - p.indentLevel++ - p.writeByte(newline, 1) - p.print(f.Body) - p.indentLevel-- - } -} - -// shouldUnquoteFieldID determines whether s can be an unquoted field identifier. -// Things that can't be unquoted: keywords, expressions. -func shouldUnquoteFieldID(s string) bool { - // Try to pose the string as a raw (unquoted) object field identifier. - // If this succeeds, quotes are not needed. - toParse := fmt.Sprintf("{%s: 'value'}", s) - tokens, err := parser.Lex("", toParse) - if err != nil { - return false - } - - if len(tokens) < 3 { - return false - } - - // The following pattern would show s tokenized entirely as a single identifier. - // NOTE we resort to string matching as `token.kind` is not exported. - idTokenMatch := fmt.Sprintf("(IDENTIFIER, \"%s\")", s) - - if tokens[1].String() == idTokenMatch && - tokens[2].String() == "\":\"" { - return true - } - - return false -} - -// reID matches `id` as defined in the jsonnet spec -var reID = regexp.MustCompile(`^[_a-zA-Z][_a-zA-Z0-9]*$`) - -func (p *printer) fieldID(kind ast.ObjectFieldKind, expr1 ast.Node, id *ast.Identifier) { - if expr1 != nil { - switch t := expr1.(type) { - default: - p.print(t) - return - case *ast.LiteralString: - qm := detectQuoteMode(t.Value, t.Kind) - useSingle := (qm == quoteModeSingle) - quoted := stringQuote(t.Value, useSingle) - - // Block quotes (|||) are always retained: - if qm == quoteModeBlock { - sb := strings.Builder{} - sb.WriteString("|||") - sb.WriteByte(newline) - // Indent the value using BlockIndent, but be aware that our caller - // will also be indenting using indentLevel. Remove those many bytes. - padding := strings.Repeat(" ", p.indentLevel*p.cfg.IndentSize) - replaceCount := strings.Count(t.Value, "\n") - 1 // Replace all but the last newline - indented := padding + strings.Replace(t.Value, "\n", ("\n"+padding), replaceCount) - sb.WriteString(indented) - sb.WriteString("|||") - p.writeString(sb.String()) - return - } - - // Return identity if quotes aren't strictly necessary, - // that is it could pass for a bare identifier without ambiguity. - // This is not the case for keywords, expressions, - // e.g. 'guestbook-ui' or 'error'. - switch kind { - case ast.ObjectFieldID, ast.ObjectFieldStr: - if shouldUnquoteFieldID(t.Value) { - p.writeString(t.Value) - return - } - } - - // Example where quotes are needed: kind==ObjectFieldExpr - p.writeString(quoted) - return - } - } - - if id != nil { - p.writeString(string(*id)) - return - } -} - -func (p *printer) handleObjectComp(oc *ast.ObjectComp) { - p.writeString("{") - p.indentLevel++ - p.writeByte(newline, 1) - p.handleObjectField(oc) - p.indentLevel-- - p.writeByte(newline, 1) - p.writeString("}") -} - -func (p *printer) handleArrayComp(ac *ast.ArrayComp) { - p.writeString("[") - p.indentLevel++ - p.writeByte(newline, 1) - p.print(ac.Body) - p.writeByte(newline, 1) - p.forSpec(ac.Spec) - p.indentLevel-- - p.writeByte(newline, 1) - p.writeString("]") -} - -func (p *printer) forSpec(spec ast.ForSpec) { - if spec.Outer != nil { - p.forSpec(*spec.Outer) - p.writeByte(newline, 1) - } - - if spec.VarName != "" { - p.writeString(fmt.Sprintf("for %s in ", string(spec.VarName))) - p.print(spec.Expr) - - for _, ifSpec := range spec.Conditions { - p.writeByte(newline, 1) - p.print(ifSpec) - } - } -} - -func (p *printer) handleObjectField(n interface{}) { - var ofHide ast.ObjectFieldHide - var ofKind ast.ObjectFieldKind - var ofID *ast.Identifier - var ofMethod *ast.Function - var ofSugar bool - var ofExpr1 ast.Node - var ofExpr2 ast.Node - var ofExpr3 ast.Node - - var forSpec ast.ForSpec - - switch t := n.(type) { - default: - p.err = errors.Errorf("unknown object field type %T", t) - return - case ast.ObjectField: - ofHide = t.Hide - ofKind = t.Kind - ofID = t.Id - ofMethod = t.Method - ofSugar = t.SuperSugar - ofExpr1 = t.Expr1 - ofExpr2 = t.Expr2 - ofExpr3 = t.Expr3 - case astext.ObjectField: - ofHide = t.Hide - ofKind = t.Kind - ofID = t.Id - ofMethod = t.Method - ofSugar = t.SuperSugar - ofExpr1 = t.Expr1 - ofExpr2 = t.Expr2 - ofExpr3 = t.Expr3 - p.writeComment(t.Comment) - case *ast.ObjectComp: - field := t.Fields[0] - ofHide = field.Hide - ofKind = field.Kind - ofMethod = field.Method - ofExpr1 = field.Expr1 - ofSugar = field.SuperSugar - ofExpr2 = field.Expr2 - - forSpec = t.Spec - } - - var fieldType string - - switch ofHide { - default: - p.err = errors.Errorf("unknown Hide type %#v", ofHide) - return - case ast.ObjectFieldHidden: - fieldType = "::" - case ast.ObjectFieldVisible: - fieldType = ":::" - case ast.ObjectFieldInherit: - fieldType = ":" - } - - switch ofKind { - default: - p.err = errors.Errorf("unknown Kind type (%T) %#v", ofKind, ofKind) - return - case ast.ObjectAssert: - p.writeString("assert ") - p.print(ofExpr2) - if ofExpr3 != nil { - p.writeString(": ") - p.print(ofExpr3) - } - case ast.ObjectFieldID: - p.fieldID(ofKind, ofExpr1, ofID) - if ofMethod != nil { - p.addMethodSignature(ofMethod) - } - - if ofSugar { - p.writeByte(syntaxSugar, 1) - } - - p.writeString(fieldType) - - if isLocal(ofExpr2) { - p.indentLevel++ - p.writeByte(newline, 1) - p.print(ofExpr2) - p.indentLevel-- - - } else { - p.writeByte(space, 1) - p.print(ofExpr2) - } - - case ast.ObjectLocal: - p.writeString("local ") - p.fieldID(ofKind, ofExpr1, ofID) - p.addMethodSignature(ofMethod) - p.writeString(" = ") - p.print(ofExpr2) - case ast.ObjectFieldStr: - p.fieldID(ofKind, ofExpr1, ofID) - if ofSugar { - p.writeByte(syntaxSugar, 1) - } - p.writeString(fieldType) - p.writeByte(space, 1) - p.print(ofExpr2) - case ast.ObjectFieldExpr: - p.writeString("[") - p.fieldID(ofKind, ofExpr1, ofID) - p.writeString("]: ") - p.print(ofExpr2) - if forSpec.VarName != "" { - p.writeByte(newline, 1) - p.forSpec(forSpec) - } - } -} - -func isLocal(node ast.Node) bool { - switch node.(type) { - default: - return false - case *ast.Local: - return true - } -} - -func (p *printer) addMethodSignature(fun *ast.Function) { - if fun == nil { - return - } - params := fun.Parameters - - p.writeString("(") - var args []string - for _, arg := range params.Required { - args = append(args, string(arg)) - } - - for _, opt := range params.Optional { - if opt.DefaultArg == nil { - continue - } - var arg string - arg += string(opt.Name) - arg += "=" - - child := printer{cfg: p.cfg} - child.inFunction = true - child.print(opt.DefaultArg) - if child.err != nil { - p.err = errors.Wrapf(child.err, "invalid argument for %s", string(opt.Name)) - return - } - - arg += string(child.output) - - args = append(args, arg) - } - - p.writeString(strings.Join(args, ", ")) - p.writeString(")") -} - -var reDotIndex = regexp.MustCompile(`^\w[A-Za-z0-9]*$`) - -func (p *printer) indexID(i *ast.Index) { - if i == nil { - p.err = errors.New("index is nil") - return - } - - if i.Index != nil { - switch t := i.Index.(type) { - default: - p.err = errors.Errorf("can't handle index type %T", t) - return - case *ast.LiteralNumber: - p.writeString(fmt.Sprintf(`[%s]`, t.OriginalString)) - case *ast.LiteralString: - if t == nil { - p.err = errors.New("string id is nil") - return - } - - id := t.Value - if reDotIndex.MatchString(id) { - p.writeString(fmt.Sprintf(".%s", id)) - return - } - quoted := stringQuote(id, true) - p.writeString(fmt.Sprintf(`[%s]`, quoted)) - case *ast.Unary: - p.writeString("[") - p.print(t) - p.writeString("]") - case *ast.Var: - p.writeString(fmt.Sprintf("[%s]", string(t.Id))) - } - } else if i.Id != nil { - id := string(*i.Id) - quoted := stringQuote(id, true) - index := fmt.Sprintf(`[%s]`, quoted) - if reDotIndex.MatchString(id) { - index = fmt.Sprintf(`.%s`, id) - } - p.writeString(index) - - } else { - p.err = errors.New("index and id can't both be blank") - return - } -} - -func (p *printer) isObjectSingleLine(i interface{}) bool { - if p.inFunction { - return true - } - - var loc *ast.LocationRange - switch t := i.(type) { - default: - return false - case *astext.Object: - if len(t.Fields) == 0 { - return true - } - if t.Oneline { - return true - } - loc = t.NodeBase.Loc() - case *ast.Object: - if len(t.Fields) == 0 { - return true - } - loc = t.NodeBase.Loc() - } - - if loc == nil { - return false - } - - if loc.Begin.Line == 0 { - return false - } - - return loc.Begin.Line == loc.End.Line -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/printer_test.go b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/printer_test.go deleted file mode 100644 index 529b57ee..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/printer_test.go +++ /dev/null @@ -1,1273 +0,0 @@ -package printer - -import ( - "bytes" - "errors" - "io/ioutil" - "path/filepath" - "strconv" - "strings" - "testing" - - "github.com/google/go-jsonnet/ast" - "github.com/google/go-jsonnet/parser" - "github.com/ksonnet/ksonnet-lib/ksonnet-gen/astext" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestFprintf(t *testing.T) { - cases := []struct { - name string - isErr bool - }{ - {name: "null"}, - {name: "object"}, - {name: "object_with_hidden_field"}, - {name: "apply_brace"}, - {name: "object_mixin"}, - {name: "object_mixin_with_string_index"}, - {name: "object_with_nested_object"}, - {name: "local"}, - {name: "multi_line_comments"}, - {name: "boolean"}, - {name: "literal"}, - {name: "literal_with_newline"}, - {name: "literal_with_single_quote"}, - {name: "object_field_with_comment"}, - {name: "object_field_trailing_comma"}, - {name: "function_with_no_args"}, - {name: "function_with_args"}, - {name: "function_with_optional_args_ast"}, - {name: "function_with_optional_args_astext"}, - {name: "local_function_with_args"}, - {name: "conditional"}, - {name: "conditional_no_false"}, - {name: "index"}, - {name: "index_with_index"}, - {name: "index_quote_name"}, - {name: "index_quote_name_2"}, - {name: "array"}, - {name: "self_apply"}, - {name: "apply_with_multiple_arguments"}, - {name: "declarations"}, - {name: "chained_apply"}, - {name: "apply_with_index"}, - {name: "object_field_with_local"}, - {name: "local_with_function"}, - {name: "apply_with_number"}, - {name: "local_with_multiline_function"}, - {name: "field_with_string_key"}, - {name: "object_comp"}, - {name: "array_comp"}, - {name: "importstr"}, - {name: "function"}, - {name: "super_index"}, - {name: "block_string"}, - {name: "dollar"}, - {name: "nil_node"}, - {name: "trimmed_whitespace_in_tests"}, - {name: "field_id_keywords"}, - - // errors - {name: "unknown_node", isErr: true}, - {name: "invalid_literal_string", isErr: true}, - {name: "invalid_of_kind", isErr: true}, - {name: "invalid_of_hide", isErr: true}, - {name: "index_no_index_or_id", isErr: true}, - {name: "index_invalid_index", isErr: true}, - {name: "index_invalid_literal_string", isErr: true}, - {name: "null_index", isErr: true}, - {name: "function_with_invalid_optional_arg", isErr: true}, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - var buf bytes.Buffer - - node, ok := fprintfCases[tc.name] - if !ok { - t.Fatalf("test case %q does not exist", tc.name) - } - - err := Fprint(&buf, node) - if tc.isErr { - require.Error(t, err) - return - } - - require.NoError(t, err) - - testDataFile := filepath.Join("testdata", tc.name) - testData, err := ioutil.ReadFile(testDataFile) - require.NoError(t, err, "unable to read test data") - - got := strings.TrimSpace(buf.String()) - expected := strings.TrimSpace(string(testData)) - if got != expected { - t.Fatalf("Fprint\ngot = %s\nexpected = %s", - got, expected) - } - }) - } -} - -func Test_with_upstream_golden(t *testing.T) { - dataPath := filepath.FromSlash("testdata/upstream") - fis, err := ioutil.ReadDir(dataPath) - require.NoError(t, err) - - for _, fi := range fis { - t.Run(fi.Name(), func(t *testing.T) { - defer func() { - if r := recover(); r != nil { - t.Logf("recover from panic: %v", r) - } - }() - - if fi.IsDir() { - return - } - - filePath := filepath.Join(dataPath, fi.Name()) - b, err := ioutil.ReadFile(filePath) - require.NoError(t, err) - - tokens, err := parser.Lex(fi.Name(), string(b)) - require.NoError(t, err) - - node, err := parser.Parse(tokens) - require.NoError(t, err) - - var buf bytes.Buffer - - err = Fprint(&buf, node) - require.NoError(t, err) - - got := strings.TrimSpace(buf.String()) - expected := strings.TrimSpace(string(b)) - if got != expected { - // dmp := diffmatchpatch.New() - // diffs := dmp.DiffMain(expected, got, false) - // t.Fatalf(dmp.DiffPrettyText(diffs)) - t.Fatalf("Fprint from upstream\ngot:\n%s\n===\nexpected:\n%s\n", - strconv.Quote(got), strconv.Quote(expected)) - } - }) - } - -} - -var ( - id1 = ast.Identifier("foo") - id2 = ast.Identifier("bar") - - fprintfCases = map[string]ast.Node{ - "null": &ast.LiteralNull{}, - "object": &ast.Object{ - Fields: ast.ObjectFields{}, - }, - "object_with_hidden_field": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Id: newIdentifier("foo"), - Expr2: &ast.Object{}, - }, - { - Kind: ast.ObjectFieldID, - Id: newIdentifier("bar"), - Expr2: &ast.Object{}, - }, - }, - }, - "apply_brace": &ast.ApplyBrace{ - Left: &ast.Var{Id: *newIdentifier("params")}, - Right: &astext.Object{}, - }, - "index": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Id: &id1, - Expr2: &ast.Index{ - Id: newIdentifier("baz"), - Target: &ast.Index{ - Id: newIdentifier("bar"), - Target: &ast.Var{ - Id: *newIdentifier("foo"), - }, - }, - }, - }, - }, - }, - "index_with_index": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Id: &id1, - Expr2: &ast.Index{ - Id: newIdentifier("baz"), - Target: &ast.Index{ - Index: &ast.LiteralString{ - Value: "bar", - Kind: ast.StringDouble, - }, - Target: &ast.Var{ - Id: *newIdentifier("foo"), - }, - }, - }, - }, - }, - }, - "index_quote_name": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Id: &id1, - Expr2: &ast.Index{ - Id: newIdentifier("baz-dashed"), - Target: &ast.Index{ - Id: newIdentifier("bar-dashed"), - Target: &ast.Var{ - Id: *newIdentifier("foo"), - }, - }, - }, - }, - }, - }, - "index_quote_name_2": &ast.Index{ - Target: &ast.Index{ - Target: &ast.Apply{ - Target: &ast.Index{ - Target: &ast.Var{ - Id: *newIdentifier("std"), - }, - Id: newIdentifier("extVar"), - }, - Arguments: ast.Arguments{ - Positional: ast.Nodes{ - &ast.LiteralString{ - Value: "__ksonnet/params", - Kind: ast.StringDouble, - }, - }, - }, - }, - Id: newIdentifier("components"), - }, - Index: &ast.LiteralString{ - Value: "my-service", - Kind: ast.StringDouble, - }, - }, - "object_mixin": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Id: &id1, - Expr2: &ast.Object{}, - SuperSugar: true, - }, - }, - }, - "object_mixin_with_string_index": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: 3, - Hide: ast.ObjectFieldInherit, - Expr1: &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "id", - }, - Expr2: &ast.Object{}, - SuperSugar: true, - }, - }, - }, - "object_with_nested_object": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Id: &id1, - Expr2: &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Id: &id2, - Expr2: &ast.Object{}, - }, - }, - }, - }, - }, - }, - "local": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectLocal, - Hide: ast.ObjectFieldVisible, - Id: &id2, - Expr2: &ast.Object{}, - }, - }, - }, - "multi_line_comments": &astext.Object{ - Fields: []astext.ObjectField{ - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectLocal, - Hide: ast.ObjectFieldVisible, - Id: &id2, - Expr2: &ast.Object{}, - }, - Comment: &astext.Comment{ - Text: "line 1\n\nline 3\nline 4", - }, - }, - }, - }, - "boolean": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("isTrue"), - Expr2: &ast.LiteralBoolean{ - Value: true, - }, - }, - { - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("isFalse"), - Expr2: &ast.LiteralBoolean{ - Value: false, - }, - }, - }, - }, - "literal": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: &id1, - Expr2: &ast.LiteralString{ - Value: "value", - Kind: ast.StringDouble, - }, - }, - }, - }, - "literal_with_newline": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: &id1, - Expr2: &ast.LiteralString{ - Value: "value1\nvalue2", - Kind: ast.StringDouble, - }, - }, - }, - }, - "literal_with_single_quote": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: &id1, - Expr2: &ast.LiteralString{ - Value: "value1", - Kind: ast.StringSingle, - }, - }, - }, - }, - "object_field_with_comment": &astext.Object{ - Object: ast.Object{TrailingComma: false}, - Fields: []astext.ObjectField{ - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: &id1, - Expr2: &ast.LiteralString{ - Value: "value", - Kind: ast.StringDouble, - }, - }, - Comment: &astext.Comment{ - Text: "a comment", - }, - }, - }, - }, - "object_field_trailing_comma": &astext.Object{ - Object: ast.Object{TrailingComma: true}, - Fields: []astext.ObjectField{ - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: &id1, - Expr2: &ast.LiteralString{ - Value: "value", - Kind: ast.StringDouble, - }, - }, - Comment: &astext.Comment{ - Text: "a comment", - }, - }, - }, - }, - "function_with_no_args": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Id: &id1, - Expr2: &ast.Binary{ - Left: newLiteralNumber("1"), - Right: newLiteralNumber("2"), - Op: ast.BopPlus, - }, - Method: &ast.Function{ - Parameters: ast.Parameters{}, - }, - }, - }, - }, - "function_with_args": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Id: &id1, - Expr2: &ast.Binary{ - Left: &ast.Var{Id: *newIdentifier("myVar")}, - Right: newLiteralNumber("2"), - Op: ast.BopPlus, - }, - Method: &ast.Function{ - Parameters: ast.Parameters{ - Required: ast.Identifiers{ - *newIdentifier("one"), - *newIdentifier("two"), - }, - }, - }, - }, - }, - }, - "function_with_optional_args_astext": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Id: newIdentifier("alpha"), - Expr2: &ast.Binary{ - Left: &ast.Var{Id: *newIdentifier("myVar")}, - Right: newLiteralNumber("2"), - Op: ast.BopPlus, - }, - Method: &ast.Function{ - Parameters: ast.Parameters{ - Required: ast.Identifiers{ - *newIdentifier("one"), - *newIdentifier("two"), - }, - Optional: []ast.NamedParameter{ - { - Name: *newIdentifier("opt1"), - DefaultArg: newLiteralNumber("1"), - }, - }, - }, - }, - }, - { - Kind: ast.ObjectFieldID, - Id: newIdentifier("beta"), - Expr2: &ast.Binary{ - Left: &ast.Var{Id: *newIdentifier("myVar")}, - Right: newLiteralNumber("2"), - Op: ast.BopPlus, - }, - Method: &ast.Function{ - Parameters: ast.Parameters{ - Required: ast.Identifiers{ - *newIdentifier("one"), - *newIdentifier("two"), - }, - Optional: []ast.NamedParameter{ - { - Name: *newIdentifier("opt1"), - DefaultArg: &astext.Object{ - Fields: []astext.ObjectField{ - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("foo"), - Expr2: newLiteralNumber("1"), - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - "function_with_optional_args_ast": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Id: newIdentifier("alpha"), - Expr2: &ast.Binary{ - Left: &ast.Var{Id: *newIdentifier("myVar")}, - Right: newLiteralNumber("2"), - Op: ast.BopPlus, - }, - Method: &ast.Function{ - Parameters: ast.Parameters{ - Required: ast.Identifiers{ - *newIdentifier("one"), - *newIdentifier("two"), - }, - Optional: []ast.NamedParameter{ - { - Name: *newIdentifier("opt1"), - DefaultArg: newLiteralNumber("1"), - }, - }, - }, - }, - }, - { - Kind: ast.ObjectFieldID, - Id: newIdentifier("beta"), - Expr2: &ast.Binary{ - Left: &ast.Var{Id: *newIdentifier("myVar")}, - Right: newLiteralNumber("2"), - Op: ast.BopPlus, - }, - Method: &ast.Function{ - Parameters: ast.Parameters{ - Required: ast.Identifiers{ - *newIdentifier("one"), - *newIdentifier("two"), - }, - Optional: []ast.NamedParameter{ - { - Name: *newIdentifier("opt1"), - DefaultArg: &ast.Object{ - Fields: []ast.ObjectField{ - { - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("foo"), - Expr2: newLiteralNumber("1"), - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - "local_function_with_args": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectLocal, - Id: newIdentifier("foo"), - Expr2: &ast.Binary{ - Left: &ast.Var{Id: *newIdentifier("myVar")}, - Right: newLiteralNumber("2"), - Op: ast.BopPlus, - }, - Method: &ast.Function{ - Parameters: ast.Parameters{ - Required: ast.Identifiers{ - *newIdentifier("one"), - *newIdentifier("two"), - }, - }, - }, - }, - }, - }, - "conditional": &ast.Conditional{ - Cond: &ast.Binary{ - Left: &ast.Apply{ - Target: &ast.Index{ - Id: newIdentifier("type"), - Target: &ast.Var{ - Id: *newIdentifier("std"), - }, - }, - Arguments: ast.Arguments{ - Positional: ast.Nodes{ - &ast.Var{Id: *newIdentifier("foo")}, - }, - }, - }, - Right: &ast.LiteralString{ - Value: "array", - Kind: ast.StringDouble, - }, - Op: ast.BopManifestEqual, - }, - BranchTrue: &astext.Object{ - Oneline: true, - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Expr2: &ast.Var{Id: *newIdentifier("foo")}, - }, - }, - }, - }, - BranchFalse: &astext.Object{ - Oneline: true, - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Expr2: &ast.Array{ - Elements: ast.Nodes{ - &ast.Var{Id: *newIdentifier("foo")}, - }, - }, - }, - }, - }, - }, - }, - "conditional_no_false": &ast.Conditional{ - Cond: &ast.Binary{ - Left: &ast.Apply{ - Target: &ast.Index{ - Id: newIdentifier("type"), - Target: &ast.Var{ - Id: *newIdentifier("std"), - }, - }, - Arguments: ast.Arguments{ - Positional: ast.Nodes{ - &ast.Var{Id: *newIdentifier("foo")}, - }, - }, - }, - Right: &ast.LiteralString{ - Value: "array", - Kind: ast.StringDouble, - }, - Op: ast.BopManifestEqual, - }, - BranchTrue: &astext.Object{ - Oneline: true, - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("foo"), - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Expr2: &ast.Var{Id: *newIdentifier("foo")}, - }, - }, - }, - }, - }, - "array": &ast.Array{ - Elements: ast.Nodes{ - &ast.Var{Id: *newIdentifier("foo")}, - &ast.Self{}, - &ast.LiteralString{ - Value: "string", - }, - }, - }, - "self_apply": &ast.Apply{Target: &ast.Self{}}, - "apply_with_multiple_arguments": &ast.Apply{ - Target: &ast.Self{}, - Arguments: ast.Arguments{ - Positional: ast.Nodes{ - &ast.Var{Id: *newIdentifier("a")}, - &ast.Var{Id: *newIdentifier("b")}, - }, - }, - }, - "declarations": &ast.Local{ - Binds: ast.LocalBinds{ - ast.LocalBind{ - Variable: *newIdentifier("a"), - Body: &ast.Import{ - File: &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "a", - }, - }, - }, - }, - Body: &ast.Local{ - Binds: ast.LocalBinds{ - ast.LocalBind{ - Variable: *newIdentifier("b"), - Body: &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "b", - }, - }, - }, - Body: &ast.Local{ - Binds: ast.LocalBinds{ - ast.LocalBind{ - Variable: *newIdentifier("c"), - Body: &ast.Apply{ - Target: &ast.Index{ - Id: newIdentifier("new"), - Target: &ast.Var{ - Id: *newIdentifier("deployment"), - }, - }, - }, - }, - }, - Body: &ast.Object{}, - }, - }, - }, - "chained_apply": &ast.Apply{ - Arguments: ast.Arguments{ - Positional: ast.Nodes{ - &ast.Var{Id: *newIdentifier("bar")}, - }, - }, - Target: &ast.Index{ - Id: newIdentifier("withBar"), - Target: &ast.Apply{ - Arguments: ast.Arguments{ - Positional: ast.Nodes{ - &ast.Var{Id: *newIdentifier("foo")}, - }, - }, - Target: &ast.Index{ - Id: newIdentifier("withFoo"), - Target: &ast.Var{ - Id: *newIdentifier("di"), - }, - }, - }, - }, - }, - "apply_with_index": &ast.Apply{ - Target: &ast.Index{ - Id: newIdentifier("charlie"), - Target: &ast.Index{ - Id: newIdentifier("beta"), - Target: &ast.Var{ - Id: *newIdentifier("alpha"), - }, - }, - }, - Arguments: ast.Arguments{ - Positional: ast.Nodes{ - &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "arg1", - }, - }, - }, - }, - "object_field_with_local": &ast.Object{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldID, - Id: newIdentifier("fn"), - Expr2: &ast.Local{ - Binds: ast.LocalBinds{ - { - Variable: *newIdentifier("foo"), - Body: &ast.LiteralString{ - Value: "a", - Kind: ast.StringDouble, - }, - }, - }, - Body: &ast.Object{}, - }, - Method: &ast.Function{ - Parameters: ast.Parameters{}, - }, - }, - }, - }, - "local_with_function": &ast.Local{ - Binds: ast.LocalBinds{ - { - Variable: *newIdentifier("foo"), - Body: &ast.Function{ - Body: &ast.LiteralString{ - Value: "a", - Kind: ast.StringDouble, - }, - }, - }, - }, - Body: &ast.Object{}, - }, - "apply_with_number": &ast.Apply{Target: newLiteralNumber("1")}, - "local_with_multiline_function": &ast.Local{ - Binds: ast.LocalBinds{ - { - Variable: *newIdentifier("foo"), - Body: &ast.Function{ - Body: &ast.Local{ - Binds: ast.LocalBinds{ - { - Variable: *newIdentifier("a"), - Body: &astext.Object{ - Oneline: true, - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("a"), - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Expr2: &ast.LiteralString{ - Value: "a", - Kind: ast.StringDouble, - }, - }, - }, - }, - }, - }, - }, - Body: &ast.Local{ - Binds: ast.LocalBinds{ - { - Variable: *newIdentifier("b"), - Body: &astext.Object{ - Oneline: true, - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Id: newIdentifier("b"), - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Expr2: &ast.LiteralString{ - Value: "b", - Kind: ast.StringDouble, - }, - }, - }, - }, - }, - }, - }, - Body: &ast.Binary{ - Left: &ast.Var{Id: *newIdentifier("a")}, - Right: &ast.Var{Id: *newIdentifier("b")}, - Op: ast.BopPlus, - }, - }, - }, - }, - }, - }, - Body: &ast.Object{}, - }, - "field_with_string_key": &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Expr1: &ast.LiteralString{ - Kind: ast.StringDouble, - Value: "key", - }, - Expr2: &ast.Var{ - Id: *newIdentifier("value"), - }, - }, - }, - }, - }, - "object_comp": &astext.Object{ - Fields: astext.ObjectFields{ - { - ObjectField: ast.ObjectField{ - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Id: newIdentifier("field"), - Expr2: &ast.ObjectComp{ - Fields: ast.ObjectFields{ - { - Kind: ast.ObjectFieldExpr, - Hide: ast.ObjectFieldInherit, - Expr1: &ast.Var{ - Id: *newIdentifier("x"), - }, - Expr2: &ast.Binary{ - Left: &ast.Index{ - Target: &ast.Index{ - Target: &ast.Var{ - Id: *newIdentifier("envParams"), - }, - Id: newIdentifier("components"), - }, - Index: &ast.Var{ - Id: *newIdentifier("x"), - }, - }, - Op: ast.BopPlus, - Right: &ast.Var{ - Id: *newIdentifier("globals"), - }, - }, - }, - }, - Spec: ast.ForSpec{ - VarName: *newIdentifier("x"), - Expr: &ast.Apply{ - Target: &ast.Index{ - Target: &ast.Var{ - Id: *newIdentifier("std"), - }, - Id: newIdentifier("objectFields"), - }, - Arguments: ast.Arguments{ - Positional: ast.Nodes{ - &ast.Index{ - Target: &ast.Var{ - Id: *newIdentifier("envParams"), - }, - Id: newIdentifier("components"), - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - "importstr": &ast.ImportStr{ - File: &ast.LiteralString{ - Value: "file.txt", - Kind: ast.StringDouble, - }, - }, - "array_comp": &ast.ArrayComp{ - Body: &ast.Object{ - Fields: ast.ObjectFields{ - { - Id: newIdentifier("kind"), - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Expr2: &ast.Var{Id: *newIdentifier("kind")}, - }, - { - Id: newIdentifier("qty"), - Kind: ast.ObjectFieldID, - Hide: ast.ObjectFieldInherit, - Expr2: &ast.Binary{ - Left: &ast.LiteralNumber{Value: float64(4), OriginalString: "4"}, - Right: &ast.LiteralNumber{Value: float64(3), OriginalString: "3"}, - Op: ast.BopDiv, - }, - }, - }, - }, - Spec: ast.ForSpec{ - VarName: *newIdentifier("kind"), - Expr: &ast.Array{ - Elements: ast.Nodes{ - &ast.LiteralString{Value: "Honey Syrup", Kind: ast.StringSingle}, - &ast.LiteralString{Value: "Lemon Juice", Kind: ast.StringSingle}, - &ast.LiteralString{Value: "Farmers Gin", Kind: ast.StringSingle}, - }, - }, - }, - }, - "function": &ast.Function{ - Body: &astext.Object{Oneline: true}, - }, - "super_index": &ast.SuperIndex{ - Id: newIdentifier("metadata"), - }, - "block_string": &ast.LiteralString{ - Kind: ast.StringBlock, - Value: "text", - }, - "dollar": &ast.Dollar{}, - "nil_node": nil, - - // errors - "unknown_node": &noopNode{}, - "invalid_literal_string": &ast.LiteralString{Kind: 99}, - "invalid_of_kind": &ast.Object{ - Fields: ast.ObjectFields{{Kind: 99}}, - }, - "invalid_of_hide": &ast.Object{ - Fields: ast.ObjectFields{{Hide: 99}}, - }, - "index_no_index_or_id": &ast.Index{}, - "index_invalid_index": &ast.Index{Index: &noopNode{}}, - "index_invalid_literal_string": &ast.Index{Index: (*ast.LiteralString)(nil)}, - "null_index": (*ast.Index)(nil), - "function_with_invalid_optional_arg": &ast.Function{ - Parameters: ast.Parameters{ - Optional: []ast.NamedParameter{ - { - DefaultArg: &unprintableNode{}, - }, - }, - }, - }, - "trimmed_whitespace_in_tests": &ast.Object{ - Fields: ast.ObjectFields{}, - }, - "field_id_keywords": &ast.Object{ - Fields: ast.ObjectFields{ - ast.ObjectField{ - Kind: ast.ObjectFieldStr, - Hide: ast.ObjectFieldInherit, - Expr1: &ast.LiteralString{ - Value: "error", - Kind: ast.StringSingle, - }, - Expr2: &ast.LiteralString{ - Value: "value", - Kind: ast.StringSingle, - }, - }, - ast.ObjectField{ - Kind: ast.ObjectFieldStr, - Hide: ast.ObjectFieldInherit, - Expr1: &ast.LiteralString{ - Value: "local", - Kind: ast.StringSingle, - }, - Expr2: &ast.LiteralString{ - Value: "value", - Kind: ast.StringSingle, - }, - }, - ast.ObjectField{ - Kind: ast.ObjectFieldStr, - Hide: ast.ObjectFieldInherit, - Expr1: &ast.LiteralString{ - Value: "unquoteme", - Kind: ast.StringSingle, - }, - Expr2: &ast.LiteralString{ - Value: "value", - Kind: ast.StringSingle, - }, - }, - ast.ObjectField{ - Kind: ast.ObjectFieldStr, - Hide: ast.ObjectFieldInherit, - Expr1: &ast.LiteralString{ - Value: "but-not-me", - Kind: ast.StringSingle, - }, - Expr2: &ast.LiteralString{ - Value: "value", - Kind: ast.StringSingle, - }, - }, - ast.ObjectField{ - Kind: ast.ObjectFieldStr, - Hide: ast.ObjectFieldInherit, - Expr1: &ast.LiteralString{ - Value: "nor:me", - Kind: ast.StringSingle, - }, - Expr2: &ast.LiteralString{ - Value: "value", - Kind: ast.StringSingle, - }, - }, - }, - }, - } -) - -func Test_printer_indent(t *testing.T) { - cases := []struct { - name string - level int - expected string - output []byte - mode IndentMode - }{ - { - name: "space: empty", - level: 0, expected: "", output: make([]byte, 0)}, - { - name: "space: not at eol", - level: 0, expected: "word", output: []byte("word")}, - { - name: "space: at eol", - level: 0, expected: "word\n", output: []byte("word\n")}, - { - name: "space: indent level 1: empty", - level: 1, expected: "", output: make([]byte, 0)}, - { - name: "space: indent level 1: not at eol", - level: 1, expected: "word", output: []byte("word")}, - { - name: "space: indent level 1: at eol", - level: 1, expected: "word\n ", output: []byte("word\n")}, - { - name: "tab: empty", - level: 0, expected: "", output: make([]byte, 0), mode: IndentModeTab}, - { - name: "tab: not at eol", - level: 0, expected: "word", output: []byte("word"), mode: IndentModeTab}, - { - name: "tab: at eol", - level: 0, expected: "word\n", output: []byte("word\n"), mode: IndentModeTab}, - { - name: "tab: indent level 1: empty", - level: 1, expected: "", output: make([]byte, 0), mode: IndentModeTab}, - { - name: "tab: indent level 1: not at eol", - level: 1, expected: "word", output: []byte("word"), mode: IndentModeTab}, - { - name: "tab: indent level 1: at eol", - level: 1, expected: "word\n\t", output: []byte("word\n"), mode: IndentModeTab}, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - p := printer{cfg: Config{IndentMode: tc.mode, IndentSize: 2}} - p.indentLevel = tc.level - - for _, b := range tc.output { - p.writeByte(b, 1) - } - - expected := tc.expected - if got := string(p.output); got != expected { - t.Fatalf("Fprint\ngot = %s\nexpected = %s", - strconv.Quote(got), strconv.Quote(expected)) - } - }) - } -} - -type unprintableNode struct { - ast.Object -} - -func Test_printer_indent_empty(t *testing.T) { - p := printer{cfg: DefaultConfig} - p.indentLevel = 1 - p.indent() - if len(p.output) != 0 { - t.Errorf("indent() with empty output should not change output") - } -} - -func Test_printer_err(t *testing.T) { - p := printer{cfg: DefaultConfig} - p.err = errors.New("error") - - n := &ast.Object{} - p.print(n) - - if len(p.output) != 0 { - t.Errorf("print() in error state should not add any output") - } -} - -func Test_handleObjectField_unknown_object(t *testing.T) { - p := printer{cfg: DefaultConfig} - p.handleObjectField(nil) - require.Error(t, p.err) -} - -func Test_quoteString(t *testing.T) { - tests := []struct { - s string - expected string - useSingle bool - }{ - { - s: "\\tFoo\tBar", - expected: `'\tFoo\tBar'`, - useSingle: true, - }, - { - s: "\\tFoo\tBar", - expected: `"\tFoo\tBar"`, - useSingle: false, - }, - { - s: "Foo\n\u000aBar", - expected: `'Foo\n\nBar'`, - useSingle: true, - }, - { - s: "Foo\n\\u000a\rBar", - expected: `'Foo\n\n\rBar'`, - useSingle: true, - }, - { - s: "'Foo'\\n\"Bar\\\"", - expected: `'\'Foo\'\n"Bar"'`, - useSingle: true, - }, - { - s: "'Foo'\\n\"Bar\\\"", - expected: `"'Foo'\n\"Bar\""`, - useSingle: false, - }, - } - - for _, tc := range tests { - actual := stringQuote(tc.s, tc.useSingle) - assert.Equal(t, tc.expected, actual) - } -} - -func newLiteralNumber(in string) *ast.LiteralNumber { - f, err := strconv.ParseFloat(in, 64) - if err != nil { - return &ast.LiteralNumber{OriginalString: in, Value: 0} - } - return &ast.LiteralNumber{OriginalString: in, Value: f} -} - -// newIdentifier creates an identifier. -func newIdentifier(value string) *ast.Identifier { - id := ast.Identifier(value) - return &id -} - -type noopNode struct{} - -func (n *noopNode) Context() ast.Context { return nil } -func (n *noopNode) Loc() *ast.LocationRange { return nil } -func (n *noopNode) FreeVariables() ast.Identifiers { return nil } -func (n *noopNode) SetFreeVariables(ast.Identifiers) {} -func (n *noopNode) SetContext(ast.Context) {} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_brace b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_brace deleted file mode 100644 index 41ccfea7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_brace +++ /dev/null @@ -1 +0,0 @@ -params {} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_index b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_index deleted file mode 100644 index 0202f1b7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_index +++ /dev/null @@ -1 +0,0 @@ -alpha.beta.charlie('arg1') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_multiple_arguments b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_multiple_arguments deleted file mode 100644 index a7cfeace..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_multiple_arguments +++ /dev/null @@ -1 +0,0 @@ -self(a, b) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_number b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_number deleted file mode 100644 index 894118bb..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/apply_with_number +++ /dev/null @@ -1 +0,0 @@ -function() 1 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/array b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/array deleted file mode 100644 index d1f74666..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/array +++ /dev/null @@ -1 +0,0 @@ -[foo, self, 'string'] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/array_comp b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/array_comp deleted file mode 100644 index 18464959..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/array_comp +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - kind: kind, - qty: 4 / 3, - } - for kind in ['Honey Syrup', 'Lemon Juice', 'Farmers Gin'] -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/block_string b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/block_string deleted file mode 100644 index 7bd99016..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/block_string +++ /dev/null @@ -1,3 +0,0 @@ -||| -text -||| \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/boolean b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/boolean deleted file mode 100644 index bce84343..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/boolean +++ /dev/null @@ -1,4 +0,0 @@ -{ - isTrue: true, - isFalse: false, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/chained_apply b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/chained_apply deleted file mode 100644 index f1553a68..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/chained_apply +++ /dev/null @@ -1 +0,0 @@ -di.withFoo(foo).withBar(bar) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/conditional b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/conditional deleted file mode 100644 index e8389561..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/conditional +++ /dev/null @@ -1 +0,0 @@ -if std.type(foo) == 'array' then { foo: foo } else { foo: [foo] } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/conditional_no_false b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/conditional_no_false deleted file mode 100644 index ae12fc70..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/conditional_no_false +++ /dev/null @@ -1 +0,0 @@ -if std.type(foo) == 'array' then { foo: foo } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/declarations b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/declarations deleted file mode 100644 index 05746a90..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/declarations +++ /dev/null @@ -1,5 +0,0 @@ -local a = import 'a'; -local b = 'b'; -local c = deployment.new(); - -{} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/dollar b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/dollar deleted file mode 100644 index 857f13ad..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/dollar +++ /dev/null @@ -1 +0,0 @@ -$ diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/field_id_keywords b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/field_id_keywords deleted file mode 100644 index 3101b4ac..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/field_id_keywords +++ /dev/null @@ -1,7 +0,0 @@ -{ - 'error': 'value', - 'local': 'value', - unquoteme: 'value', - 'but-not-me': 'value', - 'nor:me': 'value', -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/field_with_string_key b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/field_with_string_key deleted file mode 100644 index d322b6fb..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/field_with_string_key +++ /dev/null @@ -1,3 +0,0 @@ -{ - key:: value, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function deleted file mode 100644 index f5de701d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function +++ /dev/null @@ -1 +0,0 @@ -function() {} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_args b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_args deleted file mode 100644 index d8dba98a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_args +++ /dev/null @@ -1,3 +0,0 @@ -{ - foo(one, two):: myVar + 2, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_no_args b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_no_args deleted file mode 100644 index 0f5e915d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_no_args +++ /dev/null @@ -1,3 +0,0 @@ -{ - foo():: 1 + 2, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_optional_args_ast b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_optional_args_ast deleted file mode 100644 index 5060b5bb..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_optional_args_ast +++ /dev/null @@ -1,4 +0,0 @@ -{ - alpha(one, two, opt1=1):: myVar + 2, - beta(one, two, opt1={ foo: 1 }):: myVar + 2, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_optional_args_astext b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_optional_args_astext deleted file mode 100644 index 5060b5bb..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/function_with_optional_args_astext +++ /dev/null @@ -1,4 +0,0 @@ -{ - alpha(one, two, opt1=1):: myVar + 2, - beta(one, two, opt1={ foo: 1 }):: myVar + 2, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/importstr b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/importstr deleted file mode 100644 index 8f63322a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/importstr +++ /dev/null @@ -1 +0,0 @@ -importstr 'file.txt' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/index b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/index deleted file mode 100644 index d91ecf37..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/index +++ /dev/null @@ -1,3 +0,0 @@ -{ - foo:: foo.bar.baz, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/index_quote_name b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/index_quote_name deleted file mode 100644 index 5466411a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/index_quote_name +++ /dev/null @@ -1,3 +0,0 @@ -{ - foo:: foo['bar-dashed']['baz-dashed'], -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/index_quote_name_2 b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/index_quote_name_2 deleted file mode 100644 index c170e61e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/index_quote_name_2 +++ /dev/null @@ -1 +0,0 @@ -std.extVar('__ksonnet/params').components['my-service'] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/index_with_index b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/index_with_index deleted file mode 100644 index d91ecf37..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/index_with_index +++ /dev/null @@ -1,3 +0,0 @@ -{ - foo:: foo.bar.baz, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/literal b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/literal deleted file mode 100644 index d35c2364..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/literal +++ /dev/null @@ -1,3 +0,0 @@ -{ - foo: 'value', -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/literal_with_newline b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/literal_with_newline deleted file mode 100644 index 68505e19..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/literal_with_newline +++ /dev/null @@ -1,3 +0,0 @@ -{ - foo: 'value1\nvalue2', -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/literal_with_single_quote b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/literal_with_single_quote deleted file mode 100644 index ecc44942..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/literal_with_single_quote +++ /dev/null @@ -1,3 +0,0 @@ -{ - foo: 'value1', -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/local b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/local deleted file mode 100644 index 4ea08796..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/local +++ /dev/null @@ -1,3 +0,0 @@ -{ - local bar = {}, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/local_function_with_args b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/local_function_with_args deleted file mode 100644 index cc4d97cb..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/local_function_with_args +++ /dev/null @@ -1,3 +0,0 @@ -{ - local foo(one, two) = myVar + 2, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/local_with_function b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/local_with_function deleted file mode 100644 index a00d3bf0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/local_with_function +++ /dev/null @@ -1,3 +0,0 @@ -local foo() = 'a'; - -{} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/local_with_multiline_function b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/local_with_multiline_function deleted file mode 100644 index 54e5ce9e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/local_with_multiline_function +++ /dev/null @@ -1,7 +0,0 @@ -local foo() = - local a = { a: 'a' }; - local b = { b: 'b' }; - - a + b; - -{} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/multi_line_comments b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/multi_line_comments deleted file mode 100644 index 59738d58..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/multi_line_comments +++ /dev/null @@ -1,7 +0,0 @@ -{ - // line 1 - // - // line 3 - // line 4 - local bar = {}, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/nil_node b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/nil_node deleted file mode 100644 index e69de29b..00000000 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/null b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/null deleted file mode 100644 index 19765bd5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/null +++ /dev/null @@ -1 +0,0 @@ -null diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object deleted file mode 100644 index 0967ef42..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_comp b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_comp deleted file mode 100644 index 6e618c20..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_comp +++ /dev/null @@ -1,6 +0,0 @@ -{ - field: { - [x]: envParams.components[x] + globals - for x in std.objectFields(envParams.components) - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_trailing_comma b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_trailing_comma deleted file mode 100644 index 25695edd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_trailing_comma +++ /dev/null @@ -1,4 +0,0 @@ -{ - // a comment - foo: 'value', -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_with_comment b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_with_comment deleted file mode 100644 index 25695edd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_with_comment +++ /dev/null @@ -1,4 +0,0 @@ -{ - // a comment - foo: 'value', -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_with_local b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_with_local deleted file mode 100644 index e21bea47..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_field_with_local +++ /dev/null @@ -1,6 +0,0 @@ -{ - fn():: - local foo = 'a'; - - {}, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_mixin b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_mixin deleted file mode 100644 index 000dcced..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_mixin +++ /dev/null @@ -1,3 +0,0 @@ -{ - foo+:: {}, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_mixin_with_string_index b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_mixin_with_string_index deleted file mode 100644 index 614f7a5e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_mixin_with_string_index +++ /dev/null @@ -1,3 +0,0 @@ -{ - id+: {}, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_with_hidden_field b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_with_hidden_field deleted file mode 100644 index 1075e223..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_with_hidden_field +++ /dev/null @@ -1,4 +0,0 @@ -{ - foo:: {}, - bar:: {}, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_with_nested_object b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_with_nested_object deleted file mode 100644 index 92a724f6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/object_with_nested_object +++ /dev/null @@ -1,5 +0,0 @@ -{ - foo:: { - bar:: {}, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/self_apply b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/self_apply deleted file mode 100644 index 144c2279..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/self_apply +++ /dev/null @@ -1 +0,0 @@ -self() diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/super_index b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/super_index deleted file mode 100644 index 0d5ee483..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/super_index +++ /dev/null @@ -1 +0,0 @@ -super.metadata diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/trimmed_whitespace_in_tests b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/trimmed_whitespace_in_tests deleted file mode 100644 index 0967ef42..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/trimmed_whitespace_in_tests +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array.jsonnet deleted file mode 100644 index 5b27fe94..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 1 + 2] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index1.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index1.jsonnet deleted file mode 100644 index b509eb3c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index1.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1][0] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index2.jsonnet deleted file mode 100644 index 0fc47930..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3][0] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index3.jsonnet deleted file mode 100644 index a0ce51a6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3][1] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index4.jsonnet deleted file mode 100644 index 776d19c4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_index4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3][2] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds.jsonnet deleted file mode 100644 index 2b235c90..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[][0] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds2.jsonnet deleted file mode 100644 index 3f47fc0a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3][3] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds3.jsonnet deleted file mode 100644 index 89e0ae3b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[][-1] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds4.jsonnet deleted file mode 100644 index 8f44aa80..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_out_of_bounds4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3][42] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_plus_bad.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_plus_bad.jsonnet deleted file mode 100644 index 8eb05bca..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/array_plus_bad.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[] + 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp.jsonnet deleted file mode 100644 index f69358cd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp.jsonnet +++ /dev/null @@ -1,4 +0,0 @@ -[ - x - for x in [] -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp2.jsonnet deleted file mode 100644 index 2a19b043..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp2.jsonnet +++ /dev/null @@ -1,4 +0,0 @@ -[ - x - for x in [1, 2, 3] -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp3.jsonnet deleted file mode 100644 index 47cd166f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp3.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -[ - [var, var2] - for var in [1, 2, 3] - for var2 in ['a', 'b', 'c'] -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp4.jsonnet deleted file mode 100644 index 16302b2a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp4.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -[ - y - for x in [1, 2, 3] - for y in [x + 1] -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp5.jsonnet deleted file mode 100644 index dcecb810..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp5.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -[ - y - for y in [x + 1] - for x in [1, 2, 3] -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp6.jsonnet deleted file mode 100644 index b9bc8447..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp6.jsonnet +++ /dev/null @@ -1,6 +0,0 @@ -[ - [x, y, z] - for x in [1] - for y in [2] - for z in [3] -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp7.jsonnet deleted file mode 100644 index 3b031a57..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp7.jsonnet +++ /dev/null @@ -1,15 +0,0 @@ -[ - [a1, a2, a3, a4, a5, a6, a7, a8] - for a1 in [1, 2] - for a2 in [3, 4] - for a3 in [5, 6] - for a4 in [7, 8] - for a5 in [9, 10] - for a6 in [11, 12] - for a7 in [13, 14] - if a7 % 2 == 1 - if a4 % 2 == 0 - if a2 % 2 == 0 - if a1 % 2 == 1 - for a8 in [15, 16] -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if.jsonnet deleted file mode 100644 index d3f4f8ed..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -[ - x - for x in [1, 2, 3, 4, 5] - if x > 3 -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if2.jsonnet deleted file mode 100644 index 85301848..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if2.jsonnet +++ /dev/null @@ -1,7 +0,0 @@ -[ - [x, y] - for x in [1, 2, 3, 4, 5] - for y in [1, 2, 3, 4, 5] - if x > 3 - if y < 4 -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if3.jsonnet deleted file mode 100644 index 765ac83d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if3.jsonnet +++ /dev/null @@ -1,7 +0,0 @@ -[ - [x, y] - for x in [1, 2, 3, 4, 5] - if x < 3 - for y in [1, 2, 3, 4, 5] - if y > 2 -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if4.jsonnet deleted file mode 100644 index 47c61c8c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if4.jsonnet +++ /dev/null @@ -1,6 +0,0 @@ -[ - [x, y] - for x in [1, 2, 3, 4, 5] - if y == 3 - for y in [1, 2, 3, 4, 5] -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if5.jsonnet deleted file mode 100644 index b6495fd1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if5.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -[ - x - for x in [] - if error 'x' -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if6.jsonnet deleted file mode 100644 index 600bb926..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if6.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -[ - x - for x in [1] - if error 'x' -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if7.jsonnet deleted file mode 100644 index 373dc1b9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/arrcomp_if7.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -[ - x - for x in [1, 2, 3] - if 42 -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert.jsonnet deleted file mode 100644 index 2fff0f61..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert.jsonnet +++ /dev/null @@ -1 +0,0 @@ -assert true; true diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert2.jsonnet deleted file mode 100644 index c74d1ace..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -assert 42 == 42; true diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert3.jsonnet deleted file mode 100644 index 98aeb87f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -assert 42 != 42; 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal.jsonnet deleted file mode 100644 index 07576bcd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.assertEqual([], []) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal2.jsonnet deleted file mode 100644 index 78e26f9e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.assertEqual({}, {}) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal3.jsonnet deleted file mode 100644 index a925f41d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_equal3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.assertEqual({ x:: 42 }, {}) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_failed.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_failed.jsonnet deleted file mode 100644 index 222c9e7b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_failed.jsonnet +++ /dev/null @@ -1 +0,0 @@ -assert false; true diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_failed_custom.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_failed_custom.jsonnet deleted file mode 100644 index c498025c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/assert_failed_custom.jsonnet +++ /dev/null @@ -1 +0,0 @@ -assert false : 'Custom Message'; true diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/binaryNot.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/binaryNot.jsonnet deleted file mode 100644 index 819b12fa..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/binaryNot.jsonnet +++ /dev/null @@ -1 +0,0 @@ -~12345 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/binaryNot2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/binaryNot2.jsonnet deleted file mode 100644 index fa7859a8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/binaryNot2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -~'xxx' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and.jsonnet deleted file mode 100644 index 511a60e4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and.jsonnet +++ /dev/null @@ -1 +0,0 @@ -0 & 0 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and2.jsonnet deleted file mode 100644 index b29db891..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1337 & 0 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and3.jsonnet deleted file mode 100644 index 99ae8b75..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1e30 & 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and4.jsonnet deleted file mode 100644 index 80b31fc8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1 & error 'x' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and5.jsonnet deleted file mode 100644 index 867238c1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and5.jsonnet +++ /dev/null @@ -1 +0,0 @@ --1337 & 1337 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and6.jsonnet deleted file mode 100644 index 9fdb778a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_and6.jsonnet +++ /dev/null @@ -1 +0,0 @@ --42 & 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or.jsonnet deleted file mode 100644 index eda3ff2c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or.jsonnet +++ /dev/null @@ -1 +0,0 @@ -0 | 0 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or10.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or10.jsonnet deleted file mode 100644 index 7616a3ee..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or10.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'xxx' | 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or2.jsonnet deleted file mode 100644 index 84dd1b02..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -0 | 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or3.jsonnet deleted file mode 100644 index 2562de3c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 | 0 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or4.jsonnet deleted file mode 100644 index dec8fdd5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 | 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or5.jsonnet deleted file mode 100644 index 15098c3d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1337 | 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or6.jsonnet deleted file mode 100644 index ea9bdc11..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1 | 2 | 3 | 4 | 5 | 6 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or7.jsonnet deleted file mode 100644 index 6d8b5b02..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1 | 2 | 4 | 8 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or8.jsonnet deleted file mode 100644 index 0fd35178..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or8.jsonnet +++ /dev/null @@ -1 +0,0 @@ --42 | 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or9.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or9.jsonnet deleted file mode 100644 index bc2b0878..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_or9.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(1 << 62) | 1 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift.jsonnet deleted file mode 100644 index 8af50914..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1 << 10 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift2.jsonnet deleted file mode 100644 index 88908779..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1024 >> 10 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift3.jsonnet deleted file mode 100644 index 158b495d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1 << 20 >> 20 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift4.jsonnet deleted file mode 100644 index 4fd246e5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_shift4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -10000 >> (-10) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor.jsonnet deleted file mode 100644 index 52d04ab8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor.jsonnet +++ /dev/null @@ -1 +0,0 @@ -0 ^ 0 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor2.jsonnet deleted file mode 100644 index 175330e3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -0 ^ 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor3.jsonnet deleted file mode 100644 index c08870b8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 ^ 0 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor4.jsonnet deleted file mode 100644 index a21e4097..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 ^ 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor5.jsonnet deleted file mode 100644 index 89e3412d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 ^ 7 ^ 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor6.jsonnet deleted file mode 100644 index 9ee21a3e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1 ^ 1 ^ 1 ^ 1 ^ 1 ^ 1 ^ 1 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor7.jsonnet deleted file mode 100644 index 9cf3ee84..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1 ^ error 'x' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor8.jsonnet deleted file mode 100644 index 3626a2ac..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor8.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 ^ 1 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor9.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor9.jsonnet deleted file mode 100644 index 0418b008..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/bitwise_xor9.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 ^ 2 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/boolean_literal.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/boolean_literal.jsonnet deleted file mode 100644 index 27ba77dd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/boolean_literal.jsonnet +++ /dev/null @@ -1 +0,0 @@ -true diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar.jsonnet deleted file mode 100644 index 53d6f35d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.char(65) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar2.jsonnet deleted file mode 100644 index fa8113f0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.char(0) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar3.jsonnet deleted file mode 100644 index e506045d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.char(-1) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar4.jsonnet deleted file mode 100644 index fa98a4a3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.char(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar5.jsonnet deleted file mode 100644 index a4d65445..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.char(1114112) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar6.jsonnet deleted file mode 100644 index 6f5d8ced..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.char(1114111) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar7.jsonnet deleted file mode 100644 index d40fe6af..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinChar7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.char('xxx') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectFieldsEx.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectFieldsEx.jsonnet deleted file mode 100644 index 8aec348f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectFieldsEx.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -std.objectFieldsEx({ - x: 1, - y:: 1, - z::: 2, -}, false) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectFieldsExWithHidden.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectFieldsExWithHidden.jsonnet deleted file mode 100644 index 9e6a26af..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectFieldsExWithHidden.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -std.objectFieldsEx({ - x: 1, - y:: 1, - z::: 2, -}, true) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectHasEx.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectHasEx.jsonnet deleted file mode 100644 index d1a67317..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtinObjectHasEx.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.objectHasEx({ x: 1, y:: 1, z::: 2 }, 'x', false) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_acos.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_acos.jsonnet deleted file mode 100644 index eefc2fd8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_acos.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.acos(1) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_asin.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_asin.jsonnet deleted file mode 100644 index 2ae81b09..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_asin.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.asin(1) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_atan.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_atan.jsonnet deleted file mode 100644 index 36c20131..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_atan.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.atan(1) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_ceil.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_ceil.jsonnet deleted file mode 100644 index 435394ae..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_ceil.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.ceil(2.5) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_cos.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_cos.jsonnet deleted file mode 100644 index f926cd32..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_cos.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.cos(1) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp.jsonnet deleted file mode 100644 index a7a400c0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exp(12) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp2.jsonnet deleted file mode 100644 index 591751aa..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exp(0) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp3.jsonnet deleted file mode 100644 index 55dc2f5f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exp(1000) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp4.jsonnet deleted file mode 100644 index 8fa22f31..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exp(100) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp5.jsonnet deleted file mode 100644 index 66c08f07..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exp(100000000000000000000) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp6.jsonnet deleted file mode 100644 index 0e8618fb..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exp(-2) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp7.jsonnet deleted file mode 100644 index c4ea68f9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exp(-100000000000000000) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp8.jsonnet deleted file mode 100644 index b479fa4a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_exp8.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exp(3.14) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_floor.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_floor.jsonnet deleted file mode 100644 index 24d8f61c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_floor.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.floor(2.5) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log.jsonnet deleted file mode 100644 index 594799c0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.log(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log2.jsonnet deleted file mode 100644 index 4a96b4a8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.log(std.exp(100)) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log3.jsonnet deleted file mode 100644 index 0c0dbfe7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.log(100000000000000000000000000000000000) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log4.jsonnet deleted file mode 100644 index e49e01d1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.log(3.14) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log5.jsonnet deleted file mode 100644 index e34a1e28..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.log(0) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log6.jsonnet deleted file mode 100644 index dd1a7fa1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.log(0.0000000000000001) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log7.jsonnet deleted file mode 100644 index dc099a3e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.log(-1) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log8.jsonnet deleted file mode 100644 index 8b943013..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_log8.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.log(-1000000000000) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sin.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sin.jsonnet deleted file mode 100644 index 41e53665..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sin.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.sin(1) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sqrt.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sqrt.jsonnet deleted file mode 100644 index 0e6d28d7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sqrt.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.sqrt(4) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sqrt2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sqrt2.jsonnet deleted file mode 100644 index 82c8c268..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_sqrt2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.sqrt('cookie') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_tan.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_tan.jsonnet deleted file mode 100644 index c45322d6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/builtin_tan.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.tan(1) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div1.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div1.jsonnet deleted file mode 100644 index ceeb6071..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div1.jsonnet +++ /dev/null @@ -1 +0,0 @@ -2 / 2 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div2.jsonnet deleted file mode 100644 index b26c20d2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1337 / 2 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div3.jsonnet deleted file mode 100644 index bfed3ec4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1 / 1e30 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div4.jsonnet deleted file mode 100644 index 0cf1901c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/div4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1 / (1e-160) / (1e-160) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/empty_array.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/empty_array.jsonnet deleted file mode 100644 index fe51488c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/empty_array.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/empty_object.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/empty_object.jsonnet deleted file mode 100644 index 0967ef42..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/empty_object.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/equals.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/equals.jsonnet deleted file mode 100644 index dc52ba11..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/equals.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 == 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error.jsonnet deleted file mode 100644 index 779ed4d1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error.jsonnet +++ /dev/null @@ -1 +0,0 @@ -error '42' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error_from_array.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error_from_array.jsonnet deleted file mode 100644 index 43540fff..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error_from_array.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[error 'xxx'][0] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error_function_fail.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error_function_fail.jsonnet deleted file mode 100644 index ddaf7080..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/error_function_fail.jsonnet +++ /dev/null @@ -1 +0,0 @@ -error (function(x) 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/escaped_fields.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/escaped_fields.jsonnet deleted file mode 100644 index 9c32a220..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/escaped_fields.jsonnet +++ /dev/null @@ -1,8 +0,0 @@ -{ - '"': null, - "'": null, - ||| - 1234 - 1234 - |||: null, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_code.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_code.jsonnet deleted file mode 100644 index ab2d3147..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_code.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.extVar('codeVar') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_error.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_error.jsonnet deleted file mode 100644 index 09c093a7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_error.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.extVar('errorVar') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_hermetic.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_hermetic.jsonnet deleted file mode 100644 index a7204b21..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_hermetic.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local x = 42; - -std.extVar('UndeclaredX') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_mutually_recursive.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_mutually_recursive.jsonnet deleted file mode 100644 index daf270ec..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_mutually_recursive.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.extVar('mutuallyRecursiveVar1') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_not_a_string.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_not_a_string.jsonnet deleted file mode 100644 index 19130d50..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_not_a_string.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.extVar(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_self_recursive.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_self_recursive.jsonnet deleted file mode 100644 index a0d6c0c7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_self_recursive.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.extVar('selfRecursiveVar') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_static_error.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_static_error.jsonnet deleted file mode 100644 index fe3ce638..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_static_error.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.extVar('staticErrorVar') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_string.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_string.jsonnet deleted file mode 100644 index 4d9bfaa9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_string.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.extVar('stringVar') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_unknown.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_unknown.jsonnet deleted file mode 100644 index b7d9a65b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/extvar_unknown.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.extVar('UNKNOWN') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_call.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_call.jsonnet deleted file mode 100644 index f3f7f979..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_call.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function() 42)() diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_capturing.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_capturing.jsonnet deleted file mode 100644 index ee46a52e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_capturing.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local y = 17; - -(function(x) y)(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_in_object.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_in_object.jsonnet deleted file mode 100644 index 9dba8dbe..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_in_object.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local r = { f: function(x) 42 }; - -r.f(null) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_manifested.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_manifested.jsonnet deleted file mode 100644 index 8e3fa6ea..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_manifested.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -{ - f(x): 3, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_no_params.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_no_params.jsonnet deleted file mode 100644 index 6394907a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_no_params.jsonnet +++ /dev/null @@ -1 +0,0 @@ -function() 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_plus_string.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_plus_string.jsonnet deleted file mode 100644 index e97c01ef..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_plus_string.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function() 42) + 'xxx' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_too_many_params.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_too_many_params.jsonnet deleted file mode 100644 index 1285c2e8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_too_many_params.jsonnet +++ /dev/null @@ -1 +0,0 @@ -function(x) 3 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_with_argument.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_with_argument.jsonnet deleted file mode 100644 index 81c98971..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/function_with_argument.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(x) x)(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greater.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greater.jsonnet deleted file mode 100644 index 0d409b32..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greater.jsonnet +++ /dev/null @@ -1 +0,0 @@ -if 1 > 2 then error 'x' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greaterEq.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greaterEq.jsonnet deleted file mode 100644 index 9a13cfe4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greaterEq.jsonnet +++ /dev/null @@ -1 +0,0 @@ -if 1 >= 2 then error 'x' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greaterEq2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greaterEq2.jsonnet deleted file mode 100644 index b78ccb6e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/greaterEq2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -if 1 >= 1 then 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/argcapture_builtin_call.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/argcapture_builtin_call.jsonnet deleted file mode 100644 index d6de5d47..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/argcapture_builtin_call.jsonnet +++ /dev/null @@ -1 +0,0 @@ -local r = { f(x): local a = x; std.length(a) }; r.f([1, 2, 3]) \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/assert_equal5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/assert_equal5.jsonnet deleted file mode 100644 index 00cab54d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/assert_equal5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.assertEqual("\n ", "\n") diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/assert_equal6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/assert_equal6.jsonnet deleted file mode 100644 index f1086dbe..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/assert_equal6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.assertEqual("\u001b[31m", "") diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/call_number.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/call_number.jsonnet deleted file mode 100644 index 140831e3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/call_number.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42() \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/double_thunk.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/double_thunk.jsonnet deleted file mode 100644 index f2a6767c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/double_thunk.jsonnet +++ /dev/null @@ -1 +0,0 @@ -local x = local y = error "xxx"; y; x diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/escaped_single_quote.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/escaped_single_quote.jsonnet deleted file mode 100644 index eb16fcdb..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/escaped_single_quote.jsonnet +++ /dev/null @@ -1 +0,0 @@ -"\\'" \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/false.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/false.jsonnet deleted file mode 100644 index c508d536..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/false.jsonnet +++ /dev/null @@ -1 +0,0 @@ -false diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/fieldname_not_string.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/fieldname_not_string.jsonnet deleted file mode 100644 index 300cfe85..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/fieldname_not_string.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ [1234]: 42 } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/filled_thunk.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/filled_thunk.jsonnet deleted file mode 100644 index a3c823e1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/filled_thunk.jsonnet +++ /dev/null @@ -1 +0,0 @@ -local x = [1, 2, 3]; x[1] + x[1] \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/method_call.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/method_call.jsonnet deleted file mode 100644 index f9fae837..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/method_call.jsonnet +++ /dev/null @@ -1 +0,0 @@ -local r = {f(a): 42};r.f(null) \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/missing_super.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/missing_super.jsonnet deleted file mode 100644 index f46bc40c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/missing_super.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ x: super.x } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/nonexistent_import.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/nonexistent_import.jsonnet deleted file mode 100644 index 99fefa36..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/nonexistent_import.jsonnet +++ /dev/null @@ -1 +0,0 @@ -importstr 'no chance a file with this name exists' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/nonexistent_import_crazy.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/nonexistent_import_crazy.jsonnet deleted file mode 100644 index fe6f680d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/nonexistent_import_crazy.jsonnet +++ /dev/null @@ -1 +0,0 @@ -importstr "ąęółńśćźż \" \' \n\n\t\t" diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/proto_object_comp.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/proto_object_comp.jsonnet deleted file mode 100644 index dcbab626..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/proto_object_comp.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[{[v]: v} for v in ["x", "y", "z"]] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/self.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/self.jsonnet deleted file mode 100644 index d7874d34..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/self.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{x: self.y, y: 42}.x \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/stackbug-regression-test.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/stackbug-regression-test.jsonnet deleted file mode 100644 index 88518f42..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/stackbug-regression-test.jsonnet +++ /dev/null @@ -1 +0,0 @@ -local xxx=0; xxx==0 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/static_error_eof.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/static_error_eof.jsonnet deleted file mode 100644 index 1167177b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/static_error_eof.jsonnet +++ /dev/null @@ -1 +0,0 @@ -local x = 5 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/std.codepoint2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/std.codepoint2.jsonnet deleted file mode 100644 index eb6a95ca..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/std.codepoint2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.codepoint("\u0000") diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/std.toString7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/std.toString7.jsonnet deleted file mode 100644 index 1c81da78..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/std.toString7.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -std.toString([{ - a: [42, 42, { - }], - ["b"]: 1337 -}, 42, "text", 42]) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/string2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/string2.jsonnet deleted file mode 100644 index 9458e0f6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/string2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -"\"xxx\"" diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/too_many_arguments.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/too_many_arguments.jsonnet deleted file mode 100644 index 52c30d7c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/too_many_arguments.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(x, y, z) 42)(1, 2, 3, 4) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/unicode.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/unicode.jsonnet deleted file mode 100644 index d514a5d7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/unicode.jsonnet +++ /dev/null @@ -1 +0,0 @@ -"\u263A" \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/unicode2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/unicode2.jsonnet deleted file mode 100644 index 2402faf9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/unicode2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -"\u263a" \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/variable.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/variable.jsonnet deleted file mode 100644 index a235b8e6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/variable.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local x = 2; - -x \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/variable_not_visible.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/variable_not_visible.jsonnet deleted file mode 100644 index 8fe6a910..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/variable_not_visible.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local x1 = local nested = 42; - -nested, x2 = nested; x2 \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/verbatim_string.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/verbatim_string.jsonnet deleted file mode 100644 index ed3f2d6c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/holding/verbatim_string.jsonnet +++ /dev/null @@ -1 +0,0 @@ -@"blah ☺" \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthen_false.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthen_false.jsonnet deleted file mode 100644 index ab65dcaf..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthen_false.jsonnet +++ /dev/null @@ -1 +0,0 @@ -if true then 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthenelse_false.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthenelse_false.jsonnet deleted file mode 100644 index 5accc94d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthenelse_false.jsonnet +++ /dev/null @@ -1 +0,0 @@ -if false then error 'no way' else 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthenelse_true.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthenelse_true.jsonnet deleted file mode 100644 index 9a71ac17..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/ifthenelse_true.jsonnet +++ /dev/null @@ -1 +0,0 @@ -if true then 42 else error 'no way' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import.jsonnet deleted file mode 100644 index 530136a2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import.jsonnet +++ /dev/null @@ -1 +0,0 @@ -import 'true.jsonnet' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import2.jsonnet deleted file mode 100644 index 046d5d0b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -import 'false.jsonnet' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import3.jsonnet deleted file mode 100644 index a7fde339..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -importstr 'true.jsonnet' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import4.jsonnet deleted file mode 100644 index c9b733c0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -importstr 'false.jsonnet' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import_various_literals.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import_various_literals.jsonnet deleted file mode 100644 index 2eb6d62a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/import_various_literals.jsonnet +++ /dev/null @@ -1,6 +0,0 @@ -[ - import 'true.jsonnet', - import 'true.jsonnet', - import @"true.jsonnet", - import @'true.jsonnet', -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in.jsonnet deleted file mode 100644 index e1b6095a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x' in { x: 42 } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in2.jsonnet deleted file mode 100644 index 97911db9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x' in {} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in3.jsonnet deleted file mode 100644 index 0cb2f626..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x' in { x: 42, y: 42 } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in4.jsonnet deleted file mode 100644 index f16a7d91..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/in4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x' in { assert false } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper.jsonnet deleted file mode 100644 index f70c711d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -{ - x: 42, -} { - assert 'x' in super, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper2.jsonnet deleted file mode 100644 index 3ba8a459..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{} { x: 'x' in super } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper4.jsonnet deleted file mode 100644 index c9b290b3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/insuper4.jsonnet +++ /dev/null @@ -1 +0,0 @@ - 'x' in super diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy.jsonnet deleted file mode 100644 index d064e91b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local x = { x: error 'blah' }, f(x) = 42, z = x.x; - -f(x.x) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy_operator1.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy_operator1.jsonnet deleted file mode 100644 index 335fd537..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy_operator1.jsonnet +++ /dev/null @@ -1 +0,0 @@ -false && error "shouldn't happen" diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy_operator2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy_operator2.jsonnet deleted file mode 100644 index e29a0abe..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lazy_operator2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -true && error 'should happen' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/less.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/less.jsonnet deleted file mode 100644 index 11c033bf..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/less.jsonnet +++ /dev/null @@ -1 +0,0 @@ -if 2 < 1 then error 'x' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lessEq.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lessEq.jsonnet deleted file mode 100644 index 88b38b93..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lessEq.jsonnet +++ /dev/null @@ -1 +0,0 @@ -if 2 <= 1 then error 'x' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lessEq2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lessEq2.jsonnet deleted file mode 100644 index 66a142ae..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/lessEq2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -if 2 <= 2 then 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/local1.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/local1.jsonnet deleted file mode 100644 index 8ef469af..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/local1.jsonnet +++ /dev/null @@ -1,16 +0,0 @@ -local params = std.extVar('__ksonnet/params'); -local globals = import 'globals.libsonnet'; -local envParams = params { - components+: { - guestbook+: { - name: 'guestbook-dev', - }, - }, -}; - -{ - components: { - [x]: envParams.components[x] + globals - for x in std.objectFields(envParams.components) - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/local_within_nested_object.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/local_within_nested_object.jsonnet deleted file mode 100644 index e1b069e1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/local_within_nested_object.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local a = 42; - -{ x: { x: a } }.x.x diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo.jsonnet deleted file mode 100644 index 3bd870c6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.modulo(16, 3) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo2.jsonnet deleted file mode 100644 index 9e2b2a76..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.modulo(42, 3) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo3.jsonnet deleted file mode 100644 index d13f02ea..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.modulo(16, -3) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo4.jsonnet deleted file mode 100644 index 5b033efe..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.modulo(-16, 3) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo5.jsonnet deleted file mode 100644 index 35ffcae9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.modulo(-16, -3) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo6.jsonnet deleted file mode 100644 index 71addd9f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.modulo(15.5, 1) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo7.jsonnet deleted file mode 100644 index b777d532..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/modulo7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.modulo(42, 2.5) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult.jsonnet deleted file mode 100644 index e784f3ef..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult.jsonnet +++ /dev/null @@ -1 +0,0 @@ -2 * 2 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult2.jsonnet deleted file mode 100644 index 49917914..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -2 * (-2) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult3.jsonnet deleted file mode 100644 index 302c692f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/mult3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 * 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native1.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native1.jsonnet deleted file mode 100644 index 8bbfe13c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native1.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.native('jsonToString')('test') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native2.jsonnet deleted file mode 100644 index f81cffa0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.native('jsonToString')({}) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native4.jsonnet deleted file mode 100644 index 1309fd16..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.native('jsonToString')(error 'xxx') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native5.jsonnet deleted file mode 100644 index 9137da79..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.native('jsonToString')(function() 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native6.jsonnet deleted file mode 100644 index c6de08ba..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.native('jsonToString')(x={}) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native7.jsonnet deleted file mode 100644 index 9222e5d0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.native('jsonToString')(y={}) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native_error.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native_error.jsonnet deleted file mode 100644 index 06f84f0f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native_error.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.native('nativeError')() diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native_nonexistent.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native_nonexistent.jsonnet deleted file mode 100644 index ea403979..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/native_nonexistent.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.native('blah') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/number_divided_by_string.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/number_divided_by_string.jsonnet deleted file mode 100644 index 942c9dfd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/number_divided_by_string.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 / 'xxx' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/number_times_string.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/number_times_string.jsonnet deleted file mode 100644 index d82e3b2c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/number_times_string.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 * 'xxx' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/numeric_literal.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/numeric_literal.jsonnet deleted file mode 100644 index 29d6383b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/numeric_literal.jsonnet +++ /dev/null @@ -1 +0,0 @@ -100 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object.jsonnet deleted file mode 100644 index 81043b3b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ x: 1 + 1 } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object2.jsonnet deleted file mode 100644 index bf9a0615..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object2.jsonnet +++ /dev/null @@ -1,15 +0,0 @@ -{ - global: { - restart: false, - }, - components: { - 'guestbook-ui': { - containerPort: 80, - image: 'gcr.io/heptio-images/ks-guestbook-demo:0.2', - name: 'guestbook-ui', - replicas: 5, - servicePort: 80, - type: 'NodePort', - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object3.jsonnet deleted file mode 100644 index 8bf5f87c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object3.jsonnet +++ /dev/null @@ -1,9 +0,0 @@ -local params = import '../../components/params.libsonnet'; - -params { - components+: { - guestbook+: { - name: 'guestbook-dev', - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp.jsonnet deleted file mode 100644 index 13d8e4b7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp.jsonnet +++ /dev/null @@ -1,4 +0,0 @@ -{ - [x]: 42 - for x in ['a', 'b', 'c'] -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_binary.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_binary.jsonnet deleted file mode 100644 index 5462d73d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_binary.jsonnet +++ /dev/null @@ -1,9 +0,0 @@ -local o = { - a: 'a', - b: 'b', -}; - -{ - ['pre-' + key]: o[key] - for key in std.objectFields(o) -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_dollar.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_dollar.jsonnet deleted file mode 100644 index 083653e8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_dollar.jsonnet +++ /dev/null @@ -1,4 +0,0 @@ -{ - [x]: if x == 'a' then 42 else $.a + 1 - for x in ['a', 'b', 'c'] -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_err_elem.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_err_elem.jsonnet deleted file mode 100644 index fd550e4f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_err_elem.jsonnet +++ /dev/null @@ -1,4 +0,0 @@ -{ - ['x']: error 'xxx' - for x in [1] -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_err_index.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_err_index.jsonnet deleted file mode 100644 index be35a95f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_err_index.jsonnet +++ /dev/null @@ -1,4 +0,0 @@ -{ - [error 'xxx']: 42 - for x in [1] -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_if.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_if.jsonnet deleted file mode 100644 index fdc7500e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_if.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -{ - [x]: 42 - for x in ['a', 'b', 'bb', 'c'] - if x[0] == 'b' -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_int_index.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_int_index.jsonnet deleted file mode 100644 index 706d7d22..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_int_index.jsonnet +++ /dev/null @@ -1,4 +0,0 @@ -{ - [x]: x - for x in [1, 2, 3] -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_local.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_local.jsonnet deleted file mode 100644 index 012ef330..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_local.jsonnet +++ /dev/null @@ -1,11 +0,0 @@ -local domain = '.example.org'; -local services = ['one', 'two']; -local computedServices = [ - local serviceName = service; - local serviceUrl = service + domain; - - { [serviceName]: serviceUrl } - for service in services -]; - -std.prune(computedServices) \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_super.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_super.jsonnet deleted file mode 100644 index 5f9100cf..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_comp_super.jsonnet +++ /dev/null @@ -1,10 +0,0 @@ -{ x: 1, y: 2, z: 3 } + -{ - [v]: [super.x, v] - for v in ['x', 'y', 'z'] -} + -{ - [v]: self.q + v - for v in ['a', 'b', 'c'] -} + -{ q: 42 } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_field1.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_field1.jsonnet deleted file mode 100644 index 269860a5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_field1.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -local command = 'command'; - -{ - [if command != 'null' then 'command']: [command], -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_hidden.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_hidden.jsonnet deleted file mode 100644 index 7384ead4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_hidden.jsonnet +++ /dev/null @@ -1,23 +0,0 @@ -local progressive = { f1: 1, f2:: 2, f3::: 3 }; -local all_inherit = { f1: 4, f2: 5, f3: 6 }; -local all_hidden = { f1:: 7, f2:: 8, f3:: 9 }; -local all_visible = { f1::: 10, f2::: 11, f3::: 12 }; - -[ - progressive, - all_inherit, - all_hidden, - all_visible, - progressive + all_inherit, - progressive + all_hidden, - progressive + all_visible, - all_hidden + all_visible, - all_visible + all_hidden, - all_hidden + all_inherit, - all_visible + all_inherit, - all_inherit + all_inherit, - all_inherit + progressive, - all_visible + progressive, - all_hidden + progressive, - progressive + (all_hidden + all_inherit), -] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_local.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_local.jsonnet deleted file mode 100644 index 2a0ef95b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_local.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ local foo(bar) = bar, baz: foo(42) } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_local_self_super.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_local_self_super.jsonnet deleted file mode 100644 index c5e687bf..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_local_self_super.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ local x = self, y:: x, z: 42, foo: 'xxx' } { local x = super.y, foo: x.z, bar: x.foo, baz: super.foo } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_plus_bad.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_plus_bad.jsonnet deleted file mode 100644 index eb5f316b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_plus_bad.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{} + 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum.jsonnet deleted file mode 100644 index aa158b1b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{} + {} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum2.jsonnet deleted file mode 100644 index 921ef3e1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ a: 1 } + { a: 2 } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum3.jsonnet deleted file mode 100644 index 2c34c41d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_sum3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ a: 1 } + { b: 2 } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super.jsonnet deleted file mode 100644 index 640b9460..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ a: 1 } + { a: 2, b: super.a } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super_deep.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super_deep.jsonnet deleted file mode 100644 index 8c7cb505..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super_deep.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ a: 1 } + {} + { a: 2, b: super.a } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super_within.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super_within.jsonnet deleted file mode 100644 index 46b20f95..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/object_super_within.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ a: 42, d: 1 } + { c: super.d, d: 42 } + { a: 2, b: super.c, d: 42 } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args.jsonnet deleted file mode 100644 index 11daa922..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local foo(x=42) = x; - -foo() diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args10.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args10.jsonnet deleted file mode 100644 index 98cd4fbd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args10.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(x, y) x)(y=1, x=2) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args11.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args11.jsonnet deleted file mode 100644 index f5de182d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args11.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(x, y) 42)(42, x=42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args12.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args12.jsonnet deleted file mode 100644 index 1f576baf..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args12.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(x=42, y=42) 42)(y=42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args13.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args13.jsonnet deleted file mode 100644 index 0a08516b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args13.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(x, y) 42)(x=42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args14.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args14.jsonnet deleted file mode 100644 index ed03b9d2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args14.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(a=b, b=a) 42)() diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args15.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args15.jsonnet deleted file mode 100644 index e5d071d0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args15.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ g: 42, f(a=self.g): a }.f() diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args16.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args16.jsonnet deleted file mode 100644 index 88c02a2b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args16.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(x=17) x)(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args17.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args17.jsonnet deleted file mode 100644 index 403afd39..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args17.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(x, y=42) x + y)(y=1, x=2) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args18.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args18.jsonnet deleted file mode 100644 index d828007b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args18.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(a1=1, a2=a1 + 1, a3=a2 + 1, a4=a3 + 1) [a1, a2, a3, a4])(a1=42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args19.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args19.jsonnet deleted file mode 100644 index e952e815..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args19.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(a1=a2 + 1, a2=a3 + 1, a3=a4 + 1, a4=1) [a1, a2, a3, a4])(a4=42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args2.jsonnet deleted file mode 100644 index 7acac87d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args2.jsonnet +++ /dev/null @@ -1,9 +0,0 @@ -local x = 1; -local foo(x=2, y=3, z=x) = { - x: x, - y: y, - z: z, -}; -local x = 4; - -foo(y=x) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args20.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args20.jsonnet deleted file mode 100644 index 6395976d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args20.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(x, a1=[x, a2[1] + 1], a2=[a1[0] + 1, a3[1] + 1], a3=[a2[0] + 1, a4[1] + 1], a4=[a3[0] + 1, a4[0] + 1]) [a1, a2, a3, a4])(x=42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args21.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args21.jsonnet deleted file mode 100644 index 5c95c88f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args21.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local foo(x=2, z=x) = x; - -foo() diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args22.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args22.jsonnet deleted file mode 100644 index 917e8d93..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args22.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -local foo(x) = local bar(y=x) = [x, y]; - -bar; - -[foo(42)(), foo(42)(17)] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args3.jsonnet deleted file mode 100644 index 42d4c033..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args3.jsonnet +++ /dev/null @@ -1,8 +0,0 @@ -local x = 1; -local foo(x=2, y=3, z=x) = { - x: x, - y: y, - z: z, -}; - -foo(y=x) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args4.jsonnet deleted file mode 100644 index 3dbff13e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args4.jsonnet +++ /dev/null @@ -1,9 +0,0 @@ -local x = 1; -local foo(x=2, y=3, z=x) = { - x: x, - y: y, - z: z, -}; -local x = 4; - -foo(x=5, y=x) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args5.jsonnet deleted file mode 100644 index 56cf926b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args5.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local foo(x, y=x) = y; - -foo(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args6.jsonnet deleted file mode 100644 index 2c58191c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args6.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local foo(x, y=x) = y; - -foo(x=42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args7.jsonnet deleted file mode 100644 index 11a93a96..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args7.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local foo(x) = x; - -foo(x=42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args8.jsonnet deleted file mode 100644 index 7eb4de27..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args8.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local foo(x=42) = x; - -foo(y=17) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args9.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args9.jsonnet deleted file mode 100644 index 0db2a360..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/optional_args9.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(function(x) x)(42, x=42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or.jsonnet deleted file mode 100644 index 06eb8b0b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or.jsonnet +++ /dev/null @@ -1 +0,0 @@ -false || false diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or2.jsonnet deleted file mode 100644 index 84ffdd6e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -false || true diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or3.jsonnet deleted file mode 100644 index 23b33a90..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -true || error 'xxx' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or4.jsonnet deleted file mode 100644 index 39e6a488..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -false || error 'xxx' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or5.jsonnet deleted file mode 100644 index 788838a7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'xxx' || true diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or6.jsonnet deleted file mode 100644 index 6a5f6f57..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/or6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -false || 'xxx' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_float.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_float.jsonnet deleted file mode 100644 index 14022033..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_float.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'%f' % 0 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str.jsonnet deleted file mode 100644 index 7155b318..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x %s' % ['y'] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str2.jsonnet deleted file mode 100644 index f3a8abef..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x %s' % 'y' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str3.jsonnet deleted file mode 100644 index 578014de..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x %s %s' % ['y', 'z'] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str4.jsonnet deleted file mode 100644 index 7c87222e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x %s' % ['y', 'z'] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str5.jsonnet deleted file mode 100644 index 965445ac..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x %s %s' % ['y'] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str6.jsonnet deleted file mode 100644 index 20be358d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x %s %s' % 'y' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str7.jsonnet deleted file mode 100644 index d3745e48..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x %d' % ['y'] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str8.jsonnet deleted file mode 100644 index 0f790aab..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_format_str8.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x %(a)s %(b)s' % { a: 'y', b: 'z' } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int.jsonnet deleted file mode 100644 index ca415dc4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 % 5 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int2.jsonnet deleted file mode 100644 index 72eff8b0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 % -5 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int3.jsonnet deleted file mode 100644 index dccbe2ef..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int3.jsonnet +++ /dev/null @@ -1 +0,0 @@ --42 % 5 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int4.jsonnet deleted file mode 100644 index 4c3bbc2e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int4.jsonnet +++ /dev/null @@ -1 +0,0 @@ --42 % -5 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int5.jsonnet deleted file mode 100644 index bb46fb9f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 % 0 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int6.jsonnet deleted file mode 100644 index 98a7800c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/percent_mod_int6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -0 % 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus.jsonnet deleted file mode 100644 index e0ef5840..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus.jsonnet +++ /dev/null @@ -1 +0,0 @@ -1 + 2 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus2.jsonnet deleted file mode 100644 index 4b73091b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'a' + 'b' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus3.jsonnet deleted file mode 100644 index a7dfcb88..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3] + [4, 5, 6] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus4.jsonnet deleted file mode 100644 index 0a74eea3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ a: 1, b: 2 } + { a: 3, c: 4 } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus5.jsonnet deleted file mode 100644 index 28ba6675..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 + function() 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus6.jsonnet deleted file mode 100644 index 439d3a1e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'a' + 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus7.jsonnet deleted file mode 100644 index 75fb0c4d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -42 + 'a' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus9.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus9.jsonnet deleted file mode 100644 index 27f7d914..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/plus9.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'a' + [1, 2, 3] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow.jsonnet deleted file mode 100644 index 79481767..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.pow(2, 10) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow2.jsonnet deleted file mode 100644 index 50e61a63..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.pow(10, 2) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow3.jsonnet deleted file mode 100644 index 87899939..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.pow(-1, 3) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow4.jsonnet deleted file mode 100644 index 99a08d36..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.pow(-1, 0.2) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow5.jsonnet deleted file mode 100644 index d1230be9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.pow(2, 0.2) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow8.jsonnet deleted file mode 100644 index c98f205e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow8.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.pow('xxx', 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow9.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow9.jsonnet deleted file mode 100644 index fe98159d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/pow9.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.pow(42, 'xxx') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/recursive_local.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/recursive_local.jsonnet deleted file mode 100644 index e0d62fdb..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/recursive_local.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local f(x) = if x == 0 then 0 else 1 + f(x - 1); - -f(5) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/recursive_thunk.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/recursive_thunk.jsonnet deleted file mode 100644 index 2235fc65..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/recursive_thunk.jsonnet +++ /dev/null @@ -1,4 +0,0 @@ -local bar(th, x) = if x == 0 then error 'xxx' else th; -local foo(x) = bar(foo(x - 1), x - 1); - -foo(3) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith1.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith1.jsonnet deleted file mode 100644 index 184afeb5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith1.jsonnet +++ /dev/null @@ -1 +0,0 @@ -3 + 3 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith2.jsonnet deleted file mode 100644 index 6bb5e4d2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -3 + 3 + 3 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith3.jsonnet deleted file mode 100644 index f3ef5556..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -(3 + 3) + (3 + 3) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string.jsonnet deleted file mode 100644 index 7e72b5a5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'aaa' + 'bbb' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string2.jsonnet deleted file mode 100644 index 574b446a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'aaa' + '' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string3.jsonnet deleted file mode 100644 index cebf6325..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'' + 'bbb' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string_empty.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string_empty.jsonnet deleted file mode 100644 index 15f82f0a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/simple_arith_string_empty.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'' + '' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice.jsonnet deleted file mode 100644 index 699e707f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3, 4][1:4:2] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice3.jsonnet deleted file mode 100644 index a469f662..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3, 4][1:2] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice4.jsonnet deleted file mode 100644 index 45c2c253..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3, 4][:3] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice5.jsonnet deleted file mode 100644 index e9b24f1c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3, 4][1:] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice7.jsonnet deleted file mode 100644 index 4d3a0dec..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/slice7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -[1, 2, 3, 4][::2] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint.jsonnet deleted file mode 100644 index 1bd78d79..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.codepoint('A') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint3.jsonnet deleted file mode 100644 index 0588d89b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.codepoint('aa') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint4.jsonnet deleted file mode 100644 index 0413f4a4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.codepoint('ą') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint5.jsonnet deleted file mode 100644 index a8b721d7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.codepoint('台') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint6.jsonnet deleted file mode 100644 index 3002c4a6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.codepoint('') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint7.jsonnet deleted file mode 100644 index 18448309..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.codepoint('ą') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint8.jsonnet deleted file mode 100644 index 37c614da..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.codepoint8.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.codepoint(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent.jsonnet deleted file mode 100644 index 9f677398..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exponent(0) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent2.jsonnet deleted file mode 100644 index 87223e64..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exponent(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent3.jsonnet deleted file mode 100644 index b2351660..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exponent(1e30) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent4.jsonnet deleted file mode 100644 index 17a1f3e3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exponent(1 << 30) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent5.jsonnet deleted file mode 100644 index 01188d99..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exponent(42 << 30) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent6.jsonnet deleted file mode 100644 index 3b1b19a5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exponent(42 / (1 << 30)) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent7.jsonnet deleted file mode 100644 index b5257fd3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.exponent7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.exponent(-42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter.jsonnet deleted file mode 100644 index 024ab413..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.filter(function(n) std.mod(n, 2) == 1, [1, 2, 3, 4, 5]) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter2.jsonnet deleted file mode 100644 index 73ee7949..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.filter(error 'x', []) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter3.jsonnet deleted file mode 100644 index 9042c9c7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.filter(function(n) error 'xxx', []) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter4.jsonnet deleted file mode 100644 index 2cfdc4f2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.filter(42, []) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter5.jsonnet deleted file mode 100644 index 1b2ab0de..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.filter(function(n) 42, 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter6.jsonnet deleted file mode 100644 index ed535162..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.filter(42, '42') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter7.jsonnet deleted file mode 100644 index 2813f147..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.filter(function(n) false, [error 'xxx']) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter8.jsonnet deleted file mode 100644 index b6d02458..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter8.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.filter([42], function(i) 'xxx') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter_swapped_args.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter_swapped_args.jsonnet deleted file mode 100644 index d421a7f9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.filter_swapped_args.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.filter([1, 2, 3], function(n) true) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap.jsonnet deleted file mode 100644 index b35cfb36..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.flatMap(function(x) [], [1, 2, 3]) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap2.jsonnet deleted file mode 100644 index c1244801..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.flatMap(function(x) [1, 2, 3], ['a', 2, 3, 4, 5]) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap3.jsonnet deleted file mode 100644 index 7dd6f9f6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.flatMap(function(x) error 'never happens', []) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap4.jsonnet deleted file mode 100644 index 34a40fb8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.flatMap(function(x) [x, x], [1, 2, 3, 4, 5]) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap5.jsonnet deleted file mode 100644 index 665c8cc4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.flatmap5.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local failWith(x) = error x; - -std.type(std.flatMap(failWith, ['a', 'b', 'c'])) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join.jsonnet deleted file mode 100644 index ca3fc664..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.join([], []) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join2.jsonnet deleted file mode 100644 index dd401c21..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.join([42], []) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join3.jsonnet deleted file mode 100644 index 19658401..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.join([42], [[1]]) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join4.jsonnet deleted file mode 100644 index 471d7213..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.join([42], [[1], [2]]) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join5.jsonnet deleted file mode 100644 index c83e34e8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.join([42], [[1], [2], [3]]) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join6.jsonnet deleted file mode 100644 index decde21e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.join('xxx', ['aa', 'bb']) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join7.jsonnet deleted file mode 100644 index 4c196b54..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.join('aa', [[1], [2]]) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join8.jsonnet deleted file mode 100644 index 892e312a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.join8.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.join([3, 4], [[1, 2], '56']) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.jsonnet deleted file mode 100644 index cd135ab2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.length('x') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray.jsonnet deleted file mode 100644 index 92d2c4d9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.makeArray(5, function(x) 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed.jsonnet deleted file mode 100644 index 95e1f7a4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.makeArray(sz=5, func=function(i) i) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed2.jsonnet deleted file mode 100644 index bb5acb7f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.makeArray(func=function(i) i, sz=5) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed3.jsonnet deleted file mode 100644 index e327cb96..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.makeArray(blahblah=5, blahblahblah=function(i) i) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed4.jsonnet deleted file mode 100644 index aabecf3d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArrayNamed4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.makeArray(3, func=function(i) i) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_bad.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_bad.jsonnet deleted file mode 100644 index 42a5c4f2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_bad.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.makeArray('xxx', function(i) i) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_bad2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_bad2.jsonnet deleted file mode 100644 index 07975457..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_bad2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.makeArray(42, 'xxx') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_noninteger.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_noninteger.jsonnet deleted file mode 100644 index c046e672..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_noninteger.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.makeArray(2.5, function(i) i) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_noninteger_big.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_noninteger_big.jsonnet deleted file mode 100644 index 9bd2ba3f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_noninteger_big.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.makeArray(1e100, error "shouldn't happen") diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_recursive.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_recursive.jsonnet deleted file mode 100644 index 18716a20..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_recursive.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local arr = [0] + std.makeArray(2000, function(i) arr[i] + 1); - -arr diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_recursive_evalutation_order_matters.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_recursive_evalutation_order_matters.jsonnet deleted file mode 100644 index 0db7fb5b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.makeArray_recursive_evalutation_order_matters.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local arr = [0] + std.makeArray(2000, function(i) arr[i] + 1); - -arr[500] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa.jsonnet deleted file mode 100644 index e4c1cb04..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.mantissa(0) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa2.jsonnet deleted file mode 100644 index 8e741ee7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.mantissa(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa3.jsonnet deleted file mode 100644 index de02a0a6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.mantissa(0.42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa4.jsonnet deleted file mode 100644 index 428706b9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.mantissa(1e100) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa5.jsonnet deleted file mode 100644 index 55ac1c7d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.mantissa(42 << 30) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa6.jsonnet deleted file mode 100644 index fd5eb967..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.mantissa(42 / (1 << 30)) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa7.jsonnet deleted file mode 100644 index 3dafcd25..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mantissa7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.mantissa(-42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5.jsonnet deleted file mode 100644 index 8968358b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.md5('xxx') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_2.jsonnet deleted file mode 100644 index 1a8acbc3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.md5('') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_3.jsonnet deleted file mode 100644 index 74035294..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.md5('a') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_4.jsonnet deleted file mode 100644 index 3cb3c731..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.md5('message digest') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_5.jsonnet deleted file mode 100644 index c6ff90d6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.md5('ą') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_6.jsonnet deleted file mode 100644 index 2542a471..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.md5_6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.md5(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mod_int.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mod_int.jsonnet deleted file mode 100644 index 01a3999a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mod_int.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.mod(42, 5) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mod_string.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mod_string.jsonnet deleted file mode 100644 index 1e40839e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.mod_string.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.mod('abcd %s %03d', ['xxx', 42]) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo.jsonnet deleted file mode 100644 index 3b8c4d95..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.modulo(42, 5) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo2.jsonnet deleted file mode 100644 index defcd281..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.modulo('xxx', 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo3.jsonnet deleted file mode 100644 index defcd281..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.modulo3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.modulo('xxx', 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals.jsonnet deleted file mode 100644 index 90d187d7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(1, 1) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals10.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals10.jsonnet deleted file mode 100644 index ece4bd95..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals10.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(error 'x', 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals11.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals11.jsonnet deleted file mode 100644 index 3d369b67..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals11.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(3.14, 3.14) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals12.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals12.jsonnet deleted file mode 100644 index 13d01294..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals12.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(3.14, 3.15) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals13.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals13.jsonnet deleted file mode 100644 index f6468c1e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals13.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals([], []) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals14.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals14.jsonnet deleted file mode 100644 index 928250cd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals14.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(42, {}) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals15.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals15.jsonnet deleted file mode 100644 index 6753165f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals15.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals({}, 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals16.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals16.jsonnet deleted file mode 100644 index 5fa00764..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals16.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals([], 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals17.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals17.jsonnet deleted file mode 100644 index a7095f17..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals17.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(42, []) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals18.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals18.jsonnet deleted file mode 100644 index b80fa3d5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals18.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(null, null) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals19.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals19.jsonnet deleted file mode 100644 index 2e38df99..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals19.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(true, true) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals2.jsonnet deleted file mode 100644 index 7b7cc1c8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(1, 2) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals20.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals20.jsonnet deleted file mode 100644 index 200a4725..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals20.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(true, 'xxx') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals21.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals21.jsonnet deleted file mode 100644 index 9336e0cb..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals21.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals('xxx', 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals3.jsonnet deleted file mode 100644 index 97324cbe..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals('xxx', 'xxx') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals4.jsonnet deleted file mode 100644 index 47f0c9f7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals('xxx', 'xxy') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals5.jsonnet deleted file mode 100644 index 28238a33..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(1, 'x') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals6.jsonnet deleted file mode 100644 index 092e8ebb..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals({}, {}) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals7.jsonnet deleted file mode 100644 index 62a486fd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(function() 42, function() 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals8.jsonnet deleted file mode 100644 index 7c51d25f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals8.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(42, function() 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals9.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals9.jsonnet deleted file mode 100644 index 194131be..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.primitiveEquals9.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.primitiveEquals(42, error 'x') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.slice.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.slice.jsonnet deleted file mode 100644 index c071f348..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.slice.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.slice([1, 2, 3, 4], 1, 4, 2) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.thisFile.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.thisFile.jsonnet deleted file mode 100644 index f413f6e2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.thisFile.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.thisFile diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.thisFile2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.thisFile2.jsonnet deleted file mode 100644 index 85302909..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.thisFile2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -import 'std.thisFile.jsonnet' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString.jsonnet deleted file mode 100644 index 011485d5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.toString('xxx') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString2.jsonnet deleted file mode 100644 index 0490c862..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.toString(2) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString3.jsonnet deleted file mode 100644 index 01a535eb..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.toString({}) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString4.jsonnet deleted file mode 100644 index 81ec3215..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.toString([]) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString5.jsonnet deleted file mode 100644 index 403f26f9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.toString(error 'x') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString6.jsonnet deleted file mode 100644 index 86693cf9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.toString({ x: [{ y: [] }] }) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString8.jsonnet deleted file mode 100644 index 5dec3a16..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std.toString8.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.toString(a=42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std_in_local.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std_in_local.jsonnet deleted file mode 100644 index cbb4fc11..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std_in_local.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local x = std.length('x'); - -x diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std_substr.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std_substr.jsonnet deleted file mode 100644 index 47ff8449..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/std_substr.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.substr('abcd', 1, 2) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace.jsonnet deleted file mode 100644 index 0a60023e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace.jsonnet +++ /dev/null @@ -1,4 +0,0 @@ -local n = 10000; -local text = std.join('', std.makeArray(n, function(x) 'ab')); - -std.strReplace(text, 'a', 'b') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace2.jsonnet deleted file mode 100644 index 975e37da..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.strReplace('test test test', 'test', '__') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace3.jsonnet deleted file mode 100644 index 20fe5c35..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/strReplace3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.strReplace('test', '', 'blah') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string.jsonnet deleted file mode 100644 index 8c88a1e1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'xxx' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison1.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison1.jsonnet deleted file mode 100644 index 39a32e35..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison1.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'a' < 'b' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison2.jsonnet deleted file mode 100644 index 64cbf8c6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'a' > 'b' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison3.jsonnet deleted file mode 100644 index 354572f2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'a' == 'b' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison4.jsonnet deleted file mode 100644 index 1422e47a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison4.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'a' < 'aa' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison5.jsonnet deleted file mode 100644 index d55be31e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'aa' < 'a' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison6.jsonnet deleted file mode 100644 index 1fbfbf1a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison6.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'ą' < 'ć' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison7.jsonnet deleted file mode 100644 index dedc374e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_comparison7.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'ą' < 'z' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_divided_by_number.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_divided_by_number.jsonnet deleted file mode 100644 index d6e6fb2b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_divided_by_number.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'xxx' / 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index.jsonnet deleted file mode 100644 index 20d8b0bd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'abcd'[0] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index2.jsonnet deleted file mode 100644 index a8fd4832..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'abcd'[3] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index_negative.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index_negative.jsonnet deleted file mode 100644 index f35590cd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index_negative.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'abcd'[-1] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index_out_of_bounds.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index_out_of_bounds.jsonnet deleted file mode 100644 index a7a0dcaf..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_index_out_of_bounds.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'abcd'[4] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_minus_number.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_minus_number.jsonnet deleted file mode 100644 index b7b4ff5c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_minus_number.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x' - 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_plus_function.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_plus_function.jsonnet deleted file mode 100644 index 4f3c42a3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_plus_function.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'xxx' + (function() 42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_times_number.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_times_number.jsonnet deleted file mode 100644 index a08a2e67..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_times_number.jsonnet +++ /dev/null @@ -1 +0,0 @@ -'x' * 42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_to_bool.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_to_bool.jsonnet deleted file mode 100644 index 4a971037..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/string_to_bool.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local stringToBool(s) = if s == 'true' then true else if s == 'false' then false else error 'invalid boolean: ' + std.manifestJson(s); - -[stringToBool('false'), stringToBool('true')] diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar.jsonnet deleted file mode 100644 index 1c1bd4c2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ x: { a: 1 } } { x+: { b: 2 } } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar2.jsonnet deleted file mode 100644 index 75a7be3e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar2.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ x: +1 } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar3.jsonnet deleted file mode 100644 index 56c7884a..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar3.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ assert self.x } { x+: true } diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar5.jsonnet deleted file mode 100644 index 44d9f789..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar5.jsonnet +++ /dev/null @@ -1 +0,0 @@ -({} { x+: function(x) x }).x(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar6.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar6.jsonnet deleted file mode 100644 index d50ee1c8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar6.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -{ - x: 'hello, ', -} { - x+: 'world', -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar7.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar7.jsonnet deleted file mode 100644 index d5030ea6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar7.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -{ - x: [1, 2, 3], -} { - x+: [4, 5, 6], -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar8.jsonnet deleted file mode 100644 index 55d46df1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/supersugar8.jsonnet +++ /dev/null @@ -1,5 +0,0 @@ -{ - assert self.x, -} { - x+: false, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict.jsonnet deleted file mode 100644 index 352c5752..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local arr = [function(x) x] + std.makeArray(600, function(i) (function(x) arr[i](x + 1) tailstrict)); - -arr[600](42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict2.jsonnet deleted file mode 100644 index b7eda2c6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict2.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local e(x) = (error x); - -(function(x) e(x))('xxx') tailstrict diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict3.jsonnet deleted file mode 100644 index 23906b88..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict3.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local foo(x, y=error 'xxx') = x; - -foo(42) tailstrict diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict4.jsonnet deleted file mode 100644 index 421fe3b0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict4.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local foo(x, y=error 'xxx') = x; - -foo(42, y=5) tailstrict diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict5.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict5.jsonnet deleted file mode 100644 index 7b1b599c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/tailstrict5.jsonnet +++ /dev/null @@ -1,3 +0,0 @@ -local sum(x, v) = if x <= 0 then v else sum(x - 1, x + v) tailstrict; - -sum(1000, 0) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/true.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/true.jsonnet deleted file mode 100644 index 27ba77dd..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/true.jsonnet +++ /dev/null @@ -1 +0,0 @@ -true diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_array.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_array.jsonnet deleted file mode 100644 index 25a8772d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_array.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.type([error 'x']) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_builtin_function.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_builtin_function.jsonnet deleted file mode 100644 index bafe1a01..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_builtin_function.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.type(std.type) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_error.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_error.jsonnet deleted file mode 100644 index cb2d0cc5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_error.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.type(error 'xxx') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_function.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_function.jsonnet deleted file mode 100644 index b3a44170..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_function.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.type(function() {}) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_number.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_number.jsonnet deleted file mode 100644 index 5e2a2a69..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_number.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.type(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_object.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_object.jsonnet deleted file mode 100644 index 3d07e6cc..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_object.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.type({ x: error 'x' }) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_string.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_string.jsonnet deleted file mode 100644 index 609e90ca..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/type_string.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.type('xxx') diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus.jsonnet deleted file mode 100644 index 6a0e60d4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus.jsonnet +++ /dev/null @@ -1 +0,0 @@ --42 diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus2.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus2.jsonnet deleted file mode 100644 index ef0d12a9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus2.jsonnet +++ /dev/null @@ -1 +0,0 @@ --(-42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus3.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus3.jsonnet deleted file mode 100644 index 9181679d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus3.jsonnet +++ /dev/null @@ -1 +0,0 @@ --(42) diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus4.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus4.jsonnet deleted file mode 100644 index 668f8fe4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/unary_minus4.jsonnet +++ /dev/null @@ -1 +0,0 @@ --'xxx' diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/use_object.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/use_object.jsonnet deleted file mode 100644 index cf34ae95..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet-gen/printer/testdata/upstream/use_object.jsonnet +++ /dev/null @@ -1 +0,0 @@ -{ a: 1 }.a diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/core.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/core.libsonnet deleted file mode 100644 index e0924f3e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/core.libsonnet +++ /dev/null @@ -1,995 +0,0 @@ -local kubeAssert = import "internal/assert.libsonnet"; -local base = import "internal/base.libsonnet"; -local meta = import "internal/meta.libsonnet"; - -{ - // A collection of common fields in the Kubernetes API objects, - // that we do not want to expose for public use. For example, - // `Kind` appears frequently in API objects of both - // `extensions/v1beta1` and `v1`, but we don't want users to mess - // mess with an object's `Kind`. - local common = { - Kind(kind):: kubeAssert.Type("kind", kind, "string") {kind: kind}, - - // TODO: This sets the metadata property, rather than doing a - // mixin. Is this what we want? - Metadata(metadata={}):: {metadata: $.v1.metadata.Default() + metadata}, - - mixin:: { - Metadata(mixin):: {metadata+: mixin}, - - metadata:: { - local metadata = $.v1.metadata, - local mixin = common.mixin, - - Name:: meta.MixinPartial1(metadata.Name, mixin.Metadata), - Label:: meta.MixinPartial2(metadata.Label, mixin.Metadata), - Labels:: meta.MixinPartial1(metadata.Labels, mixin.Metadata), - Namespace:: meta.MixinPartial1(metadata.Namespace, mixin.Metadata), - Annotation:: meta.MixinPartial2(metadata.Annotation, mixin.Metadata), - Annotations:: - meta.MixinPartial1(metadata.Annotations, mixin.Metadata), - }, - }, - }, - - v1:: { - local bases = { - ConfigMap: base.New("configMap", "AC74E727-0605-4872-8F30-E5CAFB2A0984"), - Container: base.New("container", "50281784-097C-46A9-8D2C-C6E9078D77D4"), - ContainerPort: - base.New("containerPort", "2854EB13-644C-4FEF-A62D-DBAC554D6A24"), - Metadata: base.New("metadata", "027AE69D-1DD6-42D2-AD47-8F4A55DF9D76"), - PersistentVolume: - base.New("persistentVolume", "03113473-7083-4D07-A7FE-83699EB4128C"), - PersistentVolumeClaim: - base.New("persistentVolumeClaim", "CD58B997-FF5E-4ED9-8F8A-573E92336D35"), - Pod: base.New("pod", "2854EB13-644C-4FEF-A62D-DBAC554D6A24"), - Probe: base.New("probe", "943CF775-B17F-4D25-A794-7D800F08E7FE"), - Secret: base.New("secret", "0C3D2362-968B-4751-BF67-D58ADA1FC5FC"), - Service: base.New("service", "87EE499C-EC06-421D-9450-EFE0701851EB"), - ServicePort: base.New("servicePort", "C38839B7-DA05-4845-B643-E6826E38EA1B"), - Mount: base.New("mount", "D1E2E601-E64A-4A95-A15C-E78CA724764C"), - Namespace: base.New("namespace", "6A94A118-F6A7-40EE-8BA1-6096CEC7BDE3"), - }, - - ApiVersion:: { apiVersion: "v1" }, - - metadata:: { - Default(name=null, namespace=null, annotations=null, labels=null):: - bases.Metadata + - (if name != null then self.Name(name) else {}) + - (if namespace != null then self.Namespace(namespace) else {}) + { - annotations: if annotations == null then {} else annotations, - labels: if labels == null then {} else labels, - }, - - Name(name):: - base.Verify(bases.Metadata) + - kubeAssert.Type("name", name, "string") + - {name: name}, - - Label(key, value):: - base.Verify(bases.Metadata) + - {labels+: {[key]: value}}, - - Labels(labels):: - base.Verify(bases.Metadata) + - {labels+: labels}, - - Namespace(namespace):: - base.Verify(bases.Metadata) + - kubeAssert.Type("namespace", namespace, "string") + - {namespace: namespace}, - - Annotation(key, value):: - base.Verify(bases.Metadata) + - {annotations+: {[key]: value}}, - - Annotations(annotations):: - base.Verify(bases.Metadata) + - {annotations+: annotations}, - }, - - // - // Namespace. - // - - namespace:: { - Default(name):: - bases.Namespace + - kubeAssert.Type("name", name, "string") + - $.v1.ApiVersion + - common.Kind("Namespace") + - common.Metadata($.v1.metadata.Name(name)), - }, - - // - // Ports. - // - port:: { - local protocolOptions = std.set(["TCP", "UDP"]), - - local PortProtocol(protocol, targetBase) = - kubeAssert.InSet("protocol", protocol, protocolOptions) + - base.Verify(targetBase) { - protocol: protocol, - }, - - local PortName(name, targetPort) = - base.Verify(targetPort) + - kubeAssert.Type("name", name, "string") { - name: name, - }, - - container:: { - Default(containerPort):: - bases.ContainerPort + - kubeAssert.ValidPort("containerPort", containerPort) { - containerPort: containerPort, - }, - - Named(name, containerPort):: - kubeAssert.Type("name", name, "string") + - self.Default(containerPort) + - self.Name(name), - - Name(name):: PortName(name, bases.ContainerPort), - - Protocol(protocol):: PortProtocol(protocol, bases.ContainerPort), - - HostPort(hostPort):: - base.Verify(bases.ContainerPort) + - kubeAssert.ValidPort("hostPort", hostPort) { - hostPort: hostPort - }, - - HostIp(hostIp):: - base.Verify(bases.ContainerPort) + - kubeAssert.Type("hostIp", hostIp, "string") { - hostIP: hostIp, - }, - }, - - service:: { - Default(servicePort):: - bases.ServicePort + - kubeAssert.ValidPort("servicePort", servicePort) { - port: servicePort, - }, - - WithTarget(servicePort, targetPort):: - self.Default(servicePort) + - self.TargetPort(targetPort), - - Named(name, servicePort, targetPort):: - kubeAssert.Type("name", name, "string") + - self.Default(servicePort) + - self.Name(name) + - self.TargetPort(targetPort), - - Name(name):: PortName(name, bases.ServicePort), - - Protocol(protocol):: PortProtocol(protocol, bases.ServicePort), - - TargetPort(targetPort):: - base.Verify(bases.ServicePort) { - // TODO: Assert clusterIP is not set? - targetPort: targetPort, - }, - - NodePort(nodePort):: - base.Verify(bases.ServicePort) { - nodePort: nodePort, - }, - }, - }, - - // - // Service. - // - - service:: { - Default(name, portList, labels={}, annotations={}):: - local defaultMetadata = - common.Metadata( - $.v1.metadata.Name(name) + - $.v1.metadata.Labels(labels) + - $.v1.metadata.Annotations(annotations)); - local serviceKind = common.Kind("Service"); - bases.Service + $.v1.ApiVersion + serviceKind + defaultMetadata { - spec: { - ports: portList, - }, - }, - - // TODO: Incorrect indentation below. - Metadata:: common.mixin.Metadata, - Spec(mixin):: {spec+: mixin}, - - spec:: { - local typeOptions = std.set([ - "ExternalName", "ClusterIP", "NodePort", "LoadBalancer"]), - local sessionAffinityOptions = std.set(["ClientIP", "None"]), - - Port(port):: - // base.Verify(bases.Service) + - {ports+: [port]}, - - Selector(selector):: - // base.Verify(bases.Service) + - {selector: selector}, - - ClusterIp(clusterIp):: - // base.Verify(bases.Service) + - kubeAssert.Type("clusterIp", clusterIp, "string") + - {clusterIP: clusterIp}, - - Type(type):: - // base.Verify(bases.Service) + - kubeAssert.InSet("type", type, typeOptions) + - {type: type}, - - ExternalIps(externalIpList):: - // base.Verify(bases.Service) + - // TODO: Verify that externalIpList is a list of string. - kubeAssert.Type("externalIpList", externalIpList, "array") + - {externalIPs: externalIpList}, - - SessionAffinity(sessionAffinity):: - // base.Verify(bases.Service) + - kubeAssert.InSet( - "sessionAffinity", sessionAffinity, sessionAffinityOptions) + - {sessionAffinity: sessionAffinity}, - - LoadBalancerIp(loadBalancerIp):: - // base.Verify(bases.Service) + - kubeAssert.Type("loadBalancerIp", loadBalancerIp, "string") + - {loadBalancerIP: loadBalancerIp}, - - LoadBalancerSourceRanges(loadBalancerSourceRanges):: - // base.Verify(bases.Service) + - // TODO: Verify that loadBalancerSourceRanges is a list - // of string. - kubeAssert.Type( - "loadBalancerSourceRanges", loadBalancerSourceRanges, "array") + - {loadBalancerSourceRanges: loadBalancerSourceRanges}, - - ExternalName(externalName):: - // base.Verify(bases.Service) + - kubeAssert.Type("externalName", externalName, "string") + - {externalName: externalName}, - }, - - mixin:: { - metadata:: common.mixin.metadata { - annotation:: { - TolerateUnreadyEndpoints(truthiness):: - common.mixin.metadata.Annotation( - "service.alpha.kubernetes.io/tolerate-unready-endpoints", - truthiness), - }, - }, - - spec:: { - local service = $.v1.service, - - Port:: - meta.MixinPartial1(service.spec.Port, service.Spec), - Selector:: - meta.MixinPartial1(service.spec.Selector, service.Spec), - ClusterIp:: - meta.MixinPartial1(service.spec.ClusterIp, service.Spec), - Type:: - meta.MixinPartial1(service.spec.Type, service.Spec), - ExternalIps:: - meta.MixinPartial1(service.spec.ExternalIps, service.Spec), - SessionAffinity:: - meta.MixinPartial1(service.spec.SessionAffinity, service.Spec), - LoadBalancerIp:: - meta.MixinPartial1(service.spec.LoadBalancerIp, service.Spec), - LoadBalancerSourceRanges:: meta.MixinPartial1( - service.spec.LoadBalancerSourceRanges, service.Spec), - ExternalName:: - meta.MixinPartial1(service.spec.ExternalName, service.Spec), - }, - }, - }, - - configMap:: { - Default(namespace, configMapName, data): - bases.ConfigMap + - $.v1.ApiVersion + - common.Kind("ConfigMap") + - common.Metadata( - $.v1.metadata.Name(configMapName) + - $.v1.metadata.Namespace(namespace)) { - data: data, - }, - - DefaultFromClaim(namespace, name, claim):: - self.Default(namespace, name, claim.metadata.name) - }, - - secret:: { - Default(namespace, secretName, data):: - bases.Secret + - $.v1.ApiVersion + - common.Kind("Secret") + - common.Metadata( - $.v1.metadata.Name(secretName) + - $.v1.metadata.Namespace(namespace)) { - data: data, - }, - - StringData(stringData):: - base.Verify(bases.Secret) { - stringData: stringData, - }, - - Type(type):: - base.Verify(bases.Secret) + - kubeAssert.Type("type", type, "string") { - type: type, - }, - }, - - // - // Volume. - // - - // - // NOTE: TODO: YOU ARE HERE. You haven't implemented type checking - // beyond this point. - // - - volume:: { - persistent:: { - // TODO: Add checks to the parameters here. - Default(name, claimName):: bases.PersistentVolume { - name: name, - persistentVolumeClaim: { - claimName: claimName, - }, - }, - - DefaultFromClaim(name, claim):: - self.Default(name, claim.metadata.name) - }, - - hostPath:: { - // TODO: Add checks to the parameters here. - Default(name, path):: { - name: name, - hostPath: { - path: path - }, - }, - }, - - configMap:: { - // TODO: Add checks to the parameters here. - Default(name, configMapName):: { - name: name, - configMap: { - name: configMapName, - }, - }, - }, - - secret:: { - // TODO: Add checks to the parameters here. - Default(name, secretName):: { - name: name, - secret: { - secretName: secretName, - }, - }, - }, - - emptyDir:: { - Default(name):: { - name: name, - emptyDir: {}, - }, - }, - - // - // Mount. - // - mount:: { - Default(name, mountPath, readOnly=false):: bases.Mount { - name: name, - mountPath: mountPath, - readOnly: readOnly, - }, - - FromVolume(volume, mountPath, readOnly=false):: - self.Default(volume.name, mountPath, readOnly), - - FromConfigMap(configMap, mountPath, readOnly=false):: - self.Default(configMap.name, mountPath, readOnly), - }, - - // - // Claim. - // - claim:: { - DefaultPersistent(claimName, accessModes, size, namespace=null): - local defaultMetadata = common.Metadata( - $.v1.metadata.Default(namespace=namespace, name=claimName)); - bases.PersistentVolumeClaim + - $.v1.ApiVersion + - common.Kind("PersistentVolumeClaim") + - defaultMetadata { - // TODO: Move this assert to `kubeAssert.Type`. - assert std.type(accessModes) == "array" - : "'accessModes' must by of type 'array'", - spec: { - accessModes: accessModes, - resources: { - requests: { - storage: size - }, - }, - }, - }, - - mixin:: { - metadata:: common.mixin.metadata { - annotation:: { - AlphaStorageClass(storageClass):: - common.mixin.metadata.Annotation( - "volume.alpha.kubernetes.io/storage-class", - storageClass), - - BetaStorageClass(storageClass):: - common.mixin.metadata.Annotation( - "volume.beta.kubernetes.io/storage-class", - storageClass), - }, - }, - }, - }, - }, - - // - // Probe. - // - probe:: { - local defaultTimeout = 1, - local defaultPeriod = 10, - - Default( - initDelaySecs, - timeoutSecs=defaultTimeout, - periodSeconds=defaultPeriod - ):: bases.Probe { - initialDelaySeconds: initDelaySecs, - timeoutSeconds: timeoutSecs, - }, - - Http( - getPath, - portName, - initDelaySecs, - timeoutSecs=defaultTimeout, - periodSeconds=defaultPeriod - ):: self.Default(initDelaySecs, timeoutSecs) { - httpGet: { - path: getPath, - port: portName, - }, - }, - - Tcp( - port, - initDelaySecs, - timeoutSecs=defaultTimeout, - periodSeconds=defaultPeriod - ):: self.Default(initDelaySecs, timeoutSecs) { - tcpSocket: { - port: port, - }, - }, - - Exec( - command, - initDelaySecs, - timeoutSecs=defaultTimeout, - periodSeconds=defaultPeriod - ):: self.Default(initDelaySecs, timeoutSecs) { - exec: { - command: command, - }, - }, - }, - - // - // Container. - // - container:: { - local imagePullPolicyOptions = std.set(["Always", "Never", "IfNotPresent"]), - - Default(name, image, imagePullPolicy="Always"):: - bases.Container + - // TODO: Make "Always" the default only when we're doing the :latest. - kubeAssert.Type("name", name, "string") + - kubeAssert.Type("image", image, "string") + - kubeAssert.InSet("imagePullPolicy", imagePullPolicy, imagePullPolicyOptions) { - name: name, - image: image, - imagePullPolicy: imagePullPolicy, - // TODO: Think carefully about whether we want an empty list here. - ports: [], - env: [], - volumeMounts: [], - }, - - Args(args):: base.Verify(bases.Container) { - args: args - }, - - Command(command):: base.Verify(bases.Container) { - command: command, - }, - - // TODO: Should this take a k/v pair instead? - Env(env):: base.Verify(bases.Container) { - env+: env, - }, - - Resources(resources):: base.Verify(bases.Container) { - resources: resources - }, - - Ports(ports):: base.Verify(bases.Container) { - ports+: ports, - }, - - Port(port):: base.Verify(bases.Container) { ports+: [port] }, - - NamedPort(name, port):: base.Verify(bases.Container) { - ports+: [$.v1.port.container.Named(name, port)], - }, - - LivenessProbe(probe):: base.Verify(bases.Container) { - livenessProbe: probe, - }, - - ReadinessProbe(probe):: base.Verify(bases.Container) { - readinessProbe: probe, - }, - - VolumeMounts(mounts):: base.Verify(bases.Container) { - volumeMounts+: mounts, - }, - - // TODO: Make these into mixins, also. - resources:: { - Requests(cpu, memory):: { - requests: { - cpu: cpu, - memory: memory - }, - }, - - Limits(cpu, memory):: { - limits: { - cpu: cpu, - memory: memory - }, - }, - }, - }, - - // - // Env. - // - env:: { - Variable(name, value):: { - name: name, - value: value, - }, - - // TODO: Rename this `ValueFromConfigMap`. - ValueFrom(name, configMapName, configMapKey):: { - name: name, - valueFrom: { - configMapKeyRef: { - name: configMapName, - key: configMapKey, - }, - }, - }, - - ValueFromFieldRef(name, fieldPath):: { - name: name, - valueFrom: { - fieldRef: { - fieldPath: fieldPath, - }, - }, - }, - - ValueFromSecret(name, secretName, secretKey):: { - name: name, - valueFrom: { - secretKeyRef: { - name: secretName, - key: secretKey, - }, - }, - }, - }, - - // - // Pods. - // - pod:: { - local pod = self, - - Default(containers, volumes=[]):: - bases.Pod + - $.v1.ApiVersion + - common.Kind("Pod") + - common.Metadata() { - spec: pod.spec.Default(containers, volumes), - }, - - Metadata:: common.mixin.Metadata, - Spec(mixin):: {spec+: mixin}, - - spec:: { - Default(containers, volumes=[]):: { - containers: containers, - volumes: volumes, - }, - - // TODO: Consider making this a mixin. - Volumes(volumes):: {volumes+: volumes}, - Containers(containers):: {containers+: containers}, - DnsPolicy:: CreateDnsPolicyFunction(), - RestartPolicy:: CreateRestartPolicyFunction(), - }, - - template:: { - Default(containers, volumes=[]):: - common.Metadata() { - spec: pod.spec.Default(containers, volumes), - }, - - Metadata:: common.mixin.Metadata, - - mixin:: { - metadata:: common.mixin.metadata { - annotation:: { - PodAffinity(affinitySpec):: - common.mixin.metadata.Annotation( - "scheduler.alpha.kubernetes.io/affinity", affinitySpec), - PodInitContainers(initSpec):: - common.mixin.metadata.Annotation( - "pod.alpha.kubernetes.io/init-containers", initSpec), - }, - }, - - spec:: { - local pod = $.v1.pod, - local templateSpecMixin(mixin) = {template+: {spec+: mixin}}, - - Containers:: - meta.MixinPartial1(pod.spec.Containers, templateSpecMixin), - Volumes:: - meta.MixinPartial1(pod.spec.Volumes, templateSpecMixin), - DnsPolicy:: - meta.MixinPartial1(pod.spec.DnsPolicy, templateSpecMixin), - RestartPolicy:: - meta.MixinPartial1(pod.spec.RestartPolicy, templateSpecMixin), - }, - }, - }, - - local CreateDnsPolicyFunction(createMixin=null) = - local partial = meta.MixinPartial1( - function(policy) {dnsPolicy: policy}, - createMixin); - function(policy="ClusterFirst") partial(policy), - - local CreateRestartPolicyFunction(createMixin=null) = - local partial = meta.MixinPartial1( - function(policy) {restartPolicy: policy}, - createMixin); - function(policy="Always") partial(policy), - }, - }, - - extensions:: { - v1beta1: { - local bases = { - Deployment: base.New("deployment", "176A7BEF-E577-4EBD-952D-5E8F7BB7AE1A"), - }, - - ApiVersion:: { apiVersion: "extensions/v1beta1" }, - - // - // Deployments. - // - deployment:: { - // TODO: Get rid of the `spec` parameter. - Default(name, spec):: - bases.Deployment + - $.extensions.v1beta1.ApiVersion + - common.Kind("Deployment") + - common.Metadata($.v1.metadata.Name(name)) { - spec: spec, - }, - - Metadata:: common.mixin.Metadata, - Spec(mixin):: {spec+: mixin}, - - spec:: { - ReplicatedPod(replicas, podTemplate):: { - replicas: replicas, - // TODO: Should this be a mixin? - template: podTemplate, - }, - - RevisionHistoryLimit(limit):: - // base.Verify(bases.Service) + - {revisionHistoryLimit: limit}, - - NodeSelector(labels):: - // base.Verify(bases.Service) + - {nodeSelector: labels}, - - Selector(labels):: { - // base.Verify(bases.Service) + - // TODO: Consider making these mixins. - selector: { - matchLabels: labels, - }, - }, - - MinReadySeconds:: CreateMinReadySecondsFunction(), - RollingUpdateStrategy:: CreateRollingUpdateStrategyFunction(), - }, - - mixin:: { - metadata:: common.mixin.metadata, - - podTemplate:: { - local pod = $.v1.pod, - - NodeSelector:: meta.MixinPartial1( - $.extensions.v1beta1.deployment.spec.NodeSelector, - self.Spec), - Volumes:: meta.MixinPartial1(pod.spec.Volumes, self.Spec), - Containers:: meta.MixinPartial1(pod.spec.Containers, self.Spec), - - // TODO: Consider moving this default to some common - // place, so it's not duplicated. - DnsPolicy:: - local partial = - meta.MixinPartial1(pod.spec.DnsPolicy, self.Spec); - function(policy="ClusterFirst") partial(policy), - - RestartPolicy(policy="Always"):: - self.Spec(pod.spec.RestartPolicy(policy=policy)), - - Spec(mixin):: { - // TODO: Add base verification here. - spec+: { - template+: { - spec+: mixin - }, - }, - }, - }, - - spec:: { - local deployment = $.extensions.v1beta1.deployment, - - RevisionHistoryLimit:: meta.MixinPartial1( - deployment.spec.RevisionHistoryLimit, deployment.Spec), - NodeSelector:: meta.MixinPartial1( - deployment.spec.NodeSelector, deployment.Spec), - Selector:: - meta.MixinPartial1(deployment.spec.Selector, deployment.Spec), - MinReadySeconds:: CreateMinReadySecondsFunction(deployment.Spec), - RollingUpdateStrategy:: - CreateRollingUpdateStrategyFunction(deployment.Spec), - }, - }, - - local CreateMinReadySecondsFunction(createMixin=null) = - local partial = - meta.MixinPartial1( - function(seconds) - // base.Verify(bases.Service) + - {minReadySeconds: seconds}, - createMixin); - function(seconds=0) partial(seconds), - - local CreateRollingUpdateStrategyFunction(createMixin=null) = - local rollingUpdateStrategy(maxSurge, maxUnavailable) = { - // base.Verify(bases.Service) - strategy: { - rollingUpdate: { - maxSurge: maxSurge, - maxUnavailable: maxUnavailable, - }, - type: "RollingUpdate", - }, - }; - local partial = - meta.MixinPartial2( - rollingUpdateStrategy, - createMixin); - function(maxSurge=1, maxUnavailable=1) - partial(maxSurge, maxUnavailable), - }, - - ingress:: { - local ingress = self, - - Default(name, ingressTls=[], ingressRules=[], labels=null):: - $.extensions.v1beta1.ApiVersion + - common.Kind("Ingress") + - common.Metadata($.v1.metadata.Default(name=name, labels=labels)) { - spec: { - tls: ingressTls, - rules: ingressRules, - }, - }, - - Metadata:: common.mixin.Metadata, - Spec(mixin):: {spec+: mixin}, - - spec:: { - Tls:: CreateTlsFunction(), - Rule:: CreateRuleFunction(), - }, - - rule:: { - Default:: CreateRuleFunction(), - }, - - httpIngressPath:: { - Default(serviceName, servicePort, path=null):: { - backend: { - serviceName: serviceName, - servicePort: servicePort, - }, - [if path != null then "path"]: path, - }, - }, - - mixin:: { - metadata:: common.mixin.metadata, - spec:: { - Tls:: CreateTlsFunction(function(tls) ingress.Spec({tls+: [tls]})), - Rule:: CreateRuleFunction( - function(rule) ingress.Spec({rules+: [rule]})), - }, - }, - - local CreateTlsFunction(createMixin=null) = - local tls(hosts, secretName) = { - [if hosts != null then "hosts"]: hosts, - [if secretName != null then "secretName"]: secretName, - }; - local partial = meta.MixinPartial2(tls, createMixin); - function(hosts=null, secretName=null) partial(hosts, secretName), - - local CreateRuleFunction(createMixin=null) = - local rule(host, httpIngressRule) = { - [if host != null then "host"]: host, - [if httpIngressRule != null then "http"]: httpIngressRule, - }; - local partial = meta.MixinPartial2(rule, createMixin); - function(host=null, http=null) partial(host, http), - }, - }, - }, - - meta:: { - v1:: { - labelSelector:: { - DefaultMatchLabelReqs(labels):: {matchLabels: labels}, - DefaultMatchExpressions(expressions):: {matchExpressions: expressions}, - }, - }, - }, - - policy:: { - v1beta1:: { - ApiVersion:: { apiVersion: "policy/v1beta1" }, - - podDistruptionBudget:: { - - Default(name, labels=null):: - $.policy.v1beta1.ApiVersion + - common.Kind("PodDisruptionBudget") + - common.Metadata($.v1.metadata.Default(name=name, labels=labels)) { - spec: {}, - }, - - Metadata:: common.mixin.Metadata, - Spec(mixin):: {spec+: mixin}, - - spec:: { - Selector:: $.extensions.v1beta1.deployment.Selector, - MinAvailable(time):: {minAvailable: time}, - }, - - mixin:: { - spec:: { - Selector:: meta.MixinPartial1( - $.extensions.v1beta1.deployment.spec.Selector, - $.extensions.v1beta1.deployment.Spec), - MinAvailable:: meta.MixinPartial1( - $.policy.v1beta1.podDistruptionBudget.spec.MinAvailable, - $.extensions.v1beta1.deployment.Spec), - }, - }, - }, - }, - }, - - apps:: { - v1beta1:: { - ApiVersion:: { apiVersion: "apps/v1beta1" }, - - statefulSet:: { - local statefulSet = self, - - Default( - name, replicas, template, serviceName=name, volumeClaimTemplates=[], - selector=null - ):: - $.apps.v1beta1.ApiVersion + - common.Kind("StatefulSet") + - common.Metadata($.v1.metadata.Default(name=name)) { - spec: statefulSet.spec.Default( - serviceName, replicas, template, volumeClaimTemplates, selector), - }, - - Metadata:: common.mixin.Metadata, - Spec(mixin):: {spec+: mixin}, - - spec:: { - Default( - serviceName, replicas, template, volumeClaimTemplates=[], - selector=null - ):: { - serviceName: serviceName, - replicas: replicas, - template: template, - volumeClaimTemplates: volumeClaimTemplates, - [if selector != null then "selector"]: selector, - }, - - ServiceName(serviceName):: {serviceName: serviceName}, - Template(podTemplate):: {template+: podTemplate}, - VolumeClaimTemplates(vcTemplates):: - {volumeClaimTemplates+: vcTemplates}, - // Selector(selector):: {selector: selector}, - }, - - mixin:: { - spec:: { - ServiceName:: meta.MixinPartial1( - $.apps.v1beta1.statefulSet.spec.ServiceName, - $.apps.v1beta1.statefulSet.Spec), - Template:: meta.MixinPartial1( - $.apps.v1beta1.statefulSet.spec.Template, - $.apps.v1beta1.statefulSet.Spec), - VolumeClaimTemplates:: meta.MixinPartial1( - $.apps.v1beta1.statefulSet.spec.VolumeClaimTemplates, - $.apps.v1beta1.statefulSet.Spec), - }, - }, - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/internal/assert.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/internal/assert.libsonnet deleted file mode 100644 index f8654989..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/internal/assert.libsonnet +++ /dev/null @@ -1,25 +0,0 @@ -{ - Type(fieldName, value, targetType): { - local observedType = std.type(value), - assert observedType == targetType - : "Field '%s' must be type '%s'; value was type '%s', with value '%s'" - % [fieldName, targetType, observedType, value] - }, - - InSet(fieldName, value, set): { - assert std.length(set) > 0 && std.type(set[0]) == std.type(value) - : "Field '%s' with value '%s' is of type '%s', but set '%s' contains elements of type '%s'" - % [fieldName, value, std.type(value), set, std.type(set[0])], - assert std.length(std.setInter(set, [value])) == 1 - : "Field '%s' with value '%s' must be in set '%s'" - % [fieldName, value, set] - }, - - ValidPort(fieldName, port): { - assert port > 0 && port < 65536 - : "Port '%s' must be in range 0 < port < 65536, but had value '%d'" - % [fieldName, port] - // NOTE: For some reason, Jsonnet only executes this check first - // if we put it after the port range assert. - } + self.Type(fieldName, port, "number"), -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/internal/base.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/internal/base.libsonnet deleted file mode 100644 index 3684dfa9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/internal/base.libsonnet +++ /dev/null @@ -1,15 +0,0 @@ -{ - local baseName = "B98F6CE0-DEE9-43AE-BC09-C7C8EDE55029", - New(name, id): { - [baseName]:: { - name: name, - id: id, - }, - }, - - Verify(targetBase):: { - assert super[baseName].id == targetBase[baseName].id - : "Can't '+' object of type '%s' with object of type '%s'" - % [super[baseName].name, targetBase[baseName].name] - }, -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/internal/meta.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/internal/meta.libsonnet deleted file mode 100644 index dd98c440..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/internal/meta.libsonnet +++ /dev/null @@ -1,11 +0,0 @@ -{ - MixinPartial1(fn, createMixin=null):: - if createMixin != null - then function(arg1) createMixin(fn(arg1)) - else fn, - - MixinPartial2(fn, createMixin=null):: - if createMixin != null - then function(arg1, arg2) createMixin(fn(arg1, arg2)) - else fn, -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/util.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/util.libsonnet deleted file mode 100644 index 3f449f51..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.alpha.1/util.libsonnet +++ /dev/null @@ -1,103 +0,0 @@ -local kubeAssert = import "internal/assert.libsonnet"; -local core = import "./core.libsonnet"; - -{ - app:: { - v1:: { - container:: { - NewWithPorts(name, image, ports):: - core.v1.container.Default(name, image) + - core.v1.container.Ports(ports), - }, - - env:: { - array:: { - // TODO: In all of these, check that we're not duplicating - // the variables, as the order is independent in Jsonnet, - // and we will mess it up. - - FromConfigMap(configMap, envSpec):: - self.FromConfigMapName(configMap.metadata.name, envSpec), - - FromConfigMapName(configMapName, envSpec):: - [core.v1.env.ValueFrom(name, configMapName, envSpec[name]) - for name in std.objectFields(envSpec)], - - FromSecret(secret, envSpec):: - self.FromSecretName(secret.metadata.name, envSpec), - - FromSecretName(secretName, envSpec):: - [core.v1.env.ValueFromSecret(name, secretName, envSpec[name]) - for name in std.objectFields(envSpec)], - - FromObj(envVariables):: - [core.v1.env.Variable(name, envVariables[name]) - for name in std.objectFields(envVariables)], - }, - }, - - pod:: { - FromContainer(container, labels={app: container.name}, volumes=[]):: - core.v1.pod.Default([container], volumes) + - core.v1.pod.Metadata(core.v1.metadata.Labels(labels)), - - template:: { - FromContainer(container, labels={app: container.name}, volumes=[]):: - core.v1.pod.template.Default([container], volumes) + - core.v1.pod.template.Metadata(core.v1.metadata.Labels(labels)), - }, - }, - - port:: { - service:: { - array:: { - FromContainerPorts(createServicePort, containerPorts):: [ - core.v1.port.service.Named( - port.name, createServicePort(port), port.name) - for port in containerPorts], - } - }, - }, - }, - - v1beta1:: { - deployment:: { - FromPodTemplate(name, replicas, podTemplate, labels={}):: - core.extensions.v1beta1.deployment.Default( - name, - core.extensions.v1beta1.deployment.spec.ReplicatedPod( - replicas, podTemplate)) + - core.extensions.v1beta1.deployment.Metadata( - core.v1.metadata.Labels(labels)), - - MapContainers(f):: { - local podContainers = super.spec.template.spec.containers, - spec+: { - template+: { - spec+: { - // IMPORTANT: This overwrites the `containers` field - // for this deployment. - containers: std.map(f, podContainers), - }, - }, - }, - }, - - FromContainer( - name, - replicas, - container, - labels={}, - podLabels={app: container.name}, - volumes=[] - ):: - self.FromPodTemplate( - name, - replicas, - $.app.v1.pod.template.FromContainer( - container, labels=podLabels, volumes=volumes), - labels=labels), - }, - }, - }, -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/apps.v1beta1.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/apps.v1beta1.libsonnet deleted file mode 100644 index 175414ae..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/apps.v1beta1.libsonnet +++ /dev/null @@ -1,2398 +0,0 @@ -{ - local apiVersion = {apiVersion: "apps/v1beta1"}, - local defaultMetadata(name, namespace) = {metadata: $.v1.objectMeta.name(name) + $.v1.objectMeta.namespace(namespace)}, - types:: { - uID:: { - }, - unixGroupID:: { - }, - unixUserID:: { - }, - }, - v1:: { - aPIResource:: { - local kind = {kind: "APIResource"}, - default(name, singularName, namespaced, verbs):: - kind + - { - name: name, - namespaced: namespaced, - shortNames: [], - singularName: singularName, - verbs: if std.type(verbs) == "array" then verbs else [verbs], - }, - // name is the plural name of the resource. - name(name):: {name: name}, - // namespaced indicates if a resource is namespaced or not. - namespaced(namespaced):: {namespaced: namespaced}, - // shortNames is a list of suggested short names of the resource. - shortNames(shortNames):: if std.type(shortNames) == "array" then {shortNames+: shortNames} else {shortNames+: [shortNames]}, - // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface. - singularName(singularName):: {singularName: singularName}, - // verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) - verbs(verbs):: if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - }, - aPIResourceList:: { - local kind = {kind: "APIResourceList"}, - default(groupVersion, resources):: - apiVersion + - kind + - { - groupVersion: groupVersion, - resources: if std.type(resources) == "array" then resources else [resources], - }, - // groupVersion is the group and version this APIResourceList is for. - groupVersion(groupVersion):: {groupVersion: groupVersion}, - // resources contains the name of the resources and if they are namespaced. - resources(resources):: if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - }, - aWSElasticBlockStoreVolumeSource:: { - default(volumeID):: - { - volumeID: 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(fsType):: {fsType: 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(partition):: {partition: 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(readOnly):: {readOnly: readOnly}, - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - volumeID(volumeID):: {volumeID: volumeID}, - }, - affinity:: { - default():: - { - nodeAffinity: {}, - podAffinity: {}, - podAntiAffinity: {}, - }, - // Describes node affinity scheduling rules for the pod. - nodeAffinity(nodeAffinity):: {nodeAffinity+: 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):: {podAffinity+: 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):: {podAntiAffinity+: podAntiAffinity}, - mixin:: { - nodeAffinity:: { - local nodeAffinity(mixin) = {nodeAffinity+: mixin}, - preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: nodeAffinity($.v1.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution)), - requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: nodeAffinity($.v1.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution)), - }, - podAffinity:: { - local podAffinity(mixin) = {podAffinity+: mixin}, - preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: podAffinity($.v1.podAffinity.preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution)), - requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: podAffinity($.v1.podAffinity.requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution)), - }, - podAntiAffinity:: { - local podAntiAffinity(mixin) = {podAntiAffinity+: mixin}, - preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: podAntiAffinity($.v1.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution)), - requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: podAntiAffinity($.v1.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution)), - }, - }, - }, - azureDataDiskCachingMode:: { - }, - azureDataDiskKind:: { - }, - azureDiskVolumeSource:: { - local kind = {kind: "AzureDiskVolumeSource"}, - default(diskName, diskURI):: - kind + - { - cachingMode: {}, - diskName: diskName, - diskURI: diskURI, - kind: {}, - }, - // Host Caching mode: None, Read Only, Read Write. - cachingMode(cachingMode):: {cachingMode+: cachingMode}, - // The Name of the data disk in the blob storage - diskName(diskName):: {diskName: diskName}, - // The URI the data disk in the blob storage - diskURI(diskURI):: {diskURI: diskURI}, - // 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(fsType):: {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - }, - azureFileVolumeSource:: { - default(secretName, shareName):: - { - secretName: secretName, - shareName: shareName, - }, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // the name of secret that contains Azure Storage Account Name and Key - secretName(secretName):: {secretName: secretName}, - // Share Name - shareName(shareName):: {shareName: shareName}, - }, - capabilities:: { - default():: - { - add: [], - drop: [], - }, - // Added capabilities - add(add):: if std.type(add) == "array" then {add+: add} else {add+: [add]}, - // Removed capabilities - drop(drop):: if std.type(drop) == "array" then {drop+: drop} else {drop+: [drop]}, - }, - capability:: { - }, - cephFSVolumeSource:: { - default(monitors):: - { - monitors: if std.type(monitors) == "array" then monitors else [monitors], - secretRef: {}, - }, - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - path(path):: {path: path}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - readOnly(readOnly):: {readOnly: readOnly}, - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretFile(secretFile):: {secretFile: secretFile}, - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef(secretRef):: {secretRef+: secretRef}, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - user(user):: {user: user}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - cinderVolumeSource:: { - default(volumeID):: - { - volumeID: 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - fsType(fsType):: {fsType: fsType}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - readOnly(readOnly):: {readOnly: readOnly}, - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - volumeID(volumeID):: {volumeID: volumeID}, - }, - configMapEnvSource:: { - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap must be defined - optional(optional):: {optional: optional}, - }, - configMapKeySelector:: { - default(key):: - { - key: key, - }, - // The key to select. - key(key):: {key: key}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap or it's key must be defined - optional(optional):: {optional: optional}, - }, - configMapProjection:: { - default():: - { - items: [], - }, - // 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap or it's keys must be defined - optional(optional):: {optional: optional}, - }, - configMapVolumeSource:: { - default():: - { - items: [], - }, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap or it's keys must be defined - optional(optional):: {optional: optional}, - }, - container:: { - default(name):: - { - args: [], - command: [], - env: [], - envFrom: [], - lifecycle: {}, - livenessProbe: {}, - name: name, - ports: [], - readinessProbe: {}, - resources: {}, - securityContext: {}, - volumeMounts: [], - }, - // 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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(args):: if std.type(args) == "array" then {args+: args} else {args+: [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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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(command):: if std.type(command) == "array" then {command+: command} else {command+: [command]}, - // List of environment variables to set in the container. Cannot be updated. - env(env):: if std.type(env) == "array" then {env+: env} else {env+: [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(envFrom):: if std.type(envFrom) == "array" then {envFrom+: envFrom} else {envFrom+: [envFrom]}, - // Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images - image(image):: {image: 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(imagePullPolicy):: {imagePullPolicy: imagePullPolicy}, - // Actions that the management system should take in response to container lifecycle events. Cannot be updated. - lifecycle(lifecycle):: {lifecycle+: 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(livenessProbe):: {livenessProbe+: livenessProbe}, - // 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(name):: {name: name}, - // 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(ports):: if std.type(ports) == "array" then {ports+: ports} else {ports+: [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(readinessProbe):: {readinessProbe+: readinessProbe}, - // Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources(resources):: {resources+: resources}, - // Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/security_context.md - securityContext(securityContext):: {securityContext+: securityContext}, - // 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(stdin):: {stdin: 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(stdinOnce):: {stdinOnce: 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(terminationMessagePath):: {terminationMessagePath: 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(terminationMessagePolicy):: {terminationMessagePolicy: terminationMessagePolicy}, - // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. - tty(tty):: {tty: tty}, - // Pod volumes to mount into the container's filesystem. Cannot be updated. - volumeMounts(volumeMounts):: if std.type(volumeMounts) == "array" then {volumeMounts+: volumeMounts} else {volumeMounts+: [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(workingDir):: {workingDir: workingDir}, - mixin:: { - lifecycle:: { - local lifecycle(mixin) = {lifecycle+: mixin}, - postStart(postStart):: lifecycle($.v1.lifecycle.postStart(postStart)), - preStop(preStop):: lifecycle($.v1.lifecycle.preStop(preStop)), - }, - livenessProbe:: { - local livenessProbe(mixin) = {livenessProbe+: mixin}, - exec(exec):: livenessProbe($.v1.probe.exec(exec)), - failureThreshold(failureThreshold):: livenessProbe($.v1.probe.failureThreshold(failureThreshold)), - httpGet(httpGet):: livenessProbe($.v1.probe.httpGet(httpGet)), - initialDelaySeconds(initialDelaySeconds):: livenessProbe($.v1.probe.initialDelaySeconds(initialDelaySeconds)), - periodSeconds(periodSeconds):: livenessProbe($.v1.probe.periodSeconds(periodSeconds)), - successThreshold(successThreshold):: livenessProbe($.v1.probe.successThreshold(successThreshold)), - tcpSocket(tcpSocket):: livenessProbe($.v1.probe.tcpSocket(tcpSocket)), - timeoutSeconds(timeoutSeconds):: livenessProbe($.v1.probe.timeoutSeconds(timeoutSeconds)), - }, - readinessProbe:: { - local readinessProbe(mixin) = {readinessProbe+: mixin}, - exec(exec):: readinessProbe($.v1.probe.exec(exec)), - failureThreshold(failureThreshold):: readinessProbe($.v1.probe.failureThreshold(failureThreshold)), - httpGet(httpGet):: readinessProbe($.v1.probe.httpGet(httpGet)), - initialDelaySeconds(initialDelaySeconds):: readinessProbe($.v1.probe.initialDelaySeconds(initialDelaySeconds)), - periodSeconds(periodSeconds):: readinessProbe($.v1.probe.periodSeconds(periodSeconds)), - successThreshold(successThreshold):: readinessProbe($.v1.probe.successThreshold(successThreshold)), - tcpSocket(tcpSocket):: readinessProbe($.v1.probe.tcpSocket(tcpSocket)), - timeoutSeconds(timeoutSeconds):: readinessProbe($.v1.probe.timeoutSeconds(timeoutSeconds)), - }, - resources:: { - local resources(mixin) = {resources+: mixin}, - limits(limits):: resources($.v1.resourceRequirements.limits(limits)), - requests(requests):: resources($.v1.resourceRequirements.requests(requests)), - }, - securityContext:: { - local securityContext(mixin) = {securityContext+: mixin}, - capabilities(capabilities):: securityContext($.v1.securityContext.capabilities(capabilities)), - privileged(privileged):: securityContext($.v1.securityContext.privileged(privileged)), - readOnlyRootFilesystem(readOnlyRootFilesystem):: securityContext($.v1.securityContext.readOnlyRootFilesystem(readOnlyRootFilesystem)), - runAsNonRoot(runAsNonRoot):: securityContext($.v1.securityContext.runAsNonRoot(runAsNonRoot)), - runAsUser(runAsUser):: securityContext($.v1.securityContext.runAsUser(runAsUser)), - seLinuxOptions(seLinuxOptions):: securityContext($.v1.securityContext.seLinuxOptions(seLinuxOptions)), - }, - }, - }, - containerPort:: { - default(containerPort):: - { - containerPort: containerPort, - }, - // Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. - containerPort(containerPort):: {containerPort: containerPort}, - // What host IP to bind the external port to. - hostIP(hostIP):: {hostIP: 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(hostPort):: {hostPort: 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(name):: {name: name}, - // Protocol for port. Must be UDP or TCP. Defaults to "TCP". - protocol(protocol):: {protocol: protocol}, - }, - deleteOptions:: { - local kind = {kind: "DeleteOptions"}, - default():: - apiVersion + - kind + - { - preconditions: {}, - propagationPolicy: {}, - }, - // 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(gracePeriodSeconds):: {gracePeriodSeconds: gracePeriodSeconds}, - // 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(orphanDependents):: {orphanDependents: orphanDependents}, - // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. - preconditions(preconditions):: {preconditions+: 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. - propagationPolicy(propagationPolicy):: {propagationPolicy+: propagationPolicy}, - mixin:: { - preconditions:: { - local preconditions(mixin) = {preconditions+: mixin}, - uid(uid):: preconditions($.v1.preconditions.uid(uid)), - }, - }, - }, - deletionPropagation:: { - }, - downwardAPIProjection:: { - default():: - { - items: [], - }, - // Items is a list of DownwardAPIVolume file - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - }, - downwardAPIVolumeFile:: { - default(path):: - { - fieldRef: {}, - path: path, - resourceFieldRef: {}, - }, - // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. - fieldRef(fieldRef):: {fieldRef+: fieldRef}, - // Optional: mode bits to use on this file, must be a value between 0 and 0777. 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(mode):: {mode: mode}, - // 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(path):: {path: path}, - // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - resourceFieldRef(resourceFieldRef):: {resourceFieldRef+: resourceFieldRef}, - mixin:: { - fieldRef:: { - local fieldRef(mixin) = {fieldRef+: mixin}, - fieldPath(fieldPath):: fieldRef($.v1.objectFieldSelector.fieldPath(fieldPath)), - }, - resourceFieldRef:: { - local resourceFieldRef(mixin) = {resourceFieldRef+: mixin}, - containerName(containerName):: resourceFieldRef($.v1.resourceFieldSelector.containerName(containerName)), - divisor(divisor):: resourceFieldRef($.v1.resourceFieldSelector.divisor(divisor)), - resource(resource):: resourceFieldRef($.v1.resourceFieldSelector.resource(resource)), - }, - }, - }, - downwardAPIVolumeSource:: { - default():: - { - items: [], - }, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: defaultMode}, - // Items is a list of downward API volume file - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - }, - emptyDirVolumeSource:: { - // 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(medium):: {medium: medium}, - }, - envFromSource:: { - default():: - { - configMapRef: {}, - secretRef: {}, - }, - // The ConfigMap to select from - configMapRef(configMapRef):: {configMapRef+: configMapRef}, - // An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - prefix(prefix):: {prefix: prefix}, - // The Secret to select from - secretRef(secretRef):: {secretRef+: secretRef}, - mixin:: { - configMapRef:: { - local configMapRef(mixin) = {configMapRef+: mixin}, - name(name):: configMapRef($.v1.configMapEnvSource.name(name)), - optional(optional):: configMapRef($.v1.configMapEnvSource.optional(optional)), - }, - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.secretEnvSource.name(name)), - optional(optional):: secretRef($.v1.secretEnvSource.optional(optional)), - }, - }, - }, - envVar:: { - default(name):: - { - name: name, - valueFrom: {}, - }, - // Name of the environment variable. Must be a C_IDENTIFIER. - name(name):: {name: name}, - // Variable references $(VAR_NAME) are expanded using the previous 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". - value(value):: {value: value}, - // Source for the environment variable's value. Cannot be used if value is not empty. - valueFrom(valueFrom):: {valueFrom+: valueFrom}, - mixin:: { - valueFrom:: { - local valueFrom(mixin) = {valueFrom+: mixin}, - configMapKeyRef(configMapKeyRef):: valueFrom($.v1.envVarSource.configMapKeyRef(configMapKeyRef)), - fieldRef(fieldRef):: valueFrom($.v1.envVarSource.fieldRef(fieldRef)), - resourceFieldRef(resourceFieldRef):: valueFrom($.v1.envVarSource.resourceFieldRef(resourceFieldRef)), - secretKeyRef(secretKeyRef):: valueFrom($.v1.envVarSource.secretKeyRef(secretKeyRef)), - }, - }, - }, - envVarSource:: { - default():: - { - configMapKeyRef: {}, - fieldRef: {}, - resourceFieldRef: {}, - secretKeyRef: {}, - }, - // Selects a key of a ConfigMap. - configMapKeyRef(configMapKeyRef):: {configMapKeyRef+: configMapKeyRef}, - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP. - fieldRef(fieldRef):: {fieldRef+: fieldRef}, - // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - resourceFieldRef(resourceFieldRef):: {resourceFieldRef+: resourceFieldRef}, - // Selects a key of a secret in the pod's namespace - secretKeyRef(secretKeyRef):: {secretKeyRef+: secretKeyRef}, - mixin:: { - configMapKeyRef:: { - local configMapKeyRef(mixin) = {configMapKeyRef+: mixin}, - key(key):: configMapKeyRef($.v1.configMapKeySelector.key(key)), - name(name):: configMapKeyRef($.v1.configMapKeySelector.name(name)), - optional(optional):: configMapKeyRef($.v1.configMapKeySelector.optional(optional)), - }, - fieldRef:: { - local fieldRef(mixin) = {fieldRef+: mixin}, - fieldPath(fieldPath):: fieldRef($.v1.objectFieldSelector.fieldPath(fieldPath)), - }, - resourceFieldRef:: { - local resourceFieldRef(mixin) = {resourceFieldRef+: mixin}, - containerName(containerName):: resourceFieldRef($.v1.resourceFieldSelector.containerName(containerName)), - divisor(divisor):: resourceFieldRef($.v1.resourceFieldSelector.divisor(divisor)), - resource(resource):: resourceFieldRef($.v1.resourceFieldSelector.resource(resource)), - }, - secretKeyRef:: { - local secretKeyRef(mixin) = {secretKeyRef+: mixin}, - key(key):: secretKeyRef($.v1.secretKeySelector.key(key)), - name(name):: secretKeyRef($.v1.secretKeySelector.name(name)), - optional(optional):: secretKeyRef($.v1.secretKeySelector.optional(optional)), - }, - }, - }, - execAction:: { - default():: - { - command: [], - }, - // 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(command):: if std.type(command) == "array" then {command+: command} else {command+: [command]}, - }, - fCVolumeSource:: { - default(targetWWNs, lun):: - { - lun: lun, - targetWWNs: if std.type(targetWWNs) == "array" then targetWWNs else [targetWWNs], - }, - // 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(fsType):: {fsType: fsType}, - // Required: FC target lun number - lun(lun):: {lun: lun}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // Required: FC target worldwide names (WWNs) - targetWWNs(targetWWNs):: if std.type(targetWWNs) == "array" then {targetWWNs+: targetWWNs} else {targetWWNs+: [targetWWNs]}, - }, - flexVolumeSource:: { - default(driver):: - { - driver: driver, - options: {}, - secretRef: {}, - }, - // Driver is the name of the driver to use for this volume. - driver(driver):: {driver: 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(fsType):: {fsType: fsType}, - // Optional: Extra command options if any. - options(options):: {options+: options}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: 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(secretRef):: {secretRef+: secretRef}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - flockerVolumeSource:: { - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - datasetName(datasetName):: {datasetName: datasetName}, - // UUID of the dataset. This is unique identifier of a Flocker dataset - datasetUUID(datasetUUID):: {datasetUUID: datasetUUID}, - }, - gCEPersistentDiskVolumeSource:: { - default(pdName):: - { - pdName: 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(fsType):: {fsType: 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(partition):: {partition: partition}, - // 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(pdName):: {pdName: pdName}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - readOnly(readOnly):: {readOnly: readOnly}, - }, - gitRepoVolumeSource:: { - default(repository):: - { - repository: 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(directory):: {directory: directory}, - // Repository URL - repository(repository):: {repository: repository}, - // Commit hash for the specified revision. - revision(revision):: {revision: revision}, - }, - glusterfsVolumeSource:: { - default(endpoints, path):: - { - endpoints: endpoints, - path: path, - }, - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - endpoints(endpoints):: {endpoints: endpoints}, - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - path(path):: {path: path}, - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - readOnly(readOnly):: {readOnly: readOnly}, - }, - hTTPGetAction:: { - default(port):: - { - httpHeaders: [], - port: port, - }, - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host(host):: {host: host}, - // Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders(httpHeaders):: if std.type(httpHeaders) == "array" then {httpHeaders+: httpHeaders} else {httpHeaders+: [httpHeaders]}, - // Path to access on the HTTP server. - path(path):: {path: path}, - // 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(port):: {port: port}, - // Scheme to use for connecting to the host. Defaults to HTTP. - scheme(scheme):: {scheme: scheme}, - }, - hTTPHeader:: { - default(name, value):: - { - name: name, - value: value, - }, - // The header field name - name(name):: {name: name}, - // The header field value - value(value):: {value: value}, - }, - handler:: { - default():: - { - exec: {}, - httpGet: {}, - tcpSocket: {}, - }, - // One and only one of the following should be specified. Exec specifies the action to take. - exec(exec):: {exec+: exec}, - // HTTPGet specifies the http request to perform. - httpGet(httpGet):: {httpGet+: httpGet}, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket(tcpSocket):: {tcpSocket+: tcpSocket}, - mixin:: { - exec:: { - local exec(mixin) = {exec+: mixin}, - command(command):: exec($.v1.execAction.command(command)), - }, - httpGet:: { - local httpGet(mixin) = {httpGet+: mixin}, - host(host):: httpGet($.v1.hTTPGetAction.host(host)), - httpHeaders(httpHeaders):: httpGet($.v1.hTTPGetAction.httpHeaders(httpHeaders)), - path(path):: httpGet($.v1.hTTPGetAction.path(path)), - port(port):: httpGet($.v1.hTTPGetAction.port(port)), - scheme(scheme):: httpGet($.v1.hTTPGetAction.scheme(scheme)), - }, - tcpSocket:: { - local tcpSocket(mixin) = {tcpSocket+: mixin}, - host(host):: tcpSocket($.v1.tCPSocketAction.host(host)), - port(port):: tcpSocket($.v1.tCPSocketAction.port(port)), - }, - }, - }, - hostAlias:: { - default():: - { - hostnames: [], - }, - // Hostnames for the the above IP address. - hostnames(hostnames):: if std.type(hostnames) == "array" then {hostnames+: hostnames} else {hostnames+: [hostnames]}, - // IP address of the host file entry. - ip(ip):: {ip: ip}, - }, - hostPathVolumeSource:: { - default(path):: - { - path: path, - }, - // Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - path(path):: {path: path}, - }, - iSCSIVolumeSource:: { - default(targetPortal, iqn, lun):: - { - iqn: iqn, - lun: lun, - portals: [], - secretRef: {}, - targetPortal: targetPortal, - }, - // whether support iSCSI Discovery CHAP authentication - chapAuthDiscovery(chapAuthDiscovery):: {chapAuthDiscovery: chapAuthDiscovery}, - // whether support iSCSI Session CHAP authentication - chapAuthSession(chapAuthSession):: {chapAuthSession: 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(fsType):: {fsType: fsType}, - // Target iSCSI Qualified Name. - iqn(iqn):: {iqn: iqn}, - // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. - iscsiInterface(iscsiInterface):: {iscsiInterface: iscsiInterface}, - // iSCSI target lun number. - lun(lun):: {lun: lun}, - // 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(portals):: if std.type(portals) == "array" then {portals+: portals} else {portals+: [portals]}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - readOnly(readOnly):: {readOnly: readOnly}, - // CHAP secret for iSCSI target and initiator authentication - secretRef(secretRef):: {secretRef+: secretRef}, - // 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(targetPortal):: {targetPortal: targetPortal}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - initializer:: { - default(name):: - { - name: name, - }, - // name of the process that is responsible for initializing this object. - name(name):: {name: name}, - }, - initializers:: { - default(pending):: - { - pending: if std.type(pending) == "array" then pending else [pending], - result: {}, - }, - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then {pending+: pending} else {pending+: [pending]}, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result(result):: {result+: result}, - mixin:: { - result:: { - local result(mixin) = {result+: mixin}, - code(code):: result($.v1.status.code(code)), - details(details):: result($.v1.status.details(details)), - message(message):: result($.v1.status.message(message)), - reason(reason):: result($.v1.status.reason(reason)), - status(status):: result($.v1.status.status(status)), - }, - }, - }, - keyToPath:: { - default(key, path):: - { - key: key, - path: path, - }, - // The key to project. - key(key):: {key: key}, - // Optional: mode bits to use on this file, must be a value between 0 and 0777. 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(mode):: {mode: mode}, - // 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(path):: {path: path}, - }, - labelSelector:: { - default():: - { - matchExpressions: [], - matchLabels: {}, - }, - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then {matchExpressions+: matchExpressions} else {matchExpressions+: [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(matchLabels):: {matchLabels+: matchLabels}, - }, - labelSelectorRequirement:: { - default(key, operator):: - { - key: key, - operator: operator, - values: [], - }, - // key is the label key that the selector applies to. - key(key):: {key: key}, - // operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist. - operator(operator):: {operator: 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(values):: if std.type(values) == "array" then {values+: values} else {values+: [values]}, - }, - lifecycle:: { - default():: - { - postStart: {}, - preStop: {}, - }, - // 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(postStart):: {postStart+: postStart}, - // PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - preStop(preStop):: {preStop+: preStop}, - mixin:: { - postStart:: { - local postStart(mixin) = {postStart+: mixin}, - exec(exec):: postStart($.v1.handler.exec(exec)), - httpGet(httpGet):: postStart($.v1.handler.httpGet(httpGet)), - tcpSocket(tcpSocket):: postStart($.v1.handler.tcpSocket(tcpSocket)), - }, - preStop:: { - local preStop(mixin) = {preStop+: mixin}, - exec(exec):: preStop($.v1.handler.exec(exec)), - httpGet(httpGet):: preStop($.v1.handler.httpGet(httpGet)), - tcpSocket(tcpSocket):: preStop($.v1.handler.tcpSocket(tcpSocket)), - }, - }, - }, - listMeta:: { - // 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: {resourceVersion: resourceVersion}, - // SelfLink is a URL representing this object. Populated by the system. Read-only. - selfLink(selfLink):: {selfLink: selfLink}, - }, - localObjectReference:: { - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - }, - nFSVolumeSource:: { - default(server, path):: - { - path: path, - server: server, - }, - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - path(path):: {path: path}, - // 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(readOnly):: {readOnly: readOnly}, - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - server(server):: {server: server}, - }, - nodeAffinity:: { - default():: - { - preferredDuringSchedulingIgnoredDuringExecution: [], - requiredDuringSchedulingIgnoredDuringExecution: {}, - }, - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [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(requiredDuringSchedulingIgnoredDuringExecution):: {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}, - mixin:: { - requiredDuringSchedulingIgnoredDuringExecution:: { - local requiredDuringSchedulingIgnoredDuringExecution(mixin) = {requiredDuringSchedulingIgnoredDuringExecution+: mixin}, - nodeSelectorTerms(nodeSelectorTerms):: requiredDuringSchedulingIgnoredDuringExecution($.v1.nodeSelector.nodeSelectorTerms(nodeSelectorTerms)), - }, - }, - }, - nodeSelector:: { - default(nodeSelectorTerms):: - { - nodeSelectorTerms: if std.type(nodeSelectorTerms) == "array" then nodeSelectorTerms else [nodeSelectorTerms], - }, - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then {nodeSelectorTerms+: nodeSelectorTerms} else {nodeSelectorTerms+: [nodeSelectorTerms]}, - }, - nodeSelectorRequirement:: { - default(key, operator):: - { - key: key, - operator: operator, - values: [], - }, - // The label key that the selector applies to. - key(key):: {key: key}, - // Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - operator(operator):: {operator: 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(values):: if std.type(values) == "array" then {values+: values} else {values+: [values]}, - }, - nodeSelectorTerm:: { - default(matchExpressions):: - { - matchExpressions: if std.type(matchExpressions) == "array" then matchExpressions else [matchExpressions], - }, - // Required. A list of node selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then {matchExpressions+: matchExpressions} else {matchExpressions+: [matchExpressions]}, - }, - objectFieldSelector:: { - default(fieldPath):: - apiVersion + - { - fieldPath: fieldPath, - }, - // Path of the field to select in the specified API version. - fieldPath(fieldPath):: {fieldPath: fieldPath}, - }, - objectMeta:: { - default():: - { - annotations: {}, - finalizers: [], - initializers: {}, - labels: {}, - ownerReferences: [], - }, - // 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(annotations):: {annotations+: 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(clusterName):: {clusterName: 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - creationTimestamp(creationTimestamp):: {creationTimestamp: 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(deletionGracePeriodSeconds):: {deletionGracePeriodSeconds: 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 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - deletionTimestamp(deletionTimestamp):: {deletionTimestamp: 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(finalizers):: if std.type(finalizers) == "array" then {finalizers+: finalizers} else {finalizers+: [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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency - generateName(generateName):: {generateName: generateName}, - // A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. - generation(generation):: {generation: generation}, - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers(initializers):: {initializers+: initializers}, - // 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(labels):: {labels+: labels}, - // 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(name):: {name: name}, - // Namespace defines the space within 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(namespace):: {namespace: 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(ownerReferences):: if std.type(ownerReferences) == "array" then {ownerReferences+: ownerReferences} else {ownerReferences+: [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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: {resourceVersion: resourceVersion}, - // SelfLink is a URL representing this object. Populated by the system. Read-only. - selfLink(selfLink):: {selfLink: 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(uid):: {uid: uid}, - mixin:: { - initializers:: { - local initializers(mixin) = {initializers+: mixin}, - pending(pending):: initializers($.v1.initializers.pending(pending)), - result(result):: initializers($.v1.initializers.result(result)), - }, - }, - }, - ownerReference:: { - local kind = {kind: "OwnerReference"}, - default(name, uid):: - apiVersion + - kind + - { - name: name, - uid: 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(blockOwnerDeletion):: {blockOwnerDeletion: blockOwnerDeletion}, - // If true, this reference points to the managing controller. - controller(controller):: {controller: controller}, - // Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: {name: name}, - // UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids - uid(uid):: {uid: uid}, - }, - patch:: { - }, - persistentVolumeAccessMode:: { - }, - persistentVolumeClaim:: { - local kind = {kind: "PersistentVolumeClaim"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // 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(spec):: {spec+: spec}, - // Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - accessModes(accessModes):: spec($.v1.persistentVolumeClaimSpec.accessModes(accessModes)), - resources(resources):: spec($.v1.persistentVolumeClaimSpec.resources(resources)), - selector(selector):: spec($.v1.persistentVolumeClaimSpec.selector(selector)), - storageClassName(storageClassName):: spec($.v1.persistentVolumeClaimSpec.storageClassName(storageClassName)), - volumeName(volumeName):: spec($.v1.persistentVolumeClaimSpec.volumeName(volumeName)), - }, - status:: { - local status(mixin) = {status+: mixin}, - accessModes(accessModes):: status($.v1.persistentVolumeClaimStatus.accessModes(accessModes)), - capacity(capacity):: status($.v1.persistentVolumeClaimStatus.capacity(capacity)), - phase(phase):: status($.v1.persistentVolumeClaimStatus.phase(phase)), - }, - }, - }, - persistentVolumeClaimSpec:: { - default():: - { - accessModes: [], - resources: {}, - selector: {}, - }, - // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - accessModes(accessModes):: if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, - // Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources(resources):: {resources+: resources}, - // A label query over volumes to consider for binding. - selector(selector):: {selector+: selector}, - // Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - storageClassName(storageClassName):: {storageClassName: storageClassName}, - // VolumeName is the binding reference to the PersistentVolume backing this claim. - volumeName(volumeName):: {volumeName: volumeName}, - mixin:: { - resources:: { - local resources(mixin) = {resources+: mixin}, - limits(limits):: resources($.v1.resourceRequirements.limits(limits)), - requests(requests):: resources($.v1.resourceRequirements.requests(requests)), - }, - selector:: { - local selector(mixin) = {selector+: mixin}, - matchExpressions(matchExpressions):: selector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: selector($.v1.labelSelector.matchLabels(matchLabels)), - }, - }, - }, - persistentVolumeClaimStatus:: { - default():: - { - accessModes: [], - capacity: {}, - }, - // AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - accessModes(accessModes):: if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, - // Represents the actual resources of the underlying volume. - capacity(capacity):: {capacity+: capacity}, - // Phase represents the current phase of PersistentVolumeClaim. - phase(phase):: {phase: phase}, - }, - persistentVolumeClaimVolumeSource:: { - default(claimName):: - { - claimName: claimName, - }, - // 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(claimName):: {claimName: claimName}, - // Will force the ReadOnly setting in VolumeMounts. Default false. - readOnly(readOnly):: {readOnly: readOnly}, - }, - photonPersistentDiskVolumeSource:: { - default(pdID):: - { - pdID: 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(fsType):: {fsType: fsType}, - // ID that identifies Photon Controller persistent disk - pdID(pdID):: {pdID: pdID}, - }, - podAffinity:: { - default():: - { - preferredDuringSchedulingIgnoredDuringExecution: [], - requiredDuringSchedulingIgnoredDuringExecution: [], - }, - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}, - }, - podAffinityTerm:: { - default():: - { - labelSelector: {}, - namespaces: [], - }, - // A label query over a set of resources, in this case pods. - labelSelector(labelSelector):: {labelSelector+: labelSelector}, - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - namespaces(namespaces):: if std.type(namespaces) == "array" then {namespaces+: namespaces} else {namespaces+: [namespaces]}, - // 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. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. - topologyKey(topologyKey):: {topologyKey: topologyKey}, - mixin:: { - labelSelector:: { - local labelSelector(mixin) = {labelSelector+: mixin}, - matchExpressions(matchExpressions):: labelSelector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: labelSelector($.v1.labelSelector.matchLabels(matchLabels)), - }, - }, - }, - podAntiAffinity:: { - default():: - { - preferredDuringSchedulingIgnoredDuringExecution: [], - requiredDuringSchedulingIgnoredDuringExecution: [], - }, - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}, - }, - podSecurityContext:: { - default():: - { - fsGroup: {}, - runAsUser: {}, - seLinuxOptions: {}, - supplementalGroups: [], - }, - // 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 - fsGroup(fsGroup):: {fsGroup+: fsGroup}, - // 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(runAsNonRoot):: {runAsNonRoot: 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(runAsUser):: {runAsUser+: runAsUser}, - // 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):: {seLinuxOptions+: 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(supplementalGroups):: if std.type(supplementalGroups) == "array" then {supplementalGroups+: supplementalGroups} else {supplementalGroups+: [supplementalGroups]}, - mixin:: { - seLinuxOptions:: { - local seLinuxOptions(mixin) = {seLinuxOptions+: mixin}, - level(level):: seLinuxOptions($.v1.sELinuxOptions.level(level)), - role(role):: seLinuxOptions($.v1.sELinuxOptions.role(role)), - type(type):: seLinuxOptions($.v1.sELinuxOptions.type(type)), - user(user):: seLinuxOptions($.v1.sELinuxOptions.user(user)), - }, - }, - }, - podSpec:: { - default(containers):: - { - affinity: {}, - containers: if std.type(containers) == "array" then containers else [containers], - hostMappings: [], - imagePullSecrets: [], - initContainers: [], - nodeSelector: {}, - securityContext: {}, - tolerations: [], - volumes: [], - }, - // 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(activeDeadlineSeconds):: {activeDeadlineSeconds: activeDeadlineSeconds}, - // If specified, the pod's scheduling constraints - affinity(affinity):: {affinity+: affinity}, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: {automountServiceAccountToken: automountServiceAccountToken}, - // 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(containers):: if std.type(containers) == "array" then {containers+: containers} else {containers+: [containers]}, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: {dnsPolicy: dnsPolicy}, - // Use the host's ipc namespace. Optional: Default to false. - hostIPC(hostIPC):: {hostIPC: hostIPC}, - // 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. - hostMappings(hostMappings):: if std.type(hostMappings) == "array" then {hostMappings+: hostMappings} else {hostMappings+: [hostMappings]}, - // 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(hostNetwork):: {hostNetwork: hostNetwork}, - // Use the host's pid namespace. Optional: Default to false. - hostPID(hostPID):: {hostPID: hostPID}, - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: {hostname: hostname}, - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then {imagePullSecrets+: imagePullSecrets} else {imagePullSecrets+: [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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then {initContainers+: initContainers} else {initContainers+: [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(nodeName):: {nodeName: 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(nodeSelector):: {nodeSelector+: nodeSelector}, - // 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(restartPolicy):: {restartPolicy: restartPolicy}, - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: {schedulerName: 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(securityContext):: {securityContext+: securityContext}, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: {serviceAccount: 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(serviceAccountName):: {serviceAccountName: serviceAccountName}, - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: {subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: {terminationGracePeriodSeconds: terminationGracePeriodSeconds}, - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then {tolerations+: tolerations} else {tolerations+: [tolerations]}, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, - mixin:: { - affinity:: { - local affinity(mixin) = {affinity+: mixin}, - nodeAffinity(nodeAffinity):: affinity($.v1.affinity.nodeAffinity(nodeAffinity)), - podAffinity(podAffinity):: affinity($.v1.affinity.podAffinity(podAffinity)), - podAntiAffinity(podAntiAffinity):: affinity($.v1.affinity.podAntiAffinity(podAntiAffinity)), - }, - securityContext:: { - local securityContext(mixin) = {securityContext+: mixin}, - fsGroup(fsGroup):: securityContext($.v1.podSecurityContext.fsGroup(fsGroup)), - runAsNonRoot(runAsNonRoot):: securityContext($.v1.podSecurityContext.runAsNonRoot(runAsNonRoot)), - runAsUser(runAsUser):: securityContext($.v1.podSecurityContext.runAsUser(runAsUser)), - seLinuxOptions(seLinuxOptions):: securityContext($.v1.podSecurityContext.seLinuxOptions(seLinuxOptions)), - supplementalGroups(supplementalGroups):: securityContext($.v1.podSecurityContext.supplementalGroups(supplementalGroups)), - }, - }, - }, - podTemplateSpec:: { - default(name, namespace="default"):: - defaultMetadata(name, namespace) + - { - spec: {}, - }, - // Specification of the desired behavior of the pod. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - activeDeadlineSeconds(activeDeadlineSeconds):: spec($.v1.podSpec.activeDeadlineSeconds(activeDeadlineSeconds)), - affinity(affinity):: spec($.v1.podSpec.affinity(affinity)), - automountServiceAccountToken(automountServiceAccountToken):: spec($.v1.podSpec.automountServiceAccountToken(automountServiceAccountToken)), - containers(containers):: spec($.v1.podSpec.containers(containers)), - dnsPolicy(dnsPolicy):: spec($.v1.podSpec.dnsPolicy(dnsPolicy)), - hostIPC(hostIPC):: spec($.v1.podSpec.hostIPC(hostIPC)), - hostMappings(hostMappings):: spec($.v1.podSpec.hostMappings(hostMappings)), - hostNetwork(hostNetwork):: spec($.v1.podSpec.hostNetwork(hostNetwork)), - hostPID(hostPID):: spec($.v1.podSpec.hostPID(hostPID)), - hostname(hostname):: spec($.v1.podSpec.hostname(hostname)), - imagePullSecrets(imagePullSecrets):: spec($.v1.podSpec.imagePullSecrets(imagePullSecrets)), - initContainers(initContainers):: spec($.v1.podSpec.initContainers(initContainers)), - nodeName(nodeName):: spec($.v1.podSpec.nodeName(nodeName)), - nodeSelector(nodeSelector):: spec($.v1.podSpec.nodeSelector(nodeSelector)), - restartPolicy(restartPolicy):: spec($.v1.podSpec.restartPolicy(restartPolicy)), - schedulerName(schedulerName):: spec($.v1.podSpec.schedulerName(schedulerName)), - securityContext(securityContext):: spec($.v1.podSpec.securityContext(securityContext)), - serviceAccount(serviceAccount):: spec($.v1.podSpec.serviceAccount(serviceAccount)), - serviceAccountName(serviceAccountName):: spec($.v1.podSpec.serviceAccountName(serviceAccountName)), - subdomain(subdomain):: spec($.v1.podSpec.subdomain(subdomain)), - terminationGracePeriodSeconds(terminationGracePeriodSeconds):: spec($.v1.podSpec.terminationGracePeriodSeconds(terminationGracePeriodSeconds)), - tolerations(tolerations):: spec($.v1.podSpec.tolerations(tolerations)), - volumes(volumes):: spec($.v1.podSpec.volumes(volumes)), - }, - }, - }, - portworxVolumeSource:: { - default(volumeID):: - { - volumeID: 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(fsType):: {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // VolumeID uniquely identifies a Portworx volume - volumeID(volumeID):: {volumeID: volumeID}, - }, - preconditions:: { - default():: - { - uid: {}, - }, - // Specifies the target UID. - uid(uid):: {uid+: uid}, - }, - preferredSchedulingTerm:: { - default(weight, preference):: - { - preference: preference, - weight: weight, - }, - // A node selector term, associated with the corresponding weight. - preference(preference):: {preference+: preference}, - // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - weight(weight):: {weight: weight}, - mixin:: { - preference:: { - local preference(mixin) = {preference+: mixin}, - matchExpressions(matchExpressions):: preference($.v1.nodeSelectorTerm.matchExpressions(matchExpressions)), - }, - }, - }, - probe:: { - default():: - { - exec: {}, - httpGet: {}, - tcpSocket: {}, - }, - // One and only one of the following should be specified. Exec specifies the action to take. - exec(exec):: {exec+: exec}, - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - failureThreshold(failureThreshold):: {failureThreshold: failureThreshold}, - // HTTPGet specifies the http request to perform. - httpGet(httpGet):: {httpGet+: 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(initialDelaySeconds):: {initialDelaySeconds: initialDelaySeconds}, - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - periodSeconds(periodSeconds):: {periodSeconds: periodSeconds}, - // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. - successThreshold(successThreshold):: {successThreshold: successThreshold}, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket(tcpSocket):: {tcpSocket+: tcpSocket}, - // 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(timeoutSeconds):: {timeoutSeconds: timeoutSeconds}, - mixin:: { - exec:: { - local exec(mixin) = {exec+: mixin}, - command(command):: exec($.v1.execAction.command(command)), - }, - httpGet:: { - local httpGet(mixin) = {httpGet+: mixin}, - host(host):: httpGet($.v1.hTTPGetAction.host(host)), - httpHeaders(httpHeaders):: httpGet($.v1.hTTPGetAction.httpHeaders(httpHeaders)), - path(path):: httpGet($.v1.hTTPGetAction.path(path)), - port(port):: httpGet($.v1.hTTPGetAction.port(port)), - scheme(scheme):: httpGet($.v1.hTTPGetAction.scheme(scheme)), - }, - tcpSocket:: { - local tcpSocket(mixin) = {tcpSocket+: mixin}, - host(host):: tcpSocket($.v1.tCPSocketAction.host(host)), - port(port):: tcpSocket($.v1.tCPSocketAction.port(port)), - }, - }, - }, - projectedVolumeSource:: { - default(sources):: - { - sources: if std.type(sources) == "array" then sources else [sources], - }, - // Mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: defaultMode}, - // list of volume projections - sources(sources):: if std.type(sources) == "array" then {sources+: sources} else {sources+: [sources]}, - }, - quobyteVolumeSource:: { - default(registry, volume):: - { - registry: registry, - volume: volume, - }, - // Group to map volume access to Default is no group - group(group):: {group: group}, - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - readOnly(readOnly):: {readOnly: readOnly}, - // 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(registry):: {registry: registry}, - // User to map volume access to Defaults to serivceaccount user - user(user):: {user: user}, - // Volume is a string that references an already created Quobyte volume by name. - volume(volume):: {volume: volume}, - }, - rBDVolumeSource:: { - default(monitors, image):: - { - image: image, - monitors: if std.type(monitors) == "array" then monitors else [monitors], - secretRef: {}, - }, - // 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(fsType):: {fsType: fsType}, - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - image(image):: {image: image}, - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - keyring(keyring):: {keyring: keyring}, - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - pool(pool):: {pool: pool}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - readOnly(readOnly):: {readOnly: readOnly}, - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef(secretRef):: {secretRef+: secretRef}, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - user(user):: {user: user}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - resourceFieldSelector:: { - default(resource):: - { - resource: resource, - }, - // Container name: required for volumes, optional for env vars - containerName(containerName):: {containerName: containerName}, - // Specifies the output format of the exposed resources, defaults to "1" - divisor(divisor):: {divisor: divisor}, - // Required: resource to select - resource(resource):: {resource: resource}, - }, - resourceRequirements:: { - default():: - { - limits: {}, - requests: {}, - }, - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - limits(limits):: {limits+: 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-compute-resources-container/ - requests(requests):: {requests+: requests}, - }, - sELinuxOptions:: { - // Level is SELinux level label that applies to the container. - level(level):: {level: level}, - // Role is a SELinux role label that applies to the container. - role(role):: {role: role}, - // Type is a SELinux type label that applies to the container. - type(type):: {type: type}, - // User is a SELinux user label that applies to the container. - user(user):: {user: user}, - }, - scaleIOVolumeSource:: { - default(gateway, system, secretRef):: - { - gateway: gateway, - secretRef: secretRef, - system: system, - }, - // 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(fsType):: {fsType: fsType}, - // The host address of the ScaleIO API Gateway. - gateway(gateway):: {gateway: gateway}, - // The name of the Protection Domain for the configured storage (defaults to "default"). - protectionDomain(protectionDomain):: {protectionDomain: protectionDomain}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef(secretRef):: {secretRef+: secretRef}, - // Flag to enable/disable SSL communication with Gateway, default false - sslEnabled(sslEnabled):: {sslEnabled: sslEnabled}, - // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). - storageMode(storageMode):: {storageMode: storageMode}, - // The Storage Pool associated with the protection domain (defaults to "default"). - storagePool(storagePool):: {storagePool: storagePool}, - // The name of the storage system as configured in ScaleIO. - system(system):: {system: system}, - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - volumeName(volumeName):: {volumeName: volumeName}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - secretEnvSource:: { - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the Secret must be defined - optional(optional):: {optional: optional}, - }, - secretKeySelector:: { - default(key):: - { - key: key, - }, - // The key of the secret to select from. Must be a valid secret key. - key(key):: {key: key}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the Secret or it's key must be defined - optional(optional):: {optional: optional}, - }, - secretProjection:: { - default():: - { - items: [], - }, - // 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the Secret or its key must be defined - optional(optional):: {optional: optional}, - }, - secretVolumeSource:: { - default():: - { - items: [], - }, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - // Specify whether the Secret or it's keys must be defined - optional(optional):: {optional: optional}, - // Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - secretName(secretName):: {secretName: secretName}, - }, - securityContext:: { - default():: - { - capabilities: {}, - runAsUser: {}, - seLinuxOptions: {}, - }, - // The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. - capabilities(capabilities):: {capabilities+: capabilities}, - // Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. - privileged(privileged):: {privileged: privileged}, - // Whether this container has a read-only root filesystem. Default is false. - readOnlyRootFilesystem(readOnlyRootFilesystem):: {readOnlyRootFilesystem: readOnlyRootFilesystem}, - // 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(runAsNonRoot):: {runAsNonRoot: 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(runAsUser):: {runAsUser+: runAsUser}, - // 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):: {seLinuxOptions+: seLinuxOptions}, - mixin:: { - capabilities:: { - local capabilities(mixin) = {capabilities+: mixin}, - add(add):: capabilities($.v1.capabilities.add(add)), - drop(drop):: capabilities($.v1.capabilities.drop(drop)), - }, - seLinuxOptions:: { - local seLinuxOptions(mixin) = {seLinuxOptions+: mixin}, - level(level):: seLinuxOptions($.v1.sELinuxOptions.level(level)), - role(role):: seLinuxOptions($.v1.sELinuxOptions.role(role)), - type(type):: seLinuxOptions($.v1.sELinuxOptions.type(type)), - user(user):: seLinuxOptions($.v1.sELinuxOptions.user(user)), - }, - }, - }, - status:: { - local kind = {kind: "Status"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - details: {}, - }, - // Suggested HTTP return code for this status, 0 if not set. - code(code):: {code: 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(details):: {details+: details}, - // A human-readable description of the status of this operation. - message(message):: {message: message}, - // 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(reason):: {reason: reason}, - // Status of the operation. One of: "Success" or "Failure". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - status(status):: {status: status}, - mixin:: { - details:: { - local details(mixin) = {details+: mixin}, - causes(causes):: details($.v1.statusDetails.causes(causes)), - group(group):: details($.v1.statusDetails.group(group)), - name(name):: details($.v1.statusDetails.name(name)), - retryAfterSeconds(retryAfterSeconds):: details($.v1.statusDetails.retryAfterSeconds(retryAfterSeconds)), - uid(uid):: details($.v1.statusDetails.uid(uid)), - }, - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - statusCause:: { - // 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(field):: {field: field}, - // A human-readable description of the cause of the error. This field may be presented as-is to a reader. - message(message):: {message: message}, - // A machine-readable description of the cause of the error. If this value is empty there is no information available. - reason(reason):: {reason: reason}, - }, - statusDetails:: { - local kind = {kind: "StatusDetails"}, - default():: - kind + - { - causes: [], - }, - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then {causes+: causes} else {causes+: [causes]}, - // The group attribute of the resource associated with the status StatusReason. - group(group):: {group: group}, - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: {name: name}, - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: {retryAfterSeconds: 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(uid):: {uid: uid}, - }, - tCPSocketAction:: { - default(port):: - { - port: port, - }, - // Optional: Host name to connect to, defaults to the pod IP. - host(host):: {host: host}, - // 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(port):: {port: port}, - }, - toleration:: { - // Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - effect(effect):: {effect: 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(key):: {key: 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(operator):: {operator: 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(tolerationSeconds):: {tolerationSeconds: 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(value):: {value: value}, - }, - volume:: { - default(name):: - { - awsElasticBlockStore: {}, - azureDisk: {}, - azureFile: {}, - cephfs: {}, - cinder: {}, - configMap: {}, - downwardAPI: {}, - emptyDir: {}, - fc: {}, - flexVolume: {}, - flocker: {}, - gcePersistentDisk: {}, - gitRepo: {}, - glusterfs: {}, - hostPath: {}, - iscsi: {}, - name: name, - nfs: {}, - persistentVolumeClaim: {}, - photonPersistentDisk: {}, - portworxVolume: {}, - projected: {}, - quobyte: {}, - rbd: {}, - scaleIO: {}, - secret: {}, - vsphereVolume: {}, - }, - // 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(awsElasticBlockStore):: {awsElasticBlockStore+: awsElasticBlockStore}, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk(azureDisk):: {azureDisk+: azureDisk}, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile(azureFile):: {azureFile+: azureFile}, - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs(cephfs):: {cephfs+: cephfs}, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder(cinder):: {cinder+: cinder}, - // ConfigMap represents a configMap that should populate this volume - configMap(configMap):: {configMap+: configMap}, - // DownwardAPI represents downward API about the pod that should populate this volume - downwardAPI(downwardAPI):: {downwardAPI+: downwardAPI}, - // EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - emptyDir(emptyDir):: {emptyDir+: emptyDir}, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc(fc):: {fc+: fc}, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - flexVolume(flexVolume):: {flexVolume+: flexVolume}, - // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - flocker(flocker):: {flocker+: 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(gcePersistentDisk):: {gcePersistentDisk+: gcePersistentDisk}, - // GitRepo represents a git repository at a particular revision. - gitRepo(gitRepo):: {gitRepo+: gitRepo}, - // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs(glusterfs):: {glusterfs+: 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(hostPath):: {hostPath+: 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://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md - iscsi(iscsi):: {iscsi+: iscsi}, - // 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(name):: {name: name}, - // 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(nfs):: {nfs+: nfs}, - // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - persistentVolumeClaim(persistentVolumeClaim):: {persistentVolumeClaim+: persistentVolumeClaim}, - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk(photonPersistentDisk):: {photonPersistentDisk+: photonPersistentDisk}, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume(portworxVolume):: {portworxVolume+: portworxVolume}, - // Items for all in one resources secrets, configmaps, and downward API - projected(projected):: {projected+: projected}, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte(quobyte):: {quobyte+: quobyte}, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd(rbd):: {rbd+: rbd}, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIO(scaleIO):: {scaleIO+: scaleIO}, - // Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - secret(secret):: {secret+: secret}, - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume(vsphereVolume):: {vsphereVolume+: vsphereVolume}, - mixin:: { - awsElasticBlockStore:: { - local awsElasticBlockStore(mixin) = {awsElasticBlockStore+: mixin}, - fsType(fsType):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.fsType(fsType)), - partition(partition):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.partition(partition)), - readOnly(readOnly):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.readOnly(readOnly)), - volumeID(volumeID):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.volumeID(volumeID)), - }, - azureDisk:: { - local azureDisk(mixin) = {azureDisk+: mixin}, - cachingMode(cachingMode):: azureDisk($.v1.azureDiskVolumeSource.cachingMode(cachingMode)), - diskName(diskName):: azureDisk($.v1.azureDiskVolumeSource.diskName(diskName)), - diskURI(diskURI):: azureDisk($.v1.azureDiskVolumeSource.diskURI(diskURI)), - fsType(fsType):: azureDisk($.v1.azureDiskVolumeSource.fsType(fsType)), - readOnly(readOnly):: azureDisk($.v1.azureDiskVolumeSource.readOnly(readOnly)), - }, - azureFile:: { - local azureFile(mixin) = {azureFile+: mixin}, - readOnly(readOnly):: azureFile($.v1.azureFileVolumeSource.readOnly(readOnly)), - secretName(secretName):: azureFile($.v1.azureFileVolumeSource.secretName(secretName)), - shareName(shareName):: azureFile($.v1.azureFileVolumeSource.shareName(shareName)), - }, - cephfs:: { - local cephfs(mixin) = {cephfs+: mixin}, - monitors(monitors):: cephfs($.v1.cephFSVolumeSource.monitors(monitors)), - path(path):: cephfs($.v1.cephFSVolumeSource.path(path)), - readOnly(readOnly):: cephfs($.v1.cephFSVolumeSource.readOnly(readOnly)), - secretFile(secretFile):: cephfs($.v1.cephFSVolumeSource.secretFile(secretFile)), - secretRef(secretRef):: cephfs($.v1.cephFSVolumeSource.secretRef(secretRef)), - user(user):: cephfs($.v1.cephFSVolumeSource.user(user)), - }, - cinder:: { - local cinder(mixin) = {cinder+: mixin}, - fsType(fsType):: cinder($.v1.cinderVolumeSource.fsType(fsType)), - readOnly(readOnly):: cinder($.v1.cinderVolumeSource.readOnly(readOnly)), - volumeID(volumeID):: cinder($.v1.cinderVolumeSource.volumeID(volumeID)), - }, - configMap:: { - local configMap(mixin) = {configMap+: mixin}, - defaultMode(defaultMode):: configMap($.v1.configMapVolumeSource.defaultMode(defaultMode)), - items(items):: configMap($.v1.configMapVolumeSource.items(items)), - name(name):: configMap($.v1.configMapVolumeSource.name(name)), - optional(optional):: configMap($.v1.configMapVolumeSource.optional(optional)), - }, - downwardAPI:: { - local downwardAPI(mixin) = {downwardAPI+: mixin}, - defaultMode(defaultMode):: downwardAPI($.v1.downwardAPIVolumeSource.defaultMode(defaultMode)), - items(items):: downwardAPI($.v1.downwardAPIVolumeSource.items(items)), - }, - emptyDir:: { - local emptyDir(mixin) = {emptyDir+: mixin}, - medium(medium):: emptyDir($.v1.emptyDirVolumeSource.medium(medium)), - }, - fc:: { - local fc(mixin) = {fc+: mixin}, - fsType(fsType):: fc($.v1.fCVolumeSource.fsType(fsType)), - lun(lun):: fc($.v1.fCVolumeSource.lun(lun)), - readOnly(readOnly):: fc($.v1.fCVolumeSource.readOnly(readOnly)), - targetWWNs(targetWWNs):: fc($.v1.fCVolumeSource.targetWWNs(targetWWNs)), - }, - flexVolume:: { - local flexVolume(mixin) = {flexVolume+: mixin}, - driver(driver):: flexVolume($.v1.flexVolumeSource.driver(driver)), - fsType(fsType):: flexVolume($.v1.flexVolumeSource.fsType(fsType)), - options(options):: flexVolume($.v1.flexVolumeSource.options(options)), - readOnly(readOnly):: flexVolume($.v1.flexVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: flexVolume($.v1.flexVolumeSource.secretRef(secretRef)), - }, - flocker:: { - local flocker(mixin) = {flocker+: mixin}, - datasetName(datasetName):: flocker($.v1.flockerVolumeSource.datasetName(datasetName)), - datasetUUID(datasetUUID):: flocker($.v1.flockerVolumeSource.datasetUUID(datasetUUID)), - }, - gcePersistentDisk:: { - local gcePersistentDisk(mixin) = {gcePersistentDisk+: mixin}, - fsType(fsType):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.fsType(fsType)), - partition(partition):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.partition(partition)), - pdName(pdName):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.pdName(pdName)), - readOnly(readOnly):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.readOnly(readOnly)), - }, - gitRepo:: { - local gitRepo(mixin) = {gitRepo+: mixin}, - directory(directory):: gitRepo($.v1.gitRepoVolumeSource.directory(directory)), - repository(repository):: gitRepo($.v1.gitRepoVolumeSource.repository(repository)), - revision(revision):: gitRepo($.v1.gitRepoVolumeSource.revision(revision)), - }, - glusterfs:: { - local glusterfs(mixin) = {glusterfs+: mixin}, - endpoints(endpoints):: glusterfs($.v1.glusterfsVolumeSource.endpoints(endpoints)), - path(path):: glusterfs($.v1.glusterfsVolumeSource.path(path)), - readOnly(readOnly):: glusterfs($.v1.glusterfsVolumeSource.readOnly(readOnly)), - }, - hostPath:: { - local hostPath(mixin) = {hostPath+: mixin}, - path(path):: hostPath($.v1.hostPathVolumeSource.path(path)), - }, - iscsi:: { - local iscsi(mixin) = {iscsi+: mixin}, - chapAuthDiscovery(chapAuthDiscovery):: iscsi($.v1.iSCSIVolumeSource.chapAuthDiscovery(chapAuthDiscovery)), - chapAuthSession(chapAuthSession):: iscsi($.v1.iSCSIVolumeSource.chapAuthSession(chapAuthSession)), - fsType(fsType):: iscsi($.v1.iSCSIVolumeSource.fsType(fsType)), - iqn(iqn):: iscsi($.v1.iSCSIVolumeSource.iqn(iqn)), - iscsiInterface(iscsiInterface):: iscsi($.v1.iSCSIVolumeSource.iscsiInterface(iscsiInterface)), - lun(lun):: iscsi($.v1.iSCSIVolumeSource.lun(lun)), - portals(portals):: iscsi($.v1.iSCSIVolumeSource.portals(portals)), - readOnly(readOnly):: iscsi($.v1.iSCSIVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: iscsi($.v1.iSCSIVolumeSource.secretRef(secretRef)), - targetPortal(targetPortal):: iscsi($.v1.iSCSIVolumeSource.targetPortal(targetPortal)), - }, - nfs:: { - local nfs(mixin) = {nfs+: mixin}, - path(path):: nfs($.v1.nFSVolumeSource.path(path)), - readOnly(readOnly):: nfs($.v1.nFSVolumeSource.readOnly(readOnly)), - server(server):: nfs($.v1.nFSVolumeSource.server(server)), - }, - persistentVolumeClaim:: { - local persistentVolumeClaim(mixin) = {persistentVolumeClaim+: mixin}, - claimName(claimName):: persistentVolumeClaim($.v1.persistentVolumeClaimVolumeSource.claimName(claimName)), - readOnly(readOnly):: persistentVolumeClaim($.v1.persistentVolumeClaimVolumeSource.readOnly(readOnly)), - }, - photonPersistentDisk:: { - local photonPersistentDisk(mixin) = {photonPersistentDisk+: mixin}, - fsType(fsType):: photonPersistentDisk($.v1.photonPersistentDiskVolumeSource.fsType(fsType)), - pdID(pdID):: photonPersistentDisk($.v1.photonPersistentDiskVolumeSource.pdID(pdID)), - }, - portworxVolume:: { - local portworxVolume(mixin) = {portworxVolume+: mixin}, - fsType(fsType):: portworxVolume($.v1.portworxVolumeSource.fsType(fsType)), - readOnly(readOnly):: portworxVolume($.v1.portworxVolumeSource.readOnly(readOnly)), - volumeID(volumeID):: portworxVolume($.v1.portworxVolumeSource.volumeID(volumeID)), - }, - projected:: { - local projected(mixin) = {projected+: mixin}, - defaultMode(defaultMode):: projected($.v1.projectedVolumeSource.defaultMode(defaultMode)), - sources(sources):: projected($.v1.projectedVolumeSource.sources(sources)), - }, - quobyte:: { - local quobyte(mixin) = {quobyte+: mixin}, - group(group):: quobyte($.v1.quobyteVolumeSource.group(group)), - readOnly(readOnly):: quobyte($.v1.quobyteVolumeSource.readOnly(readOnly)), - registry(registry):: quobyte($.v1.quobyteVolumeSource.registry(registry)), - user(user):: quobyte($.v1.quobyteVolumeSource.user(user)), - volume(volume):: quobyte($.v1.quobyteVolumeSource.volume(volume)), - }, - rbd:: { - local rbd(mixin) = {rbd+: mixin}, - fsType(fsType):: rbd($.v1.rBDVolumeSource.fsType(fsType)), - image(image):: rbd($.v1.rBDVolumeSource.image(image)), - keyring(keyring):: rbd($.v1.rBDVolumeSource.keyring(keyring)), - monitors(monitors):: rbd($.v1.rBDVolumeSource.monitors(monitors)), - pool(pool):: rbd($.v1.rBDVolumeSource.pool(pool)), - readOnly(readOnly):: rbd($.v1.rBDVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: rbd($.v1.rBDVolumeSource.secretRef(secretRef)), - user(user):: rbd($.v1.rBDVolumeSource.user(user)), - }, - scaleIO:: { - local scaleIO(mixin) = {scaleIO+: mixin}, - fsType(fsType):: scaleIO($.v1.scaleIOVolumeSource.fsType(fsType)), - gateway(gateway):: scaleIO($.v1.scaleIOVolumeSource.gateway(gateway)), - protectionDomain(protectionDomain):: scaleIO($.v1.scaleIOVolumeSource.protectionDomain(protectionDomain)), - readOnly(readOnly):: scaleIO($.v1.scaleIOVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: scaleIO($.v1.scaleIOVolumeSource.secretRef(secretRef)), - sslEnabled(sslEnabled):: scaleIO($.v1.scaleIOVolumeSource.sslEnabled(sslEnabled)), - storageMode(storageMode):: scaleIO($.v1.scaleIOVolumeSource.storageMode(storageMode)), - storagePool(storagePool):: scaleIO($.v1.scaleIOVolumeSource.storagePool(storagePool)), - system(system):: scaleIO($.v1.scaleIOVolumeSource.system(system)), - volumeName(volumeName):: scaleIO($.v1.scaleIOVolumeSource.volumeName(volumeName)), - }, - secret:: { - local secret(mixin) = {secret+: mixin}, - defaultMode(defaultMode):: secret($.v1.secretVolumeSource.defaultMode(defaultMode)), - items(items):: secret($.v1.secretVolumeSource.items(items)), - optional(optional):: secret($.v1.secretVolumeSource.optional(optional)), - secretName(secretName):: secret($.v1.secretVolumeSource.secretName(secretName)), - }, - vsphereVolume:: { - local vsphereVolume(mixin) = {vsphereVolume+: mixin}, - fsType(fsType):: vsphereVolume($.v1.vsphereVirtualDiskVolumeSource.fsType(fsType)), - volumePath(volumePath):: vsphereVolume($.v1.vsphereVirtualDiskVolumeSource.volumePath(volumePath)), - }, - }, - }, - volumeMount:: { - default(name, mountPath):: - { - mountPath: mountPath, - name: name, - }, - // Path within the container at which the volume should be mounted. Must not contain ':'. - mountPath(mountPath):: {mountPath: mountPath}, - // This must match the Name of a Volume. - name(name):: {name: name}, - // Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - readOnly(readOnly):: {readOnly: readOnly}, - // Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). - subPath(subPath):: {subPath: subPath}, - }, - volumeProjection:: { - default():: - { - configMap: {}, - downwardAPI: {}, - secret: {}, - }, - // information about the configMap data to project - configMap(configMap):: {configMap+: configMap}, - // information about the downwardAPI data to project - downwardAPI(downwardAPI):: {downwardAPI+: downwardAPI}, - // information about the secret data to project - secret(secret):: {secret+: secret}, - mixin:: { - configMap:: { - local configMap(mixin) = {configMap+: mixin}, - items(items):: configMap($.v1.configMapProjection.items(items)), - name(name):: configMap($.v1.configMapProjection.name(name)), - optional(optional):: configMap($.v1.configMapProjection.optional(optional)), - }, - downwardAPI:: { - local downwardAPI(mixin) = {downwardAPI+: mixin}, - items(items):: downwardAPI($.v1.downwardAPIProjection.items(items)), - }, - secret:: { - local secret(mixin) = {secret+: mixin}, - items(items):: secret($.v1.secretProjection.items(items)), - name(name):: secret($.v1.secretProjection.name(name)), - optional(optional):: secret($.v1.secretProjection.optional(optional)), - }, - }, - }, - vsphereVirtualDiskVolumeSource:: { - default(volumePath):: - { - volumePath: 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(fsType):: {fsType: fsType}, - // Path that identifies vSphere volume vmdk - volumePath(volumePath):: {volumePath: volumePath}, - }, - watchEvent:: { - default(type, object):: - { - object: object, - type: type, - }, - // - object(object):: {object: object}, - // - type(type):: {type: type}, - }, - weightedPodAffinityTerm:: { - default(weight, podAffinityTerm):: - { - podAffinityTerm: podAffinityTerm, - weight: weight, - }, - // Required. A pod affinity term, associated with the corresponding weight. - podAffinityTerm(podAffinityTerm):: {podAffinityTerm+: podAffinityTerm}, - // weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - weight(weight):: {weight: weight}, - mixin:: { - podAffinityTerm:: { - local podAffinityTerm(mixin) = {podAffinityTerm+: mixin}, - labelSelector(labelSelector):: podAffinityTerm($.v1.podAffinityTerm.labelSelector(labelSelector)), - namespaces(namespaces):: podAffinityTerm($.v1.podAffinityTerm.namespaces(namespaces)), - topologyKey(topologyKey):: podAffinityTerm($.v1.podAffinityTerm.topologyKey(topologyKey)), - }, - }, - }, - }, - v1beta1:: { - deployment:: { - local kind = {kind: "Deployment"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // Specification of the desired behavior of the Deployment. - spec(spec):: {spec+: spec}, - // Most recently observed status of the Deployment. - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - minReadySeconds(minReadySeconds):: spec($.v1beta1.deploymentSpec.minReadySeconds(minReadySeconds)), - paused(paused):: spec($.v1beta1.deploymentSpec.paused(paused)), - progressDeadlineSeconds(progressDeadlineSeconds):: spec($.v1beta1.deploymentSpec.progressDeadlineSeconds(progressDeadlineSeconds)), - replicas(replicas):: spec($.v1beta1.deploymentSpec.replicas(replicas)), - revisionHistoryLimit(revisionHistoryLimit):: spec($.v1beta1.deploymentSpec.revisionHistoryLimit(revisionHistoryLimit)), - rollbackTo(rollbackTo):: spec($.v1beta1.deploymentSpec.rollbackTo(rollbackTo)), - selector(selector):: spec($.v1beta1.deploymentSpec.selector(selector)), - strategy(strategy):: spec($.v1beta1.deploymentSpec.strategy(strategy)), - template(template):: spec($.v1beta1.deploymentSpec.template(template)), - }, - status:: { - local status(mixin) = {status+: mixin}, - availableReplicas(availableReplicas):: status($.v1beta1.deploymentStatus.availableReplicas(availableReplicas)), - conditions(conditions):: status($.v1beta1.deploymentStatus.conditions(conditions)), - observedGeneration(observedGeneration):: status($.v1beta1.deploymentStatus.observedGeneration(observedGeneration)), - readyReplicas(readyReplicas):: status($.v1beta1.deploymentStatus.readyReplicas(readyReplicas)), - replicas(replicas):: status($.v1beta1.deploymentStatus.replicas(replicas)), - unavailableReplicas(unavailableReplicas):: status($.v1beta1.deploymentStatus.unavailableReplicas(unavailableReplicas)), - updatedReplicas(updatedReplicas):: status($.v1beta1.deploymentStatus.updatedReplicas(updatedReplicas)), - }, - }, - }, - deploymentCondition:: { - default(type, status):: - { - status: status, - type: type, - }, - // Last time the condition transitioned from one status to another. - lastTransitionTime(lastTransitionTime):: {lastTransitionTime: lastTransitionTime}, - // The last time this condition was updated. - lastUpdateTime(lastUpdateTime):: {lastUpdateTime: lastUpdateTime}, - // A human readable message indicating details about the transition. - message(message):: {message: message}, - // The reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Status of the condition, one of True, False, Unknown. - status(status):: {status: status}, - // Type of deployment condition. - type(type):: {type: type}, - }, - deploymentList:: { - local kind = {kind: "DeploymentList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // Items is the list of Deployments. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - deploymentRollback:: { - local kind = {kind: "DeploymentRollback"}, - default(name, rollbackTo):: - apiVersion + - kind + - { - name: name, - rollbackTo: rollbackTo, - updatedAnnotations: {}, - }, - // Required: This must match the Name of a deployment. - name(name):: {name: name}, - // The config of this deployment rollback. - rollbackTo(rollbackTo):: {rollbackTo+: rollbackTo}, - // The annotations to be updated to a deployment - updatedAnnotations(updatedAnnotations):: {updatedAnnotations+: updatedAnnotations}, - mixin:: { - rollbackTo:: { - local rollbackTo(mixin) = {rollbackTo+: mixin}, - revision(revision):: rollbackTo($.v1beta1.rollbackConfig.revision(revision)), - }, - }, - }, - deploymentSpec:: { - default(template):: - { - rollbackTo: {}, - selector: {}, - strategy: {}, - template: 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(minReadySeconds):: {minReadySeconds: minReadySeconds}, - // Indicates that the deployment is paused. - paused(paused):: {paused: 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. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. - progressDeadlineSeconds(progressDeadlineSeconds):: {progressDeadlineSeconds: progressDeadlineSeconds}, - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - replicas(replicas):: {replicas: 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 2. - revisionHistoryLimit(revisionHistoryLimit):: {revisionHistoryLimit: revisionHistoryLimit}, - // The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo(rollbackTo):: {rollbackTo+: rollbackTo}, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector(selector):: {selector+: selector}, - // The deployment strategy to use to replace existing pods with new ones. - strategy(strategy):: {strategy+: strategy}, - // Template describes the pods that will be created. - template(template):: {template+: template}, - mixin:: { - rollbackTo:: { - local rollbackTo(mixin) = {rollbackTo+: mixin}, - revision(revision):: rollbackTo($.v1beta1.rollbackConfig.revision(revision)), - }, - selector:: { - local selector(mixin) = {selector+: mixin}, - matchExpressions(matchExpressions):: selector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: selector($.v1.labelSelector.matchLabels(matchLabels)), - }, - strategy:: { - local strategy(mixin) = {strategy+: mixin}, - rollingUpdate(rollingUpdate):: strategy($.v1beta1.deploymentStrategy.rollingUpdate(rollingUpdate)), - type(type):: strategy($.v1beta1.deploymentStrategy.type(type)), - }, - template:: { - local template(mixin) = {template+: mixin}, - spec(spec):: template($.v1.podTemplateSpec.spec(spec)), - }, - }, - }, - deploymentStatus:: { - default():: - { - conditions: [], - }, - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - availableReplicas(availableReplicas):: {availableReplicas: availableReplicas}, - // Represents the latest available observations of a deployment's current state. - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - // The generation observed by the deployment controller. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - // Total number of ready pods targeted by this deployment. - readyReplicas(readyReplicas):: {readyReplicas: readyReplicas}, - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - replicas(replicas):: {replicas: replicas}, - // Total number of unavailable pods targeted by this deployment. - unavailableReplicas(unavailableReplicas):: {unavailableReplicas: unavailableReplicas}, - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - updatedReplicas(updatedReplicas):: {updatedReplicas: updatedReplicas}, - }, - deploymentStrategy:: { - default():: - { - rollingUpdate: {}, - }, - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate(rollingUpdate):: {rollingUpdate+: rollingUpdate}, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - type(type):: {type: type}, - mixin:: { - rollingUpdate:: { - local rollingUpdate(mixin) = {rollingUpdate+: mixin}, - maxSurge(maxSurge):: rollingUpdate($.v1beta1.rollingUpdateDeployment.maxSurge(maxSurge)), - maxUnavailable(maxUnavailable):: rollingUpdate($.v1beta1.rollingUpdateDeployment.maxUnavailable(maxUnavailable)), - }, - }, - }, - rollbackConfig:: { - // The revision to rollback to. If set to 0, rollbck to the last revision. - revision(revision):: {revision: revision}, - }, - rollingUpdateDeployment:: { - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - maxSurge(maxSurge):: {maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - maxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, - }, - scale:: { - local kind = {kind: "Scale"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - spec(spec):: {spec+: spec}, - // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - replicas(replicas):: spec($.v1beta1.scaleSpec.replicas(replicas)), - }, - status:: { - local status(mixin) = {status+: mixin}, - replicas(replicas):: status($.v1beta1.scaleStatus.replicas(replicas)), - selector(selector):: status($.v1beta1.scaleStatus.selector(selector)), - targetSelector(targetSelector):: status($.v1beta1.scaleStatus.targetSelector(targetSelector)), - }, - }, - }, - scaleSpec:: { - // desired number of instances for the scaled object. - replicas(replicas):: {replicas: replicas}, - }, - scaleStatus:: { - default(replicas):: - { - replicas: replicas, - selector: {}, - }, - // actual number of observed instances of the scaled object. - replicas(replicas):: {replicas: replicas}, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - selector(selector):: {selector+: selector}, - // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - targetSelector(targetSelector):: {targetSelector: targetSelector}, - }, - statefulSet:: { - local kind = {kind: "StatefulSet"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // Spec defines the desired identities of pods in this set. - spec(spec):: {spec+: spec}, - // Status is the current status of Pods in this StatefulSet. This data may be out of date by some window of time. - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - replicas(replicas):: spec($.v1beta1.statefulSetSpec.replicas(replicas)), - selector(selector):: spec($.v1beta1.statefulSetSpec.selector(selector)), - serviceName(serviceName):: spec($.v1beta1.statefulSetSpec.serviceName(serviceName)), - template(template):: spec($.v1beta1.statefulSetSpec.template(template)), - volumeClaimTemplates(volumeClaimTemplates):: spec($.v1beta1.statefulSetSpec.volumeClaimTemplates(volumeClaimTemplates)), - }, - status:: { - local status(mixin) = {status+: mixin}, - observedGeneration(observedGeneration):: status($.v1beta1.statefulSetStatus.observedGeneration(observedGeneration)), - replicas(replicas):: status($.v1beta1.statefulSetStatus.replicas(replicas)), - }, - }, - }, - statefulSetList:: { - local kind = {kind: "StatefulSetList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - statefulSetSpec:: { - default(template, serviceName):: - { - selector: {}, - serviceName: serviceName, - template: template, - volumeClaimTemplates: [], - }, - // 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(replicas):: {replicas: replicas}, - // Selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector(selector):: {selector+: 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(serviceName):: {serviceName: 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(template):: {template+: template}, - // 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(volumeClaimTemplates):: if std.type(volumeClaimTemplates) == "array" then {volumeClaimTemplates+: volumeClaimTemplates} else {volumeClaimTemplates+: [volumeClaimTemplates]}, - mixin:: { - selector:: { - local selector(mixin) = {selector+: mixin}, - matchExpressions(matchExpressions):: selector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: selector($.v1.labelSelector.matchLabels(matchLabels)), - }, - template:: { - local template(mixin) = {template+: mixin}, - spec(spec):: template($.v1.podTemplateSpec.spec(spec)), - }, - }, - }, - statefulSetStatus:: { - default(replicas):: - { - replicas: replicas, - }, - // most recent generation observed by this StatefulSet. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - // Replicas is the number of actual replicas. - replicas(replicas):: {replicas: replicas}, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/core.v1.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/core.v1.libsonnet deleted file mode 100644 index fb88d697..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/core.v1.libsonnet +++ /dev/null @@ -1,4036 +0,0 @@ -{ - local apiVersion = {apiVersion: "v1"}, - local defaultMetadata(name, namespace) = {metadata: $.v1.objectMeta.name(name) + $.v1.objectMeta.namespace(namespace)}, - types:: { - uID:: { - }, - unixGroupID:: { - }, - unixUserID:: { - }, - }, - v1:: { - aPIResource:: { - local kind = {kind: "APIResource"}, - default(name, singularName, namespaced, verbs):: - kind + - { - name: name, - namespaced: namespaced, - shortNames: [], - singularName: singularName, - verbs: if std.type(verbs) == "array" then verbs else [verbs], - }, - // name is the plural name of the resource. - name(name):: {name: name}, - // namespaced indicates if a resource is namespaced or not. - namespaced(namespaced):: {namespaced: namespaced}, - // shortNames is a list of suggested short names of the resource. - shortNames(shortNames):: if std.type(shortNames) == "array" then {shortNames+: shortNames} else {shortNames+: [shortNames]}, - // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface. - singularName(singularName):: {singularName: singularName}, - // verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) - verbs(verbs):: if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - }, - aPIResourceList:: { - local kind = {kind: "APIResourceList"}, - default(groupVersion, resources):: - apiVersion + - kind + - { - groupVersion: groupVersion, - resources: if std.type(resources) == "array" then resources else [resources], - }, - // groupVersion is the group and version this APIResourceList is for. - groupVersion(groupVersion):: {groupVersion: groupVersion}, - // resources contains the name of the resources and if they are namespaced. - resources(resources):: if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - }, - aWSElasticBlockStoreVolumeSource:: { - default(volumeID):: - { - volumeID: 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(fsType):: {fsType: 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(partition):: {partition: 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(readOnly):: {readOnly: readOnly}, - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - volumeID(volumeID):: {volumeID: volumeID}, - }, - affinity:: { - default():: - { - nodeAffinity: {}, - podAffinity: {}, - podAntiAffinity: {}, - }, - // Describes node affinity scheduling rules for the pod. - nodeAffinity(nodeAffinity):: {nodeAffinity+: 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):: {podAffinity+: 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):: {podAntiAffinity+: podAntiAffinity}, - mixin:: { - nodeAffinity:: { - local nodeAffinity(mixin) = {nodeAffinity+: mixin}, - preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: nodeAffinity($.v1.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution)), - requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: nodeAffinity($.v1.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution)), - }, - podAffinity:: { - local podAffinity(mixin) = {podAffinity+: mixin}, - preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: podAffinity($.v1.podAffinity.preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution)), - requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: podAffinity($.v1.podAffinity.requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution)), - }, - podAntiAffinity:: { - local podAntiAffinity(mixin) = {podAntiAffinity+: mixin}, - preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: podAntiAffinity($.v1.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution)), - requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: podAntiAffinity($.v1.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution)), - }, - }, - }, - attachedVolume:: { - default(name, devicePath):: - { - devicePath: devicePath, - name: name, - }, - // DevicePath represents the device path where the volume should be available - devicePath(devicePath):: {devicePath: devicePath}, - // Name of the attached volume - name(name):: {name: name}, - }, - azureDataDiskCachingMode:: { - }, - azureDataDiskKind:: { - }, - azureDiskVolumeSource:: { - local kind = {kind: "AzureDiskVolumeSource"}, - default(diskName, diskURI):: - kind + - { - cachingMode: {}, - diskName: diskName, - diskURI: diskURI, - kind: {}, - }, - // Host Caching mode: None, Read Only, Read Write. - cachingMode(cachingMode):: {cachingMode+: cachingMode}, - // The Name of the data disk in the blob storage - diskName(diskName):: {diskName: diskName}, - // The URI the data disk in the blob storage - diskURI(diskURI):: {diskURI: diskURI}, - // 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(fsType):: {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - }, - azureFileVolumeSource:: { - default(secretName, shareName):: - { - secretName: secretName, - shareName: shareName, - }, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // the name of secret that contains Azure Storage Account Name and Key - secretName(secretName):: {secretName: secretName}, - // Share Name - shareName(shareName):: {shareName: shareName}, - }, - binding:: { - local kind = {kind: "Binding"}, - default(name, target, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - target: target, - }, - // The target object that you want to bind to the standard object. - target(target):: {target+: target}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - target:: { - local target(mixin) = {target+: mixin}, - fieldPath(fieldPath):: target($.v1.objectReference.fieldPath(fieldPath)), - name(name):: target($.v1.objectReference.name(name)), - namespace(namespace):: target($.v1.objectReference.namespace(namespace)), - resourceVersion(resourceVersion):: target($.v1.objectReference.resourceVersion(resourceVersion)), - uid(uid):: target($.v1.objectReference.uid(uid)), - }, - }, - }, - capabilities:: { - default():: - { - add: [], - drop: [], - }, - // Added capabilities - add(add):: if std.type(add) == "array" then {add+: add} else {add+: [add]}, - // Removed capabilities - drop(drop):: if std.type(drop) == "array" then {drop+: drop} else {drop+: [drop]}, - }, - capability:: { - }, - cephFSVolumeSource:: { - default(monitors):: - { - monitors: if std.type(monitors) == "array" then monitors else [monitors], - secretRef: {}, - }, - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - path(path):: {path: path}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - readOnly(readOnly):: {readOnly: readOnly}, - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretFile(secretFile):: {secretFile: secretFile}, - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef(secretRef):: {secretRef+: secretRef}, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - user(user):: {user: user}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - cinderVolumeSource:: { - default(volumeID):: - { - volumeID: 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - fsType(fsType):: {fsType: fsType}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - readOnly(readOnly):: {readOnly: readOnly}, - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - volumeID(volumeID):: {volumeID: volumeID}, - }, - componentCondition:: { - default(type, status):: - { - status: status, - type: type, - }, - // Condition error code for a component. For example, a health check error code. - errorCondition(errorCondition):: {"error": errorCondition}, - // Message about the condition for a component. For example, information about a health check. - message(message):: {message: message}, - // Status of the condition for a component. Valid values for "Healthy": "True", "False", or "Unknown". - status(status):: {status: status}, - // Type of condition for a component. Valid value: "Healthy" - type(type):: {type: type}, - }, - componentStatus:: { - local kind = {kind: "ComponentStatus"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - conditions: [], - }, - // List of component conditions observed - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - }, - }, - componentStatusList:: { - local kind = {kind: "ComponentStatusList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // List of ComponentStatus objects. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - configMap:: { - local kind = {kind: "ConfigMap"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - data: {}, - }, - // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. - data(data):: {data+: data}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - }, - }, - configMapEnvSource:: { - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap must be defined - optional(optional):: {optional: optional}, - }, - configMapKeySelector:: { - default(key):: - { - key: key, - }, - // The key to select. - key(key):: {key: key}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap or it's key must be defined - optional(optional):: {optional: optional}, - }, - configMapList:: { - local kind = {kind: "ConfigMapList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // Items is the list of ConfigMaps. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - configMapProjection:: { - default():: - { - items: [], - }, - // 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap or it's keys must be defined - optional(optional):: {optional: optional}, - }, - configMapVolumeSource:: { - default():: - { - items: [], - }, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap or it's keys must be defined - optional(optional):: {optional: optional}, - }, - container:: { - default(name):: - { - args: [], - command: [], - env: [], - envFrom: [], - lifecycle: {}, - livenessProbe: {}, - name: name, - ports: [], - readinessProbe: {}, - resources: {}, - securityContext: {}, - volumeMounts: [], - }, - // 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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(args):: if std.type(args) == "array" then {args+: args} else {args+: [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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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(command):: if std.type(command) == "array" then {command+: command} else {command+: [command]}, - // List of environment variables to set in the container. Cannot be updated. - env(env):: if std.type(env) == "array" then {env+: env} else {env+: [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(envFrom):: if std.type(envFrom) == "array" then {envFrom+: envFrom} else {envFrom+: [envFrom]}, - // Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images - image(image):: {image: 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(imagePullPolicy):: {imagePullPolicy: imagePullPolicy}, - // Actions that the management system should take in response to container lifecycle events. Cannot be updated. - lifecycle(lifecycle):: {lifecycle+: 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(livenessProbe):: {livenessProbe+: livenessProbe}, - // 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(name):: {name: name}, - // 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(ports):: if std.type(ports) == "array" then {ports+: ports} else {ports+: [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(readinessProbe):: {readinessProbe+: readinessProbe}, - // Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources(resources):: {resources+: resources}, - // Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/security_context.md - securityContext(securityContext):: {securityContext+: securityContext}, - // 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(stdin):: {stdin: 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(stdinOnce):: {stdinOnce: 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(terminationMessagePath):: {terminationMessagePath: 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(terminationMessagePolicy):: {terminationMessagePolicy: terminationMessagePolicy}, - // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. - tty(tty):: {tty: tty}, - // Pod volumes to mount into the container's filesystem. Cannot be updated. - volumeMounts(volumeMounts):: if std.type(volumeMounts) == "array" then {volumeMounts+: volumeMounts} else {volumeMounts+: [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(workingDir):: {workingDir: workingDir}, - mixin:: { - lifecycle:: { - local lifecycle(mixin) = {lifecycle+: mixin}, - postStart(postStart):: lifecycle($.v1.lifecycle.postStart(postStart)), - preStop(preStop):: lifecycle($.v1.lifecycle.preStop(preStop)), - }, - livenessProbe:: { - local livenessProbe(mixin) = {livenessProbe+: mixin}, - exec(exec):: livenessProbe($.v1.probe.exec(exec)), - failureThreshold(failureThreshold):: livenessProbe($.v1.probe.failureThreshold(failureThreshold)), - httpGet(httpGet):: livenessProbe($.v1.probe.httpGet(httpGet)), - initialDelaySeconds(initialDelaySeconds):: livenessProbe($.v1.probe.initialDelaySeconds(initialDelaySeconds)), - periodSeconds(periodSeconds):: livenessProbe($.v1.probe.periodSeconds(periodSeconds)), - successThreshold(successThreshold):: livenessProbe($.v1.probe.successThreshold(successThreshold)), - tcpSocket(tcpSocket):: livenessProbe($.v1.probe.tcpSocket(tcpSocket)), - timeoutSeconds(timeoutSeconds):: livenessProbe($.v1.probe.timeoutSeconds(timeoutSeconds)), - }, - readinessProbe:: { - local readinessProbe(mixin) = {readinessProbe+: mixin}, - exec(exec):: readinessProbe($.v1.probe.exec(exec)), - failureThreshold(failureThreshold):: readinessProbe($.v1.probe.failureThreshold(failureThreshold)), - httpGet(httpGet):: readinessProbe($.v1.probe.httpGet(httpGet)), - initialDelaySeconds(initialDelaySeconds):: readinessProbe($.v1.probe.initialDelaySeconds(initialDelaySeconds)), - periodSeconds(periodSeconds):: readinessProbe($.v1.probe.periodSeconds(periodSeconds)), - successThreshold(successThreshold):: readinessProbe($.v1.probe.successThreshold(successThreshold)), - tcpSocket(tcpSocket):: readinessProbe($.v1.probe.tcpSocket(tcpSocket)), - timeoutSeconds(timeoutSeconds):: readinessProbe($.v1.probe.timeoutSeconds(timeoutSeconds)), - }, - resources:: { - local resources(mixin) = {resources+: mixin}, - limits(limits):: resources($.v1.resourceRequirements.limits(limits)), - requests(requests):: resources($.v1.resourceRequirements.requests(requests)), - }, - securityContext:: { - local securityContext(mixin) = {securityContext+: mixin}, - capabilities(capabilities):: securityContext($.v1.securityContext.capabilities(capabilities)), - privileged(privileged):: securityContext($.v1.securityContext.privileged(privileged)), - readOnlyRootFilesystem(readOnlyRootFilesystem):: securityContext($.v1.securityContext.readOnlyRootFilesystem(readOnlyRootFilesystem)), - runAsNonRoot(runAsNonRoot):: securityContext($.v1.securityContext.runAsNonRoot(runAsNonRoot)), - runAsUser(runAsUser):: securityContext($.v1.securityContext.runAsUser(runAsUser)), - seLinuxOptions(seLinuxOptions):: securityContext($.v1.securityContext.seLinuxOptions(seLinuxOptions)), - }, - }, - }, - containerImage:: { - default(names):: - { - names: if std.type(names) == "array" then names else [names], - }, - // Names by which this image is known. e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"] - names(names):: if std.type(names) == "array" then {names+: names} else {names+: [names]}, - // The size of the image in bytes. - sizeBytes(sizeBytes):: {sizeBytes: sizeBytes}, - }, - containerPort:: { - default(containerPort):: - { - containerPort: containerPort, - }, - // Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. - containerPort(containerPort):: {containerPort: containerPort}, - // What host IP to bind the external port to. - hostIP(hostIP):: {hostIP: 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(hostPort):: {hostPort: 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(name):: {name: name}, - // Protocol for port. Must be UDP or TCP. Defaults to "TCP". - protocol(protocol):: {protocol: protocol}, - }, - containerState:: { - default():: - { - running: {}, - terminated: {}, - waiting: {}, - }, - // Details about a running container - running(running):: {running+: running}, - // Details about a terminated container - terminated(terminated):: {terminated+: terminated}, - // Details about a waiting container - waiting(waiting):: {waiting+: waiting}, - mixin:: { - running:: { - local running(mixin) = {running+: mixin}, - startedAt(startedAt):: running($.v1.containerStateRunning.startedAt(startedAt)), - }, - terminated:: { - local terminated(mixin) = {terminated+: mixin}, - containerID(containerID):: terminated($.v1.containerStateTerminated.containerID(containerID)), - exitCode(exitCode):: terminated($.v1.containerStateTerminated.exitCode(exitCode)), - finishedAt(finishedAt):: terminated($.v1.containerStateTerminated.finishedAt(finishedAt)), - message(message):: terminated($.v1.containerStateTerminated.message(message)), - reason(reason):: terminated($.v1.containerStateTerminated.reason(reason)), - signal(signal):: terminated($.v1.containerStateTerminated.signal(signal)), - startedAt(startedAt):: terminated($.v1.containerStateTerminated.startedAt(startedAt)), - }, - waiting:: { - local waiting(mixin) = {waiting+: mixin}, - message(message):: waiting($.v1.containerStateWaiting.message(message)), - reason(reason):: waiting($.v1.containerStateWaiting.reason(reason)), - }, - }, - }, - containerStateRunning:: { - // Time at which the container was last (re-)started - startedAt(startedAt):: {startedAt: startedAt}, - }, - containerStateTerminated:: { - default(exitCode):: - { - exitCode: exitCode, - }, - // Container's ID in the format 'docker://' - containerID(containerID):: {containerID: containerID}, - // Exit status from the last termination of the container - exitCode(exitCode):: {exitCode: exitCode}, - // Time at which the container last terminated - finishedAt(finishedAt):: {finishedAt: finishedAt}, - // Message regarding the last termination of the container - message(message):: {message: message}, - // (brief) reason from the last termination of the container - reason(reason):: {reason: reason}, - // Signal from the last termination of the container - signal(signal):: {signal: signal}, - // Time at which previous execution of the container started - startedAt(startedAt):: {startedAt: startedAt}, - }, - containerStateWaiting:: { - // Message regarding why the container is not yet running. - message(message):: {message: message}, - // (brief) reason the container is not yet running. - reason(reason):: {reason: reason}, - }, - containerStatus:: { - default(name, ready, restartCount, image, imageID):: - { - image: image, - imageID: imageID, - lastState: {}, - name: name, - ready: ready, - restartCount: restartCount, - state: {}, - }, - // Container's ID in the format 'docker://'. - containerID(containerID):: {containerID: containerID}, - // The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images - image(image):: {image: image}, - // ImageID of the container's image. - imageID(imageID):: {imageID: imageID}, - // Details about the container's last termination condition. - lastState(lastState):: {lastState+: lastState}, - // This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated. - name(name):: {name: name}, - // Specifies whether the container has passed its readiness probe. - ready(ready):: {ready: ready}, - // The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC. - restartCount(restartCount):: {restartCount: restartCount}, - // Details about the container's current condition. - state(state):: {state+: state}, - mixin:: { - lastState:: { - local lastState(mixin) = {lastState+: mixin}, - running(running):: lastState($.v1.containerState.running(running)), - terminated(terminated):: lastState($.v1.containerState.terminated(terminated)), - waiting(waiting):: lastState($.v1.containerState.waiting(waiting)), - }, - state:: { - local state(mixin) = {state+: mixin}, - running(running):: state($.v1.containerState.running(running)), - terminated(terminated):: state($.v1.containerState.terminated(terminated)), - waiting(waiting):: state($.v1.containerState.waiting(waiting)), - }, - }, - }, - daemonEndpoint:: { - default(Port):: - { - Port: Port, - }, - // Port number of the given endpoint. - Port(Port):: {Port: Port}, - }, - deleteOptions:: { - local kind = {kind: "DeleteOptions"}, - default():: - apiVersion + - kind + - { - preconditions: {}, - propagationPolicy: {}, - }, - // 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(gracePeriodSeconds):: {gracePeriodSeconds: gracePeriodSeconds}, - // 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(orphanDependents):: {orphanDependents: orphanDependents}, - // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. - preconditions(preconditions):: {preconditions+: 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. - propagationPolicy(propagationPolicy):: {propagationPolicy+: propagationPolicy}, - mixin:: { - preconditions:: { - local preconditions(mixin) = {preconditions+: mixin}, - uid(uid):: preconditions($.v1.preconditions.uid(uid)), - }, - }, - }, - deletionPropagation:: { - }, - downwardAPIProjection:: { - default():: - { - items: [], - }, - // Items is a list of DownwardAPIVolume file - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - }, - downwardAPIVolumeFile:: { - default(path):: - { - fieldRef: {}, - path: path, - resourceFieldRef: {}, - }, - // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. - fieldRef(fieldRef):: {fieldRef+: fieldRef}, - // Optional: mode bits to use on this file, must be a value between 0 and 0777. 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(mode):: {mode: mode}, - // 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(path):: {path: path}, - // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - resourceFieldRef(resourceFieldRef):: {resourceFieldRef+: resourceFieldRef}, - mixin:: { - fieldRef:: { - local fieldRef(mixin) = {fieldRef+: mixin}, - fieldPath(fieldPath):: fieldRef($.v1.objectFieldSelector.fieldPath(fieldPath)), - }, - resourceFieldRef:: { - local resourceFieldRef(mixin) = {resourceFieldRef+: mixin}, - containerName(containerName):: resourceFieldRef($.v1.resourceFieldSelector.containerName(containerName)), - divisor(divisor):: resourceFieldRef($.v1.resourceFieldSelector.divisor(divisor)), - resource(resource):: resourceFieldRef($.v1.resourceFieldSelector.resource(resource)), - }, - }, - }, - downwardAPIVolumeSource:: { - default():: - { - items: [], - }, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: defaultMode}, - // Items is a list of downward API volume file - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - }, - emptyDirVolumeSource:: { - // 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(medium):: {medium: medium}, - }, - endpointAddress:: { - default(ip):: - { - ip: ip, - targetRef: {}, - }, - // The Hostname of this endpoint - hostname(hostname):: {hostname: hostname}, - // 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(ip):: {ip: ip}, - // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. - nodeName(nodeName):: {nodeName: nodeName}, - // Reference to object providing the endpoint. - targetRef(targetRef):: {targetRef+: targetRef}, - mixin:: { - targetRef:: { - local targetRef(mixin) = {targetRef+: mixin}, - fieldPath(fieldPath):: targetRef($.v1.objectReference.fieldPath(fieldPath)), - name(name):: targetRef($.v1.objectReference.name(name)), - namespace(namespace):: targetRef($.v1.objectReference.namespace(namespace)), - resourceVersion(resourceVersion):: targetRef($.v1.objectReference.resourceVersion(resourceVersion)), - uid(uid):: targetRef($.v1.objectReference.uid(uid)), - }, - }, - }, - endpointPort:: { - default(port):: - { - port: port, - }, - // The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined. - name(name):: {name: name}, - // The port number of the endpoint. - port(port):: {port: port}, - // The IP protocol for this port. Must be UDP or TCP. Default is TCP. - protocol(protocol):: {protocol: protocol}, - }, - endpointSubset:: { - default():: - { - addresses: [], - notReadyAddresses: [], - ports: [], - }, - // 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(addresses):: if std.type(addresses) == "array" then {addresses+: addresses} else {addresses+: [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(notReadyAddresses):: if std.type(notReadyAddresses) == "array" then {notReadyAddresses+: notReadyAddresses} else {notReadyAddresses+: [notReadyAddresses]}, - // Port numbers available on the related IP addresses. - ports(ports):: if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - }, - endpoints:: { - local kind = {kind: "Endpoints"}, - default(name, subsets, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - subsets: if std.type(subsets) == "array" then subsets else [subsets], - }, - // 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(subsets):: if std.type(subsets) == "array" then {subsets+: subsets} else {subsets+: [subsets]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - }, - }, - endpointsList:: { - local kind = {kind: "EndpointsList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // List of endpoints. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - envFromSource:: { - default():: - { - configMapRef: {}, - secretRef: {}, - }, - // The ConfigMap to select from - configMapRef(configMapRef):: {configMapRef+: configMapRef}, - // An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - prefix(prefix):: {prefix: prefix}, - // The Secret to select from - secretRef(secretRef):: {secretRef+: secretRef}, - mixin:: { - configMapRef:: { - local configMapRef(mixin) = {configMapRef+: mixin}, - name(name):: configMapRef($.v1.configMapEnvSource.name(name)), - optional(optional):: configMapRef($.v1.configMapEnvSource.optional(optional)), - }, - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.secretEnvSource.name(name)), - optional(optional):: secretRef($.v1.secretEnvSource.optional(optional)), - }, - }, - }, - envVar:: { - default(name):: - { - name: name, - valueFrom: {}, - }, - // Name of the environment variable. Must be a C_IDENTIFIER. - name(name):: {name: name}, - // Variable references $(VAR_NAME) are expanded using the previous 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". - value(value):: {value: value}, - // Source for the environment variable's value. Cannot be used if value is not empty. - valueFrom(valueFrom):: {valueFrom+: valueFrom}, - mixin:: { - valueFrom:: { - local valueFrom(mixin) = {valueFrom+: mixin}, - configMapKeyRef(configMapKeyRef):: valueFrom($.v1.envVarSource.configMapKeyRef(configMapKeyRef)), - fieldRef(fieldRef):: valueFrom($.v1.envVarSource.fieldRef(fieldRef)), - resourceFieldRef(resourceFieldRef):: valueFrom($.v1.envVarSource.resourceFieldRef(resourceFieldRef)), - secretKeyRef(secretKeyRef):: valueFrom($.v1.envVarSource.secretKeyRef(secretKeyRef)), - }, - }, - }, - envVarSource:: { - default():: - { - configMapKeyRef: {}, - fieldRef: {}, - resourceFieldRef: {}, - secretKeyRef: {}, - }, - // Selects a key of a ConfigMap. - configMapKeyRef(configMapKeyRef):: {configMapKeyRef+: configMapKeyRef}, - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP. - fieldRef(fieldRef):: {fieldRef+: fieldRef}, - // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - resourceFieldRef(resourceFieldRef):: {resourceFieldRef+: resourceFieldRef}, - // Selects a key of a secret in the pod's namespace - secretKeyRef(secretKeyRef):: {secretKeyRef+: secretKeyRef}, - mixin:: { - configMapKeyRef:: { - local configMapKeyRef(mixin) = {configMapKeyRef+: mixin}, - key(key):: configMapKeyRef($.v1.configMapKeySelector.key(key)), - name(name):: configMapKeyRef($.v1.configMapKeySelector.name(name)), - optional(optional):: configMapKeyRef($.v1.configMapKeySelector.optional(optional)), - }, - fieldRef:: { - local fieldRef(mixin) = {fieldRef+: mixin}, - fieldPath(fieldPath):: fieldRef($.v1.objectFieldSelector.fieldPath(fieldPath)), - }, - resourceFieldRef:: { - local resourceFieldRef(mixin) = {resourceFieldRef+: mixin}, - containerName(containerName):: resourceFieldRef($.v1.resourceFieldSelector.containerName(containerName)), - divisor(divisor):: resourceFieldRef($.v1.resourceFieldSelector.divisor(divisor)), - resource(resource):: resourceFieldRef($.v1.resourceFieldSelector.resource(resource)), - }, - secretKeyRef:: { - local secretKeyRef(mixin) = {secretKeyRef+: mixin}, - key(key):: secretKeyRef($.v1.secretKeySelector.key(key)), - name(name):: secretKeyRef($.v1.secretKeySelector.name(name)), - optional(optional):: secretKeyRef($.v1.secretKeySelector.optional(optional)), - }, - }, - }, - event:: { - local kind = {kind: "Event"}, - default(name, involvedObject, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - involvedObject: involvedObject, - source: {}, - }, - // The number of times this event has occurred. - count(count):: {count: count}, - // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) - firstTimestamp(firstTimestamp):: {firstTimestamp: firstTimestamp}, - // The object that this event is about. - involvedObject(involvedObject):: {involvedObject+: involvedObject}, - // The time at which the most recent occurrence of this event was recorded. - lastTimestamp(lastTimestamp):: {lastTimestamp: lastTimestamp}, - // A human-readable description of the status of this operation. - message(message):: {message: message}, - // This should be a short, machine understandable string that gives the reason for the transition into the object's current status. - reason(reason):: {reason: reason}, - // The component reporting this event. Should be a short machine understandable string. - source(source):: {source+: source}, - // Type of this event (Normal, Warning), new types could be added in the future - type(type):: {type: type}, - mixin:: { - involvedObject:: { - local involvedObject(mixin) = {involvedObject+: mixin}, - fieldPath(fieldPath):: involvedObject($.v1.objectReference.fieldPath(fieldPath)), - name(name):: involvedObject($.v1.objectReference.name(name)), - namespace(namespace):: involvedObject($.v1.objectReference.namespace(namespace)), - resourceVersion(resourceVersion):: involvedObject($.v1.objectReference.resourceVersion(resourceVersion)), - uid(uid):: involvedObject($.v1.objectReference.uid(uid)), - }, - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - source:: { - local source(mixin) = {source+: mixin}, - component(component):: source($.v1.eventSource.component(component)), - host(host):: source($.v1.eventSource.host(host)), - }, - }, - }, - eventList:: { - local kind = {kind: "EventList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // List of events - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - eventSource:: { - // Component from which the event is generated. - component(component):: {component: component}, - // Node name on which the event is generated. - host(host):: {host: host}, - }, - execAction:: { - default():: - { - command: [], - }, - // 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(command):: if std.type(command) == "array" then {command+: command} else {command+: [command]}, - }, - fCVolumeSource:: { - default(targetWWNs, lun):: - { - lun: lun, - targetWWNs: if std.type(targetWWNs) == "array" then targetWWNs else [targetWWNs], - }, - // 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(fsType):: {fsType: fsType}, - // Required: FC target lun number - lun(lun):: {lun: lun}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // Required: FC target worldwide names (WWNs) - targetWWNs(targetWWNs):: if std.type(targetWWNs) == "array" then {targetWWNs+: targetWWNs} else {targetWWNs+: [targetWWNs]}, - }, - finalizerName:: { - }, - flexVolumeSource:: { - default(driver):: - { - driver: driver, - options: {}, - secretRef: {}, - }, - // Driver is the name of the driver to use for this volume. - driver(driver):: {driver: 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(fsType):: {fsType: fsType}, - // Optional: Extra command options if any. - options(options):: {options+: options}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: 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(secretRef):: {secretRef+: secretRef}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - flockerVolumeSource:: { - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - datasetName(datasetName):: {datasetName: datasetName}, - // UUID of the dataset. This is unique identifier of a Flocker dataset - datasetUUID(datasetUUID):: {datasetUUID: datasetUUID}, - }, - gCEPersistentDiskVolumeSource:: { - default(pdName):: - { - pdName: 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(fsType):: {fsType: 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(partition):: {partition: partition}, - // 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(pdName):: {pdName: pdName}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - readOnly(readOnly):: {readOnly: readOnly}, - }, - gitRepoVolumeSource:: { - default(repository):: - { - repository: 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(directory):: {directory: directory}, - // Repository URL - repository(repository):: {repository: repository}, - // Commit hash for the specified revision. - revision(revision):: {revision: revision}, - }, - glusterfsVolumeSource:: { - default(endpoints, path):: - { - endpoints: endpoints, - path: path, - }, - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - endpoints(endpoints):: {endpoints: endpoints}, - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - path(path):: {path: path}, - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - readOnly(readOnly):: {readOnly: readOnly}, - }, - hTTPGetAction:: { - default(port):: - { - httpHeaders: [], - port: port, - }, - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host(host):: {host: host}, - // Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders(httpHeaders):: if std.type(httpHeaders) == "array" then {httpHeaders+: httpHeaders} else {httpHeaders+: [httpHeaders]}, - // Path to access on the HTTP server. - path(path):: {path: path}, - // 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(port):: {port: port}, - // Scheme to use for connecting to the host. Defaults to HTTP. - scheme(scheme):: {scheme: scheme}, - }, - hTTPHeader:: { - default(name, value):: - { - name: name, - value: value, - }, - // The header field name - name(name):: {name: name}, - // The header field value - value(value):: {value: value}, - }, - handler:: { - default():: - { - exec: {}, - httpGet: {}, - tcpSocket: {}, - }, - // One and only one of the following should be specified. Exec specifies the action to take. - exec(exec):: {exec+: exec}, - // HTTPGet specifies the http request to perform. - httpGet(httpGet):: {httpGet+: httpGet}, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket(tcpSocket):: {tcpSocket+: tcpSocket}, - mixin:: { - exec:: { - local exec(mixin) = {exec+: mixin}, - command(command):: exec($.v1.execAction.command(command)), - }, - httpGet:: { - local httpGet(mixin) = {httpGet+: mixin}, - host(host):: httpGet($.v1.hTTPGetAction.host(host)), - httpHeaders(httpHeaders):: httpGet($.v1.hTTPGetAction.httpHeaders(httpHeaders)), - path(path):: httpGet($.v1.hTTPGetAction.path(path)), - port(port):: httpGet($.v1.hTTPGetAction.port(port)), - scheme(scheme):: httpGet($.v1.hTTPGetAction.scheme(scheme)), - }, - tcpSocket:: { - local tcpSocket(mixin) = {tcpSocket+: mixin}, - host(host):: tcpSocket($.v1.tCPSocketAction.host(host)), - port(port):: tcpSocket($.v1.tCPSocketAction.port(port)), - }, - }, - }, - hostAlias:: { - default():: - { - hostnames: [], - }, - // Hostnames for the the above IP address. - hostnames(hostnames):: if std.type(hostnames) == "array" then {hostnames+: hostnames} else {hostnames+: [hostnames]}, - // IP address of the host file entry. - ip(ip):: {ip: ip}, - }, - hostPathVolumeSource:: { - default(path):: - { - path: path, - }, - // Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - path(path):: {path: path}, - }, - iSCSIVolumeSource:: { - default(targetPortal, iqn, lun):: - { - iqn: iqn, - lun: lun, - portals: [], - secretRef: {}, - targetPortal: targetPortal, - }, - // whether support iSCSI Discovery CHAP authentication - chapAuthDiscovery(chapAuthDiscovery):: {chapAuthDiscovery: chapAuthDiscovery}, - // whether support iSCSI Session CHAP authentication - chapAuthSession(chapAuthSession):: {chapAuthSession: 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(fsType):: {fsType: fsType}, - // Target iSCSI Qualified Name. - iqn(iqn):: {iqn: iqn}, - // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. - iscsiInterface(iscsiInterface):: {iscsiInterface: iscsiInterface}, - // iSCSI target lun number. - lun(lun):: {lun: lun}, - // 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(portals):: if std.type(portals) == "array" then {portals+: portals} else {portals+: [portals]}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - readOnly(readOnly):: {readOnly: readOnly}, - // CHAP secret for iSCSI target and initiator authentication - secretRef(secretRef):: {secretRef+: secretRef}, - // 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(targetPortal):: {targetPortal: targetPortal}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - initializer:: { - default(name):: - { - name: name, - }, - // name of the process that is responsible for initializing this object. - name(name):: {name: name}, - }, - initializers:: { - default(pending):: - { - pending: if std.type(pending) == "array" then pending else [pending], - result: {}, - }, - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then {pending+: pending} else {pending+: [pending]}, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result(result):: {result+: result}, - mixin:: { - result:: { - local result(mixin) = {result+: mixin}, - code(code):: result($.v1.status.code(code)), - details(details):: result($.v1.status.details(details)), - message(message):: result($.v1.status.message(message)), - reason(reason):: result($.v1.status.reason(reason)), - status(status):: result($.v1.status.status(status)), - }, - }, - }, - keyToPath:: { - default(key, path):: - { - key: key, - path: path, - }, - // The key to project. - key(key):: {key: key}, - // Optional: mode bits to use on this file, must be a value between 0 and 0777. 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(mode):: {mode: mode}, - // 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(path):: {path: path}, - }, - labelSelector:: { - default():: - { - matchExpressions: [], - matchLabels: {}, - }, - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then {matchExpressions+: matchExpressions} else {matchExpressions+: [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(matchLabels):: {matchLabels+: matchLabels}, - }, - labelSelectorRequirement:: { - default(key, operator):: - { - key: key, - operator: operator, - values: [], - }, - // key is the label key that the selector applies to. - key(key):: {key: key}, - // operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist. - operator(operator):: {operator: 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(values):: if std.type(values) == "array" then {values+: values} else {values+: [values]}, - }, - lifecycle:: { - default():: - { - postStart: {}, - preStop: {}, - }, - // 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(postStart):: {postStart+: postStart}, - // PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - preStop(preStop):: {preStop+: preStop}, - mixin:: { - postStart:: { - local postStart(mixin) = {postStart+: mixin}, - exec(exec):: postStart($.v1.handler.exec(exec)), - httpGet(httpGet):: postStart($.v1.handler.httpGet(httpGet)), - tcpSocket(tcpSocket):: postStart($.v1.handler.tcpSocket(tcpSocket)), - }, - preStop:: { - local preStop(mixin) = {preStop+: mixin}, - exec(exec):: preStop($.v1.handler.exec(exec)), - httpGet(httpGet):: preStop($.v1.handler.httpGet(httpGet)), - tcpSocket(tcpSocket):: preStop($.v1.handler.tcpSocket(tcpSocket)), - }, - }, - }, - limitRange:: { - local kind = {kind: "LimitRange"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - }, - // Spec defines the limits enforced. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - limits(limits):: spec($.v1.limitRangeSpec.limits(limits)), - }, - }, - }, - limitRangeItem:: { - default():: - { - default: {}, - defaultRequest: {}, - max: {}, - maxLimitRequestRatio: {}, - min: {}, - }, - // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. - defaultRequest(defaultRequest):: {defaultRequest+: defaultRequest}, - // Default resource requirement limit value by resource name if resource limit is omitted. - defaultValue(defaultValue):: {default+: defaultValue}, - // Max usage constraints on this kind by resource name. - max(max):: {max+: 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(maxLimitRequestRatio):: {maxLimitRequestRatio+: maxLimitRequestRatio}, - // Min usage constraints on this kind by resource name. - min(min):: {min+: min}, - // Type of resource that this limit applies to. - type(type):: {type: type}, - }, - limitRangeList:: { - local kind = {kind: "LimitRangeList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // Items is a list of LimitRange objects. More info: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/admission_control_limit_range.md - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - limitRangeSpec:: { - default(limits):: - { - limits: if std.type(limits) == "array" then limits else [limits], - }, - // Limits is the list of LimitRangeItem objects that are enforced. - limits(limits):: if std.type(limits) == "array" then {limits+: limits} else {limits+: [limits]}, - }, - listMeta:: { - // 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: {resourceVersion: resourceVersion}, - // SelfLink is a URL representing this object. Populated by the system. Read-only. - selfLink(selfLink):: {selfLink: selfLink}, - }, - loadBalancerIngress:: { - // Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers) - hostname(hostname):: {hostname: hostname}, - // IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers) - ip(ip):: {ip: ip}, - }, - loadBalancerStatus:: { - default():: - { - ingress: [], - }, - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - ingress(ingress):: if std.type(ingress) == "array" then {ingress+: ingress} else {ingress+: [ingress]}, - }, - localObjectReference:: { - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - }, - nFSVolumeSource:: { - default(server, path):: - { - path: path, - server: server, - }, - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - path(path):: {path: path}, - // 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(readOnly):: {readOnly: readOnly}, - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - server(server):: {server: server}, - }, - namespace:: { - local kind = {kind: "Namespace"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // Spec defines the behavior of the Namespace. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - // Status describes the current status of a Namespace. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - finalizers(finalizers):: spec($.v1.namespaceSpec.finalizers(finalizers)), - }, - status:: { - local status(mixin) = {status+: mixin}, - phase(phase):: status($.v1.namespaceStatus.phase(phase)), - }, - }, - }, - namespaceList:: { - local kind = {kind: "NamespaceList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - namespaceSpec:: { - default():: - { - finalizers: [], - }, - // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/namespaces.md#finalizers - finalizers(finalizers):: if std.type(finalizers) == "array" then {finalizers+: finalizers} else {finalizers+: [finalizers]}, - }, - namespaceStatus:: { - // Phase is the current lifecycle phase of the namespace. More info: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/namespaces.md#phases - phase(phase):: {phase: phase}, - }, - node:: { - local kind = {kind: "Node"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // Spec defines the behavior of a node. https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - // Most recently observed status of the node. Populated by the system. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - externalID(externalID):: spec($.v1.nodeSpec.externalID(externalID)), - podCIDR(podCIDR):: spec($.v1.nodeSpec.podCIDR(podCIDR)), - providerID(providerID):: spec($.v1.nodeSpec.providerID(providerID)), - taints(taints):: spec($.v1.nodeSpec.taints(taints)), - unschedulable(unschedulable):: spec($.v1.nodeSpec.unschedulable(unschedulable)), - }, - status:: { - local status(mixin) = {status+: mixin}, - addresses(addresses):: status($.v1.nodeStatus.addresses(addresses)), - allocatable(allocatable):: status($.v1.nodeStatus.allocatable(allocatable)), - capacity(capacity):: status($.v1.nodeStatus.capacity(capacity)), - conditions(conditions):: status($.v1.nodeStatus.conditions(conditions)), - daemonEndpoints(daemonEndpoints):: status($.v1.nodeStatus.daemonEndpoints(daemonEndpoints)), - images(images):: status($.v1.nodeStatus.images(images)), - nodeInfo(nodeInfo):: status($.v1.nodeStatus.nodeInfo(nodeInfo)), - phase(phase):: status($.v1.nodeStatus.phase(phase)), - volumesAttached(volumesAttached):: status($.v1.nodeStatus.volumesAttached(volumesAttached)), - volumesInUse(volumesInUse):: status($.v1.nodeStatus.volumesInUse(volumesInUse)), - }, - }, - }, - nodeAddress:: { - default(type, address):: - { - address: address, - type: type, - }, - // The node address. - address(address):: {address: address}, - // Node address type, one of Hostname, ExternalIP or InternalIP. - type(type):: {type: type}, - }, - nodeAffinity:: { - default():: - { - preferredDuringSchedulingIgnoredDuringExecution: [], - requiredDuringSchedulingIgnoredDuringExecution: {}, - }, - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [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(requiredDuringSchedulingIgnoredDuringExecution):: {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}, - mixin:: { - requiredDuringSchedulingIgnoredDuringExecution:: { - local requiredDuringSchedulingIgnoredDuringExecution(mixin) = {requiredDuringSchedulingIgnoredDuringExecution+: mixin}, - nodeSelectorTerms(nodeSelectorTerms):: requiredDuringSchedulingIgnoredDuringExecution($.v1.nodeSelector.nodeSelectorTerms(nodeSelectorTerms)), - }, - }, - }, - nodeCondition:: { - default(type, status):: - { - status: status, - type: type, - }, - // Last time we got an update on a given condition. - lastHeartbeatTime(lastHeartbeatTime):: {lastHeartbeatTime: lastHeartbeatTime}, - // Last time the condition transit from one status to another. - lastTransitionTime(lastTransitionTime):: {lastTransitionTime: lastTransitionTime}, - // Human readable message indicating details about last transition. - message(message):: {message: message}, - // (brief) reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Status of the condition, one of True, False, Unknown. - status(status):: {status: status}, - // Type of node condition. - type(type):: {type: type}, - }, - nodeDaemonEndpoints:: { - default():: - { - kubeletEndpoint: {}, - }, - // Endpoint on which Kubelet is listening. - kubeletEndpoint(kubeletEndpoint):: {kubeletEndpoint+: kubeletEndpoint}, - mixin:: { - kubeletEndpoint:: { - local kubeletEndpoint(mixin) = {kubeletEndpoint+: mixin}, - Port(Port):: kubeletEndpoint($.v1.daemonEndpoint.Port(Port)), - }, - }, - }, - nodeList:: { - local kind = {kind: "NodeList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // List of nodes - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - nodeSelector:: { - default(nodeSelectorTerms):: - { - nodeSelectorTerms: if std.type(nodeSelectorTerms) == "array" then nodeSelectorTerms else [nodeSelectorTerms], - }, - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then {nodeSelectorTerms+: nodeSelectorTerms} else {nodeSelectorTerms+: [nodeSelectorTerms]}, - }, - nodeSelectorRequirement:: { - default(key, operator):: - { - key: key, - operator: operator, - values: [], - }, - // The label key that the selector applies to. - key(key):: {key: key}, - // Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - operator(operator):: {operator: 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(values):: if std.type(values) == "array" then {values+: values} else {values+: [values]}, - }, - nodeSelectorTerm:: { - default(matchExpressions):: - { - matchExpressions: if std.type(matchExpressions) == "array" then matchExpressions else [matchExpressions], - }, - // Required. A list of node selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then {matchExpressions+: matchExpressions} else {matchExpressions+: [matchExpressions]}, - }, - nodeSpec:: { - default():: - { - taints: [], - }, - // External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated. - externalID(externalID):: {externalID: externalID}, - // PodCIDR represents the pod IP range assigned to the node. - podCIDR(podCIDR):: {podCIDR: podCIDR}, - // ID of the node assigned by the cloud provider in the format: :// - providerID(providerID):: {providerID: providerID}, - // If specified, the node's taints. - taints(taints):: if std.type(taints) == "array" then {taints+: taints} else {taints+: [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(unschedulable):: {unschedulable: unschedulable}, - }, - nodeStatus:: { - default():: - { - addresses: [], - allocatable: {}, - capacity: {}, - conditions: [], - daemonEndpoints: {}, - images: [], - nodeInfo: {}, - volumesAttached: [], - volumesInUse: [], - }, - // List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses - addresses(addresses):: if std.type(addresses) == "array" then {addresses+: addresses} else {addresses+: [addresses]}, - // Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity. - allocatable(allocatable):: {allocatable+: allocatable}, - // Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - capacity(capacity):: {capacity+: capacity}, - // Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - // Endpoints of daemons running on the Node. - daemonEndpoints(daemonEndpoints):: {daemonEndpoints+: daemonEndpoints}, - // List of container images on this node - images(images):: if std.type(images) == "array" then {images+: images} else {images+: [images]}, - // Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info - nodeInfo(nodeInfo):: {nodeInfo+: nodeInfo}, - // NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated. - phase(phase):: {phase: phase}, - // List of volumes that are attached to the node. - volumesAttached(volumesAttached):: if std.type(volumesAttached) == "array" then {volumesAttached+: volumesAttached} else {volumesAttached+: [volumesAttached]}, - // List of attachable volumes in use (mounted) by the node. - volumesInUse(volumesInUse):: if std.type(volumesInUse) == "array" then {volumesInUse+: volumesInUse} else {volumesInUse+: [volumesInUse]}, - mixin:: { - daemonEndpoints:: { - local daemonEndpoints(mixin) = {daemonEndpoints+: mixin}, - kubeletEndpoint(kubeletEndpoint):: daemonEndpoints($.v1.nodeDaemonEndpoints.kubeletEndpoint(kubeletEndpoint)), - }, - nodeInfo:: { - local nodeInfo(mixin) = {nodeInfo+: mixin}, - architecture(architecture):: nodeInfo($.v1.nodeSystemInfo.architecture(architecture)), - bootID(bootID):: nodeInfo($.v1.nodeSystemInfo.bootID(bootID)), - containerRuntimeVersion(containerRuntimeVersion):: nodeInfo($.v1.nodeSystemInfo.containerRuntimeVersion(containerRuntimeVersion)), - kernelVersion(kernelVersion):: nodeInfo($.v1.nodeSystemInfo.kernelVersion(kernelVersion)), - kubeProxyVersion(kubeProxyVersion):: nodeInfo($.v1.nodeSystemInfo.kubeProxyVersion(kubeProxyVersion)), - kubeletVersion(kubeletVersion):: nodeInfo($.v1.nodeSystemInfo.kubeletVersion(kubeletVersion)), - machineID(machineID):: nodeInfo($.v1.nodeSystemInfo.machineID(machineID)), - operatingSystem(operatingSystem):: nodeInfo($.v1.nodeSystemInfo.operatingSystem(operatingSystem)), - osImage(osImage):: nodeInfo($.v1.nodeSystemInfo.osImage(osImage)), - systemUUID(systemUUID):: nodeInfo($.v1.nodeSystemInfo.systemUUID(systemUUID)), - }, - }, - }, - nodeSystemInfo:: { - default(machineID, systemUUID, bootID, kernelVersion, osImage, containerRuntimeVersion, kubeletVersion, kubeProxyVersion, operatingSystem, architecture):: - { - architecture: architecture, - bootID: bootID, - containerRuntimeVersion: containerRuntimeVersion, - kernelVersion: kernelVersion, - kubeProxyVersion: kubeProxyVersion, - kubeletVersion: kubeletVersion, - machineID: machineID, - operatingSystem: operatingSystem, - osImage: osImage, - systemUUID: systemUUID, - }, - // The Architecture reported by the node - architecture(architecture):: {architecture: architecture}, - // Boot ID reported by the node. - bootID(bootID):: {bootID: bootID}, - // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). - containerRuntimeVersion(containerRuntimeVersion):: {containerRuntimeVersion: containerRuntimeVersion}, - // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). - kernelVersion(kernelVersion):: {kernelVersion: kernelVersion}, - // KubeProxy Version reported by the node. - kubeProxyVersion(kubeProxyVersion):: {kubeProxyVersion: kubeProxyVersion}, - // Kubelet Version reported by the node. - kubeletVersion(kubeletVersion):: {kubeletVersion: kubeletVersion}, - // MachineID reported by the node. For unique machine identification in the cluster this field is prefered. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - machineID(machineID):: {machineID: machineID}, - // The Operating System reported by the node - operatingSystem(operatingSystem):: {operatingSystem: operatingSystem}, - // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). - osImage(osImage):: {osImage: osImage}, - // SystemUUID reported by the node. For unique machine identification MachineID is prefered. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html - systemUUID(systemUUID):: {systemUUID: systemUUID}, - }, - objectFieldSelector:: { - default(fieldPath):: - apiVersion + - { - fieldPath: fieldPath, - }, - // Path of the field to select in the specified API version. - fieldPath(fieldPath):: {fieldPath: fieldPath}, - }, - objectMeta:: { - default():: - { - annotations: {}, - finalizers: [], - initializers: {}, - labels: {}, - ownerReferences: [], - }, - // 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(annotations):: {annotations+: 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(clusterName):: {clusterName: 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - creationTimestamp(creationTimestamp):: {creationTimestamp: 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(deletionGracePeriodSeconds):: {deletionGracePeriodSeconds: 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 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - deletionTimestamp(deletionTimestamp):: {deletionTimestamp: 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(finalizers):: if std.type(finalizers) == "array" then {finalizers+: finalizers} else {finalizers+: [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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency - generateName(generateName):: {generateName: generateName}, - // A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. - generation(generation):: {generation: generation}, - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers(initializers):: {initializers+: initializers}, - // 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(labels):: {labels+: labels}, - // 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(name):: {name: name}, - // Namespace defines the space within 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(namespace):: {namespace: 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(ownerReferences):: if std.type(ownerReferences) == "array" then {ownerReferences+: ownerReferences} else {ownerReferences+: [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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: {resourceVersion: resourceVersion}, - // SelfLink is a URL representing this object. Populated by the system. Read-only. - selfLink(selfLink):: {selfLink: 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(uid):: {uid: uid}, - mixin:: { - initializers:: { - local initializers(mixin) = {initializers+: mixin}, - pending(pending):: initializers($.v1.initializers.pending(pending)), - result(result):: initializers($.v1.initializers.result(result)), - }, - }, - }, - objectReference:: { - local kind = {kind: "ObjectReference"}, - default():: - apiVersion + - kind + - { - }, - // 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(fieldPath):: {fieldPath: fieldPath}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - namespace(namespace):: {namespace: namespace}, - // Specific resourceVersion to which this reference is made, if any. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: {resourceVersion: resourceVersion}, - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - uid(uid):: {uid: uid}, - }, - ownerReference:: { - local kind = {kind: "OwnerReference"}, - default(name, uid):: - apiVersion + - kind + - { - name: name, - uid: 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(blockOwnerDeletion):: {blockOwnerDeletion: blockOwnerDeletion}, - // If true, this reference points to the managing controller. - controller(controller):: {controller: controller}, - // Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: {name: name}, - // UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids - uid(uid):: {uid: uid}, - }, - patch:: { - }, - persistentVolume:: { - local kind = {kind: "PersistentVolume"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // 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(spec):: {spec+: spec}, - // Status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - accessModes(accessModes):: spec($.v1.persistentVolumeSpec.accessModes(accessModes)), - awsElasticBlockStore(awsElasticBlockStore):: spec($.v1.persistentVolumeSpec.awsElasticBlockStore(awsElasticBlockStore)), - azureDisk(azureDisk):: spec($.v1.persistentVolumeSpec.azureDisk(azureDisk)), - azureFile(azureFile):: spec($.v1.persistentVolumeSpec.azureFile(azureFile)), - capacity(capacity):: spec($.v1.persistentVolumeSpec.capacity(capacity)), - cephfs(cephfs):: spec($.v1.persistentVolumeSpec.cephfs(cephfs)), - cinder(cinder):: spec($.v1.persistentVolumeSpec.cinder(cinder)), - claimRef(claimRef):: spec($.v1.persistentVolumeSpec.claimRef(claimRef)), - fc(fc):: spec($.v1.persistentVolumeSpec.fc(fc)), - flexVolume(flexVolume):: spec($.v1.persistentVolumeSpec.flexVolume(flexVolume)), - flocker(flocker):: spec($.v1.persistentVolumeSpec.flocker(flocker)), - gcePersistentDisk(gcePersistentDisk):: spec($.v1.persistentVolumeSpec.gcePersistentDisk(gcePersistentDisk)), - glusterfs(glusterfs):: spec($.v1.persistentVolumeSpec.glusterfs(glusterfs)), - hostPath(hostPath):: spec($.v1.persistentVolumeSpec.hostPath(hostPath)), - iscsi(iscsi):: spec($.v1.persistentVolumeSpec.iscsi(iscsi)), - nfs(nfs):: spec($.v1.persistentVolumeSpec.nfs(nfs)), - persistentVolumeReclaimPolicy(persistentVolumeReclaimPolicy):: spec($.v1.persistentVolumeSpec.persistentVolumeReclaimPolicy(persistentVolumeReclaimPolicy)), - photonPersistentDisk(photonPersistentDisk):: spec($.v1.persistentVolumeSpec.photonPersistentDisk(photonPersistentDisk)), - portworxVolume(portworxVolume):: spec($.v1.persistentVolumeSpec.portworxVolume(portworxVolume)), - quobyte(quobyte):: spec($.v1.persistentVolumeSpec.quobyte(quobyte)), - rbd(rbd):: spec($.v1.persistentVolumeSpec.rbd(rbd)), - scaleIO(scaleIO):: spec($.v1.persistentVolumeSpec.scaleIO(scaleIO)), - storageClassName(storageClassName):: spec($.v1.persistentVolumeSpec.storageClassName(storageClassName)), - vsphereVolume(vsphereVolume):: spec($.v1.persistentVolumeSpec.vsphereVolume(vsphereVolume)), - }, - status:: { - local status(mixin) = {status+: mixin}, - message(message):: status($.v1.persistentVolumeStatus.message(message)), - phase(phase):: status($.v1.persistentVolumeStatus.phase(phase)), - reason(reason):: status($.v1.persistentVolumeStatus.reason(reason)), - }, - }, - }, - persistentVolumeAccessMode:: { - }, - persistentVolumeClaim:: { - local kind = {kind: "PersistentVolumeClaim"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // 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(spec):: {spec+: spec}, - // Status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - accessModes(accessModes):: spec($.v1.persistentVolumeClaimSpec.accessModes(accessModes)), - resources(resources):: spec($.v1.persistentVolumeClaimSpec.resources(resources)), - selector(selector):: spec($.v1.persistentVolumeClaimSpec.selector(selector)), - storageClassName(storageClassName):: spec($.v1.persistentVolumeClaimSpec.storageClassName(storageClassName)), - volumeName(volumeName):: spec($.v1.persistentVolumeClaimSpec.volumeName(volumeName)), - }, - status:: { - local status(mixin) = {status+: mixin}, - accessModes(accessModes):: status($.v1.persistentVolumeClaimStatus.accessModes(accessModes)), - capacity(capacity):: status($.v1.persistentVolumeClaimStatus.capacity(capacity)), - phase(phase):: status($.v1.persistentVolumeClaimStatus.phase(phase)), - }, - }, - }, - persistentVolumeClaimList:: { - local kind = {kind: "PersistentVolumeClaimList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - persistentVolumeClaimSpec:: { - default():: - { - accessModes: [], - resources: {}, - selector: {}, - }, - // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - accessModes(accessModes):: if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, - // Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources(resources):: {resources+: resources}, - // A label query over volumes to consider for binding. - selector(selector):: {selector+: selector}, - // Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - storageClassName(storageClassName):: {storageClassName: storageClassName}, - // VolumeName is the binding reference to the PersistentVolume backing this claim. - volumeName(volumeName):: {volumeName: volumeName}, - mixin:: { - resources:: { - local resources(mixin) = {resources+: mixin}, - limits(limits):: resources($.v1.resourceRequirements.limits(limits)), - requests(requests):: resources($.v1.resourceRequirements.requests(requests)), - }, - selector:: { - local selector(mixin) = {selector+: mixin}, - matchExpressions(matchExpressions):: selector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: selector($.v1.labelSelector.matchLabels(matchLabels)), - }, - }, - }, - persistentVolumeClaimStatus:: { - default():: - { - accessModes: [], - capacity: {}, - }, - // AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - accessModes(accessModes):: if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, - // Represents the actual resources of the underlying volume. - capacity(capacity):: {capacity+: capacity}, - // Phase represents the current phase of PersistentVolumeClaim. - phase(phase):: {phase: phase}, - }, - persistentVolumeClaimVolumeSource:: { - default(claimName):: - { - claimName: claimName, - }, - // 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(claimName):: {claimName: claimName}, - // Will force the ReadOnly setting in VolumeMounts. Default false. - readOnly(readOnly):: {readOnly: readOnly}, - }, - persistentVolumeList:: { - local kind = {kind: "PersistentVolumeList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - persistentVolumeSpec:: { - default():: - { - accessModes: [], - awsElasticBlockStore: {}, - azureDisk: {}, - azureFile: {}, - capacity: {}, - cephfs: {}, - cinder: {}, - claimRef: {}, - fc: {}, - flexVolume: {}, - flocker: {}, - gcePersistentDisk: {}, - glusterfs: {}, - hostPath: {}, - iscsi: {}, - nfs: {}, - photonPersistentDisk: {}, - portworxVolume: {}, - quobyte: {}, - rbd: {}, - scaleIO: {}, - vsphereVolume: {}, - }, - // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - accessModes(accessModes):: if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [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(awsElasticBlockStore):: {awsElasticBlockStore+: awsElasticBlockStore}, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk(azureDisk):: {azureDisk+: azureDisk}, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile(azureFile):: {azureFile+: azureFile}, - // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - capacity(capacity):: {capacity+: capacity}, - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs(cephfs):: {cephfs+: cephfs}, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder(cinder):: {cinder+: 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(claimRef):: {claimRef+: claimRef}, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc(fc):: {fc+: fc}, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - flexVolume(flexVolume):: {flexVolume+: 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(flocker):: {flocker+: 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(gcePersistentDisk):: {gcePersistentDisk+: gcePersistentDisk}, - // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs(glusterfs):: {glusterfs+: 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(hostPath):: {hostPath+: 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(iscsi):: {iscsi+: iscsi}, - // NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - nfs(nfs):: {nfs+: nfs}, - // What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming - persistentVolumeReclaimPolicy(persistentVolumeReclaimPolicy):: {persistentVolumeReclaimPolicy: persistentVolumeReclaimPolicy}, - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk(photonPersistentDisk):: {photonPersistentDisk+: photonPersistentDisk}, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume(portworxVolume):: {portworxVolume+: portworxVolume}, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte(quobyte):: {quobyte+: quobyte}, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd(rbd):: {rbd+: rbd}, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIO(scaleIO):: {scaleIO+: scaleIO}, - // Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass. - storageClassName(storageClassName):: {storageClassName: storageClassName}, - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume(vsphereVolume):: {vsphereVolume+: vsphereVolume}, - mixin:: { - awsElasticBlockStore:: { - local awsElasticBlockStore(mixin) = {awsElasticBlockStore+: mixin}, - fsType(fsType):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.fsType(fsType)), - partition(partition):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.partition(partition)), - readOnly(readOnly):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.readOnly(readOnly)), - volumeID(volumeID):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.volumeID(volumeID)), - }, - azureDisk:: { - local azureDisk(mixin) = {azureDisk+: mixin}, - cachingMode(cachingMode):: azureDisk($.v1.azureDiskVolumeSource.cachingMode(cachingMode)), - diskName(diskName):: azureDisk($.v1.azureDiskVolumeSource.diskName(diskName)), - diskURI(diskURI):: azureDisk($.v1.azureDiskVolumeSource.diskURI(diskURI)), - fsType(fsType):: azureDisk($.v1.azureDiskVolumeSource.fsType(fsType)), - readOnly(readOnly):: azureDisk($.v1.azureDiskVolumeSource.readOnly(readOnly)), - }, - azureFile:: { - local azureFile(mixin) = {azureFile+: mixin}, - readOnly(readOnly):: azureFile($.v1.azureFileVolumeSource.readOnly(readOnly)), - secretName(secretName):: azureFile($.v1.azureFileVolumeSource.secretName(secretName)), - shareName(shareName):: azureFile($.v1.azureFileVolumeSource.shareName(shareName)), - }, - cephfs:: { - local cephfs(mixin) = {cephfs+: mixin}, - monitors(monitors):: cephfs($.v1.cephFSVolumeSource.monitors(monitors)), - path(path):: cephfs($.v1.cephFSVolumeSource.path(path)), - readOnly(readOnly):: cephfs($.v1.cephFSVolumeSource.readOnly(readOnly)), - secretFile(secretFile):: cephfs($.v1.cephFSVolumeSource.secretFile(secretFile)), - secretRef(secretRef):: cephfs($.v1.cephFSVolumeSource.secretRef(secretRef)), - user(user):: cephfs($.v1.cephFSVolumeSource.user(user)), - }, - cinder:: { - local cinder(mixin) = {cinder+: mixin}, - fsType(fsType):: cinder($.v1.cinderVolumeSource.fsType(fsType)), - readOnly(readOnly):: cinder($.v1.cinderVolumeSource.readOnly(readOnly)), - volumeID(volumeID):: cinder($.v1.cinderVolumeSource.volumeID(volumeID)), - }, - claimRef:: { - local claimRef(mixin) = {claimRef+: mixin}, - fieldPath(fieldPath):: claimRef($.v1.objectReference.fieldPath(fieldPath)), - name(name):: claimRef($.v1.objectReference.name(name)), - namespace(namespace):: claimRef($.v1.objectReference.namespace(namespace)), - resourceVersion(resourceVersion):: claimRef($.v1.objectReference.resourceVersion(resourceVersion)), - uid(uid):: claimRef($.v1.objectReference.uid(uid)), - }, - fc:: { - local fc(mixin) = {fc+: mixin}, - fsType(fsType):: fc($.v1.fCVolumeSource.fsType(fsType)), - lun(lun):: fc($.v1.fCVolumeSource.lun(lun)), - readOnly(readOnly):: fc($.v1.fCVolumeSource.readOnly(readOnly)), - targetWWNs(targetWWNs):: fc($.v1.fCVolumeSource.targetWWNs(targetWWNs)), - }, - flexVolume:: { - local flexVolume(mixin) = {flexVolume+: mixin}, - driver(driver):: flexVolume($.v1.flexVolumeSource.driver(driver)), - fsType(fsType):: flexVolume($.v1.flexVolumeSource.fsType(fsType)), - options(options):: flexVolume($.v1.flexVolumeSource.options(options)), - readOnly(readOnly):: flexVolume($.v1.flexVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: flexVolume($.v1.flexVolumeSource.secretRef(secretRef)), - }, - flocker:: { - local flocker(mixin) = {flocker+: mixin}, - datasetName(datasetName):: flocker($.v1.flockerVolumeSource.datasetName(datasetName)), - datasetUUID(datasetUUID):: flocker($.v1.flockerVolumeSource.datasetUUID(datasetUUID)), - }, - gcePersistentDisk:: { - local gcePersistentDisk(mixin) = {gcePersistentDisk+: mixin}, - fsType(fsType):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.fsType(fsType)), - partition(partition):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.partition(partition)), - pdName(pdName):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.pdName(pdName)), - readOnly(readOnly):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.readOnly(readOnly)), - }, - glusterfs:: { - local glusterfs(mixin) = {glusterfs+: mixin}, - endpoints(endpoints):: glusterfs($.v1.glusterfsVolumeSource.endpoints(endpoints)), - path(path):: glusterfs($.v1.glusterfsVolumeSource.path(path)), - readOnly(readOnly):: glusterfs($.v1.glusterfsVolumeSource.readOnly(readOnly)), - }, - hostPath:: { - local hostPath(mixin) = {hostPath+: mixin}, - path(path):: hostPath($.v1.hostPathVolumeSource.path(path)), - }, - iscsi:: { - local iscsi(mixin) = {iscsi+: mixin}, - chapAuthDiscovery(chapAuthDiscovery):: iscsi($.v1.iSCSIVolumeSource.chapAuthDiscovery(chapAuthDiscovery)), - chapAuthSession(chapAuthSession):: iscsi($.v1.iSCSIVolumeSource.chapAuthSession(chapAuthSession)), - fsType(fsType):: iscsi($.v1.iSCSIVolumeSource.fsType(fsType)), - iqn(iqn):: iscsi($.v1.iSCSIVolumeSource.iqn(iqn)), - iscsiInterface(iscsiInterface):: iscsi($.v1.iSCSIVolumeSource.iscsiInterface(iscsiInterface)), - lun(lun):: iscsi($.v1.iSCSIVolumeSource.lun(lun)), - portals(portals):: iscsi($.v1.iSCSIVolumeSource.portals(portals)), - readOnly(readOnly):: iscsi($.v1.iSCSIVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: iscsi($.v1.iSCSIVolumeSource.secretRef(secretRef)), - targetPortal(targetPortal):: iscsi($.v1.iSCSIVolumeSource.targetPortal(targetPortal)), - }, - nfs:: { - local nfs(mixin) = {nfs+: mixin}, - path(path):: nfs($.v1.nFSVolumeSource.path(path)), - readOnly(readOnly):: nfs($.v1.nFSVolumeSource.readOnly(readOnly)), - server(server):: nfs($.v1.nFSVolumeSource.server(server)), - }, - photonPersistentDisk:: { - local photonPersistentDisk(mixin) = {photonPersistentDisk+: mixin}, - fsType(fsType):: photonPersistentDisk($.v1.photonPersistentDiskVolumeSource.fsType(fsType)), - pdID(pdID):: photonPersistentDisk($.v1.photonPersistentDiskVolumeSource.pdID(pdID)), - }, - portworxVolume:: { - local portworxVolume(mixin) = {portworxVolume+: mixin}, - fsType(fsType):: portworxVolume($.v1.portworxVolumeSource.fsType(fsType)), - readOnly(readOnly):: portworxVolume($.v1.portworxVolumeSource.readOnly(readOnly)), - volumeID(volumeID):: portworxVolume($.v1.portworxVolumeSource.volumeID(volumeID)), - }, - quobyte:: { - local quobyte(mixin) = {quobyte+: mixin}, - group(group):: quobyte($.v1.quobyteVolumeSource.group(group)), - readOnly(readOnly):: quobyte($.v1.quobyteVolumeSource.readOnly(readOnly)), - registry(registry):: quobyte($.v1.quobyteVolumeSource.registry(registry)), - user(user):: quobyte($.v1.quobyteVolumeSource.user(user)), - volume(volume):: quobyte($.v1.quobyteVolumeSource.volume(volume)), - }, - rbd:: { - local rbd(mixin) = {rbd+: mixin}, - fsType(fsType):: rbd($.v1.rBDVolumeSource.fsType(fsType)), - image(image):: rbd($.v1.rBDVolumeSource.image(image)), - keyring(keyring):: rbd($.v1.rBDVolumeSource.keyring(keyring)), - monitors(monitors):: rbd($.v1.rBDVolumeSource.monitors(monitors)), - pool(pool):: rbd($.v1.rBDVolumeSource.pool(pool)), - readOnly(readOnly):: rbd($.v1.rBDVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: rbd($.v1.rBDVolumeSource.secretRef(secretRef)), - user(user):: rbd($.v1.rBDVolumeSource.user(user)), - }, - scaleIO:: { - local scaleIO(mixin) = {scaleIO+: mixin}, - fsType(fsType):: scaleIO($.v1.scaleIOVolumeSource.fsType(fsType)), - gateway(gateway):: scaleIO($.v1.scaleIOVolumeSource.gateway(gateway)), - protectionDomain(protectionDomain):: scaleIO($.v1.scaleIOVolumeSource.protectionDomain(protectionDomain)), - readOnly(readOnly):: scaleIO($.v1.scaleIOVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: scaleIO($.v1.scaleIOVolumeSource.secretRef(secretRef)), - sslEnabled(sslEnabled):: scaleIO($.v1.scaleIOVolumeSource.sslEnabled(sslEnabled)), - storageMode(storageMode):: scaleIO($.v1.scaleIOVolumeSource.storageMode(storageMode)), - storagePool(storagePool):: scaleIO($.v1.scaleIOVolumeSource.storagePool(storagePool)), - system(system):: scaleIO($.v1.scaleIOVolumeSource.system(system)), - volumeName(volumeName):: scaleIO($.v1.scaleIOVolumeSource.volumeName(volumeName)), - }, - vsphereVolume:: { - local vsphereVolume(mixin) = {vsphereVolume+: mixin}, - fsType(fsType):: vsphereVolume($.v1.vsphereVirtualDiskVolumeSource.fsType(fsType)), - volumePath(volumePath):: vsphereVolume($.v1.vsphereVirtualDiskVolumeSource.volumePath(volumePath)), - }, - }, - }, - persistentVolumeStatus:: { - // A human-readable message indicating details about why the volume is in this state. - message(message):: {message: message}, - // Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase - phase(phase):: {phase: phase}, - // Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI. - reason(reason):: {reason: reason}, - }, - photonPersistentDiskVolumeSource:: { - default(pdID):: - { - pdID: 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(fsType):: {fsType: fsType}, - // ID that identifies Photon Controller persistent disk - pdID(pdID):: {pdID: pdID}, - }, - pod:: { - local kind = {kind: "Pod"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // Specification of the desired behavior of the pod. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - // Most recently observed status of the pod. This data may not be up to date. Populated by the system. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - activeDeadlineSeconds(activeDeadlineSeconds):: spec($.v1.podSpec.activeDeadlineSeconds(activeDeadlineSeconds)), - affinity(affinity):: spec($.v1.podSpec.affinity(affinity)), - automountServiceAccountToken(automountServiceAccountToken):: spec($.v1.podSpec.automountServiceAccountToken(automountServiceAccountToken)), - containers(containers):: spec($.v1.podSpec.containers(containers)), - dnsPolicy(dnsPolicy):: spec($.v1.podSpec.dnsPolicy(dnsPolicy)), - hostIPC(hostIPC):: spec($.v1.podSpec.hostIPC(hostIPC)), - hostMappings(hostMappings):: spec($.v1.podSpec.hostMappings(hostMappings)), - hostNetwork(hostNetwork):: spec($.v1.podSpec.hostNetwork(hostNetwork)), - hostPID(hostPID):: spec($.v1.podSpec.hostPID(hostPID)), - hostname(hostname):: spec($.v1.podSpec.hostname(hostname)), - imagePullSecrets(imagePullSecrets):: spec($.v1.podSpec.imagePullSecrets(imagePullSecrets)), - initContainers(initContainers):: spec($.v1.podSpec.initContainers(initContainers)), - nodeName(nodeName):: spec($.v1.podSpec.nodeName(nodeName)), - nodeSelector(nodeSelector):: spec($.v1.podSpec.nodeSelector(nodeSelector)), - restartPolicy(restartPolicy):: spec($.v1.podSpec.restartPolicy(restartPolicy)), - schedulerName(schedulerName):: spec($.v1.podSpec.schedulerName(schedulerName)), - securityContext(securityContext):: spec($.v1.podSpec.securityContext(securityContext)), - serviceAccount(serviceAccount):: spec($.v1.podSpec.serviceAccount(serviceAccount)), - serviceAccountName(serviceAccountName):: spec($.v1.podSpec.serviceAccountName(serviceAccountName)), - subdomain(subdomain):: spec($.v1.podSpec.subdomain(subdomain)), - terminationGracePeriodSeconds(terminationGracePeriodSeconds):: spec($.v1.podSpec.terminationGracePeriodSeconds(terminationGracePeriodSeconds)), - tolerations(tolerations):: spec($.v1.podSpec.tolerations(tolerations)), - volumes(volumes):: spec($.v1.podSpec.volumes(volumes)), - }, - status:: { - local status(mixin) = {status+: mixin}, - conditions(conditions):: status($.v1.podStatus.conditions(conditions)), - containerStatuses(containerStatuses):: status($.v1.podStatus.containerStatuses(containerStatuses)), - hostIP(hostIP):: status($.v1.podStatus.hostIP(hostIP)), - initContainerStatuses(initContainerStatuses):: status($.v1.podStatus.initContainerStatuses(initContainerStatuses)), - message(message):: status($.v1.podStatus.message(message)), - phase(phase):: status($.v1.podStatus.phase(phase)), - podIP(podIP):: status($.v1.podStatus.podIP(podIP)), - qosClass(qosClass):: status($.v1.podStatus.qosClass(qosClass)), - reason(reason):: status($.v1.podStatus.reason(reason)), - startTime(startTime):: status($.v1.podStatus.startTime(startTime)), - }, - }, - }, - podAffinity:: { - default():: - { - preferredDuringSchedulingIgnoredDuringExecution: [], - requiredDuringSchedulingIgnoredDuringExecution: [], - }, - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}, - }, - podAffinityTerm:: { - default():: - { - labelSelector: {}, - namespaces: [], - }, - // A label query over a set of resources, in this case pods. - labelSelector(labelSelector):: {labelSelector+: labelSelector}, - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - namespaces(namespaces):: if std.type(namespaces) == "array" then {namespaces+: namespaces} else {namespaces+: [namespaces]}, - // 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. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. - topologyKey(topologyKey):: {topologyKey: topologyKey}, - mixin:: { - labelSelector:: { - local labelSelector(mixin) = {labelSelector+: mixin}, - matchExpressions(matchExpressions):: labelSelector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: labelSelector($.v1.labelSelector.matchLabels(matchLabels)), - }, - }, - }, - podAntiAffinity:: { - default():: - { - preferredDuringSchedulingIgnoredDuringExecution: [], - requiredDuringSchedulingIgnoredDuringExecution: [], - }, - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}, - }, - podCondition:: { - default(type, status):: - { - status: status, - type: type, - }, - // Last time we probed the condition. - lastProbeTime(lastProbeTime):: {lastProbeTime: lastProbeTime}, - // Last time the condition transitioned from one status to another. - lastTransitionTime(lastTransitionTime):: {lastTransitionTime: lastTransitionTime}, - // Human-readable message indicating details about last transition. - message(message):: {message: message}, - // Unique, one-word, CamelCase reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - status(status):: {status: status}, - // Type is the type of the condition. Currently only Ready. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - type(type):: {type: type}, - }, - podList:: { - local kind = {kind: "PodList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // List of pods. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - podSecurityContext:: { - default():: - { - fsGroup: {}, - runAsUser: {}, - seLinuxOptions: {}, - supplementalGroups: [], - }, - // 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 - fsGroup(fsGroup):: {fsGroup+: fsGroup}, - // 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(runAsNonRoot):: {runAsNonRoot: 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(runAsUser):: {runAsUser+: runAsUser}, - // 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):: {seLinuxOptions+: 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(supplementalGroups):: if std.type(supplementalGroups) == "array" then {supplementalGroups+: supplementalGroups} else {supplementalGroups+: [supplementalGroups]}, - mixin:: { - seLinuxOptions:: { - local seLinuxOptions(mixin) = {seLinuxOptions+: mixin}, - level(level):: seLinuxOptions($.v1.sELinuxOptions.level(level)), - role(role):: seLinuxOptions($.v1.sELinuxOptions.role(role)), - type(type):: seLinuxOptions($.v1.sELinuxOptions.type(type)), - user(user):: seLinuxOptions($.v1.sELinuxOptions.user(user)), - }, - }, - }, - podSpec:: { - default(containers):: - { - affinity: {}, - containers: if std.type(containers) == "array" then containers else [containers], - hostMappings: [], - imagePullSecrets: [], - initContainers: [], - nodeSelector: {}, - securityContext: {}, - tolerations: [], - volumes: [], - }, - // 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(activeDeadlineSeconds):: {activeDeadlineSeconds: activeDeadlineSeconds}, - // If specified, the pod's scheduling constraints - affinity(affinity):: {affinity+: affinity}, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: {automountServiceAccountToken: automountServiceAccountToken}, - // 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(containers):: if std.type(containers) == "array" then {containers+: containers} else {containers+: [containers]}, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: {dnsPolicy: dnsPolicy}, - // Use the host's ipc namespace. Optional: Default to false. - hostIPC(hostIPC):: {hostIPC: hostIPC}, - // 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. - hostMappings(hostMappings):: if std.type(hostMappings) == "array" then {hostMappings+: hostMappings} else {hostMappings+: [hostMappings]}, - // 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(hostNetwork):: {hostNetwork: hostNetwork}, - // Use the host's pid namespace. Optional: Default to false. - hostPID(hostPID):: {hostPID: hostPID}, - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: {hostname: hostname}, - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then {imagePullSecrets+: imagePullSecrets} else {imagePullSecrets+: [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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then {initContainers+: initContainers} else {initContainers+: [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(nodeName):: {nodeName: 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(nodeSelector):: {nodeSelector+: nodeSelector}, - // 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(restartPolicy):: {restartPolicy: restartPolicy}, - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: {schedulerName: 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(securityContext):: {securityContext+: securityContext}, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: {serviceAccount: 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(serviceAccountName):: {serviceAccountName: serviceAccountName}, - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: {subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: {terminationGracePeriodSeconds: terminationGracePeriodSeconds}, - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then {tolerations+: tolerations} else {tolerations+: [tolerations]}, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, - mixin:: { - affinity:: { - local affinity(mixin) = {affinity+: mixin}, - nodeAffinity(nodeAffinity):: affinity($.v1.affinity.nodeAffinity(nodeAffinity)), - podAffinity(podAffinity):: affinity($.v1.affinity.podAffinity(podAffinity)), - podAntiAffinity(podAntiAffinity):: affinity($.v1.affinity.podAntiAffinity(podAntiAffinity)), - }, - securityContext:: { - local securityContext(mixin) = {securityContext+: mixin}, - fsGroup(fsGroup):: securityContext($.v1.podSecurityContext.fsGroup(fsGroup)), - runAsNonRoot(runAsNonRoot):: securityContext($.v1.podSecurityContext.runAsNonRoot(runAsNonRoot)), - runAsUser(runAsUser):: securityContext($.v1.podSecurityContext.runAsUser(runAsUser)), - seLinuxOptions(seLinuxOptions):: securityContext($.v1.podSecurityContext.seLinuxOptions(seLinuxOptions)), - supplementalGroups(supplementalGroups):: securityContext($.v1.podSecurityContext.supplementalGroups(supplementalGroups)), - }, - }, - }, - podStatus:: { - default():: - { - conditions: [], - containerStatuses: [], - initContainerStatuses: [], - }, - // Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - // The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - containerStatuses(containerStatuses):: if std.type(containerStatuses) == "array" then {containerStatuses+: containerStatuses} else {containerStatuses+: [containerStatuses]}, - // IP address of the host to which the pod is assigned. Empty if not yet scheduled. - hostIP(hostIP):: {hostIP: hostIP}, - // The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - initContainerStatuses(initContainerStatuses):: if std.type(initContainerStatuses) == "array" then {initContainerStatuses+: initContainerStatuses} else {initContainerStatuses+: [initContainerStatuses]}, - // A human readable message indicating details about why the pod is in this condition. - message(message):: {message: message}, - // Current condition of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase - phase(phase):: {phase: phase}, - // IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated. - podIP(podIP):: {podIP: podIP}, - // The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md - qosClass(qosClass):: {qosClass: qosClass}, - // A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk' - reason(reason):: {reason: reason}, - // RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod. - startTime(startTime):: {startTime: startTime}, - }, - podTemplate:: { - local kind = {kind: "PodTemplate"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - template: {}, - }, - // Template defines the pods that will be created from this pod template. https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - template(template):: {template+: template}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - template:: { - local template(mixin) = {template+: mixin}, - spec(spec):: template($.v1.podTemplateSpec.spec(spec)), - }, - }, - }, - podTemplateList:: { - local kind = {kind: "PodTemplateList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // List of pod templates - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - podTemplateSpec:: { - default(name, namespace="default"):: - defaultMetadata(name, namespace) + - { - spec: {}, - }, - // Specification of the desired behavior of the pod. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - activeDeadlineSeconds(activeDeadlineSeconds):: spec($.v1.podSpec.activeDeadlineSeconds(activeDeadlineSeconds)), - affinity(affinity):: spec($.v1.podSpec.affinity(affinity)), - automountServiceAccountToken(automountServiceAccountToken):: spec($.v1.podSpec.automountServiceAccountToken(automountServiceAccountToken)), - containers(containers):: spec($.v1.podSpec.containers(containers)), - dnsPolicy(dnsPolicy):: spec($.v1.podSpec.dnsPolicy(dnsPolicy)), - hostIPC(hostIPC):: spec($.v1.podSpec.hostIPC(hostIPC)), - hostMappings(hostMappings):: spec($.v1.podSpec.hostMappings(hostMappings)), - hostNetwork(hostNetwork):: spec($.v1.podSpec.hostNetwork(hostNetwork)), - hostPID(hostPID):: spec($.v1.podSpec.hostPID(hostPID)), - hostname(hostname):: spec($.v1.podSpec.hostname(hostname)), - imagePullSecrets(imagePullSecrets):: spec($.v1.podSpec.imagePullSecrets(imagePullSecrets)), - initContainers(initContainers):: spec($.v1.podSpec.initContainers(initContainers)), - nodeName(nodeName):: spec($.v1.podSpec.nodeName(nodeName)), - nodeSelector(nodeSelector):: spec($.v1.podSpec.nodeSelector(nodeSelector)), - restartPolicy(restartPolicy):: spec($.v1.podSpec.restartPolicy(restartPolicy)), - schedulerName(schedulerName):: spec($.v1.podSpec.schedulerName(schedulerName)), - securityContext(securityContext):: spec($.v1.podSpec.securityContext(securityContext)), - serviceAccount(serviceAccount):: spec($.v1.podSpec.serviceAccount(serviceAccount)), - serviceAccountName(serviceAccountName):: spec($.v1.podSpec.serviceAccountName(serviceAccountName)), - subdomain(subdomain):: spec($.v1.podSpec.subdomain(subdomain)), - terminationGracePeriodSeconds(terminationGracePeriodSeconds):: spec($.v1.podSpec.terminationGracePeriodSeconds(terminationGracePeriodSeconds)), - tolerations(tolerations):: spec($.v1.podSpec.tolerations(tolerations)), - volumes(volumes):: spec($.v1.podSpec.volumes(volumes)), - }, - }, - }, - portworxVolumeSource:: { - default(volumeID):: - { - volumeID: 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(fsType):: {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // VolumeID uniquely identifies a Portworx volume - volumeID(volumeID):: {volumeID: volumeID}, - }, - preconditions:: { - default():: - { - uid: {}, - }, - // Specifies the target UID. - uid(uid):: {uid+: uid}, - }, - preferredSchedulingTerm:: { - default(weight, preference):: - { - preference: preference, - weight: weight, - }, - // A node selector term, associated with the corresponding weight. - preference(preference):: {preference+: preference}, - // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - weight(weight):: {weight: weight}, - mixin:: { - preference:: { - local preference(mixin) = {preference+: mixin}, - matchExpressions(matchExpressions):: preference($.v1.nodeSelectorTerm.matchExpressions(matchExpressions)), - }, - }, - }, - probe:: { - default():: - { - exec: {}, - httpGet: {}, - tcpSocket: {}, - }, - // One and only one of the following should be specified. Exec specifies the action to take. - exec(exec):: {exec+: exec}, - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - failureThreshold(failureThreshold):: {failureThreshold: failureThreshold}, - // HTTPGet specifies the http request to perform. - httpGet(httpGet):: {httpGet+: 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(initialDelaySeconds):: {initialDelaySeconds: initialDelaySeconds}, - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - periodSeconds(periodSeconds):: {periodSeconds: periodSeconds}, - // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. - successThreshold(successThreshold):: {successThreshold: successThreshold}, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket(tcpSocket):: {tcpSocket+: tcpSocket}, - // 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(timeoutSeconds):: {timeoutSeconds: timeoutSeconds}, - mixin:: { - exec:: { - local exec(mixin) = {exec+: mixin}, - command(command):: exec($.v1.execAction.command(command)), - }, - httpGet:: { - local httpGet(mixin) = {httpGet+: mixin}, - host(host):: httpGet($.v1.hTTPGetAction.host(host)), - httpHeaders(httpHeaders):: httpGet($.v1.hTTPGetAction.httpHeaders(httpHeaders)), - path(path):: httpGet($.v1.hTTPGetAction.path(path)), - port(port):: httpGet($.v1.hTTPGetAction.port(port)), - scheme(scheme):: httpGet($.v1.hTTPGetAction.scheme(scheme)), - }, - tcpSocket:: { - local tcpSocket(mixin) = {tcpSocket+: mixin}, - host(host):: tcpSocket($.v1.tCPSocketAction.host(host)), - port(port):: tcpSocket($.v1.tCPSocketAction.port(port)), - }, - }, - }, - projectedVolumeSource:: { - default(sources):: - { - sources: if std.type(sources) == "array" then sources else [sources], - }, - // Mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: defaultMode}, - // list of volume projections - sources(sources):: if std.type(sources) == "array" then {sources+: sources} else {sources+: [sources]}, - }, - quobyteVolumeSource:: { - default(registry, volume):: - { - registry: registry, - volume: volume, - }, - // Group to map volume access to Default is no group - group(group):: {group: group}, - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - readOnly(readOnly):: {readOnly: readOnly}, - // 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(registry):: {registry: registry}, - // User to map volume access to Defaults to serivceaccount user - user(user):: {user: user}, - // Volume is a string that references an already created Quobyte volume by name. - volume(volume):: {volume: volume}, - }, - rBDVolumeSource:: { - default(monitors, image):: - { - image: image, - monitors: if std.type(monitors) == "array" then monitors else [monitors], - secretRef: {}, - }, - // 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(fsType):: {fsType: fsType}, - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - image(image):: {image: image}, - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - keyring(keyring):: {keyring: keyring}, - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - pool(pool):: {pool: pool}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - readOnly(readOnly):: {readOnly: readOnly}, - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef(secretRef):: {secretRef+: secretRef}, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - user(user):: {user: user}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - replicationController:: { - local kind = {kind: "ReplicationController"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // Spec defines the specification of the desired behavior of the replication controller. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - // Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - minReadySeconds(minReadySeconds):: spec($.v1.replicationControllerSpec.minReadySeconds(minReadySeconds)), - replicas(replicas):: spec($.v1.replicationControllerSpec.replicas(replicas)), - selector(selector):: spec($.v1.replicationControllerSpec.selector(selector)), - template(template):: spec($.v1.replicationControllerSpec.template(template)), - }, - status:: { - local status(mixin) = {status+: mixin}, - availableReplicas(availableReplicas):: status($.v1.replicationControllerStatus.availableReplicas(availableReplicas)), - conditions(conditions):: status($.v1.replicationControllerStatus.conditions(conditions)), - fullyLabeledReplicas(fullyLabeledReplicas):: status($.v1.replicationControllerStatus.fullyLabeledReplicas(fullyLabeledReplicas)), - observedGeneration(observedGeneration):: status($.v1.replicationControllerStatus.observedGeneration(observedGeneration)), - readyReplicas(readyReplicas):: status($.v1.replicationControllerStatus.readyReplicas(readyReplicas)), - replicas(replicas):: status($.v1.replicationControllerStatus.replicas(replicas)), - }, - }, - }, - replicationControllerCondition:: { - default(type, status):: - { - status: status, - type: type, - }, - // The last time the condition transitioned from one status to another. - lastTransitionTime(lastTransitionTime):: {lastTransitionTime: lastTransitionTime}, - // A human readable message indicating details about the transition. - message(message):: {message: message}, - // The reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Status of the condition, one of True, False, Unknown. - status(status):: {status: status}, - // Type of replication controller condition. - type(type):: {type: type}, - }, - replicationControllerList:: { - local kind = {kind: "ReplicationControllerList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - replicationControllerSpec:: { - default():: - { - selector: {}, - 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(minReadySeconds):: {minReadySeconds: 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(replicas):: {replicas: 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(selector):: {selector+: 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(template):: {template+: template}, - mixin:: { - template:: { - local template(mixin) = {template+: mixin}, - spec(spec):: template($.v1.podTemplateSpec.spec(spec)), - }, - }, - }, - replicationControllerStatus:: { - default(replicas):: - { - conditions: [], - replicas: replicas, - }, - // The number of available replicas (ready for at least minReadySeconds) for this replication controller. - availableReplicas(availableReplicas):: {availableReplicas: availableReplicas}, - // Represents the latest available observations of a replication controller's current state. - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - // The number of pods that have labels matching the labels of the pod template of the replication controller. - fullyLabeledReplicas(fullyLabeledReplicas):: {fullyLabeledReplicas: fullyLabeledReplicas}, - // ObservedGeneration reflects the generation of the most recently observed replication controller. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - // The number of ready replicas for this replication controller. - readyReplicas(readyReplicas):: {readyReplicas: readyReplicas}, - // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller - replicas(replicas):: {replicas: replicas}, - }, - resourceFieldSelector:: { - default(resource):: - { - resource: resource, - }, - // Container name: required for volumes, optional for env vars - containerName(containerName):: {containerName: containerName}, - // Specifies the output format of the exposed resources, defaults to "1" - divisor(divisor):: {divisor: divisor}, - // Required: resource to select - resource(resource):: {resource: resource}, - }, - resourceQuota:: { - local kind = {kind: "ResourceQuota"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // Spec defines the desired quota. https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - // Status defines the actual enforced quota and its current usage. https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - hard(hard):: spec($.v1.resourceQuotaSpec.hard(hard)), - scopes(scopes):: spec($.v1.resourceQuotaSpec.scopes(scopes)), - }, - status:: { - local status(mixin) = {status+: mixin}, - hard(hard):: status($.v1.resourceQuotaStatus.hard(hard)), - used(used):: status($.v1.resourceQuotaStatus.used(used)), - }, - }, - }, - resourceQuotaList:: { - local kind = {kind: "ResourceQuotaList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // Items is a list of ResourceQuota objects. More info: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/admission_control_resource_quota.md - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - resourceQuotaScope:: { - }, - resourceQuotaSpec:: { - default():: - { - hard: {}, - scopes: [], - }, - // Hard is the set of desired hard limits for each named resource. More info: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/admission_control_resource_quota.md - hard(hard):: {hard+: hard}, - // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. - scopes(scopes):: if std.type(scopes) == "array" then {scopes+: scopes} else {scopes+: [scopes]}, - }, - resourceQuotaStatus:: { - default():: - { - hard: {}, - used: {}, - }, - // Hard is the set of enforced hard limits for each named resource. More info: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/admission_control_resource_quota.md - hard(hard):: {hard+: hard}, - // Used is the current observed total usage of the resource in the namespace. - used(used):: {used+: used}, - }, - resourceRequirements:: { - default():: - { - limits: {}, - requests: {}, - }, - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - limits(limits):: {limits+: 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-compute-resources-container/ - requests(requests):: {requests+: requests}, - }, - sELinuxOptions:: { - // Level is SELinux level label that applies to the container. - level(level):: {level: level}, - // Role is a SELinux role label that applies to the container. - role(role):: {role: role}, - // Type is a SELinux type label that applies to the container. - type(type):: {type: type}, - // User is a SELinux user label that applies to the container. - user(user):: {user: user}, - }, - scale:: { - local kind = {kind: "Scale"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - spec(spec):: {spec+: spec}, - // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - replicas(replicas):: spec($.v1.scaleSpec.replicas(replicas)), - }, - status:: { - local status(mixin) = {status+: mixin}, - replicas(replicas):: status($.v1.scaleStatus.replicas(replicas)), - selector(selector):: status($.v1.scaleStatus.selector(selector)), - }, - }, - }, - scaleIOVolumeSource:: { - default(gateway, system, secretRef):: - { - gateway: gateway, - secretRef: secretRef, - system: system, - }, - // 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(fsType):: {fsType: fsType}, - // The host address of the ScaleIO API Gateway. - gateway(gateway):: {gateway: gateway}, - // The name of the Protection Domain for the configured storage (defaults to "default"). - protectionDomain(protectionDomain):: {protectionDomain: protectionDomain}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef(secretRef):: {secretRef+: secretRef}, - // Flag to enable/disable SSL communication with Gateway, default false - sslEnabled(sslEnabled):: {sslEnabled: sslEnabled}, - // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). - storageMode(storageMode):: {storageMode: storageMode}, - // The Storage Pool associated with the protection domain (defaults to "default"). - storagePool(storagePool):: {storagePool: storagePool}, - // The name of the storage system as configured in ScaleIO. - system(system):: {system: system}, - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - volumeName(volumeName):: {volumeName: volumeName}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - scaleSpec:: { - // desired number of instances for the scaled object. - replicas(replicas):: {replicas: replicas}, - }, - scaleStatus:: { - default(replicas):: - { - replicas: replicas, - }, - // actual number of observed instances of the scaled object. - replicas(replicas):: {replicas: replicas}, - // label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors - selector(selector):: {selector: selector}, - }, - secret:: { - local kind = {kind: "Secret"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - data: {}, - stringData: {}, - }, - // 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(data):: {data+: data}, - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. - stringData(stringData):: {stringData+: stringData}, - // Used to facilitate programmatic handling of secret data. - type(type):: {type: type}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - }, - }, - secretEnvSource:: { - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the Secret must be defined - optional(optional):: {optional: optional}, - }, - secretKeySelector:: { - default(key):: - { - key: key, - }, - // The key of the secret to select from. Must be a valid secret key. - key(key):: {key: key}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the Secret or it's key must be defined - optional(optional):: {optional: optional}, - }, - secretList:: { - local kind = {kind: "SecretList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - secretProjection:: { - default():: - { - items: [], - }, - // 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the Secret or its key must be defined - optional(optional):: {optional: optional}, - }, - secretVolumeSource:: { - default():: - { - items: [], - }, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - // Specify whether the Secret or it's keys must be defined - optional(optional):: {optional: optional}, - // Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - secretName(secretName):: {secretName: secretName}, - }, - securityContext:: { - default():: - { - capabilities: {}, - runAsUser: {}, - seLinuxOptions: {}, - }, - // The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. - capabilities(capabilities):: {capabilities+: capabilities}, - // Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. - privileged(privileged):: {privileged: privileged}, - // Whether this container has a read-only root filesystem. Default is false. - readOnlyRootFilesystem(readOnlyRootFilesystem):: {readOnlyRootFilesystem: readOnlyRootFilesystem}, - // 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(runAsNonRoot):: {runAsNonRoot: 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(runAsUser):: {runAsUser+: runAsUser}, - // 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):: {seLinuxOptions+: seLinuxOptions}, - mixin:: { - capabilities:: { - local capabilities(mixin) = {capabilities+: mixin}, - add(add):: capabilities($.v1.capabilities.add(add)), - drop(drop):: capabilities($.v1.capabilities.drop(drop)), - }, - seLinuxOptions:: { - local seLinuxOptions(mixin) = {seLinuxOptions+: mixin}, - level(level):: seLinuxOptions($.v1.sELinuxOptions.level(level)), - role(role):: seLinuxOptions($.v1.sELinuxOptions.role(role)), - type(type):: seLinuxOptions($.v1.sELinuxOptions.type(type)), - user(user):: seLinuxOptions($.v1.sELinuxOptions.user(user)), - }, - }, - }, - service:: { - local kind = {kind: "Service"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // Spec defines the behavior of a service. https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - // Most recently observed status of the service. Populated by the system. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - clusterIP(clusterIP):: spec($.v1.serviceSpec.clusterIP(clusterIP)), - externalIPs(externalIPs):: spec($.v1.serviceSpec.externalIPs(externalIPs)), - externalName(externalName):: spec($.v1.serviceSpec.externalName(externalName)), - externalTrafficPolicy(externalTrafficPolicy):: spec($.v1.serviceSpec.externalTrafficPolicy(externalTrafficPolicy)), - healthCheckNodePort(healthCheckNodePort):: spec($.v1.serviceSpec.healthCheckNodePort(healthCheckNodePort)), - loadBalancerIP(loadBalancerIP):: spec($.v1.serviceSpec.loadBalancerIP(loadBalancerIP)), - loadBalancerSourceRanges(loadBalancerSourceRanges):: spec($.v1.serviceSpec.loadBalancerSourceRanges(loadBalancerSourceRanges)), - ports(ports):: spec($.v1.serviceSpec.ports(ports)), - selector(selector):: spec($.v1.serviceSpec.selector(selector)), - sessionAffinity(sessionAffinity):: spec($.v1.serviceSpec.sessionAffinity(sessionAffinity)), - type(type):: spec($.v1.serviceSpec.type(type)), - }, - status:: { - local status(mixin) = {status+: mixin}, - loadBalancer(loadBalancer):: status($.v1.serviceStatus.loadBalancer(loadBalancer)), - }, - }, - }, - serviceAccount:: { - local kind = {kind: "ServiceAccount"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - imagePullSecrets: [], - secrets: [], - }, - // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level. - automountServiceAccountToken(automountServiceAccountToken):: {automountServiceAccountToken: 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then {imagePullSecrets+: imagePullSecrets} else {imagePullSecrets+: [imagePullSecrets]}, - // 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(secrets):: if std.type(secrets) == "array" then {secrets+: secrets} else {secrets+: [secrets]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - }, - }, - serviceAccountList:: { - local kind = {kind: "ServiceAccountList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - serviceList:: { - local kind = {kind: "ServiceList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // List of services - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - servicePort:: { - default(port):: - { - port: port, - }, - // The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service. - name(name):: {name: name}, - // The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - nodePort(nodePort):: {nodePort: nodePort}, - // The port that will be exposed by this service. - port(port):: {port: port}, - // The IP protocol for this port. Supports "TCP" and "UDP". Default is TCP. - protocol(protocol):: {protocol: 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(targetPort):: {targetPort: targetPort}, - }, - serviceSpec:: { - default():: - { - externalIPs: [], - loadBalancerSourceRanges: [], - ports: [], - selector: {}, - }, - // clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - clusterIP(clusterIP):: {clusterIP: clusterIP}, - // 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(externalIPs):: if std.type(externalIPs) == "array" then {externalIPs+: externalIPs} else {externalIPs+: [externalIPs]}, - // externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName. - externalName(externalName):: {externalName: externalName}, - // externalTrafficPolicy denotes if this Service desires to route external traffic to local endpoints only. This preserves Source IP and avoids a second hop for LoadBalancer and Nodeport type services. - externalTrafficPolicy(externalTrafficPolicy):: {externalTrafficPolicy: externalTrafficPolicy}, - // healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local. - healthCheckNodePort(healthCheckNodePort):: {healthCheckNodePort: healthCheckNodePort}, - // 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(loadBalancerIP):: {loadBalancerIP: 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/configure-cloud-provider-firewall/ - loadBalancerSourceRanges(loadBalancerSourceRanges):: if std.type(loadBalancerSourceRanges) == "array" then {loadBalancerSourceRanges+: loadBalancerSourceRanges} else {loadBalancerSourceRanges+: [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(ports):: if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - // 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. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ - selector(selector):: {selector+: 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(sessionAffinity):: {sessionAffinity: sessionAffinity}, - // type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to the specified externalName. "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. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services - type(type):: {type: type}, - }, - serviceStatus:: { - default():: - { - loadBalancer: {}, - }, - // LoadBalancer contains the current status of the load-balancer, if one is present. - loadBalancer(loadBalancer):: {loadBalancer+: loadBalancer}, - mixin:: { - loadBalancer:: { - local loadBalancer(mixin) = {loadBalancer+: mixin}, - ingress(ingress):: loadBalancer($.v1.loadBalancerStatus.ingress(ingress)), - }, - }, - }, - status:: { - local kind = {kind: "Status"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - details: {}, - }, - // Suggested HTTP return code for this status, 0 if not set. - code(code):: {code: 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(details):: {details+: details}, - // A human-readable description of the status of this operation. - message(message):: {message: message}, - // 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(reason):: {reason: reason}, - // Status of the operation. One of: "Success" or "Failure". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - status(status):: {status: status}, - mixin:: { - details:: { - local details(mixin) = {details+: mixin}, - causes(causes):: details($.v1.statusDetails.causes(causes)), - group(group):: details($.v1.statusDetails.group(group)), - name(name):: details($.v1.statusDetails.name(name)), - retryAfterSeconds(retryAfterSeconds):: details($.v1.statusDetails.retryAfterSeconds(retryAfterSeconds)), - uid(uid):: details($.v1.statusDetails.uid(uid)), - }, - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - statusCause:: { - // 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(field):: {field: field}, - // A human-readable description of the cause of the error. This field may be presented as-is to a reader. - message(message):: {message: message}, - // A machine-readable description of the cause of the error. If this value is empty there is no information available. - reason(reason):: {reason: reason}, - }, - statusDetails:: { - local kind = {kind: "StatusDetails"}, - default():: - kind + - { - causes: [], - }, - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then {causes+: causes} else {causes+: [causes]}, - // The group attribute of the resource associated with the status StatusReason. - group(group):: {group: group}, - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: {name: name}, - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: {retryAfterSeconds: 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(uid):: {uid: uid}, - }, - tCPSocketAction:: { - default(port):: - { - port: port, - }, - // Optional: Host name to connect to, defaults to the pod IP. - host(host):: {host: host}, - // 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(port):: {port: port}, - }, - taint:: { - default(key, effect):: - { - effect: effect, - key: key, - }, - // Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - effect(effect):: {effect: effect}, - // Required. The taint key to be applied to a node. - key(key):: {key: key}, - // TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints. - timeAdded(timeAdded):: {timeAdded: timeAdded}, - // Required. The taint value corresponding to the taint key. - value(value):: {value: value}, - }, - toleration:: { - // Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - effect(effect):: {effect: 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(key):: {key: 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(operator):: {operator: 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(tolerationSeconds):: {tolerationSeconds: 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(value):: {value: value}, - }, - uniqueVolumeName:: { - }, - volume:: { - default(name):: - { - awsElasticBlockStore: {}, - azureDisk: {}, - azureFile: {}, - cephfs: {}, - cinder: {}, - configMap: {}, - downwardAPI: {}, - emptyDir: {}, - fc: {}, - flexVolume: {}, - flocker: {}, - gcePersistentDisk: {}, - gitRepo: {}, - glusterfs: {}, - hostPath: {}, - iscsi: {}, - name: name, - nfs: {}, - persistentVolumeClaim: {}, - photonPersistentDisk: {}, - portworxVolume: {}, - projected: {}, - quobyte: {}, - rbd: {}, - scaleIO: {}, - secret: {}, - vsphereVolume: {}, - }, - // 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(awsElasticBlockStore):: {awsElasticBlockStore+: awsElasticBlockStore}, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk(azureDisk):: {azureDisk+: azureDisk}, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile(azureFile):: {azureFile+: azureFile}, - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs(cephfs):: {cephfs+: cephfs}, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder(cinder):: {cinder+: cinder}, - // ConfigMap represents a configMap that should populate this volume - configMap(configMap):: {configMap+: configMap}, - // DownwardAPI represents downward API about the pod that should populate this volume - downwardAPI(downwardAPI):: {downwardAPI+: downwardAPI}, - // EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - emptyDir(emptyDir):: {emptyDir+: emptyDir}, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc(fc):: {fc+: fc}, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - flexVolume(flexVolume):: {flexVolume+: flexVolume}, - // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - flocker(flocker):: {flocker+: 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(gcePersistentDisk):: {gcePersistentDisk+: gcePersistentDisk}, - // GitRepo represents a git repository at a particular revision. - gitRepo(gitRepo):: {gitRepo+: gitRepo}, - // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs(glusterfs):: {glusterfs+: 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(hostPath):: {hostPath+: 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://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md - iscsi(iscsi):: {iscsi+: iscsi}, - // 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(name):: {name: name}, - // 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(nfs):: {nfs+: nfs}, - // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - persistentVolumeClaim(persistentVolumeClaim):: {persistentVolumeClaim+: persistentVolumeClaim}, - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk(photonPersistentDisk):: {photonPersistentDisk+: photonPersistentDisk}, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume(portworxVolume):: {portworxVolume+: portworxVolume}, - // Items for all in one resources secrets, configmaps, and downward API - projected(projected):: {projected+: projected}, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte(quobyte):: {quobyte+: quobyte}, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd(rbd):: {rbd+: rbd}, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIO(scaleIO):: {scaleIO+: scaleIO}, - // Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - secret(secret):: {secret+: secret}, - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume(vsphereVolume):: {vsphereVolume+: vsphereVolume}, - mixin:: { - awsElasticBlockStore:: { - local awsElasticBlockStore(mixin) = {awsElasticBlockStore+: mixin}, - fsType(fsType):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.fsType(fsType)), - partition(partition):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.partition(partition)), - readOnly(readOnly):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.readOnly(readOnly)), - volumeID(volumeID):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.volumeID(volumeID)), - }, - azureDisk:: { - local azureDisk(mixin) = {azureDisk+: mixin}, - cachingMode(cachingMode):: azureDisk($.v1.azureDiskVolumeSource.cachingMode(cachingMode)), - diskName(diskName):: azureDisk($.v1.azureDiskVolumeSource.diskName(diskName)), - diskURI(diskURI):: azureDisk($.v1.azureDiskVolumeSource.diskURI(diskURI)), - fsType(fsType):: azureDisk($.v1.azureDiskVolumeSource.fsType(fsType)), - readOnly(readOnly):: azureDisk($.v1.azureDiskVolumeSource.readOnly(readOnly)), - }, - azureFile:: { - local azureFile(mixin) = {azureFile+: mixin}, - readOnly(readOnly):: azureFile($.v1.azureFileVolumeSource.readOnly(readOnly)), - secretName(secretName):: azureFile($.v1.azureFileVolumeSource.secretName(secretName)), - shareName(shareName):: azureFile($.v1.azureFileVolumeSource.shareName(shareName)), - }, - cephfs:: { - local cephfs(mixin) = {cephfs+: mixin}, - monitors(monitors):: cephfs($.v1.cephFSVolumeSource.monitors(monitors)), - path(path):: cephfs($.v1.cephFSVolumeSource.path(path)), - readOnly(readOnly):: cephfs($.v1.cephFSVolumeSource.readOnly(readOnly)), - secretFile(secretFile):: cephfs($.v1.cephFSVolumeSource.secretFile(secretFile)), - secretRef(secretRef):: cephfs($.v1.cephFSVolumeSource.secretRef(secretRef)), - user(user):: cephfs($.v1.cephFSVolumeSource.user(user)), - }, - cinder:: { - local cinder(mixin) = {cinder+: mixin}, - fsType(fsType):: cinder($.v1.cinderVolumeSource.fsType(fsType)), - readOnly(readOnly):: cinder($.v1.cinderVolumeSource.readOnly(readOnly)), - volumeID(volumeID):: cinder($.v1.cinderVolumeSource.volumeID(volumeID)), - }, - configMap:: { - local configMap(mixin) = {configMap+: mixin}, - defaultMode(defaultMode):: configMap($.v1.configMapVolumeSource.defaultMode(defaultMode)), - items(items):: configMap($.v1.configMapVolumeSource.items(items)), - name(name):: configMap($.v1.configMapVolumeSource.name(name)), - optional(optional):: configMap($.v1.configMapVolumeSource.optional(optional)), - }, - downwardAPI:: { - local downwardAPI(mixin) = {downwardAPI+: mixin}, - defaultMode(defaultMode):: downwardAPI($.v1.downwardAPIVolumeSource.defaultMode(defaultMode)), - items(items):: downwardAPI($.v1.downwardAPIVolumeSource.items(items)), - }, - emptyDir:: { - local emptyDir(mixin) = {emptyDir+: mixin}, - medium(medium):: emptyDir($.v1.emptyDirVolumeSource.medium(medium)), - }, - fc:: { - local fc(mixin) = {fc+: mixin}, - fsType(fsType):: fc($.v1.fCVolumeSource.fsType(fsType)), - lun(lun):: fc($.v1.fCVolumeSource.lun(lun)), - readOnly(readOnly):: fc($.v1.fCVolumeSource.readOnly(readOnly)), - targetWWNs(targetWWNs):: fc($.v1.fCVolumeSource.targetWWNs(targetWWNs)), - }, - flexVolume:: { - local flexVolume(mixin) = {flexVolume+: mixin}, - driver(driver):: flexVolume($.v1.flexVolumeSource.driver(driver)), - fsType(fsType):: flexVolume($.v1.flexVolumeSource.fsType(fsType)), - options(options):: flexVolume($.v1.flexVolumeSource.options(options)), - readOnly(readOnly):: flexVolume($.v1.flexVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: flexVolume($.v1.flexVolumeSource.secretRef(secretRef)), - }, - flocker:: { - local flocker(mixin) = {flocker+: mixin}, - datasetName(datasetName):: flocker($.v1.flockerVolumeSource.datasetName(datasetName)), - datasetUUID(datasetUUID):: flocker($.v1.flockerVolumeSource.datasetUUID(datasetUUID)), - }, - gcePersistentDisk:: { - local gcePersistentDisk(mixin) = {gcePersistentDisk+: mixin}, - fsType(fsType):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.fsType(fsType)), - partition(partition):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.partition(partition)), - pdName(pdName):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.pdName(pdName)), - readOnly(readOnly):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.readOnly(readOnly)), - }, - gitRepo:: { - local gitRepo(mixin) = {gitRepo+: mixin}, - directory(directory):: gitRepo($.v1.gitRepoVolumeSource.directory(directory)), - repository(repository):: gitRepo($.v1.gitRepoVolumeSource.repository(repository)), - revision(revision):: gitRepo($.v1.gitRepoVolumeSource.revision(revision)), - }, - glusterfs:: { - local glusterfs(mixin) = {glusterfs+: mixin}, - endpoints(endpoints):: glusterfs($.v1.glusterfsVolumeSource.endpoints(endpoints)), - path(path):: glusterfs($.v1.glusterfsVolumeSource.path(path)), - readOnly(readOnly):: glusterfs($.v1.glusterfsVolumeSource.readOnly(readOnly)), - }, - hostPath:: { - local hostPath(mixin) = {hostPath+: mixin}, - path(path):: hostPath($.v1.hostPathVolumeSource.path(path)), - }, - iscsi:: { - local iscsi(mixin) = {iscsi+: mixin}, - chapAuthDiscovery(chapAuthDiscovery):: iscsi($.v1.iSCSIVolumeSource.chapAuthDiscovery(chapAuthDiscovery)), - chapAuthSession(chapAuthSession):: iscsi($.v1.iSCSIVolumeSource.chapAuthSession(chapAuthSession)), - fsType(fsType):: iscsi($.v1.iSCSIVolumeSource.fsType(fsType)), - iqn(iqn):: iscsi($.v1.iSCSIVolumeSource.iqn(iqn)), - iscsiInterface(iscsiInterface):: iscsi($.v1.iSCSIVolumeSource.iscsiInterface(iscsiInterface)), - lun(lun):: iscsi($.v1.iSCSIVolumeSource.lun(lun)), - portals(portals):: iscsi($.v1.iSCSIVolumeSource.portals(portals)), - readOnly(readOnly):: iscsi($.v1.iSCSIVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: iscsi($.v1.iSCSIVolumeSource.secretRef(secretRef)), - targetPortal(targetPortal):: iscsi($.v1.iSCSIVolumeSource.targetPortal(targetPortal)), - }, - nfs:: { - local nfs(mixin) = {nfs+: mixin}, - path(path):: nfs($.v1.nFSVolumeSource.path(path)), - readOnly(readOnly):: nfs($.v1.nFSVolumeSource.readOnly(readOnly)), - server(server):: nfs($.v1.nFSVolumeSource.server(server)), - }, - persistentVolumeClaim:: { - local persistentVolumeClaim(mixin) = {persistentVolumeClaim+: mixin}, - claimName(claimName):: persistentVolumeClaim($.v1.persistentVolumeClaimVolumeSource.claimName(claimName)), - readOnly(readOnly):: persistentVolumeClaim($.v1.persistentVolumeClaimVolumeSource.readOnly(readOnly)), - }, - photonPersistentDisk:: { - local photonPersistentDisk(mixin) = {photonPersistentDisk+: mixin}, - fsType(fsType):: photonPersistentDisk($.v1.photonPersistentDiskVolumeSource.fsType(fsType)), - pdID(pdID):: photonPersistentDisk($.v1.photonPersistentDiskVolumeSource.pdID(pdID)), - }, - portworxVolume:: { - local portworxVolume(mixin) = {portworxVolume+: mixin}, - fsType(fsType):: portworxVolume($.v1.portworxVolumeSource.fsType(fsType)), - readOnly(readOnly):: portworxVolume($.v1.portworxVolumeSource.readOnly(readOnly)), - volumeID(volumeID):: portworxVolume($.v1.portworxVolumeSource.volumeID(volumeID)), - }, - projected:: { - local projected(mixin) = {projected+: mixin}, - defaultMode(defaultMode):: projected($.v1.projectedVolumeSource.defaultMode(defaultMode)), - sources(sources):: projected($.v1.projectedVolumeSource.sources(sources)), - }, - quobyte:: { - local quobyte(mixin) = {quobyte+: mixin}, - group(group):: quobyte($.v1.quobyteVolumeSource.group(group)), - readOnly(readOnly):: quobyte($.v1.quobyteVolumeSource.readOnly(readOnly)), - registry(registry):: quobyte($.v1.quobyteVolumeSource.registry(registry)), - user(user):: quobyte($.v1.quobyteVolumeSource.user(user)), - volume(volume):: quobyte($.v1.quobyteVolumeSource.volume(volume)), - }, - rbd:: { - local rbd(mixin) = {rbd+: mixin}, - fsType(fsType):: rbd($.v1.rBDVolumeSource.fsType(fsType)), - image(image):: rbd($.v1.rBDVolumeSource.image(image)), - keyring(keyring):: rbd($.v1.rBDVolumeSource.keyring(keyring)), - monitors(monitors):: rbd($.v1.rBDVolumeSource.monitors(monitors)), - pool(pool):: rbd($.v1.rBDVolumeSource.pool(pool)), - readOnly(readOnly):: rbd($.v1.rBDVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: rbd($.v1.rBDVolumeSource.secretRef(secretRef)), - user(user):: rbd($.v1.rBDVolumeSource.user(user)), - }, - scaleIO:: { - local scaleIO(mixin) = {scaleIO+: mixin}, - fsType(fsType):: scaleIO($.v1.scaleIOVolumeSource.fsType(fsType)), - gateway(gateway):: scaleIO($.v1.scaleIOVolumeSource.gateway(gateway)), - protectionDomain(protectionDomain):: scaleIO($.v1.scaleIOVolumeSource.protectionDomain(protectionDomain)), - readOnly(readOnly):: scaleIO($.v1.scaleIOVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: scaleIO($.v1.scaleIOVolumeSource.secretRef(secretRef)), - sslEnabled(sslEnabled):: scaleIO($.v1.scaleIOVolumeSource.sslEnabled(sslEnabled)), - storageMode(storageMode):: scaleIO($.v1.scaleIOVolumeSource.storageMode(storageMode)), - storagePool(storagePool):: scaleIO($.v1.scaleIOVolumeSource.storagePool(storagePool)), - system(system):: scaleIO($.v1.scaleIOVolumeSource.system(system)), - volumeName(volumeName):: scaleIO($.v1.scaleIOVolumeSource.volumeName(volumeName)), - }, - secret:: { - local secret(mixin) = {secret+: mixin}, - defaultMode(defaultMode):: secret($.v1.secretVolumeSource.defaultMode(defaultMode)), - items(items):: secret($.v1.secretVolumeSource.items(items)), - optional(optional):: secret($.v1.secretVolumeSource.optional(optional)), - secretName(secretName):: secret($.v1.secretVolumeSource.secretName(secretName)), - }, - vsphereVolume:: { - local vsphereVolume(mixin) = {vsphereVolume+: mixin}, - fsType(fsType):: vsphereVolume($.v1.vsphereVirtualDiskVolumeSource.fsType(fsType)), - volumePath(volumePath):: vsphereVolume($.v1.vsphereVirtualDiskVolumeSource.volumePath(volumePath)), - }, - }, - }, - volumeMount:: { - default(name, mountPath):: - { - mountPath: mountPath, - name: name, - }, - // Path within the container at which the volume should be mounted. Must not contain ':'. - mountPath(mountPath):: {mountPath: mountPath}, - // This must match the Name of a Volume. - name(name):: {name: name}, - // Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - readOnly(readOnly):: {readOnly: readOnly}, - // Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). - subPath(subPath):: {subPath: subPath}, - }, - volumeProjection:: { - default():: - { - configMap: {}, - downwardAPI: {}, - secret: {}, - }, - // information about the configMap data to project - configMap(configMap):: {configMap+: configMap}, - // information about the downwardAPI data to project - downwardAPI(downwardAPI):: {downwardAPI+: downwardAPI}, - // information about the secret data to project - secret(secret):: {secret+: secret}, - mixin:: { - configMap:: { - local configMap(mixin) = {configMap+: mixin}, - items(items):: configMap($.v1.configMapProjection.items(items)), - name(name):: configMap($.v1.configMapProjection.name(name)), - optional(optional):: configMap($.v1.configMapProjection.optional(optional)), - }, - downwardAPI:: { - local downwardAPI(mixin) = {downwardAPI+: mixin}, - items(items):: downwardAPI($.v1.downwardAPIProjection.items(items)), - }, - secret:: { - local secret(mixin) = {secret+: mixin}, - items(items):: secret($.v1.secretProjection.items(items)), - name(name):: secret($.v1.secretProjection.name(name)), - optional(optional):: secret($.v1.secretProjection.optional(optional)), - }, - }, - }, - vsphereVirtualDiskVolumeSource:: { - default(volumePath):: - { - volumePath: 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(fsType):: {fsType: fsType}, - // Path that identifies vSphere volume vmdk - volumePath(volumePath):: {volumePath: volumePath}, - }, - watchEvent:: { - default(type, object):: - { - object: object, - type: type, - }, - // - object(object):: {object: object}, - // - type(type):: {type: type}, - }, - weightedPodAffinityTerm:: { - default(weight, podAffinityTerm):: - { - podAffinityTerm: podAffinityTerm, - weight: weight, - }, - // Required. A pod affinity term, associated with the corresponding weight. - podAffinityTerm(podAffinityTerm):: {podAffinityTerm+: podAffinityTerm}, - // weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - weight(weight):: {weight: weight}, - mixin:: { - podAffinityTerm:: { - local podAffinityTerm(mixin) = {podAffinityTerm+: mixin}, - labelSelector(labelSelector):: podAffinityTerm($.v1.podAffinityTerm.labelSelector(labelSelector)), - namespaces(namespaces):: podAffinityTerm($.v1.podAffinityTerm.namespaces(namespaces)), - topologyKey(topologyKey):: podAffinityTerm($.v1.podAffinityTerm.topologyKey(topologyKey)), - }, - }, - }, - }, - v1beta1:: { - eviction:: { - local kind = {kind: "Eviction"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - deleteOptions: {}, - }, - // DeleteOptions may be provided - deleteOptions(deleteOptions):: {deleteOptions+: deleteOptions}, - mixin:: { - deleteOptions:: { - local deleteOptions(mixin) = {deleteOptions+: mixin}, - gracePeriodSeconds(gracePeriodSeconds):: deleteOptions($.v1.deleteOptions.gracePeriodSeconds(gracePeriodSeconds)), - orphanDependents(orphanDependents):: deleteOptions($.v1.deleteOptions.orphanDependents(orphanDependents)), - preconditions(preconditions):: deleteOptions($.v1.deleteOptions.preconditions(preconditions)), - propagationPolicy(propagationPolicy):: deleteOptions($.v1.deleteOptions.propagationPolicy(propagationPolicy)), - }, - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/extensions.v1beta1.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/extensions.v1beta1.libsonnet deleted file mode 100644 index cdaab983..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/extensions.v1beta1.libsonnet +++ /dev/null @@ -1,3049 +0,0 @@ -{ - local apiVersion = {apiVersion: "extensions/v1beta1"}, - local defaultMetadata(name, namespace) = {metadata: $.v1.objectMeta.name(name) + $.v1.objectMeta.namespace(namespace)}, - types:: { - uID:: { - }, - unixGroupID:: { - }, - unixUserID:: { - }, - }, - v1:: { - aPIResource:: { - local kind = {kind: "APIResource"}, - default(name, singularName, namespaced, verbs):: - kind + - { - name: name, - namespaced: namespaced, - shortNames: [], - singularName: singularName, - verbs: if std.type(verbs) == "array" then verbs else [verbs], - }, - // name is the plural name of the resource. - name(name):: {name: name}, - // namespaced indicates if a resource is namespaced or not. - namespaced(namespaced):: {namespaced: namespaced}, - // shortNames is a list of suggested short names of the resource. - shortNames(shortNames):: if std.type(shortNames) == "array" then {shortNames+: shortNames} else {shortNames+: [shortNames]}, - // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface. - singularName(singularName):: {singularName: singularName}, - // verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) - verbs(verbs):: if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - }, - aPIResourceList:: { - local kind = {kind: "APIResourceList"}, - default(groupVersion, resources):: - apiVersion + - kind + - { - groupVersion: groupVersion, - resources: if std.type(resources) == "array" then resources else [resources], - }, - // groupVersion is the group and version this APIResourceList is for. - groupVersion(groupVersion):: {groupVersion: groupVersion}, - // resources contains the name of the resources and if they are namespaced. - resources(resources):: if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - }, - aWSElasticBlockStoreVolumeSource:: { - default(volumeID):: - { - volumeID: 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(fsType):: {fsType: 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(partition):: {partition: 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(readOnly):: {readOnly: readOnly}, - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - volumeID(volumeID):: {volumeID: volumeID}, - }, - affinity:: { - default():: - { - nodeAffinity: {}, - podAffinity: {}, - podAntiAffinity: {}, - }, - // Describes node affinity scheduling rules for the pod. - nodeAffinity(nodeAffinity):: {nodeAffinity+: 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):: {podAffinity+: 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):: {podAntiAffinity+: podAntiAffinity}, - mixin:: { - nodeAffinity:: { - local nodeAffinity(mixin) = {nodeAffinity+: mixin}, - preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: nodeAffinity($.v1.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution)), - requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: nodeAffinity($.v1.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution)), - }, - podAffinity:: { - local podAffinity(mixin) = {podAffinity+: mixin}, - preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: podAffinity($.v1.podAffinity.preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution)), - requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: podAffinity($.v1.podAffinity.requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution)), - }, - podAntiAffinity:: { - local podAntiAffinity(mixin) = {podAntiAffinity+: mixin}, - preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: podAntiAffinity($.v1.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution)), - requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: podAntiAffinity($.v1.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution)), - }, - }, - }, - azureDataDiskCachingMode:: { - }, - azureDataDiskKind:: { - }, - azureDiskVolumeSource:: { - local kind = {kind: "AzureDiskVolumeSource"}, - default(diskName, diskURI):: - kind + - { - cachingMode: {}, - diskName: diskName, - diskURI: diskURI, - kind: {}, - }, - // Host Caching mode: None, Read Only, Read Write. - cachingMode(cachingMode):: {cachingMode+: cachingMode}, - // The Name of the data disk in the blob storage - diskName(diskName):: {diskName: diskName}, - // The URI the data disk in the blob storage - diskURI(diskURI):: {diskURI: diskURI}, - // 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(fsType):: {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - }, - azureFileVolumeSource:: { - default(secretName, shareName):: - { - secretName: secretName, - shareName: shareName, - }, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // the name of secret that contains Azure Storage Account Name and Key - secretName(secretName):: {secretName: secretName}, - // Share Name - shareName(shareName):: {shareName: shareName}, - }, - capabilities:: { - default():: - { - add: [], - drop: [], - }, - // Added capabilities - add(add):: if std.type(add) == "array" then {add+: add} else {add+: [add]}, - // Removed capabilities - drop(drop):: if std.type(drop) == "array" then {drop+: drop} else {drop+: [drop]}, - }, - capability:: { - }, - cephFSVolumeSource:: { - default(monitors):: - { - monitors: if std.type(monitors) == "array" then monitors else [monitors], - secretRef: {}, - }, - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - path(path):: {path: path}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - readOnly(readOnly):: {readOnly: readOnly}, - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretFile(secretFile):: {secretFile: secretFile}, - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef(secretRef):: {secretRef+: secretRef}, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - user(user):: {user: user}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - cinderVolumeSource:: { - default(volumeID):: - { - volumeID: 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - fsType(fsType):: {fsType: fsType}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - readOnly(readOnly):: {readOnly: readOnly}, - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - volumeID(volumeID):: {volumeID: volumeID}, - }, - configMapEnvSource:: { - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap must be defined - optional(optional):: {optional: optional}, - }, - configMapKeySelector:: { - default(key):: - { - key: key, - }, - // The key to select. - key(key):: {key: key}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap or it's key must be defined - optional(optional):: {optional: optional}, - }, - configMapProjection:: { - default():: - { - items: [], - }, - // 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap or it's keys must be defined - optional(optional):: {optional: optional}, - }, - configMapVolumeSource:: { - default():: - { - items: [], - }, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap or it's keys must be defined - optional(optional):: {optional: optional}, - }, - container:: { - default(name):: - { - args: [], - command: [], - env: [], - envFrom: [], - lifecycle: {}, - livenessProbe: {}, - name: name, - ports: [], - readinessProbe: {}, - resources: {}, - securityContext: {}, - volumeMounts: [], - }, - // 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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(args):: if std.type(args) == "array" then {args+: args} else {args+: [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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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(command):: if std.type(command) == "array" then {command+: command} else {command+: [command]}, - // List of environment variables to set in the container. Cannot be updated. - env(env):: if std.type(env) == "array" then {env+: env} else {env+: [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(envFrom):: if std.type(envFrom) == "array" then {envFrom+: envFrom} else {envFrom+: [envFrom]}, - // Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images - image(image):: {image: 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(imagePullPolicy):: {imagePullPolicy: imagePullPolicy}, - // Actions that the management system should take in response to container lifecycle events. Cannot be updated. - lifecycle(lifecycle):: {lifecycle+: 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(livenessProbe):: {livenessProbe+: livenessProbe}, - // 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(name):: {name: name}, - // 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(ports):: if std.type(ports) == "array" then {ports+: ports} else {ports+: [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(readinessProbe):: {readinessProbe+: readinessProbe}, - // Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources(resources):: {resources+: resources}, - // Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/security_context.md - securityContext(securityContext):: {securityContext+: securityContext}, - // 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(stdin):: {stdin: 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(stdinOnce):: {stdinOnce: 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(terminationMessagePath):: {terminationMessagePath: 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(terminationMessagePolicy):: {terminationMessagePolicy: terminationMessagePolicy}, - // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. - tty(tty):: {tty: tty}, - // Pod volumes to mount into the container's filesystem. Cannot be updated. - volumeMounts(volumeMounts):: if std.type(volumeMounts) == "array" then {volumeMounts+: volumeMounts} else {volumeMounts+: [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(workingDir):: {workingDir: workingDir}, - mixin:: { - lifecycle:: { - local lifecycle(mixin) = {lifecycle+: mixin}, - postStart(postStart):: lifecycle($.v1.lifecycle.postStart(postStart)), - preStop(preStop):: lifecycle($.v1.lifecycle.preStop(preStop)), - }, - livenessProbe:: { - local livenessProbe(mixin) = {livenessProbe+: mixin}, - exec(exec):: livenessProbe($.v1.probe.exec(exec)), - failureThreshold(failureThreshold):: livenessProbe($.v1.probe.failureThreshold(failureThreshold)), - httpGet(httpGet):: livenessProbe($.v1.probe.httpGet(httpGet)), - initialDelaySeconds(initialDelaySeconds):: livenessProbe($.v1.probe.initialDelaySeconds(initialDelaySeconds)), - periodSeconds(periodSeconds):: livenessProbe($.v1.probe.periodSeconds(periodSeconds)), - successThreshold(successThreshold):: livenessProbe($.v1.probe.successThreshold(successThreshold)), - tcpSocket(tcpSocket):: livenessProbe($.v1.probe.tcpSocket(tcpSocket)), - timeoutSeconds(timeoutSeconds):: livenessProbe($.v1.probe.timeoutSeconds(timeoutSeconds)), - }, - readinessProbe:: { - local readinessProbe(mixin) = {readinessProbe+: mixin}, - exec(exec):: readinessProbe($.v1.probe.exec(exec)), - failureThreshold(failureThreshold):: readinessProbe($.v1.probe.failureThreshold(failureThreshold)), - httpGet(httpGet):: readinessProbe($.v1.probe.httpGet(httpGet)), - initialDelaySeconds(initialDelaySeconds):: readinessProbe($.v1.probe.initialDelaySeconds(initialDelaySeconds)), - periodSeconds(periodSeconds):: readinessProbe($.v1.probe.periodSeconds(periodSeconds)), - successThreshold(successThreshold):: readinessProbe($.v1.probe.successThreshold(successThreshold)), - tcpSocket(tcpSocket):: readinessProbe($.v1.probe.tcpSocket(tcpSocket)), - timeoutSeconds(timeoutSeconds):: readinessProbe($.v1.probe.timeoutSeconds(timeoutSeconds)), - }, - resources:: { - local resources(mixin) = {resources+: mixin}, - limits(limits):: resources($.v1.resourceRequirements.limits(limits)), - requests(requests):: resources($.v1.resourceRequirements.requests(requests)), - }, - securityContext:: { - local securityContext(mixin) = {securityContext+: mixin}, - capabilities(capabilities):: securityContext($.v1.securityContext.capabilities(capabilities)), - privileged(privileged):: securityContext($.v1.securityContext.privileged(privileged)), - readOnlyRootFilesystem(readOnlyRootFilesystem):: securityContext($.v1.securityContext.readOnlyRootFilesystem(readOnlyRootFilesystem)), - runAsNonRoot(runAsNonRoot):: securityContext($.v1.securityContext.runAsNonRoot(runAsNonRoot)), - runAsUser(runAsUser):: securityContext($.v1.securityContext.runAsUser(runAsUser)), - seLinuxOptions(seLinuxOptions):: securityContext($.v1.securityContext.seLinuxOptions(seLinuxOptions)), - }, - }, - }, - containerPort:: { - default(containerPort):: - { - containerPort: containerPort, - }, - // Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. - containerPort(containerPort):: {containerPort: containerPort}, - // What host IP to bind the external port to. - hostIP(hostIP):: {hostIP: 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(hostPort):: {hostPort: 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(name):: {name: name}, - // Protocol for port. Must be UDP or TCP. Defaults to "TCP". - protocol(protocol):: {protocol: protocol}, - }, - deleteOptions:: { - local kind = {kind: "DeleteOptions"}, - default():: - apiVersion + - kind + - { - preconditions: {}, - propagationPolicy: {}, - }, - // 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(gracePeriodSeconds):: {gracePeriodSeconds: gracePeriodSeconds}, - // 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(orphanDependents):: {orphanDependents: orphanDependents}, - // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. - preconditions(preconditions):: {preconditions+: 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. - propagationPolicy(propagationPolicy):: {propagationPolicy+: propagationPolicy}, - mixin:: { - preconditions:: { - local preconditions(mixin) = {preconditions+: mixin}, - uid(uid):: preconditions($.v1.preconditions.uid(uid)), - }, - }, - }, - deletionPropagation:: { - }, - downwardAPIProjection:: { - default():: - { - items: [], - }, - // Items is a list of DownwardAPIVolume file - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - }, - downwardAPIVolumeFile:: { - default(path):: - { - fieldRef: {}, - path: path, - resourceFieldRef: {}, - }, - // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. - fieldRef(fieldRef):: {fieldRef+: fieldRef}, - // Optional: mode bits to use on this file, must be a value between 0 and 0777. 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(mode):: {mode: mode}, - // 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(path):: {path: path}, - // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - resourceFieldRef(resourceFieldRef):: {resourceFieldRef+: resourceFieldRef}, - mixin:: { - fieldRef:: { - local fieldRef(mixin) = {fieldRef+: mixin}, - fieldPath(fieldPath):: fieldRef($.v1.objectFieldSelector.fieldPath(fieldPath)), - }, - resourceFieldRef:: { - local resourceFieldRef(mixin) = {resourceFieldRef+: mixin}, - containerName(containerName):: resourceFieldRef($.v1.resourceFieldSelector.containerName(containerName)), - divisor(divisor):: resourceFieldRef($.v1.resourceFieldSelector.divisor(divisor)), - resource(resource):: resourceFieldRef($.v1.resourceFieldSelector.resource(resource)), - }, - }, - }, - downwardAPIVolumeSource:: { - default():: - { - items: [], - }, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: defaultMode}, - // Items is a list of downward API volume file - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - }, - emptyDirVolumeSource:: { - // 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(medium):: {medium: medium}, - }, - envFromSource:: { - default():: - { - configMapRef: {}, - secretRef: {}, - }, - // The ConfigMap to select from - configMapRef(configMapRef):: {configMapRef+: configMapRef}, - // An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - prefix(prefix):: {prefix: prefix}, - // The Secret to select from - secretRef(secretRef):: {secretRef+: secretRef}, - mixin:: { - configMapRef:: { - local configMapRef(mixin) = {configMapRef+: mixin}, - name(name):: configMapRef($.v1.configMapEnvSource.name(name)), - optional(optional):: configMapRef($.v1.configMapEnvSource.optional(optional)), - }, - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.secretEnvSource.name(name)), - optional(optional):: secretRef($.v1.secretEnvSource.optional(optional)), - }, - }, - }, - envVar:: { - default(name):: - { - name: name, - valueFrom: {}, - }, - // Name of the environment variable. Must be a C_IDENTIFIER. - name(name):: {name: name}, - // Variable references $(VAR_NAME) are expanded using the previous 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". - value(value):: {value: value}, - // Source for the environment variable's value. Cannot be used if value is not empty. - valueFrom(valueFrom):: {valueFrom+: valueFrom}, - mixin:: { - valueFrom:: { - local valueFrom(mixin) = {valueFrom+: mixin}, - configMapKeyRef(configMapKeyRef):: valueFrom($.v1.envVarSource.configMapKeyRef(configMapKeyRef)), - fieldRef(fieldRef):: valueFrom($.v1.envVarSource.fieldRef(fieldRef)), - resourceFieldRef(resourceFieldRef):: valueFrom($.v1.envVarSource.resourceFieldRef(resourceFieldRef)), - secretKeyRef(secretKeyRef):: valueFrom($.v1.envVarSource.secretKeyRef(secretKeyRef)), - }, - }, - }, - envVarSource:: { - default():: - { - configMapKeyRef: {}, - fieldRef: {}, - resourceFieldRef: {}, - secretKeyRef: {}, - }, - // Selects a key of a ConfigMap. - configMapKeyRef(configMapKeyRef):: {configMapKeyRef+: configMapKeyRef}, - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP. - fieldRef(fieldRef):: {fieldRef+: fieldRef}, - // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - resourceFieldRef(resourceFieldRef):: {resourceFieldRef+: resourceFieldRef}, - // Selects a key of a secret in the pod's namespace - secretKeyRef(secretKeyRef):: {secretKeyRef+: secretKeyRef}, - mixin:: { - configMapKeyRef:: { - local configMapKeyRef(mixin) = {configMapKeyRef+: mixin}, - key(key):: configMapKeyRef($.v1.configMapKeySelector.key(key)), - name(name):: configMapKeyRef($.v1.configMapKeySelector.name(name)), - optional(optional):: configMapKeyRef($.v1.configMapKeySelector.optional(optional)), - }, - fieldRef:: { - local fieldRef(mixin) = {fieldRef+: mixin}, - fieldPath(fieldPath):: fieldRef($.v1.objectFieldSelector.fieldPath(fieldPath)), - }, - resourceFieldRef:: { - local resourceFieldRef(mixin) = {resourceFieldRef+: mixin}, - containerName(containerName):: resourceFieldRef($.v1.resourceFieldSelector.containerName(containerName)), - divisor(divisor):: resourceFieldRef($.v1.resourceFieldSelector.divisor(divisor)), - resource(resource):: resourceFieldRef($.v1.resourceFieldSelector.resource(resource)), - }, - secretKeyRef:: { - local secretKeyRef(mixin) = {secretKeyRef+: mixin}, - key(key):: secretKeyRef($.v1.secretKeySelector.key(key)), - name(name):: secretKeyRef($.v1.secretKeySelector.name(name)), - optional(optional):: secretKeyRef($.v1.secretKeySelector.optional(optional)), - }, - }, - }, - execAction:: { - default():: - { - command: [], - }, - // 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(command):: if std.type(command) == "array" then {command+: command} else {command+: [command]}, - }, - fCVolumeSource:: { - default(targetWWNs, lun):: - { - lun: lun, - targetWWNs: if std.type(targetWWNs) == "array" then targetWWNs else [targetWWNs], - }, - // 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(fsType):: {fsType: fsType}, - // Required: FC target lun number - lun(lun):: {lun: lun}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // Required: FC target worldwide names (WWNs) - targetWWNs(targetWWNs):: if std.type(targetWWNs) == "array" then {targetWWNs+: targetWWNs} else {targetWWNs+: [targetWWNs]}, - }, - flexVolumeSource:: { - default(driver):: - { - driver: driver, - options: {}, - secretRef: {}, - }, - // Driver is the name of the driver to use for this volume. - driver(driver):: {driver: 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(fsType):: {fsType: fsType}, - // Optional: Extra command options if any. - options(options):: {options+: options}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: 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(secretRef):: {secretRef+: secretRef}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - flockerVolumeSource:: { - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - datasetName(datasetName):: {datasetName: datasetName}, - // UUID of the dataset. This is unique identifier of a Flocker dataset - datasetUUID(datasetUUID):: {datasetUUID: datasetUUID}, - }, - gCEPersistentDiskVolumeSource:: { - default(pdName):: - { - pdName: 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(fsType):: {fsType: 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(partition):: {partition: partition}, - // 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(pdName):: {pdName: pdName}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - readOnly(readOnly):: {readOnly: readOnly}, - }, - gitRepoVolumeSource:: { - default(repository):: - { - repository: 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(directory):: {directory: directory}, - // Repository URL - repository(repository):: {repository: repository}, - // Commit hash for the specified revision. - revision(revision):: {revision: revision}, - }, - glusterfsVolumeSource:: { - default(endpoints, path):: - { - endpoints: endpoints, - path: path, - }, - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - endpoints(endpoints):: {endpoints: endpoints}, - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - path(path):: {path: path}, - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - readOnly(readOnly):: {readOnly: readOnly}, - }, - hTTPGetAction:: { - default(port):: - { - httpHeaders: [], - port: port, - }, - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host(host):: {host: host}, - // Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders(httpHeaders):: if std.type(httpHeaders) == "array" then {httpHeaders+: httpHeaders} else {httpHeaders+: [httpHeaders]}, - // Path to access on the HTTP server. - path(path):: {path: path}, - // 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(port):: {port: port}, - // Scheme to use for connecting to the host. Defaults to HTTP. - scheme(scheme):: {scheme: scheme}, - }, - hTTPHeader:: { - default(name, value):: - { - name: name, - value: value, - }, - // The header field name - name(name):: {name: name}, - // The header field value - value(value):: {value: value}, - }, - handler:: { - default():: - { - exec: {}, - httpGet: {}, - tcpSocket: {}, - }, - // One and only one of the following should be specified. Exec specifies the action to take. - exec(exec):: {exec+: exec}, - // HTTPGet specifies the http request to perform. - httpGet(httpGet):: {httpGet+: httpGet}, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket(tcpSocket):: {tcpSocket+: tcpSocket}, - mixin:: { - exec:: { - local exec(mixin) = {exec+: mixin}, - command(command):: exec($.v1.execAction.command(command)), - }, - httpGet:: { - local httpGet(mixin) = {httpGet+: mixin}, - host(host):: httpGet($.v1.hTTPGetAction.host(host)), - httpHeaders(httpHeaders):: httpGet($.v1.hTTPGetAction.httpHeaders(httpHeaders)), - path(path):: httpGet($.v1.hTTPGetAction.path(path)), - port(port):: httpGet($.v1.hTTPGetAction.port(port)), - scheme(scheme):: httpGet($.v1.hTTPGetAction.scheme(scheme)), - }, - tcpSocket:: { - local tcpSocket(mixin) = {tcpSocket+: mixin}, - host(host):: tcpSocket($.v1.tCPSocketAction.host(host)), - port(port):: tcpSocket($.v1.tCPSocketAction.port(port)), - }, - }, - }, - hostAlias:: { - default():: - { - hostnames: [], - }, - // Hostnames for the the above IP address. - hostnames(hostnames):: if std.type(hostnames) == "array" then {hostnames+: hostnames} else {hostnames+: [hostnames]}, - // IP address of the host file entry. - ip(ip):: {ip: ip}, - }, - hostPathVolumeSource:: { - default(path):: - { - path: path, - }, - // Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - path(path):: {path: path}, - }, - iSCSIVolumeSource:: { - default(targetPortal, iqn, lun):: - { - iqn: iqn, - lun: lun, - portals: [], - secretRef: {}, - targetPortal: targetPortal, - }, - // whether support iSCSI Discovery CHAP authentication - chapAuthDiscovery(chapAuthDiscovery):: {chapAuthDiscovery: chapAuthDiscovery}, - // whether support iSCSI Session CHAP authentication - chapAuthSession(chapAuthSession):: {chapAuthSession: 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(fsType):: {fsType: fsType}, - // Target iSCSI Qualified Name. - iqn(iqn):: {iqn: iqn}, - // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. - iscsiInterface(iscsiInterface):: {iscsiInterface: iscsiInterface}, - // iSCSI target lun number. - lun(lun):: {lun: lun}, - // 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(portals):: if std.type(portals) == "array" then {portals+: portals} else {portals+: [portals]}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - readOnly(readOnly):: {readOnly: readOnly}, - // CHAP secret for iSCSI target and initiator authentication - secretRef(secretRef):: {secretRef+: secretRef}, - // 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(targetPortal):: {targetPortal: targetPortal}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - initializer:: { - default(name):: - { - name: name, - }, - // name of the process that is responsible for initializing this object. - name(name):: {name: name}, - }, - initializers:: { - default(pending):: - { - pending: if std.type(pending) == "array" then pending else [pending], - result: {}, - }, - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then {pending+: pending} else {pending+: [pending]}, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result(result):: {result+: result}, - mixin:: { - result:: { - local result(mixin) = {result+: mixin}, - code(code):: result($.v1.status.code(code)), - details(details):: result($.v1.status.details(details)), - message(message):: result($.v1.status.message(message)), - reason(reason):: result($.v1.status.reason(reason)), - status(status):: result($.v1.status.status(status)), - }, - }, - }, - keyToPath:: { - default(key, path):: - { - key: key, - path: path, - }, - // The key to project. - key(key):: {key: key}, - // Optional: mode bits to use on this file, must be a value between 0 and 0777. 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(mode):: {mode: mode}, - // 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(path):: {path: path}, - }, - labelSelector:: { - default():: - { - matchExpressions: [], - matchLabels: {}, - }, - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then {matchExpressions+: matchExpressions} else {matchExpressions+: [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(matchLabels):: {matchLabels+: matchLabels}, - }, - labelSelectorRequirement:: { - default(key, operator):: - { - key: key, - operator: operator, - values: [], - }, - // key is the label key that the selector applies to. - key(key):: {key: key}, - // operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist. - operator(operator):: {operator: 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(values):: if std.type(values) == "array" then {values+: values} else {values+: [values]}, - }, - lifecycle:: { - default():: - { - postStart: {}, - preStop: {}, - }, - // 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(postStart):: {postStart+: postStart}, - // PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - preStop(preStop):: {preStop+: preStop}, - mixin:: { - postStart:: { - local postStart(mixin) = {postStart+: mixin}, - exec(exec):: postStart($.v1.handler.exec(exec)), - httpGet(httpGet):: postStart($.v1.handler.httpGet(httpGet)), - tcpSocket(tcpSocket):: postStart($.v1.handler.tcpSocket(tcpSocket)), - }, - preStop:: { - local preStop(mixin) = {preStop+: mixin}, - exec(exec):: preStop($.v1.handler.exec(exec)), - httpGet(httpGet):: preStop($.v1.handler.httpGet(httpGet)), - tcpSocket(tcpSocket):: preStop($.v1.handler.tcpSocket(tcpSocket)), - }, - }, - }, - listMeta:: { - // 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: {resourceVersion: resourceVersion}, - // SelfLink is a URL representing this object. Populated by the system. Read-only. - selfLink(selfLink):: {selfLink: selfLink}, - }, - loadBalancerIngress:: { - // Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers) - hostname(hostname):: {hostname: hostname}, - // IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers) - ip(ip):: {ip: ip}, - }, - loadBalancerStatus:: { - default():: - { - ingress: [], - }, - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - ingress(ingress):: if std.type(ingress) == "array" then {ingress+: ingress} else {ingress+: [ingress]}, - }, - localObjectReference:: { - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - }, - nFSVolumeSource:: { - default(server, path):: - { - path: path, - server: server, - }, - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - path(path):: {path: path}, - // 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(readOnly):: {readOnly: readOnly}, - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - server(server):: {server: server}, - }, - nodeAffinity:: { - default():: - { - preferredDuringSchedulingIgnoredDuringExecution: [], - requiredDuringSchedulingIgnoredDuringExecution: {}, - }, - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [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(requiredDuringSchedulingIgnoredDuringExecution):: {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}, - mixin:: { - requiredDuringSchedulingIgnoredDuringExecution:: { - local requiredDuringSchedulingIgnoredDuringExecution(mixin) = {requiredDuringSchedulingIgnoredDuringExecution+: mixin}, - nodeSelectorTerms(nodeSelectorTerms):: requiredDuringSchedulingIgnoredDuringExecution($.v1.nodeSelector.nodeSelectorTerms(nodeSelectorTerms)), - }, - }, - }, - nodeSelector:: { - default(nodeSelectorTerms):: - { - nodeSelectorTerms: if std.type(nodeSelectorTerms) == "array" then nodeSelectorTerms else [nodeSelectorTerms], - }, - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then {nodeSelectorTerms+: nodeSelectorTerms} else {nodeSelectorTerms+: [nodeSelectorTerms]}, - }, - nodeSelectorRequirement:: { - default(key, operator):: - { - key: key, - operator: operator, - values: [], - }, - // The label key that the selector applies to. - key(key):: {key: key}, - // Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - operator(operator):: {operator: 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(values):: if std.type(values) == "array" then {values+: values} else {values+: [values]}, - }, - nodeSelectorTerm:: { - default(matchExpressions):: - { - matchExpressions: if std.type(matchExpressions) == "array" then matchExpressions else [matchExpressions], - }, - // Required. A list of node selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then {matchExpressions+: matchExpressions} else {matchExpressions+: [matchExpressions]}, - }, - objectFieldSelector:: { - default(fieldPath):: - apiVersion + - { - fieldPath: fieldPath, - }, - // Path of the field to select in the specified API version. - fieldPath(fieldPath):: {fieldPath: fieldPath}, - }, - objectMeta:: { - default():: - { - annotations: {}, - finalizers: [], - initializers: {}, - labels: {}, - ownerReferences: [], - }, - // 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(annotations):: {annotations+: 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(clusterName):: {clusterName: 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - creationTimestamp(creationTimestamp):: {creationTimestamp: 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(deletionGracePeriodSeconds):: {deletionGracePeriodSeconds: 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 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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - deletionTimestamp(deletionTimestamp):: {deletionTimestamp: 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(finalizers):: if std.type(finalizers) == "array" then {finalizers+: finalizers} else {finalizers+: [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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#idempotency - generateName(generateName):: {generateName: generateName}, - // A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. - generation(generation):: {generation: generation}, - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers(initializers):: {initializers+: initializers}, - // 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(labels):: {labels+: labels}, - // 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(name):: {name: name}, - // Namespace defines the space within 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(namespace):: {namespace: 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(ownerReferences):: if std.type(ownerReferences) == "array" then {ownerReferences+: ownerReferences} else {ownerReferences+: [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: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: {resourceVersion: resourceVersion}, - // SelfLink is a URL representing this object. Populated by the system. Read-only. - selfLink(selfLink):: {selfLink: 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(uid):: {uid: uid}, - mixin:: { - initializers:: { - local initializers(mixin) = {initializers+: mixin}, - pending(pending):: initializers($.v1.initializers.pending(pending)), - result(result):: initializers($.v1.initializers.result(result)), - }, - }, - }, - ownerReference:: { - local kind = {kind: "OwnerReference"}, - default(name, uid):: - apiVersion + - kind + - { - name: name, - uid: 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(blockOwnerDeletion):: {blockOwnerDeletion: blockOwnerDeletion}, - // If true, this reference points to the managing controller. - controller(controller):: {controller: controller}, - // Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: {name: name}, - // UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids - uid(uid):: {uid: uid}, - }, - patch:: { - }, - persistentVolumeClaimVolumeSource:: { - default(claimName):: - { - claimName: claimName, - }, - // 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(claimName):: {claimName: claimName}, - // Will force the ReadOnly setting in VolumeMounts. Default false. - readOnly(readOnly):: {readOnly: readOnly}, - }, - photonPersistentDiskVolumeSource:: { - default(pdID):: - { - pdID: 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(fsType):: {fsType: fsType}, - // ID that identifies Photon Controller persistent disk - pdID(pdID):: {pdID: pdID}, - }, - podAffinity:: { - default():: - { - preferredDuringSchedulingIgnoredDuringExecution: [], - requiredDuringSchedulingIgnoredDuringExecution: [], - }, - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}, - }, - podAffinityTerm:: { - default():: - { - labelSelector: {}, - namespaces: [], - }, - // A label query over a set of resources, in this case pods. - labelSelector(labelSelector):: {labelSelector+: labelSelector}, - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - namespaces(namespaces):: if std.type(namespaces) == "array" then {namespaces+: namespaces} else {namespaces+: [namespaces]}, - // 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. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. - topologyKey(topologyKey):: {topologyKey: topologyKey}, - mixin:: { - labelSelector:: { - local labelSelector(mixin) = {labelSelector+: mixin}, - matchExpressions(matchExpressions):: labelSelector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: labelSelector($.v1.labelSelector.matchLabels(matchLabels)), - }, - }, - }, - podAntiAffinity:: { - default():: - { - preferredDuringSchedulingIgnoredDuringExecution: [], - requiredDuringSchedulingIgnoredDuringExecution: [], - }, - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}, - }, - podSecurityContext:: { - default():: - { - fsGroup: {}, - runAsUser: {}, - seLinuxOptions: {}, - supplementalGroups: [], - }, - // 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 - fsGroup(fsGroup):: {fsGroup+: fsGroup}, - // 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(runAsNonRoot):: {runAsNonRoot: 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(runAsUser):: {runAsUser+: runAsUser}, - // 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):: {seLinuxOptions+: 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(supplementalGroups):: if std.type(supplementalGroups) == "array" then {supplementalGroups+: supplementalGroups} else {supplementalGroups+: [supplementalGroups]}, - mixin:: { - seLinuxOptions:: { - local seLinuxOptions(mixin) = {seLinuxOptions+: mixin}, - level(level):: seLinuxOptions($.v1.sELinuxOptions.level(level)), - role(role):: seLinuxOptions($.v1.sELinuxOptions.role(role)), - type(type):: seLinuxOptions($.v1.sELinuxOptions.type(type)), - user(user):: seLinuxOptions($.v1.sELinuxOptions.user(user)), - }, - }, - }, - podSpec:: { - default(containers):: - { - affinity: {}, - containers: if std.type(containers) == "array" then containers else [containers], - hostMappings: [], - imagePullSecrets: [], - initContainers: [], - nodeSelector: {}, - securityContext: {}, - tolerations: [], - volumes: [], - }, - // 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(activeDeadlineSeconds):: {activeDeadlineSeconds: activeDeadlineSeconds}, - // If specified, the pod's scheduling constraints - affinity(affinity):: {affinity+: affinity}, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: {automountServiceAccountToken: automountServiceAccountToken}, - // 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(containers):: if std.type(containers) == "array" then {containers+: containers} else {containers+: [containers]}, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: {dnsPolicy: dnsPolicy}, - // Use the host's ipc namespace. Optional: Default to false. - hostIPC(hostIPC):: {hostIPC: hostIPC}, - // 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. - hostMappings(hostMappings):: if std.type(hostMappings) == "array" then {hostMappings+: hostMappings} else {hostMappings+: [hostMappings]}, - // 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(hostNetwork):: {hostNetwork: hostNetwork}, - // Use the host's pid namespace. Optional: Default to false. - hostPID(hostPID):: {hostPID: hostPID}, - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: {hostname: hostname}, - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then {imagePullSecrets+: imagePullSecrets} else {imagePullSecrets+: [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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then {initContainers+: initContainers} else {initContainers+: [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(nodeName):: {nodeName: 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(nodeSelector):: {nodeSelector+: nodeSelector}, - // 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(restartPolicy):: {restartPolicy: restartPolicy}, - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: {schedulerName: 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(securityContext):: {securityContext+: securityContext}, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: {serviceAccount: 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(serviceAccountName):: {serviceAccountName: serviceAccountName}, - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: {subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: {terminationGracePeriodSeconds: terminationGracePeriodSeconds}, - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then {tolerations+: tolerations} else {tolerations+: [tolerations]}, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, - mixin:: { - affinity:: { - local affinity(mixin) = {affinity+: mixin}, - nodeAffinity(nodeAffinity):: affinity($.v1.affinity.nodeAffinity(nodeAffinity)), - podAffinity(podAffinity):: affinity($.v1.affinity.podAffinity(podAffinity)), - podAntiAffinity(podAntiAffinity):: affinity($.v1.affinity.podAntiAffinity(podAntiAffinity)), - }, - securityContext:: { - local securityContext(mixin) = {securityContext+: mixin}, - fsGroup(fsGroup):: securityContext($.v1.podSecurityContext.fsGroup(fsGroup)), - runAsNonRoot(runAsNonRoot):: securityContext($.v1.podSecurityContext.runAsNonRoot(runAsNonRoot)), - runAsUser(runAsUser):: securityContext($.v1.podSecurityContext.runAsUser(runAsUser)), - seLinuxOptions(seLinuxOptions):: securityContext($.v1.podSecurityContext.seLinuxOptions(seLinuxOptions)), - supplementalGroups(supplementalGroups):: securityContext($.v1.podSecurityContext.supplementalGroups(supplementalGroups)), - }, - }, - }, - podTemplateSpec:: { - default(name, namespace="default"):: - defaultMetadata(name, namespace) + - { - spec: {}, - }, - // Specification of the desired behavior of the pod. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - activeDeadlineSeconds(activeDeadlineSeconds):: spec($.v1.podSpec.activeDeadlineSeconds(activeDeadlineSeconds)), - affinity(affinity):: spec($.v1.podSpec.affinity(affinity)), - automountServiceAccountToken(automountServiceAccountToken):: spec($.v1.podSpec.automountServiceAccountToken(automountServiceAccountToken)), - containers(containers):: spec($.v1.podSpec.containers(containers)), - dnsPolicy(dnsPolicy):: spec($.v1.podSpec.dnsPolicy(dnsPolicy)), - hostIPC(hostIPC):: spec($.v1.podSpec.hostIPC(hostIPC)), - hostMappings(hostMappings):: spec($.v1.podSpec.hostMappings(hostMappings)), - hostNetwork(hostNetwork):: spec($.v1.podSpec.hostNetwork(hostNetwork)), - hostPID(hostPID):: spec($.v1.podSpec.hostPID(hostPID)), - hostname(hostname):: spec($.v1.podSpec.hostname(hostname)), - imagePullSecrets(imagePullSecrets):: spec($.v1.podSpec.imagePullSecrets(imagePullSecrets)), - initContainers(initContainers):: spec($.v1.podSpec.initContainers(initContainers)), - nodeName(nodeName):: spec($.v1.podSpec.nodeName(nodeName)), - nodeSelector(nodeSelector):: spec($.v1.podSpec.nodeSelector(nodeSelector)), - restartPolicy(restartPolicy):: spec($.v1.podSpec.restartPolicy(restartPolicy)), - schedulerName(schedulerName):: spec($.v1.podSpec.schedulerName(schedulerName)), - securityContext(securityContext):: spec($.v1.podSpec.securityContext(securityContext)), - serviceAccount(serviceAccount):: spec($.v1.podSpec.serviceAccount(serviceAccount)), - serviceAccountName(serviceAccountName):: spec($.v1.podSpec.serviceAccountName(serviceAccountName)), - subdomain(subdomain):: spec($.v1.podSpec.subdomain(subdomain)), - terminationGracePeriodSeconds(terminationGracePeriodSeconds):: spec($.v1.podSpec.terminationGracePeriodSeconds(terminationGracePeriodSeconds)), - tolerations(tolerations):: spec($.v1.podSpec.tolerations(tolerations)), - volumes(volumes):: spec($.v1.podSpec.volumes(volumes)), - }, - }, - }, - portworxVolumeSource:: { - default(volumeID):: - { - volumeID: 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(fsType):: {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // VolumeID uniquely identifies a Portworx volume - volumeID(volumeID):: {volumeID: volumeID}, - }, - preconditions:: { - default():: - { - uid: {}, - }, - // Specifies the target UID. - uid(uid):: {uid+: uid}, - }, - preferredSchedulingTerm:: { - default(weight, preference):: - { - preference: preference, - weight: weight, - }, - // A node selector term, associated with the corresponding weight. - preference(preference):: {preference+: preference}, - // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - weight(weight):: {weight: weight}, - mixin:: { - preference:: { - local preference(mixin) = {preference+: mixin}, - matchExpressions(matchExpressions):: preference($.v1.nodeSelectorTerm.matchExpressions(matchExpressions)), - }, - }, - }, - probe:: { - default():: - { - exec: {}, - httpGet: {}, - tcpSocket: {}, - }, - // One and only one of the following should be specified. Exec specifies the action to take. - exec(exec):: {exec+: exec}, - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - failureThreshold(failureThreshold):: {failureThreshold: failureThreshold}, - // HTTPGet specifies the http request to perform. - httpGet(httpGet):: {httpGet+: 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(initialDelaySeconds):: {initialDelaySeconds: initialDelaySeconds}, - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - periodSeconds(periodSeconds):: {periodSeconds: periodSeconds}, - // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. - successThreshold(successThreshold):: {successThreshold: successThreshold}, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket(tcpSocket):: {tcpSocket+: tcpSocket}, - // 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(timeoutSeconds):: {timeoutSeconds: timeoutSeconds}, - mixin:: { - exec:: { - local exec(mixin) = {exec+: mixin}, - command(command):: exec($.v1.execAction.command(command)), - }, - httpGet:: { - local httpGet(mixin) = {httpGet+: mixin}, - host(host):: httpGet($.v1.hTTPGetAction.host(host)), - httpHeaders(httpHeaders):: httpGet($.v1.hTTPGetAction.httpHeaders(httpHeaders)), - path(path):: httpGet($.v1.hTTPGetAction.path(path)), - port(port):: httpGet($.v1.hTTPGetAction.port(port)), - scheme(scheme):: httpGet($.v1.hTTPGetAction.scheme(scheme)), - }, - tcpSocket:: { - local tcpSocket(mixin) = {tcpSocket+: mixin}, - host(host):: tcpSocket($.v1.tCPSocketAction.host(host)), - port(port):: tcpSocket($.v1.tCPSocketAction.port(port)), - }, - }, - }, - projectedVolumeSource:: { - default(sources):: - { - sources: if std.type(sources) == "array" then sources else [sources], - }, - // Mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: defaultMode}, - // list of volume projections - sources(sources):: if std.type(sources) == "array" then {sources+: sources} else {sources+: [sources]}, - }, - protocol:: { - }, - quobyteVolumeSource:: { - default(registry, volume):: - { - registry: registry, - volume: volume, - }, - // Group to map volume access to Default is no group - group(group):: {group: group}, - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - readOnly(readOnly):: {readOnly: readOnly}, - // 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(registry):: {registry: registry}, - // User to map volume access to Defaults to serivceaccount user - user(user):: {user: user}, - // Volume is a string that references an already created Quobyte volume by name. - volume(volume):: {volume: volume}, - }, - rBDVolumeSource:: { - default(monitors, image):: - { - image: image, - monitors: if std.type(monitors) == "array" then monitors else [monitors], - secretRef: {}, - }, - // 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(fsType):: {fsType: fsType}, - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - image(image):: {image: image}, - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - keyring(keyring):: {keyring: keyring}, - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - pool(pool):: {pool: pool}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - readOnly(readOnly):: {readOnly: readOnly}, - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef(secretRef):: {secretRef+: secretRef}, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - user(user):: {user: user}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - resourceFieldSelector:: { - default(resource):: - { - resource: resource, - }, - // Container name: required for volumes, optional for env vars - containerName(containerName):: {containerName: containerName}, - // Specifies the output format of the exposed resources, defaults to "1" - divisor(divisor):: {divisor: divisor}, - // Required: resource to select - resource(resource):: {resource: resource}, - }, - resourceRequirements:: { - default():: - { - limits: {}, - requests: {}, - }, - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - limits(limits):: {limits+: 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-compute-resources-container/ - requests(requests):: {requests+: requests}, - }, - sELinuxOptions:: { - // Level is SELinux level label that applies to the container. - level(level):: {level: level}, - // Role is a SELinux role label that applies to the container. - role(role):: {role: role}, - // Type is a SELinux type label that applies to the container. - type(type):: {type: type}, - // User is a SELinux user label that applies to the container. - user(user):: {user: user}, - }, - scaleIOVolumeSource:: { - default(gateway, system, secretRef):: - { - gateway: gateway, - secretRef: secretRef, - system: system, - }, - // 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(fsType):: {fsType: fsType}, - // The host address of the ScaleIO API Gateway. - gateway(gateway):: {gateway: gateway}, - // The name of the Protection Domain for the configured storage (defaults to "default"). - protectionDomain(protectionDomain):: {protectionDomain: protectionDomain}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef(secretRef):: {secretRef+: secretRef}, - // Flag to enable/disable SSL communication with Gateway, default false - sslEnabled(sslEnabled):: {sslEnabled: sslEnabled}, - // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). - storageMode(storageMode):: {storageMode: storageMode}, - // The Storage Pool associated with the protection domain (defaults to "default"). - storagePool(storagePool):: {storagePool: storagePool}, - // The name of the storage system as configured in ScaleIO. - system(system):: {system: system}, - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - volumeName(volumeName):: {volumeName: volumeName}, - mixin:: { - secretRef:: { - local secretRef(mixin) = {secretRef+: mixin}, - name(name):: secretRef($.v1.localObjectReference.name(name)), - }, - }, - }, - secretEnvSource:: { - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the Secret must be defined - optional(optional):: {optional: optional}, - }, - secretKeySelector:: { - default(key):: - { - key: key, - }, - // The key of the secret to select from. Must be a valid secret key. - key(key):: {key: key}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the Secret or it's key must be defined - optional(optional):: {optional: optional}, - }, - secretProjection:: { - default():: - { - items: [], - }, - // 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the Secret or its key must be defined - optional(optional):: {optional: optional}, - }, - secretVolumeSource:: { - default():: - { - items: [], - }, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - // Specify whether the Secret or it's keys must be defined - optional(optional):: {optional: optional}, - // Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - secretName(secretName):: {secretName: secretName}, - }, - securityContext:: { - default():: - { - capabilities: {}, - runAsUser: {}, - seLinuxOptions: {}, - }, - // The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. - capabilities(capabilities):: {capabilities+: capabilities}, - // Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. - privileged(privileged):: {privileged: privileged}, - // Whether this container has a read-only root filesystem. Default is false. - readOnlyRootFilesystem(readOnlyRootFilesystem):: {readOnlyRootFilesystem: readOnlyRootFilesystem}, - // 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(runAsNonRoot):: {runAsNonRoot: 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(runAsUser):: {runAsUser+: runAsUser}, - // 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):: {seLinuxOptions+: seLinuxOptions}, - mixin:: { - capabilities:: { - local capabilities(mixin) = {capabilities+: mixin}, - add(add):: capabilities($.v1.capabilities.add(add)), - drop(drop):: capabilities($.v1.capabilities.drop(drop)), - }, - seLinuxOptions:: { - local seLinuxOptions(mixin) = {seLinuxOptions+: mixin}, - level(level):: seLinuxOptions($.v1.sELinuxOptions.level(level)), - role(role):: seLinuxOptions($.v1.sELinuxOptions.role(role)), - type(type):: seLinuxOptions($.v1.sELinuxOptions.type(type)), - user(user):: seLinuxOptions($.v1.sELinuxOptions.user(user)), - }, - }, - }, - status:: { - local kind = {kind: "Status"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - details: {}, - }, - // Suggested HTTP return code for this status, 0 if not set. - code(code):: {code: 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(details):: {details+: details}, - // A human-readable description of the status of this operation. - message(message):: {message: message}, - // 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(reason):: {reason: reason}, - // Status of the operation. One of: "Success" or "Failure". More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status - status(status):: {status: status}, - mixin:: { - details:: { - local details(mixin) = {details+: mixin}, - causes(causes):: details($.v1.statusDetails.causes(causes)), - group(group):: details($.v1.statusDetails.group(group)), - name(name):: details($.v1.statusDetails.name(name)), - retryAfterSeconds(retryAfterSeconds):: details($.v1.statusDetails.retryAfterSeconds(retryAfterSeconds)), - uid(uid):: details($.v1.statusDetails.uid(uid)), - }, - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - statusCause:: { - // 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(field):: {field: field}, - // A human-readable description of the cause of the error. This field may be presented as-is to a reader. - message(message):: {message: message}, - // A machine-readable description of the cause of the error. If this value is empty there is no information available. - reason(reason):: {reason: reason}, - }, - statusDetails:: { - local kind = {kind: "StatusDetails"}, - default():: - kind + - { - causes: [], - }, - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then {causes+: causes} else {causes+: [causes]}, - // The group attribute of the resource associated with the status StatusReason. - group(group):: {group: group}, - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: {name: name}, - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: {retryAfterSeconds: 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(uid):: {uid: uid}, - }, - tCPSocketAction:: { - default(port):: - { - port: port, - }, - // Optional: Host name to connect to, defaults to the pod IP. - host(host):: {host: host}, - // 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(port):: {port: port}, - }, - toleration:: { - // Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - effect(effect):: {effect: 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(key):: {key: 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(operator):: {operator: 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(tolerationSeconds):: {tolerationSeconds: 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(value):: {value: value}, - }, - volume:: { - default(name):: - { - awsElasticBlockStore: {}, - azureDisk: {}, - azureFile: {}, - cephfs: {}, - cinder: {}, - configMap: {}, - downwardAPI: {}, - emptyDir: {}, - fc: {}, - flexVolume: {}, - flocker: {}, - gcePersistentDisk: {}, - gitRepo: {}, - glusterfs: {}, - hostPath: {}, - iscsi: {}, - name: name, - nfs: {}, - persistentVolumeClaim: {}, - photonPersistentDisk: {}, - portworxVolume: {}, - projected: {}, - quobyte: {}, - rbd: {}, - scaleIO: {}, - secret: {}, - vsphereVolume: {}, - }, - // 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(awsElasticBlockStore):: {awsElasticBlockStore+: awsElasticBlockStore}, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk(azureDisk):: {azureDisk+: azureDisk}, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile(azureFile):: {azureFile+: azureFile}, - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs(cephfs):: {cephfs+: cephfs}, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder(cinder):: {cinder+: cinder}, - // ConfigMap represents a configMap that should populate this volume - configMap(configMap):: {configMap+: configMap}, - // DownwardAPI represents downward API about the pod that should populate this volume - downwardAPI(downwardAPI):: {downwardAPI+: downwardAPI}, - // EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - emptyDir(emptyDir):: {emptyDir+: emptyDir}, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc(fc):: {fc+: fc}, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - flexVolume(flexVolume):: {flexVolume+: flexVolume}, - // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - flocker(flocker):: {flocker+: 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(gcePersistentDisk):: {gcePersistentDisk+: gcePersistentDisk}, - // GitRepo represents a git repository at a particular revision. - gitRepo(gitRepo):: {gitRepo+: gitRepo}, - // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs(glusterfs):: {glusterfs+: 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(hostPath):: {hostPath+: 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://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md - iscsi(iscsi):: {iscsi+: iscsi}, - // 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(name):: {name: name}, - // 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(nfs):: {nfs+: nfs}, - // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - persistentVolumeClaim(persistentVolumeClaim):: {persistentVolumeClaim+: persistentVolumeClaim}, - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk(photonPersistentDisk):: {photonPersistentDisk+: photonPersistentDisk}, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume(portworxVolume):: {portworxVolume+: portworxVolume}, - // Items for all in one resources secrets, configmaps, and downward API - projected(projected):: {projected+: projected}, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte(quobyte):: {quobyte+: quobyte}, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd(rbd):: {rbd+: rbd}, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIO(scaleIO):: {scaleIO+: scaleIO}, - // Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - secret(secret):: {secret+: secret}, - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume(vsphereVolume):: {vsphereVolume+: vsphereVolume}, - mixin:: { - awsElasticBlockStore:: { - local awsElasticBlockStore(mixin) = {awsElasticBlockStore+: mixin}, - fsType(fsType):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.fsType(fsType)), - partition(partition):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.partition(partition)), - readOnly(readOnly):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.readOnly(readOnly)), - volumeID(volumeID):: awsElasticBlockStore($.v1.aWSElasticBlockStoreVolumeSource.volumeID(volumeID)), - }, - azureDisk:: { - local azureDisk(mixin) = {azureDisk+: mixin}, - cachingMode(cachingMode):: azureDisk($.v1.azureDiskVolumeSource.cachingMode(cachingMode)), - diskName(diskName):: azureDisk($.v1.azureDiskVolumeSource.diskName(diskName)), - diskURI(diskURI):: azureDisk($.v1.azureDiskVolumeSource.diskURI(diskURI)), - fsType(fsType):: azureDisk($.v1.azureDiskVolumeSource.fsType(fsType)), - readOnly(readOnly):: azureDisk($.v1.azureDiskVolumeSource.readOnly(readOnly)), - }, - azureFile:: { - local azureFile(mixin) = {azureFile+: mixin}, - readOnly(readOnly):: azureFile($.v1.azureFileVolumeSource.readOnly(readOnly)), - secretName(secretName):: azureFile($.v1.azureFileVolumeSource.secretName(secretName)), - shareName(shareName):: azureFile($.v1.azureFileVolumeSource.shareName(shareName)), - }, - cephfs:: { - local cephfs(mixin) = {cephfs+: mixin}, - monitors(monitors):: cephfs($.v1.cephFSVolumeSource.monitors(monitors)), - path(path):: cephfs($.v1.cephFSVolumeSource.path(path)), - readOnly(readOnly):: cephfs($.v1.cephFSVolumeSource.readOnly(readOnly)), - secretFile(secretFile):: cephfs($.v1.cephFSVolumeSource.secretFile(secretFile)), - secretRef(secretRef):: cephfs($.v1.cephFSVolumeSource.secretRef(secretRef)), - user(user):: cephfs($.v1.cephFSVolumeSource.user(user)), - }, - cinder:: { - local cinder(mixin) = {cinder+: mixin}, - fsType(fsType):: cinder($.v1.cinderVolumeSource.fsType(fsType)), - readOnly(readOnly):: cinder($.v1.cinderVolumeSource.readOnly(readOnly)), - volumeID(volumeID):: cinder($.v1.cinderVolumeSource.volumeID(volumeID)), - }, - configMap:: { - local configMap(mixin) = {configMap+: mixin}, - defaultMode(defaultMode):: configMap($.v1.configMapVolumeSource.defaultMode(defaultMode)), - items(items):: configMap($.v1.configMapVolumeSource.items(items)), - name(name):: configMap($.v1.configMapVolumeSource.name(name)), - optional(optional):: configMap($.v1.configMapVolumeSource.optional(optional)), - }, - downwardAPI:: { - local downwardAPI(mixin) = {downwardAPI+: mixin}, - defaultMode(defaultMode):: downwardAPI($.v1.downwardAPIVolumeSource.defaultMode(defaultMode)), - items(items):: downwardAPI($.v1.downwardAPIVolumeSource.items(items)), - }, - emptyDir:: { - local emptyDir(mixin) = {emptyDir+: mixin}, - medium(medium):: emptyDir($.v1.emptyDirVolumeSource.medium(medium)), - }, - fc:: { - local fc(mixin) = {fc+: mixin}, - fsType(fsType):: fc($.v1.fCVolumeSource.fsType(fsType)), - lun(lun):: fc($.v1.fCVolumeSource.lun(lun)), - readOnly(readOnly):: fc($.v1.fCVolumeSource.readOnly(readOnly)), - targetWWNs(targetWWNs):: fc($.v1.fCVolumeSource.targetWWNs(targetWWNs)), - }, - flexVolume:: { - local flexVolume(mixin) = {flexVolume+: mixin}, - driver(driver):: flexVolume($.v1.flexVolumeSource.driver(driver)), - fsType(fsType):: flexVolume($.v1.flexVolumeSource.fsType(fsType)), - options(options):: flexVolume($.v1.flexVolumeSource.options(options)), - readOnly(readOnly):: flexVolume($.v1.flexVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: flexVolume($.v1.flexVolumeSource.secretRef(secretRef)), - }, - flocker:: { - local flocker(mixin) = {flocker+: mixin}, - datasetName(datasetName):: flocker($.v1.flockerVolumeSource.datasetName(datasetName)), - datasetUUID(datasetUUID):: flocker($.v1.flockerVolumeSource.datasetUUID(datasetUUID)), - }, - gcePersistentDisk:: { - local gcePersistentDisk(mixin) = {gcePersistentDisk+: mixin}, - fsType(fsType):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.fsType(fsType)), - partition(partition):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.partition(partition)), - pdName(pdName):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.pdName(pdName)), - readOnly(readOnly):: gcePersistentDisk($.v1.gCEPersistentDiskVolumeSource.readOnly(readOnly)), - }, - gitRepo:: { - local gitRepo(mixin) = {gitRepo+: mixin}, - directory(directory):: gitRepo($.v1.gitRepoVolumeSource.directory(directory)), - repository(repository):: gitRepo($.v1.gitRepoVolumeSource.repository(repository)), - revision(revision):: gitRepo($.v1.gitRepoVolumeSource.revision(revision)), - }, - glusterfs:: { - local glusterfs(mixin) = {glusterfs+: mixin}, - endpoints(endpoints):: glusterfs($.v1.glusterfsVolumeSource.endpoints(endpoints)), - path(path):: glusterfs($.v1.glusterfsVolumeSource.path(path)), - readOnly(readOnly):: glusterfs($.v1.glusterfsVolumeSource.readOnly(readOnly)), - }, - hostPath:: { - local hostPath(mixin) = {hostPath+: mixin}, - path(path):: hostPath($.v1.hostPathVolumeSource.path(path)), - }, - iscsi:: { - local iscsi(mixin) = {iscsi+: mixin}, - chapAuthDiscovery(chapAuthDiscovery):: iscsi($.v1.iSCSIVolumeSource.chapAuthDiscovery(chapAuthDiscovery)), - chapAuthSession(chapAuthSession):: iscsi($.v1.iSCSIVolumeSource.chapAuthSession(chapAuthSession)), - fsType(fsType):: iscsi($.v1.iSCSIVolumeSource.fsType(fsType)), - iqn(iqn):: iscsi($.v1.iSCSIVolumeSource.iqn(iqn)), - iscsiInterface(iscsiInterface):: iscsi($.v1.iSCSIVolumeSource.iscsiInterface(iscsiInterface)), - lun(lun):: iscsi($.v1.iSCSIVolumeSource.lun(lun)), - portals(portals):: iscsi($.v1.iSCSIVolumeSource.portals(portals)), - readOnly(readOnly):: iscsi($.v1.iSCSIVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: iscsi($.v1.iSCSIVolumeSource.secretRef(secretRef)), - targetPortal(targetPortal):: iscsi($.v1.iSCSIVolumeSource.targetPortal(targetPortal)), - }, - nfs:: { - local nfs(mixin) = {nfs+: mixin}, - path(path):: nfs($.v1.nFSVolumeSource.path(path)), - readOnly(readOnly):: nfs($.v1.nFSVolumeSource.readOnly(readOnly)), - server(server):: nfs($.v1.nFSVolumeSource.server(server)), - }, - persistentVolumeClaim:: { - local persistentVolumeClaim(mixin) = {persistentVolumeClaim+: mixin}, - claimName(claimName):: persistentVolumeClaim($.v1.persistentVolumeClaimVolumeSource.claimName(claimName)), - readOnly(readOnly):: persistentVolumeClaim($.v1.persistentVolumeClaimVolumeSource.readOnly(readOnly)), - }, - photonPersistentDisk:: { - local photonPersistentDisk(mixin) = {photonPersistentDisk+: mixin}, - fsType(fsType):: photonPersistentDisk($.v1.photonPersistentDiskVolumeSource.fsType(fsType)), - pdID(pdID):: photonPersistentDisk($.v1.photonPersistentDiskVolumeSource.pdID(pdID)), - }, - portworxVolume:: { - local portworxVolume(mixin) = {portworxVolume+: mixin}, - fsType(fsType):: portworxVolume($.v1.portworxVolumeSource.fsType(fsType)), - readOnly(readOnly):: portworxVolume($.v1.portworxVolumeSource.readOnly(readOnly)), - volumeID(volumeID):: portworxVolume($.v1.portworxVolumeSource.volumeID(volumeID)), - }, - projected:: { - local projected(mixin) = {projected+: mixin}, - defaultMode(defaultMode):: projected($.v1.projectedVolumeSource.defaultMode(defaultMode)), - sources(sources):: projected($.v1.projectedVolumeSource.sources(sources)), - }, - quobyte:: { - local quobyte(mixin) = {quobyte+: mixin}, - group(group):: quobyte($.v1.quobyteVolumeSource.group(group)), - readOnly(readOnly):: quobyte($.v1.quobyteVolumeSource.readOnly(readOnly)), - registry(registry):: quobyte($.v1.quobyteVolumeSource.registry(registry)), - user(user):: quobyte($.v1.quobyteVolumeSource.user(user)), - volume(volume):: quobyte($.v1.quobyteVolumeSource.volume(volume)), - }, - rbd:: { - local rbd(mixin) = {rbd+: mixin}, - fsType(fsType):: rbd($.v1.rBDVolumeSource.fsType(fsType)), - image(image):: rbd($.v1.rBDVolumeSource.image(image)), - keyring(keyring):: rbd($.v1.rBDVolumeSource.keyring(keyring)), - monitors(monitors):: rbd($.v1.rBDVolumeSource.monitors(monitors)), - pool(pool):: rbd($.v1.rBDVolumeSource.pool(pool)), - readOnly(readOnly):: rbd($.v1.rBDVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: rbd($.v1.rBDVolumeSource.secretRef(secretRef)), - user(user):: rbd($.v1.rBDVolumeSource.user(user)), - }, - scaleIO:: { - local scaleIO(mixin) = {scaleIO+: mixin}, - fsType(fsType):: scaleIO($.v1.scaleIOVolumeSource.fsType(fsType)), - gateway(gateway):: scaleIO($.v1.scaleIOVolumeSource.gateway(gateway)), - protectionDomain(protectionDomain):: scaleIO($.v1.scaleIOVolumeSource.protectionDomain(protectionDomain)), - readOnly(readOnly):: scaleIO($.v1.scaleIOVolumeSource.readOnly(readOnly)), - secretRef(secretRef):: scaleIO($.v1.scaleIOVolumeSource.secretRef(secretRef)), - sslEnabled(sslEnabled):: scaleIO($.v1.scaleIOVolumeSource.sslEnabled(sslEnabled)), - storageMode(storageMode):: scaleIO($.v1.scaleIOVolumeSource.storageMode(storageMode)), - storagePool(storagePool):: scaleIO($.v1.scaleIOVolumeSource.storagePool(storagePool)), - system(system):: scaleIO($.v1.scaleIOVolumeSource.system(system)), - volumeName(volumeName):: scaleIO($.v1.scaleIOVolumeSource.volumeName(volumeName)), - }, - secret:: { - local secret(mixin) = {secret+: mixin}, - defaultMode(defaultMode):: secret($.v1.secretVolumeSource.defaultMode(defaultMode)), - items(items):: secret($.v1.secretVolumeSource.items(items)), - optional(optional):: secret($.v1.secretVolumeSource.optional(optional)), - secretName(secretName):: secret($.v1.secretVolumeSource.secretName(secretName)), - }, - vsphereVolume:: { - local vsphereVolume(mixin) = {vsphereVolume+: mixin}, - fsType(fsType):: vsphereVolume($.v1.vsphereVirtualDiskVolumeSource.fsType(fsType)), - volumePath(volumePath):: vsphereVolume($.v1.vsphereVirtualDiskVolumeSource.volumePath(volumePath)), - }, - }, - }, - volumeMount:: { - default(name, mountPath):: - { - mountPath: mountPath, - name: name, - }, - // Path within the container at which the volume should be mounted. Must not contain ':'. - mountPath(mountPath):: {mountPath: mountPath}, - // This must match the Name of a Volume. - name(name):: {name: name}, - // Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - readOnly(readOnly):: {readOnly: readOnly}, - // Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). - subPath(subPath):: {subPath: subPath}, - }, - volumeProjection:: { - default():: - { - configMap: {}, - downwardAPI: {}, - secret: {}, - }, - // information about the configMap data to project - configMap(configMap):: {configMap+: configMap}, - // information about the downwardAPI data to project - downwardAPI(downwardAPI):: {downwardAPI+: downwardAPI}, - // information about the secret data to project - secret(secret):: {secret+: secret}, - mixin:: { - configMap:: { - local configMap(mixin) = {configMap+: mixin}, - items(items):: configMap($.v1.configMapProjection.items(items)), - name(name):: configMap($.v1.configMapProjection.name(name)), - optional(optional):: configMap($.v1.configMapProjection.optional(optional)), - }, - downwardAPI:: { - local downwardAPI(mixin) = {downwardAPI+: mixin}, - items(items):: downwardAPI($.v1.downwardAPIProjection.items(items)), - }, - secret:: { - local secret(mixin) = {secret+: mixin}, - items(items):: secret($.v1.secretProjection.items(items)), - name(name):: secret($.v1.secretProjection.name(name)), - optional(optional):: secret($.v1.secretProjection.optional(optional)), - }, - }, - }, - vsphereVirtualDiskVolumeSource:: { - default(volumePath):: - { - volumePath: 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(fsType):: {fsType: fsType}, - // Path that identifies vSphere volume vmdk - volumePath(volumePath):: {volumePath: volumePath}, - }, - watchEvent:: { - default(type, object):: - { - object: object, - type: type, - }, - // - object(object):: {object: object}, - // - type(type):: {type: type}, - }, - weightedPodAffinityTerm:: { - default(weight, podAffinityTerm):: - { - podAffinityTerm: podAffinityTerm, - weight: weight, - }, - // Required. A pod affinity term, associated with the corresponding weight. - podAffinityTerm(podAffinityTerm):: {podAffinityTerm+: podAffinityTerm}, - // weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - weight(weight):: {weight: weight}, - mixin:: { - podAffinityTerm:: { - local podAffinityTerm(mixin) = {podAffinityTerm+: mixin}, - labelSelector(labelSelector):: podAffinityTerm($.v1.podAffinityTerm.labelSelector(labelSelector)), - namespaces(namespaces):: podAffinityTerm($.v1.podAffinityTerm.namespaces(namespaces)), - topologyKey(topologyKey):: podAffinityTerm($.v1.podAffinityTerm.topologyKey(topologyKey)), - }, - }, - }, - }, - v1beta1:: { - aPIVersion:: { - // Name of this version (e.g. 'v1'). - name(name):: {name: name}, - }, - daemonSet:: { - local kind = {kind: "DaemonSet"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // The desired behavior of this daemon set. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - // The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - minReadySeconds(minReadySeconds):: spec($.v1beta1.daemonSetSpec.minReadySeconds(minReadySeconds)), - selector(selector):: spec($.v1beta1.daemonSetSpec.selector(selector)), - template(template):: spec($.v1beta1.daemonSetSpec.template(template)), - templateGeneration(templateGeneration):: spec($.v1beta1.daemonSetSpec.templateGeneration(templateGeneration)), - updateStrategy(updateStrategy):: spec($.v1beta1.daemonSetSpec.updateStrategy(updateStrategy)), - }, - status:: { - local status(mixin) = {status+: mixin}, - currentNumberScheduled(currentNumberScheduled):: status($.v1beta1.daemonSetStatus.currentNumberScheduled(currentNumberScheduled)), - desiredNumberScheduled(desiredNumberScheduled):: status($.v1beta1.daemonSetStatus.desiredNumberScheduled(desiredNumberScheduled)), - numberAvailable(numberAvailable):: status($.v1beta1.daemonSetStatus.numberAvailable(numberAvailable)), - numberMisscheduled(numberMisscheduled):: status($.v1beta1.daemonSetStatus.numberMisscheduled(numberMisscheduled)), - numberReady(numberReady):: status($.v1beta1.daemonSetStatus.numberReady(numberReady)), - numberUnavailable(numberUnavailable):: status($.v1beta1.daemonSetStatus.numberUnavailable(numberUnavailable)), - observedGeneration(observedGeneration):: status($.v1beta1.daemonSetStatus.observedGeneration(observedGeneration)), - updatedNumberScheduled(updatedNumberScheduled):: status($.v1beta1.daemonSetStatus.updatedNumberScheduled(updatedNumberScheduled)), - }, - }, - }, - daemonSetList:: { - local kind = {kind: "DaemonSetList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // A list of daemon sets. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - daemonSetSpec:: { - default(template):: - { - selector: {}, - template: template, - updateStrategy: {}, - }, - // 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(minReadySeconds):: {minReadySeconds: minReadySeconds}, - // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector(selector):: {selector+: 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(template):: {template+: template}, - // A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation. - templateGeneration(templateGeneration):: {templateGeneration: templateGeneration}, - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy(updateStrategy):: {updateStrategy+: updateStrategy}, - mixin:: { - selector:: { - local selector(mixin) = {selector+: mixin}, - matchExpressions(matchExpressions):: selector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: selector($.v1.labelSelector.matchLabels(matchLabels)), - }, - template:: { - local template(mixin) = {template+: mixin}, - spec(spec):: template($.v1.podTemplateSpec.spec(spec)), - }, - updateStrategy:: { - local updateStrategy(mixin) = {updateStrategy+: mixin}, - rollingUpdate(rollingUpdate):: updateStrategy($.v1beta1.daemonSetUpdateStrategy.rollingUpdate(rollingUpdate)), - type(type):: updateStrategy($.v1beta1.daemonSetUpdateStrategy.type(type)), - }, - }, - }, - daemonSetStatus:: { - default(currentNumberScheduled, numberMisscheduled, desiredNumberScheduled, numberReady):: - { - currentNumberScheduled: currentNumberScheduled, - desiredNumberScheduled: desiredNumberScheduled, - numberMisscheduled: numberMisscheduled, - numberReady: numberReady, - }, - // The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - currentNumberScheduled(currentNumberScheduled):: {currentNumberScheduled: currentNumberScheduled}, - // The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - desiredNumberScheduled(desiredNumberScheduled):: {desiredNumberScheduled: desiredNumberScheduled}, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds) - numberAvailable(numberAvailable):: {numberAvailable: numberAvailable}, - // The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - numberMisscheduled(numberMisscheduled):: {numberMisscheduled: numberMisscheduled}, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. - numberReady(numberReady):: {numberReady: numberReady}, - // The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds) - numberUnavailable(numberUnavailable):: {numberUnavailable: numberUnavailable}, - // The most recent generation observed by the daemon set controller. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - // The total number of nodes that are running updated daemon pod - updatedNumberScheduled(updatedNumberScheduled):: {updatedNumberScheduled: updatedNumberScheduled}, - }, - daemonSetUpdateStrategy:: { - default():: - { - rollingUpdate: {}, - }, - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate(rollingUpdate):: {rollingUpdate+: rollingUpdate}, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. - type(type):: {type: type}, - mixin:: { - rollingUpdate:: { - local rollingUpdate(mixin) = {rollingUpdate+: mixin}, - maxUnavailable(maxUnavailable):: rollingUpdate($.v1beta1.rollingUpdateDaemonSet.maxUnavailable(maxUnavailable)), - }, - }, - }, - deployment:: { - local kind = {kind: "Deployment"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // Specification of the desired behavior of the Deployment. - spec(spec):: {spec+: spec}, - // Most recently observed status of the Deployment. - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - minReadySeconds(minReadySeconds):: spec($.v1beta1.deploymentSpec.minReadySeconds(minReadySeconds)), - paused(paused):: spec($.v1beta1.deploymentSpec.paused(paused)), - progressDeadlineSeconds(progressDeadlineSeconds):: spec($.v1beta1.deploymentSpec.progressDeadlineSeconds(progressDeadlineSeconds)), - replicas(replicas):: spec($.v1beta1.deploymentSpec.replicas(replicas)), - revisionHistoryLimit(revisionHistoryLimit):: spec($.v1beta1.deploymentSpec.revisionHistoryLimit(revisionHistoryLimit)), - rollbackTo(rollbackTo):: spec($.v1beta1.deploymentSpec.rollbackTo(rollbackTo)), - selector(selector):: spec($.v1beta1.deploymentSpec.selector(selector)), - strategy(strategy):: spec($.v1beta1.deploymentSpec.strategy(strategy)), - template(template):: spec($.v1beta1.deploymentSpec.template(template)), - }, - status:: { - local status(mixin) = {status+: mixin}, - availableReplicas(availableReplicas):: status($.v1beta1.deploymentStatus.availableReplicas(availableReplicas)), - conditions(conditions):: status($.v1beta1.deploymentStatus.conditions(conditions)), - observedGeneration(observedGeneration):: status($.v1beta1.deploymentStatus.observedGeneration(observedGeneration)), - readyReplicas(readyReplicas):: status($.v1beta1.deploymentStatus.readyReplicas(readyReplicas)), - replicas(replicas):: status($.v1beta1.deploymentStatus.replicas(replicas)), - unavailableReplicas(unavailableReplicas):: status($.v1beta1.deploymentStatus.unavailableReplicas(unavailableReplicas)), - updatedReplicas(updatedReplicas):: status($.v1beta1.deploymentStatus.updatedReplicas(updatedReplicas)), - }, - }, - }, - deploymentCondition:: { - default(type, status):: - { - status: status, - type: type, - }, - // Last time the condition transitioned from one status to another. - lastTransitionTime(lastTransitionTime):: {lastTransitionTime: lastTransitionTime}, - // The last time this condition was updated. - lastUpdateTime(lastUpdateTime):: {lastUpdateTime: lastUpdateTime}, - // A human readable message indicating details about the transition. - message(message):: {message: message}, - // The reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Status of the condition, one of True, False, Unknown. - status(status):: {status: status}, - // Type of deployment condition. - type(type):: {type: type}, - }, - deploymentList:: { - local kind = {kind: "DeploymentList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // Items is the list of Deployments. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - deploymentRollback:: { - local kind = {kind: "DeploymentRollback"}, - default(name, rollbackTo):: - apiVersion + - kind + - { - name: name, - rollbackTo: rollbackTo, - updatedAnnotations: {}, - }, - // Required: This must match the Name of a deployment. - name(name):: {name: name}, - // The config of this deployment rollback. - rollbackTo(rollbackTo):: {rollbackTo+: rollbackTo}, - // The annotations to be updated to a deployment - updatedAnnotations(updatedAnnotations):: {updatedAnnotations+: updatedAnnotations}, - mixin:: { - rollbackTo:: { - local rollbackTo(mixin) = {rollbackTo+: mixin}, - revision(revision):: rollbackTo($.v1beta1.rollbackConfig.revision(revision)), - }, - }, - }, - deploymentSpec:: { - default(template):: - { - rollbackTo: {}, - selector: {}, - strategy: {}, - template: 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(minReadySeconds):: {minReadySeconds: minReadySeconds}, - // Indicates that the deployment is paused and will not be processed by the deployment controller. - paused(paused):: {paused: 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. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. This is not set by default. - progressDeadlineSeconds(progressDeadlineSeconds):: {progressDeadlineSeconds: progressDeadlineSeconds}, - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - replicas(replicas):: {replicas: replicas}, - // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. - revisionHistoryLimit(revisionHistoryLimit):: {revisionHistoryLimit: revisionHistoryLimit}, - // The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo(rollbackTo):: {rollbackTo+: rollbackTo}, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector(selector):: {selector+: selector}, - // The deployment strategy to use to replace existing pods with new ones. - strategy(strategy):: {strategy+: strategy}, - // Template describes the pods that will be created. - template(template):: {template+: template}, - mixin:: { - rollbackTo:: { - local rollbackTo(mixin) = {rollbackTo+: mixin}, - revision(revision):: rollbackTo($.v1beta1.rollbackConfig.revision(revision)), - }, - selector:: { - local selector(mixin) = {selector+: mixin}, - matchExpressions(matchExpressions):: selector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: selector($.v1.labelSelector.matchLabels(matchLabels)), - }, - strategy:: { - local strategy(mixin) = {strategy+: mixin}, - rollingUpdate(rollingUpdate):: strategy($.v1beta1.deploymentStrategy.rollingUpdate(rollingUpdate)), - type(type):: strategy($.v1beta1.deploymentStrategy.type(type)), - }, - template:: { - local template(mixin) = {template+: mixin}, - spec(spec):: template($.v1.podTemplateSpec.spec(spec)), - }, - }, - }, - deploymentStatus:: { - default():: - { - conditions: [], - }, - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - availableReplicas(availableReplicas):: {availableReplicas: availableReplicas}, - // Represents the latest available observations of a deployment's current state. - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - // The generation observed by the deployment controller. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - // Total number of ready pods targeted by this deployment. - readyReplicas(readyReplicas):: {readyReplicas: readyReplicas}, - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - replicas(replicas):: {replicas: replicas}, - // Total number of unavailable pods targeted by this deployment. - unavailableReplicas(unavailableReplicas):: {unavailableReplicas: unavailableReplicas}, - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - updatedReplicas(updatedReplicas):: {updatedReplicas: updatedReplicas}, - }, - deploymentStrategy:: { - default():: - { - rollingUpdate: {}, - }, - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate(rollingUpdate):: {rollingUpdate+: rollingUpdate}, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - type(type):: {type: type}, - mixin:: { - rollingUpdate:: { - local rollingUpdate(mixin) = {rollingUpdate+: mixin}, - maxSurge(maxSurge):: rollingUpdate($.v1beta1.rollingUpdateDeployment.maxSurge(maxSurge)), - maxUnavailable(maxUnavailable):: rollingUpdate($.v1beta1.rollingUpdateDeployment.maxUnavailable(maxUnavailable)), - }, - }, - }, - fSGroupStrategyOptions:: { - default():: - { - ranges: [], - }, - // 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. - ranges(ranges):: if std.type(ranges) == "array" then {ranges+: ranges} else {ranges+: [ranges]}, - // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - rule(rule):: {rule: rule}, - }, - fSType:: { - }, - hTTPIngressPath:: { - default(backend):: - { - backend: backend, - }, - // Backend defines the referenced service endpoint to which the traffic will be forwarded to. - backend(backend):: {backend+: backend}, - // Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) 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 '/'. If unspecified, the path defaults to a catch all sending traffic to the backend. - path(path):: {path: path}, - mixin:: { - backend:: { - local backend(mixin) = {backend+: mixin}, - serviceName(serviceName):: backend($.v1beta1.ingressBackend.serviceName(serviceName)), - servicePort(servicePort):: backend($.v1beta1.ingressBackend.servicePort(servicePort)), - }, - }, - }, - hTTPIngressRuleValue:: { - default(paths):: - { - paths: if std.type(paths) == "array" then paths else [paths], - }, - // A collection of paths that map requests to backends. - paths(paths):: if std.type(paths) == "array" then {paths+: paths} else {paths+: [paths]}, - }, - hostPortRange:: { - default(min, max):: - { - max: max, - min: min, - }, - // max is the end of the range, inclusive. - max(max):: {max: max}, - // min is the start of the range, inclusive. - min(min):: {min: min}, - }, - iDRange:: { - default(min, max):: - { - max: max, - min: min, - }, - // Max is the end of the range, inclusive. - max(max):: {max: max}, - // Min is the start of the range, inclusive. - min(min):: {min: min}, - }, - ingress:: { - local kind = {kind: "Ingress"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // Spec is the desired state of the Ingress. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - // Status is the current state of the Ingress. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - backend(backend):: spec($.v1beta1.ingressSpec.backend(backend)), - rules(rules):: spec($.v1beta1.ingressSpec.rules(rules)), - tls(tls):: spec($.v1beta1.ingressSpec.tls(tls)), - }, - status:: { - local status(mixin) = {status+: mixin}, - loadBalancer(loadBalancer):: status($.v1beta1.ingressStatus.loadBalancer(loadBalancer)), - }, - }, - }, - ingressBackend:: { - default(serviceName, servicePort):: - { - serviceName: serviceName, - servicePort: servicePort, - }, - // Specifies the name of the referenced service. - serviceName(serviceName):: {serviceName: serviceName}, - // Specifies the port of the referenced service. - servicePort(servicePort):: {servicePort: servicePort}, - }, - ingressList:: { - local kind = {kind: "IngressList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // Items is the list of Ingress. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - ingressRule:: { - default():: - { - http: {}, - }, - // 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 the RFC: 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(host):: {host: host}, - // - http(http):: {http+: http}, - mixin:: { - http:: { - local http(mixin) = {http+: mixin}, - paths(paths):: http($.v1beta1.hTTPIngressRuleValue.paths(paths)), - }, - }, - }, - ingressSpec:: { - default():: - { - backend: {}, - rules: [], - tls: [], - }, - // A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. - backend(backend):: {backend+: backend}, - // 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(rules):: if std.type(rules) == "array" then {rules+: rules} else {rules+: [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(tls):: if std.type(tls) == "array" then {tls+: tls} else {tls+: [tls]}, - mixin:: { - backend:: { - local backend(mixin) = {backend+: mixin}, - serviceName(serviceName):: backend($.v1beta1.ingressBackend.serviceName(serviceName)), - servicePort(servicePort):: backend($.v1beta1.ingressBackend.servicePort(servicePort)), - }, - }, - }, - ingressStatus:: { - default():: - { - loadBalancer: {}, - }, - // LoadBalancer contains the current status of the load-balancer. - loadBalancer(loadBalancer):: {loadBalancer+: loadBalancer}, - mixin:: { - loadBalancer:: { - local loadBalancer(mixin) = {loadBalancer+: mixin}, - ingress(ingress):: loadBalancer($.v1.loadBalancerStatus.ingress(ingress)), - }, - }, - }, - ingressTLS:: { - default():: - { - hosts: [], - }, - // 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(hosts):: if std.type(hosts) == "array" then {hosts+: hosts} else {hosts+: [hosts]}, - // SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL 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(secretName):: {secretName: secretName}, - }, - networkPolicy:: { - local kind = {kind: "NetworkPolicy"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - }, - // Specification of the desired behavior for this NetworkPolicy. - spec(spec):: {spec+: spec}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - ingress(ingress):: spec($.v1beta1.networkPolicySpec.ingress(ingress)), - podSelector(podSelector):: spec($.v1beta1.networkPolicySpec.podSelector(podSelector)), - }, - }, - }, - networkPolicyIngressRule:: { - default():: - { - from: [], - ports: [], - }, - // 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list. - from(from):: if std.type(from) == "array" then {from+: from} else {from+: [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(ports):: if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - }, - networkPolicyList:: { - local kind = {kind: "NetworkPolicyList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // Items is a list of schema objects. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - networkPolicyPeer:: { - default():: - { - namespaceSelector: {}, - podSelector: {}, - }, - // Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. - namespaceSelector(namespaceSelector):: {namespaceSelector+: namespaceSelector}, - // This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - podSelector(podSelector):: {podSelector+: podSelector}, - mixin:: { - namespaceSelector:: { - local namespaceSelector(mixin) = {namespaceSelector+: mixin}, - matchExpressions(matchExpressions):: namespaceSelector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: namespaceSelector($.v1.labelSelector.matchLabels(matchLabels)), - }, - podSelector:: { - local podSelector(mixin) = {podSelector+: mixin}, - matchExpressions(matchExpressions):: podSelector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: podSelector($.v1.labelSelector.matchLabels(matchLabels)), - }, - }, - }, - networkPolicyPort:: { - default():: - { - protocol: {}, - }, - // If specified, 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(port):: {port: port}, - // Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP. - protocol(protocol):: {protocol+: protocol}, - }, - networkPolicySpec:: { - default(podSelector):: - { - ingress: [], - podSelector: podSelector, - }, - // List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, 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 affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list. - ingress(ingress):: if std.type(ingress) == "array" then {ingress+: ingress} else {ingress+: [ingress]}, - // 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(podSelector):: {podSelector+: podSelector}, - mixin:: { - podSelector:: { - local podSelector(mixin) = {podSelector+: mixin}, - matchExpressions(matchExpressions):: podSelector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: podSelector($.v1.labelSelector.matchLabels(matchLabels)), - }, - }, - }, - podSecurityPolicy:: { - local kind = {kind: "PodSecurityPolicy"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - }, - // spec defines the policy enforced. - spec(spec):: {spec+: spec}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - allowedCapabilities(allowedCapabilities):: spec($.v1beta1.podSecurityPolicySpec.allowedCapabilities(allowedCapabilities)), - defaultAddCapabilities(defaultAddCapabilities):: spec($.v1beta1.podSecurityPolicySpec.defaultAddCapabilities(defaultAddCapabilities)), - fsGroup(fsGroup):: spec($.v1beta1.podSecurityPolicySpec.fsGroup(fsGroup)), - hostIPC(hostIPC):: spec($.v1beta1.podSecurityPolicySpec.hostIPC(hostIPC)), - hostNetwork(hostNetwork):: spec($.v1beta1.podSecurityPolicySpec.hostNetwork(hostNetwork)), - hostPID(hostPID):: spec($.v1beta1.podSecurityPolicySpec.hostPID(hostPID)), - hostPorts(hostPorts):: spec($.v1beta1.podSecurityPolicySpec.hostPorts(hostPorts)), - privileged(privileged):: spec($.v1beta1.podSecurityPolicySpec.privileged(privileged)), - readOnlyRootFilesystem(readOnlyRootFilesystem):: spec($.v1beta1.podSecurityPolicySpec.readOnlyRootFilesystem(readOnlyRootFilesystem)), - requiredDropCapabilities(requiredDropCapabilities):: spec($.v1beta1.podSecurityPolicySpec.requiredDropCapabilities(requiredDropCapabilities)), - runAsUser(runAsUser):: spec($.v1beta1.podSecurityPolicySpec.runAsUser(runAsUser)), - seLinux(seLinux):: spec($.v1beta1.podSecurityPolicySpec.seLinux(seLinux)), - supplementalGroups(supplementalGroups):: spec($.v1beta1.podSecurityPolicySpec.supplementalGroups(supplementalGroups)), - volumes(volumes):: spec($.v1beta1.podSecurityPolicySpec.volumes(volumes)), - }, - }, - }, - podSecurityPolicyList:: { - local kind = {kind: "PodSecurityPolicyList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // Items is a list of schema objects. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - podSecurityPolicySpec:: { - default(seLinux, runAsUser, supplementalGroups, fsGroup):: - { - allowedCapabilities: [], - defaultAddCapabilities: [], - fsGroup: fsGroup, - hostPorts: [], - requiredDropCapabilities: [], - runAsUser: runAsUser, - seLinux: seLinux, - supplementalGroups: supplementalGroups, - volumes: [], - }, - // 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(allowedCapabilities):: if std.type(allowedCapabilities) == "array" then {allowedCapabilities+: allowedCapabilities} else {allowedCapabilities+: [allowedCapabilities]}, - // 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 capabiility in both DefaultAddCapabilities and RequiredDropCapabilities. - defaultAddCapabilities(defaultAddCapabilities):: if std.type(defaultAddCapabilities) == "array" then {defaultAddCapabilities+: defaultAddCapabilities} else {defaultAddCapabilities+: [defaultAddCapabilities]}, - // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext. - fsGroup(fsGroup):: {fsGroup+: fsGroup}, - // hostIPC determines if the policy allows the use of HostIPC in the pod spec. - hostIPC(hostIPC):: {hostIPC: hostIPC}, - // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. - hostNetwork(hostNetwork):: {hostNetwork: hostNetwork}, - // hostPID determines if the policy allows the use of HostPID in the pod spec. - hostPID(hostPID):: {hostPID: hostPID}, - // hostPorts determines which host port ranges are allowed to be exposed. - hostPorts(hostPorts):: if std.type(hostPorts) == "array" then {hostPorts+: hostPorts} else {hostPorts+: [hostPorts]}, - // privileged determines if a pod can request to be run as privileged. - privileged(privileged):: {privileged: 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(readOnlyRootFilesystem):: {readOnlyRootFilesystem: readOnlyRootFilesystem}, - // RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - requiredDropCapabilities(requiredDropCapabilities):: if std.type(requiredDropCapabilities) == "array" then {requiredDropCapabilities+: requiredDropCapabilities} else {requiredDropCapabilities+: [requiredDropCapabilities]}, - // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. - runAsUser(runAsUser):: {runAsUser+: runAsUser}, - // seLinux is the strategy that will dictate the allowable labels that may be set. - seLinux(seLinux):: {seLinux+: seLinux}, - // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. - supplementalGroups(supplementalGroups):: {supplementalGroups+: supplementalGroups}, - // volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used. - volumes(volumes):: if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, - mixin:: { - fsGroup:: { - local fsGroup(mixin) = {fsGroup+: mixin}, - ranges(ranges):: fsGroup($.v1beta1.fSGroupStrategyOptions.ranges(ranges)), - rule(rule):: fsGroup($.v1beta1.fSGroupStrategyOptions.rule(rule)), - }, - runAsUser:: { - local runAsUser(mixin) = {runAsUser+: mixin}, - ranges(ranges):: runAsUser($.v1beta1.runAsUserStrategyOptions.ranges(ranges)), - rule(rule):: runAsUser($.v1beta1.runAsUserStrategyOptions.rule(rule)), - }, - seLinux:: { - local seLinux(mixin) = {seLinux+: mixin}, - rule(rule):: seLinux($.v1beta1.sELinuxStrategyOptions.rule(rule)), - seLinuxOptions(seLinuxOptions):: seLinux($.v1beta1.sELinuxStrategyOptions.seLinuxOptions(seLinuxOptions)), - }, - supplementalGroups:: { - local supplementalGroups(mixin) = {supplementalGroups+: mixin}, - ranges(ranges):: supplementalGroups($.v1beta1.supplementalGroupsStrategyOptions.ranges(ranges)), - rule(rule):: supplementalGroups($.v1beta1.supplementalGroupsStrategyOptions.rule(rule)), - }, - }, - }, - replicaSet:: { - local kind = {kind: "ReplicaSet"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - spec(spec):: {spec+: spec}, - // Status is the most recently observed status of the ReplicaSet. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - minReadySeconds(minReadySeconds):: spec($.v1beta1.replicaSetSpec.minReadySeconds(minReadySeconds)), - replicas(replicas):: spec($.v1beta1.replicaSetSpec.replicas(replicas)), - selector(selector):: spec($.v1beta1.replicaSetSpec.selector(selector)), - template(template):: spec($.v1beta1.replicaSetSpec.template(template)), - }, - status:: { - local status(mixin) = {status+: mixin}, - availableReplicas(availableReplicas):: status($.v1beta1.replicaSetStatus.availableReplicas(availableReplicas)), - conditions(conditions):: status($.v1beta1.replicaSetStatus.conditions(conditions)), - fullyLabeledReplicas(fullyLabeledReplicas):: status($.v1beta1.replicaSetStatus.fullyLabeledReplicas(fullyLabeledReplicas)), - observedGeneration(observedGeneration):: status($.v1beta1.replicaSetStatus.observedGeneration(observedGeneration)), - readyReplicas(readyReplicas):: status($.v1beta1.replicaSetStatus.readyReplicas(readyReplicas)), - replicas(replicas):: status($.v1beta1.replicaSetStatus.replicas(replicas)), - }, - }, - }, - replicaSetCondition:: { - default(type, status):: - { - status: status, - type: type, - }, - // The last time the condition transitioned from one status to another. - lastTransitionTime(lastTransitionTime):: {lastTransitionTime: lastTransitionTime}, - // A human readable message indicating details about the transition. - message(message):: {message: message}, - // The reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Status of the condition, one of True, False, Unknown. - status(status):: {status: status}, - // Type of replica set condition. - type(type):: {type: type}, - }, - replicaSetList:: { - local kind = {kind: "ReplicaSetList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - replicaSetSpec:: { - default():: - { - selector: {}, - 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(minReadySeconds):: {minReadySeconds: 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(replicas):: {replicas: replicas}, - // Selector is a label query over pods that should match the replica count. If the 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 replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector(selector):: {selector+: selector}, - // 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(template):: {template+: template}, - mixin:: { - selector:: { - local selector(mixin) = {selector+: mixin}, - matchExpressions(matchExpressions):: selector($.v1.labelSelector.matchExpressions(matchExpressions)), - matchLabels(matchLabels):: selector($.v1.labelSelector.matchLabels(matchLabels)), - }, - template:: { - local template(mixin) = {template+: mixin}, - spec(spec):: template($.v1.podTemplateSpec.spec(spec)), - }, - }, - }, - replicaSetStatus:: { - default(replicas):: - { - conditions: [], - replicas: replicas, - }, - // The number of available replicas (ready for at least minReadySeconds) for this replica set. - availableReplicas(availableReplicas):: {availableReplicas: availableReplicas}, - // Represents the latest available observations of a replica set's current state. - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - // The number of pods that have labels matching the labels of the pod template of the replicaset. - fullyLabeledReplicas(fullyLabeledReplicas):: {fullyLabeledReplicas: fullyLabeledReplicas}, - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - // The number of ready replicas for this replica set. - readyReplicas(readyReplicas):: {readyReplicas: readyReplicas}, - // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller - replicas(replicas):: {replicas: replicas}, - }, - rollbackConfig:: { - // The revision to rollback to. If set to 0, rollbck to the last revision. - revision(revision):: {revision: revision}, - }, - rollingUpdateDaemonSet:: { - // 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. 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(maxUnavailable):: {maxUnavailable: maxUnavailable}, - }, - rollingUpdateDeployment:: { - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - maxSurge(maxSurge):: {maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - maxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, - }, - runAsUserStrategyOptions:: { - default(rule):: - { - ranges: [], - rule: rule, - }, - // Ranges are the allowed ranges of uids that may be used. - ranges(ranges):: if std.type(ranges) == "array" then {ranges+: ranges} else {ranges+: [ranges]}, - // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. - rule(rule):: {rule: rule}, - }, - sELinuxStrategyOptions:: { - default(rule):: - { - rule: rule, - seLinuxOptions: {}, - }, - // type is the strategy that will dictate the allowable labels that may be set. - rule(rule):: {rule: rule}, - // seLinuxOptions required to run as; required for MustRunAs More info: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/security_context.md - seLinuxOptions(seLinuxOptions):: {seLinuxOptions+: seLinuxOptions}, - mixin:: { - seLinuxOptions:: { - local seLinuxOptions(mixin) = {seLinuxOptions+: mixin}, - level(level):: seLinuxOptions($.v1.sELinuxOptions.level(level)), - role(role):: seLinuxOptions($.v1.sELinuxOptions.role(role)), - type(type):: seLinuxOptions($.v1.sELinuxOptions.type(type)), - user(user):: seLinuxOptions($.v1.sELinuxOptions.user(user)), - }, - }, - }, - scale:: { - local kind = {kind: "Scale"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - spec: {}, - status: {}, - }, - // defines the behavior of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. - spec(spec):: {spec+: spec}, - // current status of the scale. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status. Read-only. - status(status):: {status+: status}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - spec:: { - local spec(mixin) = {spec+: mixin}, - replicas(replicas):: spec($.v1beta1.scaleSpec.replicas(replicas)), - }, - status:: { - local status(mixin) = {status+: mixin}, - replicas(replicas):: status($.v1beta1.scaleStatus.replicas(replicas)), - selector(selector):: status($.v1beta1.scaleStatus.selector(selector)), - targetSelector(targetSelector):: status($.v1beta1.scaleStatus.targetSelector(targetSelector)), - }, - }, - }, - scaleSpec:: { - // desired number of instances for the scaled object. - replicas(replicas):: {replicas: replicas}, - }, - scaleStatus:: { - default(replicas):: - { - replicas: replicas, - selector: {}, - }, - // actual number of observed instances of the scaled object. - replicas(replicas):: {replicas: replicas}, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - selector(selector):: {selector+: selector}, - // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - targetSelector(targetSelector):: {targetSelector: targetSelector}, - }, - supplementalGroupsStrategyOptions:: { - default():: - { - ranges: [], - }, - // 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. - ranges(ranges):: if std.type(ranges) == "array" then {ranges+: ranges} else {ranges+: [ranges]}, - // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - rule(rule):: {rule: rule}, - }, - thirdPartyResource:: { - local kind = {kind: "ThirdPartyResource"}, - default(name, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - versions: [], - }, - // Description is the description of this object. - description(description):: {description: description}, - // Versions are versions for this third party object - versions(versions):: if std.type(versions) == "array" then {versions+: versions} else {versions+: [versions]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - annotations(annotations):: metadata($.v1.objectMeta.annotations(annotations)), - clusterName(clusterName):: metadata($.v1.objectMeta.clusterName(clusterName)), - creationTimestamp(creationTimestamp):: metadata($.v1.objectMeta.creationTimestamp(creationTimestamp)), - deletionGracePeriodSeconds(deletionGracePeriodSeconds):: metadata($.v1.objectMeta.deletionGracePeriodSeconds(deletionGracePeriodSeconds)), - deletionTimestamp(deletionTimestamp):: metadata($.v1.objectMeta.deletionTimestamp(deletionTimestamp)), - finalizers(finalizers):: metadata($.v1.objectMeta.finalizers(finalizers)), - generateName(generateName):: metadata($.v1.objectMeta.generateName(generateName)), - generation(generation):: metadata($.v1.objectMeta.generation(generation)), - initializers(initializers):: metadata($.v1.objectMeta.initializers(initializers)), - labels(labels):: metadata($.v1.objectMeta.labels(labels)), - name(name):: metadata($.v1.objectMeta.name(name)), - namespace(namespace):: metadata($.v1.objectMeta.namespace(namespace)), - ownerReferences(ownerReferences):: metadata($.v1.objectMeta.ownerReferences(ownerReferences)), - resourceVersion(resourceVersion):: metadata($.v1.objectMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.objectMeta.selfLink(selfLink)), - uid(uid):: metadata($.v1.objectMeta.uid(uid)), - }, - }, - }, - thirdPartyResourceList:: { - local kind = {kind: "ThirdPartyResourceList"}, - default(name, items, namespace="default"):: - apiVersion + - kind + - defaultMetadata(name, namespace) + - { - items: if std.type(items) == "array" then items else [items], - }, - // Items is the list of ThirdPartyResources. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - mixin:: { - metadata:: { - local metadata(mixin) = {metadata+: mixin}, - resourceVersion(resourceVersion):: metadata($.v1.listMeta.resourceVersion(resourceVersion)), - selfLink(selfLink):: metadata($.v1.listMeta.selfLink(selfLink)), - }, - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/k.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/k.libsonnet deleted file mode 100644 index 06d74bd2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/k.libsonnet +++ /dev/null @@ -1,72 +0,0 @@ -local apps = import "apps.v1beta1.libsonnet"; -local core = import "core.v1.libsonnet"; -local extensions = import "extensions.v1beta1.libsonnet"; -local util = import "util.libsonnet"; - -{ - apps:: apps + { - v1beta1:: apps.v1beta1 + { - deployment:: apps.v1beta1.deployment + { - default(name, containers, namespace="default"):: - super.default(name, namespace) + { - spec+: { - template: {spec: apps.v1.podSpec.default(containers)}, - }, - }, - mixin:: apps.v1beta1.deployment.mixin + { - podSpec:: { - local spec(mixin) = { - spec+: { - template+: { - spec+: mixin, - }, - }, - }, - serviceAccountName(serviceAccountName):: spec($.apps.v1.podSpec.serviceAccountName(serviceAccountName)), - restartPolicy(restartPolicy):: spec($.apps.v1.podSpec.restartPolicy(restartPolicy)), - automountServiceAccountToken(automountServiceAccountToken):: spec($.apps.v1.podSpec.automountServiceAccountToken(automountServiceAccountToken)), - activeDeadlineSeconds(activeDeadlineSeconds):: spec($.apps.v1.podSpec.activeDeadlineSeconds(activeDeadlineSeconds)), - affinity(affinity):: spec($.apps.v1.podSpec.affinity(affinity)), - serviceAccount(serviceAccount):: spec($.apps.v1.podSpec.serviceAccount(serviceAccount)), - imagePullSecrets(imagePullSecrets):: spec($.apps.v1.podSpec.imagePullSecrets(imagePullSecrets)), - hostNetwork(hostNetwork):: spec($.apps.v1.podSpec.hostNetwork(hostNetwork)), - dnsPolicy(dnsPolicy):: spec($.apps.v1.podSpec.dnsPolicy(dnsPolicy)), - tolerations(tolerations):: spec($.apps.v1.podSpec.tolerations(tolerations)), - hostIPC(hostIPC):: spec($.apps.v1.podSpec.hostIPC(hostIPC)), - initContainers(initContainers):: spec($.apps.v1.podSpec.initContainers(initContainers)), - schedulerName(schedulerName):: spec($.apps.v1.podSpec.schedulerName(schedulerName)), - hostPID(hostPID):: spec($.apps.v1.podSpec.hostPID(hostPID)), - volumes(volumes):: spec($.apps.v1.podSpec.volumes(volumes)), - nodeName(nodeName):: spec($.apps.v1.podSpec.nodeName(nodeName)), - securityContext(securityContext):: spec($.apps.v1.podSpec.securityContext(securityContext)), - nodeSelector(nodeSelector):: spec($.apps.v1.podSpec.nodeSelector(nodeSelector)), - hostname(hostname):: spec($.apps.v1.podSpec.hostname(hostname)), - hostMappings(hostMappings):: spec($.apps.v1.podSpec.hostMappings(hostMappings)), - terminationGracePeriodSeconds(terminationGracePeriodSeconds):: spec($.apps.v1.podSpec.terminationGracePeriodSeconds(terminationGracePeriodSeconds)), - containers(containers):: spec($.apps.v1.podSpec.containers(containers)), - subdomain(subdomain):: spec($.apps.v1.podSpec.subdomain(subdomain)), - }, - }, - }, - }, - }, - - core:: core + { - v1:: core.v1 + { - container:: core.v1.container + { - default(name, image):: - super.default(name) + - super.image(image), - helpers:: { - namedPort(name, port):: - local portObj = - core.v1.containerPort.name(name) + - core.v1.containerPort.containerPort(port); - core.v1.container.ports(portObj), - } - }, - }, - }, - extensions:: extensions, - util:: util, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/util.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/util.libsonnet deleted file mode 100644 index bb41e14f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.1/util.libsonnet +++ /dev/null @@ -1,28 +0,0 @@ -{ - // Remove all empty objects and arrays - prune(thing):: - if std.type(thing) == "array" then - self.pruneArray(thing) - else if std.type(thing) == "object" then - self.pruneObj(thing) - else - thing, - // Does this value have real content? - isContent(v):: - if v == null then - false - else if std.type(v) == "array" then - std.length(v) > 0 - else if std.type(v) == "object" then - std.length(v) > 0 - else - true, - // Remove all fields that have empty content - pruneObj(obj):: { - [x]: $.prune(obj[x]) - for x in std.objectFields(obj) if self.isContent($.prune(obj[x])) - }, - // Remove all members that have empty content - pruneArray(arr):: - [ $.prune(x) for x in arr if self.isContent($.prune(x)) ] -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.2/k.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.2/k.libsonnet deleted file mode 100644 index f1d40f8f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.2/k.libsonnet +++ /dev/null @@ -1,80 +0,0 @@ -local k8s = import "k8s.libsonnet"; - -local apps = k8s.apps; -local core = k8s.core; -local extensions = k8s.extensions; - -local hidden = { - mapContainers(f):: { - local podContainers = super.spec.template.spec.containers, - spec+: { - template+: { - spec+: { - // IMPORTANT: This overwrites the `containers` field - // for this deployment. - containers: std.map(f, podContainers), - }, - }, - }, - }, - - mapContainersWithName(names, f) :: - local nameSet = - if std.type(names) == "array" - then std.set(names) - else std.set([names]); - local inNameSet(name) = std.length(std.setInter(nameSet, std.set([name]))) > 0; - self.mapContainers( - function(c) - if std.objectHas(c, "name") && inNameSet(c.name) - then f(c) - else c - ), -}; - -k8s + { - apps:: apps + { - v1beta1:: apps.v1beta1 + { - local v1beta1 = apps.v1beta1, - - daemonSet:: v1beta1.daemonSet + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - - deployment:: v1beta1.deployment + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - }, - }, - - core:: core + { - v1:: core.v1 + { - list:: { - new(items):: - {apiVersion: "v1"} + - {kind: "List"} + - self.items(items), - - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - }, - }, - }, - - extensions:: extensions + { - v1beta1:: extensions.v1beta1 + { - local v1beta1 = extensions.v1beta1, - - daemonSet:: v1beta1.daemonSet + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - - deployment:: v1beta1.deployment + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.2/k8s.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.2/k8s.libsonnet deleted file mode 100644 index b36ee172..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.2/k8s.libsonnet +++ /dev/null @@ -1,17127 +0,0 @@ -// AUTOGENERATED from the Kubernetes OpenAPI specification. DO NOT MODIFY. -// Kubernetes version: v1.7.0 -// SHA of ksonnet-lib HEAD: 16cce978067ba5ab7dc94e69ec2186976ff9b60e -// SHA of Kubernetes HEAD OpenAPI spec is generated from: d3ada0119e776222f11ec7945e6d860061339aad - -{ - admissionregistration:: { - v1alpha1:: { - local apiVersion = {apiVersion: "admissionregistration.k8s.io/v1alpha1"}, - // ExternalAdmissionHookConfiguration describes the configuration of initializers. - externalAdmissionHookConfiguration:: { - local kind = {kind: "ExternalAdmissionHookConfiguration"}, - new():: apiVersion + kind, - // ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations. - externalAdmissionHooks(externalAdmissionHooks):: if std.type(externalAdmissionHooks) == "array" then {externalAdmissionHooks+: externalAdmissionHooks} else {externalAdmissionHooks+: [externalAdmissionHooks]}, - externalAdmissionHooksType:: hidden.admissionregistration.v1alpha1.externalAdmissionHook, - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration. - externalAdmissionHookConfigurationList:: { - local kind = {kind: "ExternalAdmissionHookConfigurationList"}, - new():: apiVersion + kind, - // List of ExternalAdmissionHookConfiguration. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.admissionregistration.v1alpha1.externalAdmissionHookConfiguration, - mixin:: { - // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __metadataMixin({resourceVersion: resourceVersion}), - // SelfLink is a URL representing this object. Populated by the system. Read-only. - selfLink(selfLink):: __metadataMixin({selfLink: selfLink}), - }, - metadataType:: hidden.meta.v1.listMeta, - }, - }, - // InitializerConfiguration describes the configuration of initializers. - initializerConfiguration:: { - local kind = {kind: "InitializerConfiguration"}, - new():: apiVersion + kind, - // Initializers is a list of resources and their default initializers Order-sensitive. When merging multiple InitializerConfigurations, we sort the initializers from different InitializerConfigurations by the name of the InitializerConfigurations; the order of the initializers from the same InitializerConfiguration is preserved. - initializers(initializers):: if std.type(initializers) == "array" then {initializers+: initializers} else {initializers+: [initializers]}, - initializersType:: hidden.admissionregistration.v1alpha1.initializer, - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // InitializerConfigurationList is a list of InitializerConfiguration. - initializerConfigurationList:: { - local kind = {kind: "InitializerConfigurationList"}, - new():: apiVersion + kind, - // List of InitializerConfiguration. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.admissionregistration.v1alpha1.initializerConfiguration, - mixin:: { - // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __metadataMixin({resourceVersion: resourceVersion}), - // SelfLink is a URL representing this object. Populated by the system. Read-only. - selfLink(selfLink):: __metadataMixin({selfLink: selfLink}), - }, - metadataType:: hidden.meta.v1.listMeta, - }, - }, - }, - }, - apps:: { - v1beta1:: { - local apiVersion = {apiVersion: "apps/v1beta1"}, - // 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. - controllerRevision:: { - local kind = {kind: "ControllerRevision"}, - new():: apiVersion + kind, - // Revision indicates the revision of the state represented by Data. - revision(revision):: {revision: revision}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ControllerRevisionList is a resource containing a list of ControllerRevision objects. - controllerRevisionList:: { - local kind = {kind: "ControllerRevisionList"}, - new():: apiVersion + kind, - // Items is the list of ControllerRevisions - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apps.v1beta1.controllerRevision, - mixin:: { - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __metadataMixin({resourceVersion: resourceVersion}), - // SelfLink is a URL representing this object. Populated by the system. Read-only. - selfLink(selfLink):: __metadataMixin({selfLink: selfLink}), - }, - metadataType:: hidden.meta.v1.listMeta, - }, - }, - // Deployment enables declarative updates for Pods and ReplicaSets. - deployment:: { - local kind = {kind: "Deployment"}, - new(name, replicas, containers, podLabels={}):: apiVersion + kind + self.mixin.metadata.name(name) + self.mixin.spec.replicas(replicas) + self.mixin.spec.template.spec.containers(containers) + self.mixin.spec.template.metadata.labels(podLabels), - mixin:: { - // Standard object metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the Deployment. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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(minReadySeconds):: __specMixin({minReadySeconds: minReadySeconds}), - // Indicates that the deployment is paused. - paused(paused):: __specMixin({paused: 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. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. - progressDeadlineSeconds(progressDeadlineSeconds):: __specMixin({progressDeadlineSeconds: progressDeadlineSeconds}), - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - replicas(replicas):: __specMixin({replicas: 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 2. - revisionHistoryLimit(revisionHistoryLimit):: __specMixin({revisionHistoryLimit: revisionHistoryLimit}), - // The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = __specMixin({rollbackTo+: rollbackTo}), - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - revision(revision):: __rollbackToMixin({revision: revision}), - }, - rollbackToType:: hidden.apps.v1beta1.rollbackConfig, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = __specMixin({strategy+: strategy}), - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - maxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - maxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - type(type):: __strategyMixin({type: type}), - }, - strategyType:: hidden.apps.v1beta1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.apps.v1beta1.deploymentSpec, - }, - }, - // DeploymentList is a list of Deployments. - deploymentList:: { - local kind = {kind: "DeploymentList"}, - new():: apiVersion + kind, - // Items is the list of Deployments. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apps.v1beta1.deployment, - mixin:: { - }, - }, - // DeploymentRollback stores the information required to rollback a deployment. - deploymentRollback:: { - local kind = {kind: "DeploymentRollback"}, - new():: apiVersion + kind, - // Required: This must match the Name of a deployment. - name(name):: {name: name}, - // The annotations to be updated to a deployment - updatedAnnotations(updatedAnnotations):: {updatedAnnotations+: updatedAnnotations}, - mixin:: { - // The config of this deployment rollback. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = {rollbackTo+: rollbackTo}, - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - revision(revision):: __rollbackToMixin({revision: revision}), - }, - rollbackToType:: hidden.apps.v1beta1.rollbackConfig, - }, - }, - // Scale represents a scaling request for a resource. - scale:: { - local kind = {kind: "Scale"}, - new():: apiVersion + kind, - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // desired number of instances for the scaled object. - replicas(replicas):: __specMixin({replicas: replicas}), - }, - specType:: hidden.apps.v1beta1.scaleSpec, - }, - }, - // 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. - statefulSet:: { - local kind = {kind: "StatefulSet"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the desired identities of pods in this set. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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(podManagementPolicy):: __specMixin({podManagementPolicy: 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(replicas):: __specMixin({replicas: 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(revisionHistoryLimit):: __specMixin({revisionHistoryLimit: revisionHistoryLimit}), - // selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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(serviceName):: __specMixin({serviceName: 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = __specMixin({updateStrategy+: updateStrategy}), - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. - partition(partition):: __rollingUpdateMixin({partition: partition}), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateStatefulSetStrategy, - // Type indicates the type of the StatefulSetUpdateStrategy. - type(type):: __updateStrategyMixin({type: type}), - }, - updateStrategyType:: hidden.apps.v1beta1.statefulSetUpdateStrategy, - // 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(volumeClaimTemplates):: if std.type(volumeClaimTemplates) == "array" then __specMixin({volumeClaimTemplates+: volumeClaimTemplates}) else __specMixin({volumeClaimTemplates+: [volumeClaimTemplates]}), - volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, - }, - specType:: hidden.apps.v1beta1.statefulSetSpec, - }, - }, - // StatefulSetList is a collection of StatefulSets. - statefulSetList:: { - local kind = {kind: "StatefulSetList"}, - new():: apiVersion + kind, - // - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apps.v1beta1.statefulSet, - mixin:: { - }, - }, - }, - }, - authentication:: { - v1:: { - local apiVersion = {apiVersion: "authentication.k8s.io/v1"}, - // 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. - tokenReview:: { - local kind = {kind: "TokenReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Token is the opaque bearer token. - token(token):: __specMixin({token: token}), - }, - specType:: hidden.authentication.v1.tokenReviewSpec, - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "authentication.k8s.io/v1beta1"}, - // 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. - tokenReview:: { - local kind = {kind: "TokenReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Token is the opaque bearer token. - token(token):: __specMixin({token: token}), - }, - specType:: hidden.authentication.v1beta1.tokenReviewSpec, - }, - }, - }, - }, - authorization:: { - v1:: { - local apiVersion = {apiVersion: "authorization.k8s.io/v1"}, - // 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. - localSubjectAccessReview:: { - local kind = {kind: "LocalSubjectAccessReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - extra(extra):: __specMixin({extra+: extra}), - // Groups is the groups you're testing for. - groups(groups):: if std.type(groups) == "array" then __specMixin({groups+: groups}) else __specMixin({groups+: [groups]}), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - path(path):: __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - verb(verb):: __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - group(group):: __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - name(name):: __resourceAttributesMixin({name: 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(namespace):: __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - resource(resource):: __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - subresource(subresource):: __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - verb(verb):: __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - version(version):: __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - // 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(user):: __specMixin({user: user}), - }, - specType:: hidden.authorization.v1.subjectAccessReviewSpec, - }, - }, - // 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 - selfSubjectAccessReview:: { - local kind = {kind: "SelfSubjectAccessReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated. user and groups must be empty - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - path(path):: __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - verb(verb):: __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - group(group):: __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - name(name):: __resourceAttributesMixin({name: 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(namespace):: __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - resource(resource):: __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - subresource(subresource):: __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - verb(verb):: __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - version(version):: __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - }, - specType:: hidden.authorization.v1.selfSubjectAccessReviewSpec, - }, - }, - // SubjectAccessReview checks whether or not a user or group can perform an action. - subjectAccessReview:: { - local kind = {kind: "SubjectAccessReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - extra(extra):: __specMixin({extra+: extra}), - // Groups is the groups you're testing for. - groups(groups):: if std.type(groups) == "array" then __specMixin({groups+: groups}) else __specMixin({groups+: [groups]}), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - path(path):: __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - verb(verb):: __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - group(group):: __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - name(name):: __resourceAttributesMixin({name: 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(namespace):: __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - resource(resource):: __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - subresource(subresource):: __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - verb(verb):: __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - version(version):: __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - // 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(user):: __specMixin({user: user}), - }, - specType:: hidden.authorization.v1.subjectAccessReviewSpec, - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "authorization.k8s.io/v1beta1"}, - // 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. - localSubjectAccessReview:: { - local kind = {kind: "LocalSubjectAccessReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - extra(extra):: __specMixin({extra+: extra}), - // Groups is the groups you're testing for. - group(group):: if std.type(group) == "array" then __specMixin({group+: group}) else __specMixin({group+: [group]}), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - path(path):: __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - verb(verb):: __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - group(group):: __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - name(name):: __resourceAttributesMixin({name: 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(namespace):: __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - resource(resource):: __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - subresource(subresource):: __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - verb(verb):: __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - version(version):: __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - // User is the user you're testing for. If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups - user(user):: __specMixin({user: user}), - }, - specType:: hidden.authorization.v1beta1.subjectAccessReviewSpec, - }, - }, - // 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 - selfSubjectAccessReview:: { - local kind = {kind: "SelfSubjectAccessReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated. user and groups must be empty - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - path(path):: __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - verb(verb):: __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - group(group):: __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - name(name):: __resourceAttributesMixin({name: 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(namespace):: __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - resource(resource):: __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - subresource(subresource):: __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - verb(verb):: __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - version(version):: __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - }, - specType:: hidden.authorization.v1beta1.selfSubjectAccessReviewSpec, - }, - }, - // SubjectAccessReview checks whether or not a user or group can perform an action. - subjectAccessReview:: { - local kind = {kind: "SubjectAccessReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - extra(extra):: __specMixin({extra+: extra}), - // Groups is the groups you're testing for. - group(group):: if std.type(group) == "array" then __specMixin({group+: group}) else __specMixin({group+: [group]}), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - path(path):: __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - verb(verb):: __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - group(group):: __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - name(name):: __resourceAttributesMixin({name: 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(namespace):: __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - resource(resource):: __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - subresource(subresource):: __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - verb(verb):: __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - version(version):: __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - // User is the user you're testing for. If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups - user(user):: __specMixin({user: user}), - }, - specType:: hidden.authorization.v1beta1.subjectAccessReviewSpec, - }, - }, - }, - }, - autoscaling:: { - v1:: { - local apiVersion = {apiVersion: "autoscaling/v1"}, - // configuration of a horizontal pod autoscaler. - horizontalPodAutoscaler:: { - local kind = {kind: "HorizontalPodAutoscaler"}, - new():: apiVersion + kind, - mixin:: { - // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. - maxReplicas(maxReplicas):: __specMixin({maxReplicas: maxReplicas}), - // lower limit for the number of pods that can be set by the autoscaler, default 1. - minReplicas(minReplicas):: __specMixin({minReplicas: minReplicas}), - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = __specMixin({scaleTargetRef+: scaleTargetRef}), - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: __scaleTargetRefMixin({name: name}), - }, - scaleTargetRefType:: hidden.autoscaling.v1.crossVersionObjectReference, - // 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(targetCpuUtilizationPercentage):: __specMixin({targetCPUUtilizationPercentage: targetCpuUtilizationPercentage}), - }, - specType:: hidden.autoscaling.v1.horizontalPodAutoscalerSpec, - }, - }, - // list of horizontal pod autoscaler objects. - horizontalPodAutoscalerList:: { - local kind = {kind: "HorizontalPodAutoscalerList"}, - new():: apiVersion + kind, - // list of horizontal pod autoscaler objects. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.autoscaling.v1.horizontalPodAutoscaler, - mixin:: { - }, - }, - // Scale represents a scaling request for a resource. - scale:: { - local kind = {kind: "Scale"}, - new():: apiVersion + kind, - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // desired number of instances for the scaled object. - replicas(replicas):: __specMixin({replicas: replicas}), - }, - specType:: hidden.autoscaling.v1.scaleSpec, - }, - }, - }, - v2alpha1:: { - local apiVersion = {apiVersion: "autoscaling/v2alpha1"}, - // 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. - horizontalPodAutoscaler:: { - local kind = {kind: "HorizontalPodAutoscaler"}, - new():: apiVersion + kind, - mixin:: { - // metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas. - maxReplicas(maxReplicas):: __specMixin({maxReplicas: maxReplicas}), - // 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(metrics):: if std.type(metrics) == "array" then __specMixin({metrics+: metrics}) else __specMixin({metrics+: [metrics]}), - metricsType:: hidden.autoscaling.v2alpha1.metricSpec, - // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. - minReplicas(minReplicas):: __specMixin({minReplicas: minReplicas}), - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = __specMixin({scaleTargetRef+: scaleTargetRef}), - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: __scaleTargetRefMixin({name: name}), - }, - scaleTargetRefType:: hidden.autoscaling.v2alpha1.crossVersionObjectReference, - }, - specType:: hidden.autoscaling.v2alpha1.horizontalPodAutoscalerSpec, - }, - }, - // HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. - horizontalPodAutoscalerList:: { - local kind = {kind: "HorizontalPodAutoscalerList"}, - new():: apiVersion + kind, - // items is the list of horizontal pod autoscaler objects. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.autoscaling.v2alpha1.horizontalPodAutoscaler, - mixin:: { - }, - }, - }, - }, - batch:: { - v1:: { - local apiVersion = {apiVersion: "batch/v1"}, - // Job represents the configuration of a single job. - job:: { - local kind = {kind: "Job"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - activeDeadlineSeconds(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // 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(completions):: __specMixin({completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - manualSelector(manualSelector):: __specMixin({manualSelector: 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(parallelism):: __specMixin({parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.batch.v1.jobSpec, - }, - }, - // JobList is a collection of jobs. - jobList:: { - local kind = {kind: "JobList"}, - new():: apiVersion + kind, - // items is the list of Jobs. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.batch.v1.job, - mixin:: { - }, - }, - }, - v2alpha1:: { - local apiVersion = {apiVersion: "batch/v2alpha1"}, - // CronJob represents the configuration of a single cron job. - cronJob:: { - local kind = {kind: "CronJob"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Specifies how to treat concurrent executions of a Job. Defaults to Allow. - concurrencyPolicy(concurrencyPolicy):: __specMixin({concurrencyPolicy: concurrencyPolicy}), - // The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. - failedJobsHistoryLimit(failedJobsHistoryLimit):: __specMixin({failedJobsHistoryLimit: failedJobsHistoryLimit}), - // Specifies the job that will be created when executing a CronJob. - jobTemplate:: { - local __jobTemplateMixin(jobTemplate) = __specMixin({jobTemplate+: jobTemplate}), - mixinInstance(jobTemplate):: __jobTemplateMixin(jobTemplate), - // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __jobTemplateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __jobTemplateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - activeDeadlineSeconds(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // 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(completions):: __specMixin({completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - manualSelector(manualSelector):: __specMixin({manualSelector: 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(parallelism):: __specMixin({parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.batch.v1.jobSpec, - }, - jobTemplateType:: hidden.batch.v2alpha1.jobTemplateSpec, - // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - schedule(schedule):: __specMixin({schedule: schedule}), - // 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(startingDeadlineSeconds):: __specMixin({startingDeadlineSeconds: startingDeadlineSeconds}), - // The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. - successfulJobsHistoryLimit(successfulJobsHistoryLimit):: __specMixin({successfulJobsHistoryLimit: successfulJobsHistoryLimit}), - // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. - suspend(suspend):: __specMixin({suspend: suspend}), - }, - specType:: hidden.batch.v2alpha1.cronJobSpec, - }, - }, - // CronJobList is a collection of cron jobs. - cronJobList:: { - local kind = {kind: "CronJobList"}, - new():: apiVersion + kind, - // items is the list of CronJobs. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.batch.v2alpha1.cronJob, - mixin:: { - }, - }, - }, - }, - certificates:: { - v1beta1:: { - local apiVersion = {apiVersion: "certificates.k8s.io/v1beta1"}, - // Describes a certificate signing request - certificateSigningRequest:: { - local kind = {kind: "CertificateSigningRequest"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // The certificate request itself and any additional information. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Extra information about the requesting user. See user.Info interface for details. - extra(extra):: __specMixin({extra+: extra}), - // Group information about the requesting user. See user.Info interface for details. - groups(groups):: if std.type(groups) == "array" then __specMixin({groups+: groups}) else __specMixin({groups+: [groups]}), - // Base64-encoded PKCS#10 CSR data - request(request):: __specMixin({request: request}), - // UID information about the requesting user. See user.Info interface for details. - uid(uid):: __specMixin({uid: uid}), - // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 - // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - usages(usages):: if std.type(usages) == "array" then __specMixin({usages+: usages}) else __specMixin({usages+: [usages]}), - // Information about the requesting user. See user.Info interface for details. - username(username):: __specMixin({username: username}), - }, - specType:: hidden.certificates.v1beta1.certificateSigningRequestSpec, - }, - }, - // - certificateSigningRequestList:: { - local kind = {kind: "CertificateSigningRequestList"}, - new():: apiVersion + kind, - // - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.certificates.v1beta1.certificateSigningRequest, - mixin:: { - }, - }, - }, - }, - core:: { - v1:: { - local apiVersion = {apiVersion: "v1"}, - // 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. - binding:: { - local kind = {kind: "Binding"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // The target object that you want to bind to the standard object. - target:: { - local __targetMixin(target) = {target+: target}, - mixinInstance(target):: __targetMixin(target), - // 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(fieldPath):: __targetMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __targetMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - namespace(namespace):: __targetMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __targetMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - uid(uid):: __targetMixin({uid: uid}), - }, - targetType:: hidden.core.v1.objectReference, - }, - }, - // ComponentStatus (and ComponentStatusList) holds the cluster validation info. - componentStatus:: { - local kind = {kind: "ComponentStatus"}, - new():: apiVersion + kind, - // List of component conditions observed - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.core.v1.componentCondition, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // Status of all the conditions for the component as a list of ComponentStatus objects. - componentStatusList:: { - local kind = {kind: "ComponentStatusList"}, - new():: apiVersion + kind, - // List of ComponentStatus objects. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.componentStatus, - mixin:: { - }, - }, - // ConfigMap holds configuration data for pods to consume. - configMap:: { - local kind = {kind: "ConfigMap"}, - new():: apiVersion + kind, - // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. - data(data):: {data+: data}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ConfigMapList is a resource containing a list of ConfigMap objects. - configMapList:: { - local kind = {kind: "ConfigMapList"}, - new():: apiVersion + kind, - // Items is the list of ConfigMaps. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.configMap, - mixin:: { - }, - }, - // 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}] - // }, - // ] - endpoints:: { - local kind = {kind: "Endpoints"}, - new():: apiVersion + kind, - // 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(subsets):: if std.type(subsets) == "array" then {subsets+: subsets} else {subsets+: [subsets]}, - subsetsType:: hidden.core.v1.endpointSubset, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // EndpointsList is a list of endpoints. - endpointsList:: { - local kind = {kind: "EndpointsList"}, - new():: apiVersion + kind, - // List of endpoints. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.endpoints, - mixin:: { - }, - }, - // Event is a report of an event somewhere in the cluster. - event:: { - local kind = {kind: "Event"}, - new():: apiVersion + kind, - // The number of times this event has occurred. - count(count):: {count: count}, - // A human-readable description of the status of this operation. - message(message):: {message: message}, - // This should be a short, machine understandable string that gives the reason for the transition into the object's current status. - reason(reason):: {reason: reason}, - // Type of this event (Normal, Warning), new types could be added in the future - type(type):: {type: type}, - mixin:: { - // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) - firstTimestamp:: { - local __firstTimestampMixin(firstTimestamp) = {firstTimestamp+: firstTimestamp}, - mixinInstance(firstTimestamp):: __firstTimestampMixin(firstTimestamp), - }, - firstTimestampType:: hidden.meta.v1.time, - // The object that this event is about. - involvedObject:: { - local __involvedObjectMixin(involvedObject) = {involvedObject+: involvedObject}, - mixinInstance(involvedObject):: __involvedObjectMixin(involvedObject), - // 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(fieldPath):: __involvedObjectMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __involvedObjectMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - namespace(namespace):: __involvedObjectMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __involvedObjectMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - uid(uid):: __involvedObjectMixin({uid: uid}), - }, - involvedObjectType:: hidden.core.v1.objectReference, - // The time at which the most recent occurrence of this event was recorded. - lastTimestamp:: { - local __lastTimestampMixin(lastTimestamp) = {lastTimestamp+: lastTimestamp}, - mixinInstance(lastTimestamp):: __lastTimestampMixin(lastTimestamp), - }, - lastTimestampType:: hidden.meta.v1.time, - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // The component reporting this event. Should be a short machine understandable string. - source:: { - local __sourceMixin(source) = {source+: source}, - mixinInstance(source):: __sourceMixin(source), - // Component from which the event is generated. - component(component):: __sourceMixin({component: component}), - // Node name on which the event is generated. - host(host):: __sourceMixin({host: host}), - }, - sourceType:: hidden.core.v1.eventSource, - }, - }, - // EventList is a list of events. - eventList:: { - local kind = {kind: "EventList"}, - new():: apiVersion + kind, - // List of events - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.event, - mixin:: { - }, - }, - // LimitRange sets resource usage limits for each kind of resource in a Namespace. - limitRange:: { - local kind = {kind: "LimitRange"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Limits is the list of LimitRangeItem objects that are enforced. - limits(limits):: if std.type(limits) == "array" then __specMixin({limits+: limits}) else __specMixin({limits+: [limits]}), - limitsType:: hidden.core.v1.limitRangeItem, - }, - specType:: hidden.core.v1.limitRangeSpec, - }, - }, - // LimitRangeList is a list of LimitRange items. - limitRangeList:: { - local kind = {kind: "LimitRangeList"}, - new():: apiVersion + kind, - // Items is a list of LimitRange objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.limitRange, - mixin:: { - }, - }, - // Namespace provides a scope for Names. Use of multiple namespaces is optional. - namespace:: { - local kind = {kind: "Namespace"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers - finalizers(finalizers):: if std.type(finalizers) == "array" then __specMixin({finalizers+: finalizers}) else __specMixin({finalizers+: [finalizers]}), - }, - specType:: hidden.core.v1.namespaceSpec, - }, - }, - // NamespaceList is a list of Namespaces. - namespaceList:: { - local kind = {kind: "NamespaceList"}, - new():: apiVersion + kind, - // Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.namespace, - mixin:: { - }, - }, - // Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd). - node:: { - local kind = {kind: "Node"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated. - externalId(externalId):: __specMixin({externalID: externalId}), - // PodCIDR represents the pod IP range assigned to the node. - podCidr(podCidr):: __specMixin({podCIDR: podCidr}), - // ID of the node assigned by the cloud provider in the format: :// - providerId(providerId):: __specMixin({providerID: providerId}), - // If specified, the node's taints. - taints(taints):: if std.type(taints) == "array" then __specMixin({taints+: taints}) else __specMixin({taints+: [taints]}), - taintsType:: hidden.core.v1.taint, - // 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(unschedulable):: __specMixin({unschedulable: unschedulable}), - }, - specType:: hidden.core.v1.nodeSpec, - }, - }, - // NodeList is the whole list of all Nodes which have been registered with master. - nodeList:: { - local kind = {kind: "NodeList"}, - new():: apiVersion + kind, - // List of nodes - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.node, - mixin:: { - }, - }, - // 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 - persistentVolume:: { - local kind = {kind: "PersistentVolume"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - accessModes(accessModes):: if std.type(accessModes) == "array" then __specMixin({accessModes+: accessModes}) else __specMixin({accessModes+: [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:: { - local __awsElasticBlockStoreMixin(awsElasticBlockStore) = __specMixin({awsElasticBlockStore+: awsElasticBlockStore}), - mixinInstance(awsElasticBlockStore):: __awsElasticBlockStoreMixin(awsElasticBlockStore), - // 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(fsType):: __awsElasticBlockStoreMixin({fsType: 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(partition):: __awsElasticBlockStoreMixin({partition: 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(readOnly):: __awsElasticBlockStoreMixin({readOnly: readOnly}), - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - volumeId(volumeId):: __awsElasticBlockStoreMixin({volumeID: volumeId}), - }, - awsElasticBlockStoreType:: hidden.core.v1.awsElasticBlockStoreVolumeSource, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk:: { - local __azureDiskMixin(azureDisk) = __specMixin({azureDisk+: azureDisk}), - mixinInstance(azureDisk):: __azureDiskMixin(azureDisk), - // Host Caching mode: None, Read Only, Read Write. - cachingMode(cachingMode):: __azureDiskMixin({cachingMode: cachingMode}), - // The Name of the data disk in the blob storage - diskName(diskName):: __azureDiskMixin({diskName: diskName}), - // The URI the data disk in the blob storage - diskUri(diskUri):: __azureDiskMixin({diskURI: diskUri}), - // 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(fsType):: __azureDiskMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __azureDiskMixin({readOnly: readOnly}), - }, - azureDiskType:: hidden.core.v1.azureDiskVolumeSource, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile:: { - local __azureFileMixin(azureFile) = __specMixin({azureFile+: azureFile}), - mixinInstance(azureFile):: __azureFileMixin(azureFile), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __azureFileMixin({readOnly: readOnly}), - // the name of secret that contains Azure Storage Account Name and Key - secretName(secretName):: __azureFileMixin({secretName: secretName}), - // Share Name - shareName(shareName):: __azureFileMixin({shareName: shareName}), - }, - azureFileType:: hidden.core.v1.azureFileVolumeSource, - // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - capacity(capacity):: __specMixin({capacity+: capacity}), - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs:: { - local __cephfsMixin(cephfs) = __specMixin({cephfs+: cephfs}), - mixinInstance(cephfs):: __cephfsMixin(cephfs), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then __cephfsMixin({monitors+: monitors}) else __cephfsMixin({monitors+: [monitors]}), - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - path(path):: __cephfsMixin({path: path}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - readOnly(readOnly):: __cephfsMixin({readOnly: readOnly}), - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretFile(secretFile):: __cephfsMixin({secretFile: secretFile}), - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __cephfsMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - user(user):: __cephfsMixin({user: user}), - }, - cephfsType:: hidden.core.v1.cephFsVolumeSource, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder:: { - local __cinderMixin(cinder) = __specMixin({cinder+: cinder}), - mixinInstance(cinder):: __cinderMixin(cinder), - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - fsType(fsType):: __cinderMixin({fsType: fsType}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - readOnly(readOnly):: __cinderMixin({readOnly: readOnly}), - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - volumeId(volumeId):: __cinderMixin({volumeID: volumeId}), - }, - cinderType:: hidden.core.v1.cinderVolumeSource, - // 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:: { - local __claimRefMixin(claimRef) = __specMixin({claimRef+: claimRef}), - mixinInstance(claimRef):: __claimRefMixin(claimRef), - // 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(fieldPath):: __claimRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __claimRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - namespace(namespace):: __claimRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __claimRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - uid(uid):: __claimRefMixin({uid: uid}), - }, - claimRefType:: hidden.core.v1.objectReference, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc:: { - local __fcMixin(fc) = __specMixin({fc+: fc}), - mixinInstance(fc):: __fcMixin(fc), - // 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(fsType):: __fcMixin({fsType: fsType}), - // Required: FC target lun number - lun(lun):: __fcMixin({lun: lun}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __fcMixin({readOnly: readOnly}), - // Required: FC target worldwide names (WWNs) - targetWwns(targetWwns):: if std.type(targetWwns) == "array" then __fcMixin({targetWWNs+: targetWwns}) else __fcMixin({targetWWNs+: [targetWwns]}), - }, - fcType:: hidden.core.v1.fcVolumeSource, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - flexVolume:: { - local __flexVolumeMixin(flexVolume) = __specMixin({flexVolume+: flexVolume}), - mixinInstance(flexVolume):: __flexVolumeMixin(flexVolume), - // Driver is the name of the driver to use for this volume. - driver(driver):: __flexVolumeMixin({driver: 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(fsType):: __flexVolumeMixin({fsType: fsType}), - // Optional: Extra command options if any. - options(options):: __flexVolumeMixin({options+: options}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __flexVolumeMixin({readOnly: 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:: { - local __secretRefMixin(secretRef) = __flexVolumeMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - flexVolumeType:: hidden.core.v1.flexVolumeSource, - // 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:: { - local __flockerMixin(flocker) = __specMixin({flocker+: flocker}), - mixinInstance(flocker):: __flockerMixin(flocker), - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - datasetName(datasetName):: __flockerMixin({datasetName: datasetName}), - // UUID of the dataset. This is unique identifier of a Flocker dataset - datasetUuid(datasetUuid):: __flockerMixin({datasetUUID: datasetUuid}), - }, - flockerType:: hidden.core.v1.flockerVolumeSource, - // 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:: { - local __gcePersistentDiskMixin(gcePersistentDisk) = __specMixin({gcePersistentDisk+: gcePersistentDisk}), - mixinInstance(gcePersistentDisk):: __gcePersistentDiskMixin(gcePersistentDisk), - // 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(fsType):: __gcePersistentDiskMixin({fsType: 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(partition):: __gcePersistentDiskMixin({partition: partition}), - // 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(pdName):: __gcePersistentDiskMixin({pdName: pdName}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - readOnly(readOnly):: __gcePersistentDiskMixin({readOnly: readOnly}), - }, - gcePersistentDiskType:: hidden.core.v1.gcePersistentDiskVolumeSource, - // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs:: { - local __glusterfsMixin(glusterfs) = __specMixin({glusterfs+: glusterfs}), - mixinInstance(glusterfs):: __glusterfsMixin(glusterfs), - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - endpoints(endpoints):: __glusterfsMixin({endpoints: endpoints}), - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - path(path):: __glusterfsMixin({path: path}), - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - readOnly(readOnly):: __glusterfsMixin({readOnly: readOnly}), - }, - glusterfsType:: hidden.core.v1.glusterfsVolumeSource, - // 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:: { - local __hostPathMixin(hostPath) = __specMixin({hostPath+: hostPath}), - mixinInstance(hostPath):: __hostPathMixin(hostPath), - // Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - path(path):: __hostPathMixin({path: path}), - }, - hostPathType:: hidden.core.v1.hostPathVolumeSource, - // 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:: { - local __iscsiMixin(iscsi) = __specMixin({iscsi+: iscsi}), - mixinInstance(iscsi):: __iscsiMixin(iscsi), - // whether support iSCSI Discovery CHAP authentication - chapAuthDiscovery(chapAuthDiscovery):: __iscsiMixin({chapAuthDiscovery: chapAuthDiscovery}), - // whether support iSCSI Session CHAP authentication - chapAuthSession(chapAuthSession):: __iscsiMixin({chapAuthSession: 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(fsType):: __iscsiMixin({fsType: fsType}), - // Target iSCSI Qualified Name. - iqn(iqn):: __iscsiMixin({iqn: iqn}), - // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. - iscsiInterface(iscsiInterface):: __iscsiMixin({iscsiInterface: iscsiInterface}), - // iSCSI target lun number. - lun(lun):: __iscsiMixin({lun: lun}), - // 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(portals):: if std.type(portals) == "array" then __iscsiMixin({portals+: portals}) else __iscsiMixin({portals+: [portals]}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - readOnly(readOnly):: __iscsiMixin({readOnly: readOnly}), - // CHAP secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = __iscsiMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // 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(targetPortal):: __iscsiMixin({targetPortal: targetPortal}), - }, - iscsiType:: hidden.core.v1.iscsiVolumeSource, - // Local represents directly-attached storage with node affinity - localStorage:: { - local __localStorageMixin(localStorage) = __specMixin({"local"+: localStorage}), - mixinInstance(localStorage):: __localStorageMixin(localStorage), - // The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device - path(path):: __localStorageMixin({path: path}), - }, - localStorageType:: hidden.core.v1.localVolumeSource, - // NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - nfs:: { - local __nfsMixin(nfs) = __specMixin({nfs+: nfs}), - mixinInstance(nfs):: __nfsMixin(nfs), - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - path(path):: __nfsMixin({path: path}), - // 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(readOnly):: __nfsMixin({readOnly: readOnly}), - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - server(server):: __nfsMixin({server: server}), - }, - nfsType:: hidden.core.v1.nfsVolumeSource, - // What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming - persistentVolumeReclaimPolicy(persistentVolumeReclaimPolicy):: __specMixin({persistentVolumeReclaimPolicy: persistentVolumeReclaimPolicy}), - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk:: { - local __photonPersistentDiskMixin(photonPersistentDisk) = __specMixin({photonPersistentDisk+: photonPersistentDisk}), - mixinInstance(photonPersistentDisk):: __photonPersistentDiskMixin(photonPersistentDisk), - // 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(fsType):: __photonPersistentDiskMixin({fsType: fsType}), - // ID that identifies Photon Controller persistent disk - pdId(pdId):: __photonPersistentDiskMixin({pdID: pdId}), - }, - photonPersistentDiskType:: hidden.core.v1.photonPersistentDiskVolumeSource, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume:: { - local __portworxVolumeMixin(portworxVolume) = __specMixin({portworxVolume+: portworxVolume}), - mixinInstance(portworxVolume):: __portworxVolumeMixin(portworxVolume), - // 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(fsType):: __portworxVolumeMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __portworxVolumeMixin({readOnly: readOnly}), - // VolumeID uniquely identifies a Portworx volume - volumeId(volumeId):: __portworxVolumeMixin({volumeID: volumeId}), - }, - portworxVolumeType:: hidden.core.v1.portworxVolumeSource, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte:: { - local __quobyteMixin(quobyte) = __specMixin({quobyte+: quobyte}), - mixinInstance(quobyte):: __quobyteMixin(quobyte), - // Group to map volume access to Default is no group - group(group):: __quobyteMixin({group: group}), - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - readOnly(readOnly):: __quobyteMixin({readOnly: readOnly}), - // 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(registry):: __quobyteMixin({registry: registry}), - // User to map volume access to Defaults to serivceaccount user - user(user):: __quobyteMixin({user: user}), - // Volume is a string that references an already created Quobyte volume by name. - volume(volume):: __quobyteMixin({volume: volume}), - }, - quobyteType:: hidden.core.v1.quobyteVolumeSource, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd:: { - local __rbdMixin(rbd) = __specMixin({rbd+: rbd}), - mixinInstance(rbd):: __rbdMixin(rbd), - // 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(fsType):: __rbdMixin({fsType: fsType}), - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - image(image):: __rbdMixin({image: image}), - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - keyring(keyring):: __rbdMixin({keyring: keyring}), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then __rbdMixin({monitors+: monitors}) else __rbdMixin({monitors+: [monitors]}), - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - pool(pool):: __rbdMixin({pool: pool}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - readOnly(readOnly):: __rbdMixin({readOnly: readOnly}), - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __rbdMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - user(user):: __rbdMixin({user: user}), - }, - rbdType:: hidden.core.v1.rbdVolumeSource, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIo:: { - local __scaleIoMixin(scaleIo) = __specMixin({scaleIO+: scaleIo}), - mixinInstance(scaleIo):: __scaleIoMixin(scaleIo), - // 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(fsType):: __scaleIoMixin({fsType: fsType}), - // The host address of the ScaleIO API Gateway. - gateway(gateway):: __scaleIoMixin({gateway: gateway}), - // The name of the Protection Domain for the configured storage (defaults to "default"). - protectionDomain(protectionDomain):: __scaleIoMixin({protectionDomain: protectionDomain}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __scaleIoMixin({readOnly: readOnly}), - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = __scaleIoMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // Flag to enable/disable SSL communication with Gateway, default false - sslEnabled(sslEnabled):: __scaleIoMixin({sslEnabled: sslEnabled}), - // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). - storageMode(storageMode):: __scaleIoMixin({storageMode: storageMode}), - // The Storage Pool associated with the protection domain (defaults to "default"). - storagePool(storagePool):: __scaleIoMixin({storagePool: storagePool}), - // The name of the storage system as configured in ScaleIO. - system(system):: __scaleIoMixin({system: system}), - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - volumeName(volumeName):: __scaleIoMixin({volumeName: volumeName}), - }, - scaleIoType:: hidden.core.v1.scaleIoVolumeSource, - // Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass. - storageClassName(storageClassName):: __specMixin({storageClassName: storageClassName}), - // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md - storageos:: { - local __storageosMixin(storageos) = __specMixin({storageos+: storageos}), - mixinInstance(storageos):: __storageosMixin(storageos), - // 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(fsType):: __storageosMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __storageosMixin({readOnly: readOnly}), - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = __storageosMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // 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(fieldPath):: __secretRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - namespace(namespace):: __secretRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __secretRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - uid(uid):: __secretRefMixin({uid: uid}), - }, - secretRefType:: hidden.core.v1.objectReference, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - volumeName(volumeName):: __storageosMixin({volumeName: 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(volumeNamespace):: __storageosMixin({volumeNamespace: volumeNamespace}), - }, - storageosType:: hidden.core.v1.storageOSPersistentVolumeSource, - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume:: { - local __vsphereVolumeMixin(vsphereVolume) = __specMixin({vsphereVolume+: vsphereVolume}), - mixinInstance(vsphereVolume):: __vsphereVolumeMixin(vsphereVolume), - // 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(fsType):: __vsphereVolumeMixin({fsType: fsType}), - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - storagePolicyID(storagePolicyID):: __vsphereVolumeMixin({storagePolicyID: storagePolicyID}), - // Storage Policy Based Management (SPBM) profile name. - storagePolicyName(storagePolicyName):: __vsphereVolumeMixin({storagePolicyName: storagePolicyName}), - // Path that identifies vSphere volume vmdk - volumePath(volumePath):: __vsphereVolumeMixin({volumePath: volumePath}), - }, - vsphereVolumeType:: hidden.core.v1.vsphereVirtualDiskVolumeSource, - }, - specType:: hidden.core.v1.persistentVolumeSpec, - }, - }, - // PersistentVolumeClaim is a user's request for and claim to a persistent volume - persistentVolumeClaim:: { - local kind = {kind: "PersistentVolumeClaim"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - accessModes(accessModes):: if std.type(accessModes) == "array" then __specMixin({accessModes+: accessModes}) else __specMixin({accessModes+: [accessModes]}), - // Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources:: { - local __resourcesMixin(resources) = __specMixin({resources+: resources}), - mixinInstance(resources):: __resourcesMixin(resources), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - limits(limits):: __resourcesMixin({limits+: 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-compute-resources-container/ - requests(requests):: __resourcesMixin({requests+: requests}), - }, - resourcesType:: hidden.core.v1.resourceRequirements, - // A label query over volumes to consider for binding. - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - storageClassName(storageClassName):: __specMixin({storageClassName: storageClassName}), - // VolumeName is the binding reference to the PersistentVolume backing this claim. - volumeName(volumeName):: __specMixin({volumeName: volumeName}), - }, - specType:: hidden.core.v1.persistentVolumeClaimSpec, - }, - }, - // PersistentVolumeClaimList is a list of PersistentVolumeClaim items. - persistentVolumeClaimList:: { - local kind = {kind: "PersistentVolumeClaimList"}, - new():: apiVersion + kind, - // A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.persistentVolumeClaim, - mixin:: { - }, - }, - // PersistentVolumeList is a list of PersistentVolume items. - persistentVolumeList:: { - local kind = {kind: "PersistentVolumeList"}, - new():: apiVersion + kind, - // List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.persistentVolume, - mixin:: { - }, - }, - // Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts. - pod:: { - local kind = {kind: "Pod"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - }, - // PodList is a list of Pods. - podList:: { - local kind = {kind: "PodList"}, - new():: apiVersion + kind, - // List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.pod, - mixin:: { - }, - }, - // PodTemplate describes a template for creating copies of a predefined pod. - podTemplate:: { - local kind = {kind: "PodTemplate"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - template:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // PodTemplateList is a list of PodTemplates. - podTemplateList:: { - local kind = {kind: "PodTemplateList"}, - new():: apiVersion + kind, - // List of pod templates - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.podTemplate, - mixin:: { - }, - }, - // ReplicationController represents the configuration of a replication controller. - replicationController:: { - local kind = {kind: "ReplicationController"}, - new():: apiVersion + kind, - mixin:: { - // 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/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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(minReadySeconds):: __specMixin({minReadySeconds: 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(replicas):: __specMixin({replicas: 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(selector):: __specMixin({selector+: 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.core.v1.replicationControllerSpec, - }, - }, - // ReplicationControllerList is a collection of replication controllers. - replicationControllerList:: { - local kind = {kind: "ReplicationControllerList"}, - new():: apiVersion + kind, - // List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.replicationController, - mixin:: { - }, - }, - // ResourceQuota sets aggregate quota restrictions enforced per namespace - resourceQuota:: { - local kind = {kind: "ResourceQuota"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md - hard(hard):: __specMixin({hard+: hard}), - // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. - scopes(scopes):: if std.type(scopes) == "array" then __specMixin({scopes+: scopes}) else __specMixin({scopes+: [scopes]}), - }, - specType:: hidden.core.v1.resourceQuotaSpec, - }, - }, - // ResourceQuotaList is a list of ResourceQuota items. - resourceQuotaList:: { - local kind = {kind: "ResourceQuotaList"}, - new():: apiVersion + kind, - // Items is a list of ResourceQuota objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.resourceQuota, - mixin:: { - }, - }, - // Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes. - secret:: { - local kind = {kind: "Secret"}, - new():: apiVersion + kind, - // 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(data):: {data+: data}, - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. - stringData(stringData):: {stringData+: stringData}, - // Used to facilitate programmatic handling of secret data. - type(type):: {type: type}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // SecretList is a list of Secret. - secretList:: { - local kind = {kind: "SecretList"}, - new():: apiVersion + kind, - // Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.secret, - mixin:: { - }, - }, - // 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. - service:: { - local kind = {kind: "Service"}, - new(name, selector, ports):: apiVersion + kind + self.mixin.metadata.name(name) + self.mixin.spec.selector(selector) + self.mixin.spec.ports(ports), - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - clusterIp(clusterIp):: __specMixin({clusterIP: clusterIp}), - // 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(externalIps):: if std.type(externalIps) == "array" then __specMixin({externalIPs+: externalIps}) else __specMixin({externalIPs+: [externalIps]}), - // externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName. - externalName(externalName):: __specMixin({externalName: 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(externalTrafficPolicy):: __specMixin({externalTrafficPolicy: externalTrafficPolicy}), - // healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local. - healthCheckNodePort(healthCheckNodePort):: __specMixin({healthCheckNodePort: healthCheckNodePort}), - // 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(loadBalancerIp):: __specMixin({loadBalancerIP: 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/configure-cloud-provider-firewall/ - loadBalancerSourceRanges(loadBalancerSourceRanges):: if std.type(loadBalancerSourceRanges) == "array" then __specMixin({loadBalancerSourceRanges+: loadBalancerSourceRanges}) else __specMixin({loadBalancerSourceRanges+: [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(ports):: if std.type(ports) == "array" then __specMixin({ports+: ports}) else __specMixin({ports+: [ports]}), - portsType:: hidden.core.v1.servicePort, - // 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. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ - selector(selector):: __specMixin({selector+: 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(sessionAffinity):: __specMixin({sessionAffinity: sessionAffinity}), - // type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to the specified externalName. "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. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types - type(type):: __specMixin({type: type}), - }, - specType:: hidden.core.v1.serviceSpec, - }, - }, - // 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 - serviceAccount:: { - local kind = {kind: "ServiceAccount"}, - new():: apiVersion + kind, - // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level. - automountServiceAccountToken(automountServiceAccountToken):: {automountServiceAccountToken: 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then {imagePullSecrets+: imagePullSecrets} else {imagePullSecrets+: [imagePullSecrets]}, - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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(secrets):: if std.type(secrets) == "array" then {secrets+: secrets} else {secrets+: [secrets]}, - secretsType:: hidden.core.v1.objectReference, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ServiceAccountList is a list of ServiceAccount objects - serviceAccountList:: { - local kind = {kind: "ServiceAccountList"}, - new():: apiVersion + kind, - // List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.serviceAccount, - mixin:: { - }, - }, - // ServiceList holds a list of services. - serviceList:: { - local kind = {kind: "ServiceList"}, - new():: apiVersion + kind, - // List of services - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.service, - mixin:: { - }, - }, - }, - }, - extensions:: { - v1beta1:: { - local apiVersion = {apiVersion: "extensions/v1beta1"}, - // DaemonSet represents the configuration of a daemon set. - daemonSet:: { - local kind = {kind: "DaemonSet"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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(minReadySeconds):: __specMixin({minReadySeconds: 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(revisionHistoryLimit):: __specMixin({revisionHistoryLimit: revisionHistoryLimit}), - // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = __specMixin({updateStrategy+: updateStrategy}), - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDaemonSet, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. - type(type):: __updateStrategyMixin({type: type}), - }, - updateStrategyType:: hidden.extensions.v1beta1.daemonSetUpdateStrategy, - }, - specType:: hidden.extensions.v1beta1.daemonSetSpec, - }, - }, - // DaemonSetList is a collection of daemon sets. - daemonSetList:: { - local kind = {kind: "DaemonSetList"}, - new():: apiVersion + kind, - // A list of daemon sets. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.daemonSet, - mixin:: { - }, - }, - // Deployment enables declarative updates for Pods and ReplicaSets. - deployment:: { - local kind = {kind: "Deployment"}, - new(name, replicas, containers, podLabels={}):: apiVersion + kind + self.mixin.metadata.name(name) + self.mixin.spec.replicas(replicas) + self.mixin.spec.template.spec.containers(containers) + self.mixin.spec.template.metadata.labels(podLabels), - mixin:: { - // Standard object metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the Deployment. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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(minReadySeconds):: __specMixin({minReadySeconds: minReadySeconds}), - // Indicates that the deployment is paused and will not be processed by the deployment controller. - paused(paused):: __specMixin({paused: 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. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. This is not set by default. - progressDeadlineSeconds(progressDeadlineSeconds):: __specMixin({progressDeadlineSeconds: progressDeadlineSeconds}), - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - replicas(replicas):: __specMixin({replicas: replicas}), - // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. - revisionHistoryLimit(revisionHistoryLimit):: __specMixin({revisionHistoryLimit: revisionHistoryLimit}), - // The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = __specMixin({rollbackTo+: rollbackTo}), - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - revision(revision):: __rollbackToMixin({revision: revision}), - }, - rollbackToType:: hidden.extensions.v1beta1.rollbackConfig, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = __specMixin({strategy+: strategy}), - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - maxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - maxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - type(type):: __strategyMixin({type: type}), - }, - strategyType:: hidden.extensions.v1beta1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.extensions.v1beta1.deploymentSpec, - }, - }, - // DeploymentList is a list of Deployments. - deploymentList:: { - local kind = {kind: "DeploymentList"}, - new():: apiVersion + kind, - // Items is the list of Deployments. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.deployment, - mixin:: { - }, - }, - // DeploymentRollback stores the information required to rollback a deployment. - deploymentRollback:: { - local kind = {kind: "DeploymentRollback"}, - new():: apiVersion + kind, - // Required: This must match the Name of a deployment. - name(name):: {name: name}, - // The annotations to be updated to a deployment - updatedAnnotations(updatedAnnotations):: {updatedAnnotations+: updatedAnnotations}, - mixin:: { - // The config of this deployment rollback. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = {rollbackTo+: rollbackTo}, - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - revision(revision):: __rollbackToMixin({revision: revision}), - }, - rollbackToType:: hidden.extensions.v1beta1.rollbackConfig, - }, - }, - // 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. - ingress:: { - local kind = {kind: "Ingress"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. - backend:: { - local __backendMixin(backend) = __specMixin({backend+: backend}), - mixinInstance(backend):: __backendMixin(backend), - // Specifies the name of the referenced service. - serviceName(serviceName):: __backendMixin({serviceName: serviceName}), - // Specifies the port of the referenced service. - servicePort(servicePort):: __backendMixin({servicePort: servicePort}), - }, - backendType:: hidden.extensions.v1beta1.ingressBackend, - // 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(rules):: if std.type(rules) == "array" then __specMixin({rules+: rules}) else __specMixin({rules+: [rules]}), - rulesType:: hidden.extensions.v1beta1.ingressRule, - // 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(tls):: if std.type(tls) == "array" then __specMixin({tls+: tls}) else __specMixin({tls+: [tls]}), - tlsType:: hidden.extensions.v1beta1.ingressTls, - }, - specType:: hidden.extensions.v1beta1.ingressSpec, - }, - }, - // IngressList is a collection of Ingress. - ingressList:: { - local kind = {kind: "IngressList"}, - new():: apiVersion + kind, - // Items is the list of Ingress. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.ingress, - mixin:: { - }, - }, - // NetworkPolicy describes what network traffic is allowed for a set of Pods - networkPolicy:: { - local kind = {kind: "NetworkPolicy"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior for this NetworkPolicy. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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 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(ingress):: if std.type(ingress) == "array" then __specMixin({ingress+: ingress}) else __specMixin({ingress+: [ingress]}), - ingressType:: hidden.extensions.v1beta1.networkPolicyIngressRule, - // 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:: { - local __podSelectorMixin(podSelector) = __specMixin({podSelector+: podSelector}), - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __podSelectorMixin({matchLabels+: matchLabels}), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - specType:: hidden.extensions.v1beta1.networkPolicySpec, - }, - }, - // Network Policy List is a list of NetworkPolicy objects. - networkPolicyList:: { - local kind = {kind: "NetworkPolicyList"}, - new():: apiVersion + kind, - // Items is a list of schema objects. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.networkPolicy, - mixin:: { - }, - }, - // Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. - podSecurityPolicy:: { - local kind = {kind: "PodSecurityPolicy"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // spec defines the policy enforced. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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(allowedCapabilities):: if std.type(allowedCapabilities) == "array" then __specMixin({allowedCapabilities+: allowedCapabilities}) else __specMixin({allowedCapabilities+: [allowedCapabilities]}), - // 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 capabiility in both DefaultAddCapabilities and RequiredDropCapabilities. - defaultAddCapabilities(defaultAddCapabilities):: if std.type(defaultAddCapabilities) == "array" then __specMixin({defaultAddCapabilities+: defaultAddCapabilities}) else __specMixin({defaultAddCapabilities+: [defaultAddCapabilities]}), - // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext. - fsGroup:: { - local __fsGroupMixin(fsGroup) = __specMixin({fsGroup+: fsGroup}), - mixinInstance(fsGroup):: __fsGroupMixin(fsGroup), - // 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. - ranges(ranges):: if std.type(ranges) == "array" then __fsGroupMixin({ranges+: ranges}) else __fsGroupMixin({ranges+: [ranges]}), - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - rule(rule):: __fsGroupMixin({rule: rule}), - }, - fsGroupType:: hidden.extensions.v1beta1.fsGroupStrategyOptions, - // hostIPC determines if the policy allows the use of HostIPC in the pod spec. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. - hostNetwork(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // hostPID determines if the policy allows the use of HostPID in the pod spec. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // hostPorts determines which host port ranges are allowed to be exposed. - hostPorts(hostPorts):: if std.type(hostPorts) == "array" then __specMixin({hostPorts+: hostPorts}) else __specMixin({hostPorts+: [hostPorts]}), - hostPortsType:: hidden.extensions.v1beta1.hostPortRange, - // privileged determines if a pod can request to be run as privileged. - privileged(privileged):: __specMixin({privileged: 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(readOnlyRootFilesystem):: __specMixin({readOnlyRootFilesystem: readOnlyRootFilesystem}), - // RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - requiredDropCapabilities(requiredDropCapabilities):: if std.type(requiredDropCapabilities) == "array" then __specMixin({requiredDropCapabilities+: requiredDropCapabilities}) else __specMixin({requiredDropCapabilities+: [requiredDropCapabilities]}), - // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. - runAsUser:: { - local __runAsUserMixin(runAsUser) = __specMixin({runAsUser+: runAsUser}), - mixinInstance(runAsUser):: __runAsUserMixin(runAsUser), - // Ranges are the allowed ranges of uids that may be used. - ranges(ranges):: if std.type(ranges) == "array" then __runAsUserMixin({ranges+: ranges}) else __runAsUserMixin({ranges+: [ranges]}), - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. - rule(rule):: __runAsUserMixin({rule: rule}), - }, - runAsUserType:: hidden.extensions.v1beta1.runAsUserStrategyOptions, - // seLinux is the strategy that will dictate the allowable labels that may be set. - seLinux:: { - local __seLinuxMixin(seLinux) = __specMixin({seLinux+: seLinux}), - mixinInstance(seLinux):: __seLinuxMixin(seLinux), - // type is the strategy that will dictate the allowable labels that may be set. - rule(rule):: __seLinuxMixin({rule: rule}), - // seLinuxOptions required to run as; required for MustRunAs More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md - seLinuxOptions:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __seLinuxMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - seLinuxType:: hidden.extensions.v1beta1.seLinuxStrategyOptions, - // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. - supplementalGroups:: { - local __supplementalGroupsMixin(supplementalGroups) = __specMixin({supplementalGroups+: supplementalGroups}), - mixinInstance(supplementalGroups):: __supplementalGroupsMixin(supplementalGroups), - // 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. - ranges(ranges):: if std.type(ranges) == "array" then __supplementalGroupsMixin({ranges+: ranges}) else __supplementalGroupsMixin({ranges+: [ranges]}), - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - rule(rule):: __supplementalGroupsMixin({rule: rule}), - }, - supplementalGroupsType:: hidden.extensions.v1beta1.supplementalGroupsStrategyOptions, - // volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used. - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - }, - specType:: hidden.extensions.v1beta1.podSecurityPolicySpec, - }, - }, - // Pod Security Policy List is a list of PodSecurityPolicy objects. - podSecurityPolicyList:: { - local kind = {kind: "PodSecurityPolicyList"}, - new():: apiVersion + kind, - // Items is a list of schema objects. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.podSecurityPolicy, - mixin:: { - }, - }, - // ReplicaSet represents the configuration of a ReplicaSet. - replicaSet:: { - local kind = {kind: "ReplicaSet"}, - new():: apiVersion + kind, - mixin:: { - // 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/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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(minReadySeconds):: __specMixin({minReadySeconds: 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(replicas):: __specMixin({replicas: replicas}), - // Selector is a label query over pods that should match the replica count. If the 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 replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.extensions.v1beta1.replicaSetSpec, - }, - }, - // ReplicaSetList is a collection of ReplicaSets. - replicaSetList:: { - local kind = {kind: "ReplicaSetList"}, - new():: apiVersion + kind, - // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.replicaSet, - mixin:: { - }, - }, - // represents a scaling request for a resource. - scale:: { - local kind = {kind: "Scale"}, - new():: apiVersion + kind, - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // desired number of instances for the scaled object. - replicas(replicas):: __specMixin({replicas: replicas}), - }, - specType:: hidden.extensions.v1beta1.scaleSpec, - }, - }, - // A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource types to the API. It consists of one or more Versions of the api. - thirdPartyResource:: { - local kind = {kind: "ThirdPartyResource"}, - new():: apiVersion + kind, - // Description is the description of this object. - description(description):: {description: description}, - // Versions are versions for this third party object - versions(versions):: if std.type(versions) == "array" then {versions+: versions} else {versions+: [versions]}, - versionsType:: hidden.extensions.v1beta1.apiVersion, - mixin:: { - // Standard object metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ThirdPartyResourceList is a list of ThirdPartyResources. - thirdPartyResourceList:: { - local kind = {kind: "ThirdPartyResourceList"}, - new():: apiVersion + kind, - // Items is the list of ThirdPartyResources. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.thirdPartyResource, - mixin:: { - }, - }, - }, - }, - networking:: { - v1:: { - local apiVersion = {apiVersion: "networking.k8s.io/v1"}, - // NetworkPolicy describes what network traffic is allowed for a set of Pods - networkPolicy:: { - local kind = {kind: "NetworkPolicy"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior for this NetworkPolicy. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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(ingress):: if std.type(ingress) == "array" then __specMixin({ingress+: ingress}) else __specMixin({ingress+: [ingress]}), - ingressType:: hidden.networking.v1.networkPolicyIngressRule, - // 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:: { - local __podSelectorMixin(podSelector) = __specMixin({podSelector+: podSelector}), - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __podSelectorMixin({matchLabels+: matchLabels}), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - specType:: hidden.networking.v1.networkPolicySpec, - }, - }, - // NetworkPolicyList is a list of NetworkPolicy objects. - networkPolicyList:: { - local kind = {kind: "NetworkPolicyList"}, - new():: apiVersion + kind, - // Items is a list of schema objects. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.networking.v1.networkPolicy, - mixin:: { - // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __metadataMixin({resourceVersion: resourceVersion}), - // SelfLink is a URL representing this object. Populated by the system. Read-only. - selfLink(selfLink):: __metadataMixin({selfLink: selfLink}), - }, - metadataType:: hidden.meta.v1.listMeta, - }, - }, - }, - }, - policy:: { - v1beta1:: { - local apiVersion = {apiVersion: "policy/v1beta1"}, - // 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. - eviction:: { - local kind = {kind: "Eviction"}, - new():: apiVersion + kind, - mixin:: { - // DeleteOptions may be provided - deleteOptions:: { - local __deleteOptionsMixin(deleteOptions) = {deleteOptions+: deleteOptions}, - mixinInstance(deleteOptions):: __deleteOptionsMixin(deleteOptions), - // 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(gracePeriodSeconds):: __deleteOptionsMixin({gracePeriodSeconds: gracePeriodSeconds}), - // 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(orphanDependents):: __deleteOptionsMixin({orphanDependents: orphanDependents}), - // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. - preconditions:: { - local __preconditionsMixin(preconditions) = __deleteOptionsMixin({preconditions+: preconditions}), - mixinInstance(preconditions):: __preconditionsMixin(preconditions), - // Specifies the target UID. - uid(uid):: __preconditionsMixin({uid: uid}), - }, - preconditionsType:: hidden.meta.v1.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. - propagationPolicy(propagationPolicy):: __deleteOptionsMixin({propagationPolicy: propagationPolicy}), - }, - deleteOptionsType:: hidden.meta.v1.deleteOptions, - // ObjectMeta describes the pod that is being evicted. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods - podDisruptionBudget:: { - local kind = {kind: "PodDisruptionBudget"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the PodDisruptionBudget. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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(maxUnavailable):: __specMixin({maxUnavailable: 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(minAvailable):: __specMixin({minAvailable: minAvailable}), - // Label query over pods whose evictions are managed by the disruption budget. - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - specType:: hidden.policy.v1beta1.podDisruptionBudgetSpec, - }, - }, - // PodDisruptionBudgetList is a collection of PodDisruptionBudgets. - podDisruptionBudgetList:: { - local kind = {kind: "PodDisruptionBudgetList"}, - new():: apiVersion + kind, - // - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.policy.v1beta1.podDisruptionBudget, - mixin:: { - }, - }, - }, - }, - rbac:: { - v1alpha1:: { - local apiVersion = {apiVersion: "rbac.authorization.k8s.io/v1alpha1"}, - // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. - clusterRole:: { - local kind = {kind: "ClusterRole"}, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this ClusterRole - rules(rules):: if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.rbac.v1alpha1.policyRule, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. - clusterRoleBinding:: { - local kind = {kind: "ClusterRoleBinding"}, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - subjects(subjects):: if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, - subjectsType:: hidden.rbac.v1alpha1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. - roleRef:: { - local __roleRefMixin(roleRef) = {roleRef+: roleRef}, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - apiGroup(apiGroup):: __roleRefMixin({apiGroup: apiGroup}), - // Name is the name of resource being referenced - name(name):: __roleRefMixin({name: name}), - }, - roleRefType:: hidden.rbac.v1alpha1.roleRef, - }, - }, - // ClusterRoleBindingList is a collection of ClusterRoleBindings - clusterRoleBindingList:: { - local kind = {kind: "ClusterRoleBindingList"}, - new():: apiVersion + kind, - // Items is a list of ClusterRoleBindings - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1alpha1.clusterRoleBinding, - mixin:: { - }, - }, - // ClusterRoleList is a collection of ClusterRoles - clusterRoleList:: { - local kind = {kind: "ClusterRoleList"}, - new():: apiVersion + kind, - // Items is a list of ClusterRoles - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1alpha1.clusterRole, - mixin:: { - }, - }, - // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. - role:: { - local kind = {kind: "Role"}, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this Role - rules(rules):: if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.rbac.v1alpha1.policyRule, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // 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. - roleBinding:: { - local kind = {kind: "RoleBinding"}, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - subjects(subjects):: if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, - subjectsType:: hidden.rbac.v1alpha1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __roleRefMixin(roleRef) = {roleRef+: roleRef}, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - apiGroup(apiGroup):: __roleRefMixin({apiGroup: apiGroup}), - // Name is the name of resource being referenced - name(name):: __roleRefMixin({name: name}), - }, - roleRefType:: hidden.rbac.v1alpha1.roleRef, - }, - }, - // RoleBindingList is a collection of RoleBindings - roleBindingList:: { - local kind = {kind: "RoleBindingList"}, - new():: apiVersion + kind, - // Items is a list of RoleBindings - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1alpha1.roleBinding, - mixin:: { - }, - }, - // RoleList is a collection of Roles - roleList:: { - local kind = {kind: "RoleList"}, - new():: apiVersion + kind, - // Items is a list of Roles - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1alpha1.role, - mixin:: { - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "rbac.authorization.k8s.io/v1beta1"}, - // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. - clusterRole:: { - local kind = {kind: "ClusterRole"}, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this ClusterRole - rules(rules):: if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.rbac.v1beta1.policyRule, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. - clusterRoleBinding:: { - local kind = {kind: "ClusterRoleBinding"}, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - subjects(subjects):: if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, - subjectsType:: hidden.rbac.v1beta1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. - roleRef:: { - local __roleRefMixin(roleRef) = {roleRef+: roleRef}, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - apiGroup(apiGroup):: __roleRefMixin({apiGroup: apiGroup}), - // Name is the name of resource being referenced - name(name):: __roleRefMixin({name: name}), - }, - roleRefType:: hidden.rbac.v1beta1.roleRef, - }, - }, - // ClusterRoleBindingList is a collection of ClusterRoleBindings - clusterRoleBindingList:: { - local kind = {kind: "ClusterRoleBindingList"}, - new():: apiVersion + kind, - // Items is a list of ClusterRoleBindings - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1beta1.clusterRoleBinding, - mixin:: { - }, - }, - // ClusterRoleList is a collection of ClusterRoles - clusterRoleList:: { - local kind = {kind: "ClusterRoleList"}, - new():: apiVersion + kind, - // Items is a list of ClusterRoles - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1beta1.clusterRole, - mixin:: { - }, - }, - // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. - role:: { - local kind = {kind: "Role"}, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this Role - rules(rules):: if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.rbac.v1beta1.policyRule, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // 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. - roleBinding:: { - local kind = {kind: "RoleBinding"}, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - subjects(subjects):: if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, - subjectsType:: hidden.rbac.v1beta1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __roleRefMixin(roleRef) = {roleRef+: roleRef}, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - apiGroup(apiGroup):: __roleRefMixin({apiGroup: apiGroup}), - // Name is the name of resource being referenced - name(name):: __roleRefMixin({name: name}), - }, - roleRefType:: hidden.rbac.v1beta1.roleRef, - }, - }, - // RoleBindingList is a collection of RoleBindings - roleBindingList:: { - local kind = {kind: "RoleBindingList"}, - new():: apiVersion + kind, - // Items is a list of RoleBindings - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1beta1.roleBinding, - mixin:: { - }, - }, - // RoleList is a collection of Roles - roleList:: { - local kind = {kind: "RoleList"}, - new():: apiVersion + kind, - // Items is a list of Roles - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1beta1.role, - mixin:: { - }, - }, - }, - }, - settings:: { - v1alpha1:: { - local apiVersion = {apiVersion: "settings.k8s.io/v1alpha1"}, - // PodPreset is a policy resource that defines additional runtime requirements for a Pod. - podPreset:: { - local kind = {kind: "PodPreset"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Env defines the collection of EnvVar to inject into containers. - env(env):: if std.type(env) == "array" then __specMixin({env+: env}) else __specMixin({env+: [env]}), - // EnvFrom defines the collection of EnvFromSource to inject into containers. - envFrom(envFrom):: if std.type(envFrom) == "array" then __specMixin({envFrom+: envFrom}) else __specMixin({envFrom+: [envFrom]}), - envFromType:: hidden.core.v1.envFromSource, - envType:: hidden.core.v1.envVar, - // Selector is a label query over a set of resources, in this case pods. Required. - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // VolumeMounts defines the collection of VolumeMount to inject into containers. - volumeMounts(volumeMounts):: if std.type(volumeMounts) == "array" then __specMixin({volumeMounts+: volumeMounts}) else __specMixin({volumeMounts+: [volumeMounts]}), - volumeMountsType:: hidden.core.v1.volumeMount, - // Volumes defines the collection of Volume to inject into the pod. - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.settings.v1alpha1.podPresetSpec, - }, - }, - // PodPresetList is a list of PodPreset objects. - podPresetList:: { - local kind = {kind: "PodPresetList"}, - new():: apiVersion + kind, - // Items is a list of schema objects. - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.settings.v1alpha1.podPreset, - mixin:: { - }, - }, - }, - }, - storage:: { - v1:: { - local apiVersion = {apiVersion: "storage.k8s.io/v1"}, - // 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. - storageClass:: { - local kind = {kind: "StorageClass"}, - new():: apiVersion + kind, - // Parameters holds the parameters for the provisioner that should create volumes of this storage class. - parameters(parameters):: {parameters+: parameters}, - // Provisioner indicates the type of the provisioner. - provisioner(provisioner):: {provisioner: provisioner}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // StorageClassList is a collection of storage classes. - storageClassList:: { - local kind = {kind: "StorageClassList"}, - new():: apiVersion + kind, - // Items is the list of StorageClasses - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.storage.v1.storageClass, - mixin:: { - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "storage.k8s.io/v1beta1"}, - // 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. - storageClass:: { - local kind = {kind: "StorageClass"}, - new():: apiVersion + kind, - // Parameters holds the parameters for the provisioner that should create volumes of this storage class. - parameters(parameters):: {parameters+: parameters}, - // Provisioner indicates the type of the provisioner. - provisioner(provisioner):: {provisioner: provisioner}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // StorageClassList is a collection of storage classes. - storageClassList:: { - local kind = {kind: "StorageClassList"}, - new():: apiVersion + kind, - // Items is the list of StorageClasses - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.storage.v1beta1.storageClass, - mixin:: { - }, - }, - }, - }, - local hidden = { - admissionregistration:: { - v1alpha1:: { - local apiVersion = {apiVersion: "admissionregistration/v1alpha1"}, - // AdmissionHookClientConfig contains the information to make a TLS connection with the webhook - admissionHookClientConfig:: { - new():: {}, - // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required - caBundle(caBundle):: {caBundle: caBundle}, - mixin:: { - // Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required - service:: { - local __serviceMixin(service) = {service+: service}, - mixinInstance(service):: __serviceMixin(service), - // Name is the name of the service Required - name(name):: __serviceMixin({name: name}), - // Namespace is the namespace of the service Required - namespace(namespace):: __serviceMixin({namespace: namespace}), - }, - serviceType:: hidden.admissionregistration.v1alpha1.serviceReference, - }, - }, - // ExternalAdmissionHook describes an external admission webhook and the resources and operations it applies to. - externalAdmissionHook:: { - new():: {}, - // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore. - failurePolicy(failurePolicy):: {failurePolicy: failurePolicy}, - // The name of the external 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(name):: {name: name}, - // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. - rules(rules):: if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.admissionregistration.v1alpha1.ruleWithOperations, - mixin:: { - // ClientConfig defines how to communicate with the hook. Required - clientConfig:: { - local __clientConfigMixin(clientConfig) = {clientConfig+: clientConfig}, - mixinInstance(clientConfig):: __clientConfigMixin(clientConfig), - // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required - caBundle(caBundle):: __clientConfigMixin({caBundle: caBundle}), - // Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required - service:: { - local __serviceMixin(service) = __clientConfigMixin({service+: service}), - mixinInstance(service):: __serviceMixin(service), - // Name is the name of the service Required - name(name):: __serviceMixin({name: name}), - // Namespace is the namespace of the service Required - namespace(namespace):: __serviceMixin({namespace: namespace}), - }, - serviceType:: hidden.admissionregistration.v1alpha1.serviceReference, - }, - clientConfigType:: hidden.admissionregistration.v1alpha1.admissionHookClientConfig, - }, - }, - // Initializer describes the name and the failure policy of an initializer, and what resources it applies to. - initializer:: { - new():: {}, - // FailurePolicy defines what happens if the responsible initializer controller fails to takes action. Allowed values are Ignore, or Fail. If "Ignore" is set, initializer is removed from the initializers list of an object if the timeout is reached; If "Fail" is set, admissionregistration returns timeout error if the timeout is reached. - failurePolicy(failurePolicy):: {failurePolicy: failurePolicy}, - // Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where "alwayspullimages" is the name of the webhook, and kubernetes.io is the name of the organization. Required - name(name):: {name: name}, - // Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources. - rules(rules):: if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.admissionregistration.v1alpha1.rule, - mixin:: { - }, - }, - // Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid. - rule:: { - new():: {}, - // 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(apiGroups):: if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [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(apiVersions):: if std.type(apiVersions) == "array" then {apiVersions+: apiVersions} else {apiVersions+: [apiVersions]}, - // 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(resources):: if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - mixin:: { - }, - }, - // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid. - ruleWithOperations:: { - new():: {}, - // 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(apiGroups):: if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [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(apiVersions):: if std.type(apiVersions) == "array" then {apiVersions+: apiVersions} else {apiVersions+: [apiVersions]}, - // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required. - operations(operations):: if std.type(operations) == "array" then {operations+: operations} else {operations+: [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(resources):: if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - mixin:: { - }, - }, - // ServiceReference holds a reference to Service.legacy.k8s.io - serviceReference:: { - new():: {}, - // Name is the name of the service Required - name(name):: {name: name}, - // Namespace is the namespace of the service Required - namespace(namespace):: {namespace: namespace}, - mixin:: { - }, - }, - }, - }, - apiregistration:: { - v1beta1:: { - local apiVersion = {apiVersion: "apiregistration/v1beta1"}, - // APIService represents a server for a particular GroupVersion. Name must be "version.group". - aPIService:: { - new():: {}, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec contains information for locating and communicating with a server - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. - caBundle(caBundle):: __specMixin({caBundle: caBundle}), - // Group is the API group name this server hosts - group(group):: __specMixin({group: group}), - // GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is prefered 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(groupPriorityMinimum):: __specMixin({groupPriorityMinimum: groupPriorityMinimum}), - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. - insecureSkipTLSVerify(insecureSkipTLSVerify):: __specMixin({insecureSkipTLSVerify: 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:: { - local __serviceMixin(service) = __specMixin({service+: service}), - mixinInstance(service):: __serviceMixin(service), - // Name is the name of the service - name(name):: __serviceMixin({name: name}), - // Namespace is the namespace of the service - namespace(namespace):: __serviceMixin({namespace: namespace}), - }, - serviceType:: hidden.apiregistration.v1beta1.serviceReference, - // Version is the API version this server hosts. For example, "v1" - version(version):: __specMixin({version: version}), - // 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). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) Since it's inside of a group, the number can be small, probably in the 10s. - versionPriority(versionPriority):: __specMixin({versionPriority: versionPriority}), - }, - specType:: hidden.apiregistration.v1beta1.aPIServiceSpec, - // Status contains derived information about an API server - status:: { - local __statusMixin(status) = {status+: status}, - mixinInstance(status):: __statusMixin(status), - // Current service state of apiService. - conditions(conditions):: if std.type(conditions) == "array" then __statusMixin({conditions+: conditions}) else __statusMixin({conditions+: [conditions]}), - conditionsType:: hidden.apiregistration.v1beta1.aPIServiceCondition, - }, - statusType:: hidden.apiregistration.v1beta1.aPIServiceStatus, - }, - }, - // - aPIServiceCondition:: { - new():: {}, - // Human-readable message indicating details about last transition. - message(message):: {message: message}, - // Unique, one-word, CamelCase reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Status is the status of the condition. Can be True, False, Unknown. - status(status):: {status: status}, - // Type is the type of the condition. - type(type):: {type: type}, - mixin:: { - // Last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // APIServiceList is a list of APIService objects. - aPIServiceList:: { - new():: {}, - // - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apiregistration.v1beta1.aPIService, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __metadataMixin({resourceVersion: resourceVersion}), - // SelfLink is a URL representing this object. Populated by the system. Read-only. - selfLink(selfLink):: __metadataMixin({selfLink: selfLink}), - }, - metadataType:: hidden.meta.v1.listMeta, - }, - }, - // APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification. - aPIServiceSpec:: { - new():: {}, - // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. - caBundle(caBundle):: {caBundle: caBundle}, - // Group is the API group name this server hosts - group(group):: {group: group}, - // GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is prefered 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(groupPriorityMinimum):: {groupPriorityMinimum: groupPriorityMinimum}, - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. - insecureSkipTLSVerify(insecureSkipTLSVerify):: {insecureSkipTLSVerify: insecureSkipTLSVerify}, - // Version is the API version this server hosts. For example, "v1" - version(version):: {version: version}, - // 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). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) Since it's inside of a group, the number can be small, probably in the 10s. - versionPriority(versionPriority):: {versionPriority: versionPriority}, - mixin:: { - // 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:: { - local __serviceMixin(service) = {service+: service}, - mixinInstance(service):: __serviceMixin(service), - // Name is the name of the service - name(name):: __serviceMixin({name: name}), - // Namespace is the namespace of the service - namespace(namespace):: __serviceMixin({namespace: namespace}), - }, - serviceType:: hidden.apiregistration.v1beta1.serviceReference, - }, - }, - // APIServiceStatus contains derived information about an API server - aPIServiceStatus:: { - new():: {}, - // Current service state of apiService. - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.apiregistration.v1beta1.aPIServiceCondition, - mixin:: { - }, - }, - // ServiceReference holds a reference to Service.legacy.k8s.io - serviceReference:: { - new():: {}, - // Name is the name of the service - name(name):: {name: name}, - // Namespace is the namespace of the service - namespace(namespace):: {namespace: namespace}, - mixin:: { - }, - }, - }, - }, - apps:: { - v1beta1:: { - local apiVersion = {apiVersion: "apps/v1beta1"}, - // DeploymentCondition describes the state of a deployment at a certain point. - deploymentCondition:: { - new():: {}, - // A human readable message indicating details about the transition. - message(message):: {message: message}, - // The reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Type of deployment condition. - type(type):: {type: type}, - mixin:: { - // Last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - // The last time this condition was updated. - lastUpdateTime:: { - local __lastUpdateTimeMixin(lastUpdateTime) = {lastUpdateTime+: lastUpdateTime}, - mixinInstance(lastUpdateTime):: __lastUpdateTimeMixin(lastUpdateTime), - }, - lastUpdateTimeType:: hidden.meta.v1.time, - }, - }, - // DeploymentSpec is the specification of the desired behavior of the Deployment. - deploymentSpec:: { - new():: {}, - // 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(minReadySeconds):: {minReadySeconds: minReadySeconds}, - // Indicates that the deployment is paused. - paused(paused):: {paused: 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. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. - progressDeadlineSeconds(progressDeadlineSeconds):: {progressDeadlineSeconds: progressDeadlineSeconds}, - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - replicas(replicas):: {replicas: 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 2. - revisionHistoryLimit(revisionHistoryLimit):: {revisionHistoryLimit: revisionHistoryLimit}, - mixin:: { - // The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = {rollbackTo+: rollbackTo}, - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - revision(revision):: __rollbackToMixin({revision: revision}), - }, - rollbackToType:: hidden.apps.v1beta1.rollbackConfig, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = {strategy+: strategy}, - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - maxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - maxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - type(type):: __strategyMixin({type: type}), - }, - strategyType:: hidden.apps.v1beta1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // DeploymentStatus is the most recently observed status of the Deployment. - deploymentStatus:: { - new():: {}, - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - availableReplicas(availableReplicas):: {availableReplicas: availableReplicas}, - // Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. - collisionCount(collisionCount):: {collisionCount: collisionCount}, - // Represents the latest available observations of a deployment's current state. - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.apps.v1beta1.deploymentCondition, - // The generation observed by the deployment controller. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - // Total number of ready pods targeted by this deployment. - readyReplicas(readyReplicas):: {readyReplicas: readyReplicas}, - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - replicas(replicas):: {replicas: replicas}, - // Total number of unavailable pods targeted by this deployment. - unavailableReplicas(unavailableReplicas):: {unavailableReplicas: unavailableReplicas}, - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - updatedReplicas(updatedReplicas):: {updatedReplicas: updatedReplicas}, - mixin:: { - }, - }, - // DeploymentStrategy describes how to replace existing pods with new ones. - deploymentStrategy:: { - new():: {}, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - type(type):: {type: type}, - mixin:: { - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - maxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - maxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateDeployment, - }, - }, - // - rollbackConfig:: { - new():: {}, - // The revision to rollback to. If set to 0, rollback to the last revision. - revision(revision):: {revision: revision}, - mixin:: { - }, - }, - // Spec to control the desired behavior of rolling update. - rollingUpdateDeployment:: { - new():: {}, - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - maxSurge(maxSurge):: {maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - maxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, - mixin:: { - }, - }, - // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. - rollingUpdateStatefulSetStrategy:: { - new():: {}, - // Partition indicates the ordinal at which the StatefulSet should be partitioned. - partition(partition):: {partition: partition}, - mixin:: { - }, - }, - // ScaleSpec describes the attributes of a scale subresource - scaleSpec:: { - new():: {}, - // desired number of instances for the scaled object. - replicas(replicas):: {replicas: replicas}, - mixin:: { - }, - }, - // ScaleStatus represents the current status of a scale subresource. - scaleStatus:: { - new():: {}, - // actual number of observed instances of the scaled object. - replicas(replicas):: {replicas: replicas}, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - selector(selector):: {selector+: selector}, - // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - targetSelector(targetSelector):: {targetSelector: targetSelector}, - mixin:: { - }, - }, - // A StatefulSetSpec is the specification of a StatefulSet. - statefulSetSpec:: { - new():: {}, - // 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(podManagementPolicy):: {podManagementPolicy: 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(replicas):: {replicas: 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(revisionHistoryLimit):: {revisionHistoryLimit: revisionHistoryLimit}, - // 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(serviceName):: {serviceName: serviceName}, - // 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(volumeClaimTemplates):: if std.type(volumeClaimTemplates) == "array" then {volumeClaimTemplates+: volumeClaimTemplates} else {volumeClaimTemplates+: [volumeClaimTemplates]}, - volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, - mixin:: { - // selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = {updateStrategy+: updateStrategy}, - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. - partition(partition):: __rollingUpdateMixin({partition: partition}), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateStatefulSetStrategy, - // Type indicates the type of the StatefulSetUpdateStrategy. - type(type):: __updateStrategyMixin({type: type}), - }, - updateStrategyType:: hidden.apps.v1beta1.statefulSetUpdateStrategy, - }, - }, - // StatefulSetStatus represents the current state of a StatefulSet. - statefulSetStatus:: { - new():: {}, - // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision. - currentReplicas(currentReplicas):: {currentReplicas: currentReplicas}, - // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). - currentRevision(currentRevision):: {currentRevision: currentRevision}, - // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. - readyReplicas(readyReplicas):: {readyReplicas: readyReplicas}, - // replicas is the number of Pods created by the StatefulSet controller. - replicas(replicas):: {replicas: replicas}, - // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) - updateRevision(updateRevision):: {updateRevision: updateRevision}, - // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision. - updatedReplicas(updatedReplicas):: {updatedReplicas: updatedReplicas}, - mixin:: { - }, - }, - // 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. - statefulSetUpdateStrategy:: { - new():: {}, - // Type indicates the type of the StatefulSetUpdateStrategy. - type(type):: {type: type}, - mixin:: { - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. - partition(partition):: __rollingUpdateMixin({partition: partition}), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateStatefulSetStrategy, - }, - }, - }, - }, - authentication:: { - v1:: { - local apiVersion = {apiVersion: "authentication/v1"}, - // TokenReviewSpec is a description of the token authentication request. - tokenReviewSpec:: { - new():: {}, - // Token is the opaque bearer token. - token(token):: {token: token}, - mixin:: { - }, - }, - // TokenReviewStatus is the result of the token authentication request. - tokenReviewStatus:: { - new():: {}, - // Authenticated indicates that the token was associated with a known user. - authenticated(authenticated):: {authenticated: authenticated}, - mixin:: { - // User is the UserInfo associated with the provided token. - user:: { - local __userMixin(user) = {user+: user}, - mixinInstance(user):: __userMixin(user), - // Any additional information provided by the authenticator. - extra(extra):: __userMixin({extra+: extra}), - // The names of groups this user is a part of. - groups(groups):: if std.type(groups) == "array" then __userMixin({groups+: groups}) else __userMixin({groups+: [groups]}), - // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. - uid(uid):: __userMixin({uid: uid}), - // The name that uniquely identifies this user among all active users. - username(username):: __userMixin({username: username}), - }, - userType:: hidden.authentication.v1.userInfo, - }, - }, - // UserInfo holds the information about the user needed to implement the user.Info interface. - userInfo:: { - new():: {}, - // Any additional information provided by the authenticator. - extra(extra):: {extra+: extra}, - // The names of groups this user is a part of. - groups(groups):: if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, - // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. - uid(uid):: {uid: uid}, - // The name that uniquely identifies this user among all active users. - username(username):: {username: username}, - mixin:: { - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "authentication/v1beta1"}, - // TokenReviewSpec is a description of the token authentication request. - tokenReviewSpec:: { - new():: {}, - // Token is the opaque bearer token. - token(token):: {token: token}, - mixin:: { - }, - }, - // TokenReviewStatus is the result of the token authentication request. - tokenReviewStatus:: { - new():: {}, - // Authenticated indicates that the token was associated with a known user. - authenticated(authenticated):: {authenticated: authenticated}, - mixin:: { - // User is the UserInfo associated with the provided token. - user:: { - local __userMixin(user) = {user+: user}, - mixinInstance(user):: __userMixin(user), - // Any additional information provided by the authenticator. - extra(extra):: __userMixin({extra+: extra}), - // The names of groups this user is a part of. - groups(groups):: if std.type(groups) == "array" then __userMixin({groups+: groups}) else __userMixin({groups+: [groups]}), - // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. - uid(uid):: __userMixin({uid: uid}), - // The name that uniquely identifies this user among all active users. - username(username):: __userMixin({username: username}), - }, - userType:: hidden.authentication.v1beta1.userInfo, - }, - }, - // UserInfo holds the information about the user needed to implement the user.Info interface. - userInfo:: { - new():: {}, - // Any additional information provided by the authenticator. - extra(extra):: {extra+: extra}, - // The names of groups this user is a part of. - groups(groups):: if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, - // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. - uid(uid):: {uid: uid}, - // The name that uniquely identifies this user among all active users. - username(username):: {username: username}, - mixin:: { - }, - }, - }, - }, - authorization:: { - v1:: { - local apiVersion = {apiVersion: "authorization/v1"}, - // NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface - nonResourceAttributes:: { - new():: {}, - // Path is the URL path of the request - path(path):: {path: path}, - // Verb is the standard HTTP verb - verb(verb):: {verb: verb}, - mixin:: { - }, - }, - // ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface - resourceAttributes:: { - new():: {}, - // Group is the API Group of the Resource. "*" means all. - group(group):: {group: group}, - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - name(name):: {name: 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(namespace):: {namespace: namespace}, - // Resource is one of the existing resource types. "*" means all. - resource(resource):: {resource: resource}, - // Subresource is one of the existing resource types. "" means none. - subresource(subresource):: {subresource: subresource}, - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - verb(verb):: {verb: verb}, - // Version is the API Version of the Resource. "*" means all. - version(version):: {version: version}, - mixin:: { - }, - }, - // SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set - selfSubjectAccessReviewSpec:: { - new():: {}, - mixin:: { - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = {nonResourceAttributes+: nonResourceAttributes}, - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - path(path):: __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - verb(verb):: __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = {resourceAttributes+: resourceAttributes}, - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - group(group):: __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - name(name):: __resourceAttributesMixin({name: 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(namespace):: __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - resource(resource):: __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - subresource(subresource):: __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - verb(verb):: __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - version(version):: __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - }, - }, - // SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set - subjectAccessReviewSpec:: { - new():: {}, - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - extra(extra):: {extra+: extra}, - // Groups is the groups you're testing for. - groups(groups):: if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, - // 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(user):: {user: user}, - mixin:: { - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = {nonResourceAttributes+: nonResourceAttributes}, - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - path(path):: __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - verb(verb):: __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = {resourceAttributes+: resourceAttributes}, - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - group(group):: __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - name(name):: __resourceAttributesMixin({name: 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(namespace):: __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - resource(resource):: __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - subresource(subresource):: __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - verb(verb):: __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - version(version):: __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - }, - }, - // SubjectAccessReviewStatus - subjectAccessReviewStatus:: { - new():: {}, - // Allowed is required. True if the action would be allowed, false otherwise. - allowed(allowed):: {allowed: allowed}, - // EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. - evaluationError(evaluationError):: {evaluationError: evaluationError}, - // Reason is optional. It indicates why a request was allowed or denied. - reason(reason):: {reason: reason}, - mixin:: { - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "authorization/v1beta1"}, - // NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface - nonResourceAttributes:: { - new():: {}, - // Path is the URL path of the request - path(path):: {path: path}, - // Verb is the standard HTTP verb - verb(verb):: {verb: verb}, - mixin:: { - }, - }, - // ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface - resourceAttributes:: { - new():: {}, - // Group is the API Group of the Resource. "*" means all. - group(group):: {group: group}, - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - name(name):: {name: 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(namespace):: {namespace: namespace}, - // Resource is one of the existing resource types. "*" means all. - resource(resource):: {resource: resource}, - // Subresource is one of the existing resource types. "" means none. - subresource(subresource):: {subresource: subresource}, - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - verb(verb):: {verb: verb}, - // Version is the API Version of the Resource. "*" means all. - version(version):: {version: version}, - mixin:: { - }, - }, - // SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set - selfSubjectAccessReviewSpec:: { - new():: {}, - mixin:: { - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = {nonResourceAttributes+: nonResourceAttributes}, - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - path(path):: __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - verb(verb):: __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = {resourceAttributes+: resourceAttributes}, - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - group(group):: __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - name(name):: __resourceAttributesMixin({name: 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(namespace):: __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - resource(resource):: __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - subresource(subresource):: __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - verb(verb):: __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - version(version):: __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - }, - }, - // SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set - subjectAccessReviewSpec:: { - new():: {}, - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - extra(extra):: {extra+: extra}, - // Groups is the groups you're testing for. - group(group):: if std.type(group) == "array" then {group+: group} else {group+: [group]}, - // User is the user you're testing for. If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups - user(user):: {user: user}, - mixin:: { - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = {nonResourceAttributes+: nonResourceAttributes}, - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - path(path):: __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - verb(verb):: __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = {resourceAttributes+: resourceAttributes}, - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - group(group):: __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - name(name):: __resourceAttributesMixin({name: 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(namespace):: __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - resource(resource):: __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - subresource(subresource):: __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - verb(verb):: __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - version(version):: __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - }, - }, - // SubjectAccessReviewStatus - subjectAccessReviewStatus:: { - new():: {}, - // Allowed is required. True if the action would be allowed, false otherwise. - allowed(allowed):: {allowed: allowed}, - // EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. - evaluationError(evaluationError):: {evaluationError: evaluationError}, - // Reason is optional. It indicates why a request was allowed or denied. - reason(reason):: {reason: reason}, - mixin:: { - }, - }, - }, - }, - autoscaling:: { - v1:: { - local apiVersion = {apiVersion: "autoscaling/v1"}, - // CrossVersionObjectReference contains enough information to let you identify the referred resource. - crossVersionObjectReference:: { - new():: {}, - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: {name: name}, - mixin:: { - }, - }, - // specification of a horizontal pod autoscaler. - horizontalPodAutoscalerSpec:: { - new():: {}, - // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. - maxReplicas(maxReplicas):: {maxReplicas: maxReplicas}, - // lower limit for the number of pods that can be set by the autoscaler, default 1. - minReplicas(minReplicas):: {minReplicas: 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(targetCpuUtilizationPercentage):: {targetCPUUtilizationPercentage: targetCpuUtilizationPercentage}, - mixin:: { - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = {scaleTargetRef+: scaleTargetRef}, - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: __scaleTargetRefMixin({name: name}), - }, - scaleTargetRefType:: hidden.autoscaling.v1.crossVersionObjectReference, - }, - }, - // current status of a horizontal pod autoscaler - horizontalPodAutoscalerStatus:: { - new():: {}, - // current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU. - currentCpuUtilizationPercentage(currentCpuUtilizationPercentage):: {currentCPUUtilizationPercentage: currentCpuUtilizationPercentage}, - // current number of replicas of pods managed by this autoscaler. - currentReplicas(currentReplicas):: {currentReplicas: currentReplicas}, - // desired number of replicas of pods managed by this autoscaler. - desiredReplicas(desiredReplicas):: {desiredReplicas: desiredReplicas}, - // most recent generation observed by this autoscaler. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - mixin:: { - // last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed. - lastScaleTime:: { - local __lastScaleTimeMixin(lastScaleTime) = {lastScaleTime+: lastScaleTime}, - mixinInstance(lastScaleTime):: __lastScaleTimeMixin(lastScaleTime), - }, - lastScaleTimeType:: hidden.meta.v1.time, - }, - }, - // ScaleSpec describes the attributes of a scale subresource. - scaleSpec:: { - new():: {}, - // desired number of instances for the scaled object. - replicas(replicas):: {replicas: replicas}, - mixin:: { - }, - }, - // ScaleStatus represents the current status of a scale subresource. - scaleStatus:: { - new():: {}, - // actual number of observed instances of the scaled object. - replicas(replicas):: {replicas: replicas}, - // label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors - selector(selector):: {selector: selector}, - mixin:: { - }, - }, - }, - v2alpha1:: { - local apiVersion = {apiVersion: "autoscaling/v2alpha1"}, - // CrossVersionObjectReference contains enough information to let you identify the referred resource. - crossVersionObjectReference:: { - new():: {}, - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: {name: name}, - mixin:: { - }, - }, - // HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. - horizontalPodAutoscalerCondition:: { - new():: {}, - // message is a human-readable explanation containing details about the transition - message(message):: {message: message}, - // reason is the reason for the condition's last transition. - reason(reason):: {reason: reason}, - // status is the status of the condition (True, False, Unknown) - status(status):: {status: status}, - // type describes the current condition - type(type):: {type: type}, - mixin:: { - // lastTransitionTime is the last time the condition transitioned from one status to another - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. - horizontalPodAutoscalerSpec:: { - new():: {}, - // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas. - maxReplicas(maxReplicas):: {maxReplicas: maxReplicas}, - // 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(metrics):: if std.type(metrics) == "array" then {metrics+: metrics} else {metrics+: [metrics]}, - metricsType:: hidden.autoscaling.v2alpha1.metricSpec, - // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. - minReplicas(minReplicas):: {minReplicas: minReplicas}, - mixin:: { - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = {scaleTargetRef+: scaleTargetRef}, - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: __scaleTargetRefMixin({name: name}), - }, - scaleTargetRefType:: hidden.autoscaling.v2alpha1.crossVersionObjectReference, - }, - }, - // HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. - horizontalPodAutoscalerStatus:: { - new():: {}, - // conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met. - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.autoscaling.v2alpha1.horizontalPodAutoscalerCondition, - // currentMetrics is the last read state of the metrics used by this autoscaler. - currentMetrics(currentMetrics):: if std.type(currentMetrics) == "array" then {currentMetrics+: currentMetrics} else {currentMetrics+: [currentMetrics]}, - currentMetricsType:: hidden.autoscaling.v2alpha1.metricStatus, - // currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler. - currentReplicas(currentReplicas):: {currentReplicas: currentReplicas}, - // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler. - desiredReplicas(desiredReplicas):: {desiredReplicas: desiredReplicas}, - // observedGeneration is the most recent generation observed by this autoscaler. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - mixin:: { - // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed. - lastScaleTime:: { - local __lastScaleTimeMixin(lastScaleTime) = {lastScaleTime+: lastScaleTime}, - mixinInstance(lastScaleTime):: __lastScaleTimeMixin(lastScaleTime), - }, - lastScaleTimeType:: hidden.meta.v1.time, - }, - }, - // MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). - metricSpec:: { - new():: {}, - // type is the type of metric source. It should match one of the fields below. - type(type):: {type: type}, - mixin:: { - // object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). - object:: { - local __objectMixin(object) = {object+: object}, - mixinInstance(object):: __objectMixin(object), - // metricName is the name of the metric in question. - metricName(metricName):: __objectMixin({metricName: metricName}), - // target is the described Kubernetes object. - target:: { - local __targetMixin(target) = __objectMixin({target+: target}), - mixinInstance(target):: __targetMixin(target), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: __targetMixin({name: name}), - }, - targetType:: hidden.autoscaling.v2alpha1.crossVersionObjectReference, - // targetValue is the target value of the metric (as a quantity). - targetValue:: { - local __targetValueMixin(targetValue) = __objectMixin({targetValue+: targetValue}), - mixinInstance(targetValue):: __targetValueMixin(targetValue), - }, - targetValueType:: hidden.core.resource.quantity, - }, - objectType:: hidden.autoscaling.v2alpha1.objectMetricSource, - // 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:: { - local __podsMixin(pods) = {pods+: pods}, - mixinInstance(pods):: __podsMixin(pods), - // metricName is the name of the metric in question - metricName(metricName):: __podsMixin({metricName: metricName}), - // targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity) - targetAverageValue:: { - local __targetAverageValueMixin(targetAverageValue) = __podsMixin({targetAverageValue+: targetAverageValue}), - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - }, - podsType:: hidden.autoscaling.v2alpha1.podsMetricSource, - // 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:: { - local __resourceMixin(resource) = {resource+: resource}, - mixinInstance(resource):: __resourceMixin(resource), - // name is the name of the resource in question. - name(name):: __resourceMixin({name: 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(targetAverageUtilization):: __resourceMixin({targetAverageUtilization: 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:: { - local __targetAverageValueMixin(targetAverageValue) = __resourceMixin({targetAverageValue+: targetAverageValue}), - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - }, - resourceType:: hidden.autoscaling.v2alpha1.resourceMetricSource, - }, - }, - // MetricStatus describes the last-read state of a single metric. - metricStatus:: { - new():: {}, - // type is the type of metric source. It will match one of the fields below. - type(type):: {type: type}, - mixin:: { - // object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). - object:: { - local __objectMixin(object) = {object+: object}, - mixinInstance(object):: __objectMixin(object), - // currentValue is the current value of the metric (as a quantity). - currentValue:: { - local __currentValueMixin(currentValue) = __objectMixin({currentValue+: currentValue}), - mixinInstance(currentValue):: __currentValueMixin(currentValue), - }, - currentValueType:: hidden.core.resource.quantity, - // metricName is the name of the metric in question. - metricName(metricName):: __objectMixin({metricName: metricName}), - // target is the described Kubernetes object. - target:: { - local __targetMixin(target) = __objectMixin({target+: target}), - mixinInstance(target):: __targetMixin(target), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: __targetMixin({name: name}), - }, - targetType:: hidden.autoscaling.v2alpha1.crossVersionObjectReference, - }, - objectType:: hidden.autoscaling.v2alpha1.objectMetricStatus, - // 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:: { - local __podsMixin(pods) = {pods+: pods}, - mixinInstance(pods):: __podsMixin(pods), - // currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity) - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = __podsMixin({currentAverageValue+: currentAverageValue}), - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - // metricName is the name of the metric in question - metricName(metricName):: __podsMixin({metricName: metricName}), - }, - podsType:: hidden.autoscaling.v2alpha1.podsMetricStatus, - // 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:: { - local __resourceMixin(resource) = {resource+: resource}, - mixinInstance(resource):: __resourceMixin(resource), - // currentAverageUtilization is the current 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. It will only be present if `targetAverageValue` was set in the corresponding metric specification. - currentAverageUtilization(currentAverageUtilization):: __resourceMixin({currentAverageUtilization: currentAverageUtilization}), - // currentAverageValue is the current 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. It will always be set, regardless of the corresponding metric specification. - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = __resourceMixin({currentAverageValue+: currentAverageValue}), - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - // name is the name of the resource in question. - name(name):: __resourceMixin({name: name}), - }, - resourceType:: hidden.autoscaling.v2alpha1.resourceMetricStatus, - }, - }, - // ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). - objectMetricSource:: { - new():: {}, - // metricName is the name of the metric in question. - metricName(metricName):: {metricName: metricName}, - mixin:: { - // target is the described Kubernetes object. - target:: { - local __targetMixin(target) = {target+: target}, - mixinInstance(target):: __targetMixin(target), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: __targetMixin({name: name}), - }, - targetType:: hidden.autoscaling.v2alpha1.crossVersionObjectReference, - // targetValue is the target value of the metric (as a quantity). - targetValue:: { - local __targetValueMixin(targetValue) = {targetValue+: targetValue}, - mixinInstance(targetValue):: __targetValueMixin(targetValue), - }, - targetValueType:: hidden.core.resource.quantity, - }, - }, - // ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). - objectMetricStatus:: { - new():: {}, - // metricName is the name of the metric in question. - metricName(metricName):: {metricName: metricName}, - mixin:: { - // currentValue is the current value of the metric (as a quantity). - currentValue:: { - local __currentValueMixin(currentValue) = {currentValue+: currentValue}, - mixinInstance(currentValue):: __currentValueMixin(currentValue), - }, - currentValueType:: hidden.core.resource.quantity, - // target is the described Kubernetes object. - target:: { - local __targetMixin(target) = {target+: target}, - mixinInstance(target):: __targetMixin(target), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: __targetMixin({name: name}), - }, - targetType:: hidden.autoscaling.v2alpha1.crossVersionObjectReference, - }, - }, - // 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. - podsMetricSource:: { - new():: {}, - // metricName is the name of the metric in question - metricName(metricName):: {metricName: metricName}, - mixin:: { - // targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity) - targetAverageValue:: { - local __targetAverageValueMixin(targetAverageValue) = {targetAverageValue+: targetAverageValue}, - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - }, - }, - // PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second). - podsMetricStatus:: { - new():: {}, - // metricName is the name of the metric in question - metricName(metricName):: {metricName: metricName}, - mixin:: { - // currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity) - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = {currentAverageValue+: currentAverageValue}, - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - }, - }, - // 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. - resourceMetricSource:: { - new():: {}, - // name is the name of the resource in question. - name(name):: {name: 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(targetAverageUtilization):: {targetAverageUtilization: targetAverageUtilization}, - mixin:: { - // 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:: { - local __targetAverageValueMixin(targetAverageValue) = {targetAverageValue+: targetAverageValue}, - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - }, - }, - // ResourceMetricStatus indicates the current value of 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). 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. - resourceMetricStatus:: { - new():: {}, - // currentAverageUtilization is the current 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. It will only be present if `targetAverageValue` was set in the corresponding metric specification. - currentAverageUtilization(currentAverageUtilization):: {currentAverageUtilization: currentAverageUtilization}, - // name is the name of the resource in question. - name(name):: {name: name}, - mixin:: { - // currentAverageValue is the current 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. It will always be set, regardless of the corresponding metric specification. - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = {currentAverageValue+: currentAverageValue}, - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - }, - }, - }, - }, - batch:: { - v1:: { - local apiVersion = {apiVersion: "batch/v1"}, - // JobCondition describes current state of a job. - jobCondition:: { - new():: {}, - // Human readable message indicating details about last transition. - message(message):: {message: message}, - // (brief) reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Type of job condition, Complete or Failed. - type(type):: {type: type}, - mixin:: { - // Last time the condition was checked. - lastProbeTime:: { - local __lastProbeTimeMixin(lastProbeTime) = {lastProbeTime+: lastProbeTime}, - mixinInstance(lastProbeTime):: __lastProbeTimeMixin(lastProbeTime), - }, - lastProbeTimeType:: hidden.meta.v1.time, - // Last time the condition transit from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // JobSpec describes how the job execution will look like. - jobSpec:: { - new():: {}, - // Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - activeDeadlineSeconds(activeDeadlineSeconds):: {activeDeadlineSeconds: activeDeadlineSeconds}, - // 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(completions):: {completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - manualSelector(manualSelector):: {manualSelector: 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(parallelism):: {parallelism: parallelism}, - mixin:: { - // 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:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // JobStatus represents the current state of a Job. - jobStatus:: { - new():: {}, - // The number of actively running pods. - active(active):: {active: active}, - // The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.batch.v1.jobCondition, - // The number of pods which reached phase Failed. - failed(failed):: {failed: failed}, - // The number of pods which reached phase Succeeded. - succeeded(succeeded):: {succeeded: succeeded}, - mixin:: { - // Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. - completionTime:: { - local __completionTimeMixin(completionTime) = {completionTime+: completionTime}, - mixinInstance(completionTime):: __completionTimeMixin(completionTime), - }, - completionTimeType:: hidden.meta.v1.time, - // Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. - startTime:: { - local __startTimeMixin(startTime) = {startTime+: startTime}, - mixinInstance(startTime):: __startTimeMixin(startTime), - }, - startTimeType:: hidden.meta.v1.time, - }, - }, - }, - v2alpha1:: { - local apiVersion = {apiVersion: "batch/v2alpha1"}, - // CronJobSpec describes how the job execution will look like and when it will actually run. - cronJobSpec:: { - new():: {}, - // Specifies how to treat concurrent executions of a Job. Defaults to Allow. - concurrencyPolicy(concurrencyPolicy):: {concurrencyPolicy: concurrencyPolicy}, - // The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. - failedJobsHistoryLimit(failedJobsHistoryLimit):: {failedJobsHistoryLimit: failedJobsHistoryLimit}, - // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - schedule(schedule):: {schedule: schedule}, - // 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(startingDeadlineSeconds):: {startingDeadlineSeconds: startingDeadlineSeconds}, - // The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. - successfulJobsHistoryLimit(successfulJobsHistoryLimit):: {successfulJobsHistoryLimit: successfulJobsHistoryLimit}, - // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. - suspend(suspend):: {suspend: suspend}, - mixin:: { - // Specifies the job that will be created when executing a CronJob. - jobTemplate:: { - local __jobTemplateMixin(jobTemplate) = {jobTemplate+: jobTemplate}, - mixinInstance(jobTemplate):: __jobTemplateMixin(jobTemplate), - // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __jobTemplateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __jobTemplateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - activeDeadlineSeconds(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // 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(completions):: __specMixin({completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - manualSelector(manualSelector):: __specMixin({manualSelector: 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(parallelism):: __specMixin({parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.batch.v1.jobSpec, - }, - jobTemplateType:: hidden.batch.v2alpha1.jobTemplateSpec, - }, - }, - // CronJobStatus represents the current state of a cron job. - cronJobStatus:: { - new():: {}, - // A list of pointers to currently running jobs. - active(active):: if std.type(active) == "array" then {active+: active} else {active+: [active]}, - activeType:: hidden.core.v1.objectReference, - mixin:: { - // Information when was the last time the job was successfully scheduled. - lastScheduleTime:: { - local __lastScheduleTimeMixin(lastScheduleTime) = {lastScheduleTime+: lastScheduleTime}, - mixinInstance(lastScheduleTime):: __lastScheduleTimeMixin(lastScheduleTime), - }, - lastScheduleTimeType:: hidden.meta.v1.time, - }, - }, - // JobTemplateSpec describes the data a Job should have when created from a template - jobTemplateSpec:: { - new():: {}, - mixin:: { - // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - activeDeadlineSeconds(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // 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(completions):: __specMixin({completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - manualSelector(manualSelector):: __specMixin({manualSelector: 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(parallelism):: __specMixin({parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.batch.v1.jobSpec, - }, - }, - }, - }, - certificates:: { - v1beta1:: { - local apiVersion = {apiVersion: "certificates/v1beta1"}, - // - certificateSigningRequestCondition:: { - new():: {}, - // human readable message with details about the request state - message(message):: {message: message}, - // brief reason for the request state - reason(reason):: {reason: reason}, - // request approval state, currently Approved or Denied. - type(type):: {type: type}, - mixin:: { - // timestamp for the last update to this condition - lastUpdateTime:: { - local __lastUpdateTimeMixin(lastUpdateTime) = {lastUpdateTime+: lastUpdateTime}, - mixinInstance(lastUpdateTime):: __lastUpdateTimeMixin(lastUpdateTime), - }, - lastUpdateTimeType:: hidden.meta.v1.time, - }, - }, - // This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users. - certificateSigningRequestSpec:: { - new():: {}, - // Extra information about the requesting user. See user.Info interface for details. - extra(extra):: {extra+: extra}, - // Group information about the requesting user. See user.Info interface for details. - groups(groups):: if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, - // Base64-encoded PKCS#10 CSR data - request(request):: {request: request}, - // UID information about the requesting user. See user.Info interface for details. - uid(uid):: {uid: uid}, - // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 - // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - usages(usages):: if std.type(usages) == "array" then {usages+: usages} else {usages+: [usages]}, - // Information about the requesting user. See user.Info interface for details. - username(username):: {username: username}, - mixin:: { - }, - }, - // - certificateSigningRequestStatus:: { - new():: {}, - // If request was approved, the controller will place the issued certificate here. - certificate(certificate):: {certificate: certificate}, - // Conditions applied to the request, such as approval or denial. - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.certificates.v1beta1.certificateSigningRequestCondition, - mixin:: { - }, - }, - }, - }, - core:: { - intstr:: { - local apiVersion = {apiVersion: "intstr"}, - // - intOrString:: { - new():: {}, - mixin:: { - }, - }, - }, - resource:: { - local apiVersion = {apiVersion: "resource"}, - // - quantity:: { - new():: {}, - mixin:: { - }, - }, - }, - v1:: { - local apiVersion = {apiVersion: "v1"}, - // 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. - awsElasticBlockStoreVolumeSource:: { - new():: {}, - // 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(fsType):: {fsType: 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(partition):: {partition: 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(readOnly):: {readOnly: readOnly}, - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - volumeId(volumeId):: {volumeID: volumeId}, - mixin:: { - }, - }, - // Affinity is a group of affinity scheduling rules. - affinity:: { - new():: {}, - mixin:: { - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = {nodeAffinity+: nodeAffinity}, - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = {podAffinity+: podAffinity}, - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = {podAntiAffinity+: podAntiAffinity}, - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - }, - // AttachedVolume describes a volume attached to a node - attachedVolume:: { - new():: {}, - // DevicePath represents the device path where the volume should be available - devicePath(devicePath):: {devicePath: devicePath}, - // Name of the attached volume - name(name):: {name: name}, - mixin:: { - }, - }, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDiskVolumeSource:: { - new():: {}, - // Host Caching mode: None, Read Only, Read Write. - cachingMode(cachingMode):: {cachingMode: cachingMode}, - // The Name of the data disk in the blob storage - diskName(diskName):: {diskName: diskName}, - // The URI the data disk in the blob storage - diskUri(diskUri):: {diskURI: diskUri}, - // 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(fsType):: {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - mixin:: { - }, - }, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFileVolumeSource:: { - new():: {}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // the name of secret that contains Azure Storage Account Name and Key - secretName(secretName):: {secretName: secretName}, - // Share Name - shareName(shareName):: {shareName: shareName}, - mixin:: { - }, - }, - // Adds and removes POSIX capabilities from running containers. - capabilities:: { - new():: {}, - // Added capabilities - add(add):: if std.type(add) == "array" then {add+: add} else {add+: [add]}, - // Removed capabilities - drop(drop):: if std.type(drop) == "array" then {drop+: drop} else {drop+: [drop]}, - mixin:: { - }, - }, - // Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. - cephFsVolumeSource:: { - new():: {}, - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - path(path):: {path: path}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - readOnly(readOnly):: {readOnly: readOnly}, - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretFile(secretFile):: {secretFile: secretFile}, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - user(user):: {user: user}, - mixin:: { - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // 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. - cinderVolumeSource:: { - new():: {}, - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - fsType(fsType):: {fsType: fsType}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - readOnly(readOnly):: {readOnly: readOnly}, - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - volumeId(volumeId):: {volumeID: volumeId}, - mixin:: { - }, - }, - // Information about the condition of a component. - componentCondition:: { - new():: {}, - // Message about the condition for a component. For example, information about a health check. - message(message):: {message: message}, - // Type of condition for a component. Valid value: "Healthy" - type(type):: {type: type}, - mixin:: { - }, - }, - // 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. - configMapEnvSource:: { - new():: {}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap must be defined - optional(optional):: {optional: optional}, - mixin:: { - }, - }, - // Selects a key from a ConfigMap. - configMapKeySelector:: { - new():: {}, - // The key to select. - key(key):: {key: key}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap or it's key must be defined - optional(optional):: {optional: optional}, - mixin:: { - }, - }, - // 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. - configMapProjection:: { - new():: {}, - // 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap or it's keys must be defined - optional(optional):: {optional: optional}, - mixin:: { - }, - }, - // 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. - configMapVolumeSource:: { - new():: {}, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the ConfigMap or it's keys must be defined - optional(optional):: {optional: optional}, - mixin:: { - }, - }, - // A single application container that you want to run within a pod. - container:: { - new(name, image):: {} + self.name(name) + self.image(image), - // 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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(args):: if std.type(args) == "array" then {args+: args} else {args+: [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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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(command):: if std.type(command) == "array" then {command+: command} else {command+: [command]}, - // List of environment variables to set in the container. Cannot be updated. - env(env):: if std.type(env) == "array" then {env+: env} else {env+: [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(envFrom):: if std.type(envFrom) == "array" then {envFrom+: envFrom} else {envFrom+: [envFrom]}, - envFromType:: hidden.core.v1.envFromSource, - envType:: hidden.core.v1.envVar, - // Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images - image(image):: {image: 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(imagePullPolicy):: {imagePullPolicy: imagePullPolicy}, - // 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(name):: {name: name}, - // 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(ports):: if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - portsType:: hidden.core.v1.containerPort, - // 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(stdin):: {stdin: 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(stdinOnce):: {stdinOnce: 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(terminationMessagePath):: {terminationMessagePath: 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(terminationMessagePolicy):: {terminationMessagePolicy: terminationMessagePolicy}, - // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. - tty(tty):: {tty: tty}, - // Pod volumes to mount into the container's filesystem. Cannot be updated. - volumeMounts(volumeMounts):: if std.type(volumeMounts) == "array" then {volumeMounts+: volumeMounts} else {volumeMounts+: [volumeMounts]}, - volumeMountsType:: hidden.core.v1.volumeMount, - // 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(workingDir):: {workingDir: workingDir}, - mixin:: { - // Actions that the management system should take in response to container lifecycle events. Cannot be updated. - lifecycle:: { - local __lifecycleMixin(lifecycle) = {lifecycle+: lifecycle}, - mixinInstance(lifecycle):: __lifecycleMixin(lifecycle), - // 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:: { - local __postStartMixin(postStart) = __lifecycleMixin({postStart+: postStart}), - mixinInstance(postStart):: __postStartMixin(postStart), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __postStartMixin({exec+: exec}), - mixinInstance(exec):: __execMixin(exec), - // 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(command):: if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __postStartMixin({httpGet+: httpGet}), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host(host):: __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders(httpHeaders):: if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - path(path):: __httpGetMixin({path: path}), - // 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(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - scheme(scheme):: __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __postStartMixin({tcpSocket+: tcpSocket}), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - host(host):: __tcpSocketMixin({host: host}), - // 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(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - postStartType:: hidden.core.v1.handler, - // PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - preStop:: { - local __preStopMixin(preStop) = __lifecycleMixin({preStop+: preStop}), - mixinInstance(preStop):: __preStopMixin(preStop), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __preStopMixin({exec+: exec}), - mixinInstance(exec):: __execMixin(exec), - // 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(command):: if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __preStopMixin({httpGet+: httpGet}), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host(host):: __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders(httpHeaders):: if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - path(path):: __httpGetMixin({path: path}), - // 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(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - scheme(scheme):: __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __preStopMixin({tcpSocket+: tcpSocket}), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - host(host):: __tcpSocketMixin({host: host}), - // 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(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - preStopType:: hidden.core.v1.handler, - }, - lifecycleType:: hidden.core.v1.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:: { - local __livenessProbeMixin(livenessProbe) = {livenessProbe+: livenessProbe}, - mixinInstance(livenessProbe):: __livenessProbeMixin(livenessProbe), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __livenessProbeMixin({exec+: exec}), - mixinInstance(exec):: __execMixin(exec), - // 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(command):: if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - failureThreshold(failureThreshold):: __livenessProbeMixin({failureThreshold: failureThreshold}), - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __livenessProbeMixin({httpGet+: httpGet}), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host(host):: __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders(httpHeaders):: if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - path(path):: __httpGetMixin({path: path}), - // 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(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - scheme(scheme):: __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // 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(initialDelaySeconds):: __livenessProbeMixin({initialDelaySeconds: initialDelaySeconds}), - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - periodSeconds(periodSeconds):: __livenessProbeMixin({periodSeconds: periodSeconds}), - // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. - successThreshold(successThreshold):: __livenessProbeMixin({successThreshold: successThreshold}), - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __livenessProbeMixin({tcpSocket+: tcpSocket}), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - host(host):: __tcpSocketMixin({host: host}), - // 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(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - // 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(timeoutSeconds):: __livenessProbeMixin({timeoutSeconds: timeoutSeconds}), - }, - livenessProbeType:: hidden.core.v1.probe, - // 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:: { - local __readinessProbeMixin(readinessProbe) = {readinessProbe+: readinessProbe}, - mixinInstance(readinessProbe):: __readinessProbeMixin(readinessProbe), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __readinessProbeMixin({exec+: exec}), - mixinInstance(exec):: __execMixin(exec), - // 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(command):: if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - failureThreshold(failureThreshold):: __readinessProbeMixin({failureThreshold: failureThreshold}), - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __readinessProbeMixin({httpGet+: httpGet}), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host(host):: __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders(httpHeaders):: if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - path(path):: __httpGetMixin({path: path}), - // 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(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - scheme(scheme):: __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // 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(initialDelaySeconds):: __readinessProbeMixin({initialDelaySeconds: initialDelaySeconds}), - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - periodSeconds(periodSeconds):: __readinessProbeMixin({periodSeconds: periodSeconds}), - // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. - successThreshold(successThreshold):: __readinessProbeMixin({successThreshold: successThreshold}), - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __readinessProbeMixin({tcpSocket+: tcpSocket}), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - host(host):: __tcpSocketMixin({host: host}), - // 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(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - // 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(timeoutSeconds):: __readinessProbeMixin({timeoutSeconds: timeoutSeconds}), - }, - readinessProbeType:: hidden.core.v1.probe, - // Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources:: { - local __resourcesMixin(resources) = {resources+: resources}, - mixinInstance(resources):: __resourcesMixin(resources), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - limits(limits):: __resourcesMixin({limits+: 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-compute-resources-container/ - requests(requests):: __resourcesMixin({requests+: requests}), - }, - resourcesType:: hidden.core.v1.resourceRequirements, - // Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md - securityContext:: { - local __securityContextMixin(securityContext) = {securityContext+: securityContext}, - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. - capabilities:: { - local __capabilitiesMixin(capabilities) = __securityContextMixin({capabilities+: capabilities}), - mixinInstance(capabilities):: __capabilitiesMixin(capabilities), - // Added capabilities - add(add):: if std.type(add) == "array" then __capabilitiesMixin({add+: add}) else __capabilitiesMixin({add+: [add]}), - // Removed capabilities - drop(drop):: if std.type(drop) == "array" then __capabilitiesMixin({drop+: drop}) else __capabilitiesMixin({drop+: [drop]}), - }, - capabilitiesType:: hidden.core.v1.capabilities, - // Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. - privileged(privileged):: __securityContextMixin({privileged: privileged}), - // Whether this container has a read-only root filesystem. Default is false. - readOnlyRootFilesystem(readOnlyRootFilesystem):: __securityContextMixin({readOnlyRootFilesystem: readOnlyRootFilesystem}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - securityContextType:: hidden.core.v1.securityContext, - }, - }, - // Describe a container image - containerImage:: { - new():: {}, - // Names by which this image is known. e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"] - names(names):: if std.type(names) == "array" then {names+: names} else {names+: [names]}, - // The size of the image in bytes. - sizeBytes(sizeBytes):: {sizeBytes: sizeBytes}, - mixin:: { - }, - }, - // ContainerPort represents a network port in a single container. - containerPort:: { - new(containerPort):: {} + self.containerPort(containerPort), - newNamed(name, containerPort):: {} + self.name(name) + self.containerPort(containerPort), - // Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. - containerPort(containerPort):: {containerPort: containerPort}, - // What host IP to bind the external port to. - hostIp(hostIp):: {hostIP: 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(hostPort):: {hostPort: 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(name):: {name: name}, - // Protocol for port. Must be UDP or TCP. Defaults to "TCP". - protocol(protocol):: {protocol: protocol}, - mixin:: { - }, - }, - // ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting. - containerState:: { - new():: {}, - mixin:: { - // Details about a running container - running:: { - local __runningMixin(running) = {running+: running}, - mixinInstance(running):: __runningMixin(running), - // Time at which the container was last (re-)started - startedAt:: { - local __startedAtMixin(startedAt) = __runningMixin({startedAt+: startedAt}), - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - runningType:: hidden.core.v1.containerStateRunning, - // Details about a terminated container - terminated:: { - local __terminatedMixin(terminated) = {terminated+: terminated}, - mixinInstance(terminated):: __terminatedMixin(terminated), - // Container's ID in the format 'docker://' - containerId(containerId):: __terminatedMixin({containerID: containerId}), - // Exit status from the last termination of the container - exitCode(exitCode):: __terminatedMixin({exitCode: exitCode}), - // Time at which the container last terminated - finishedAt:: { - local __finishedAtMixin(finishedAt) = __terminatedMixin({finishedAt+: finishedAt}), - mixinInstance(finishedAt):: __finishedAtMixin(finishedAt), - }, - finishedAtType:: hidden.meta.v1.time, - // Message regarding the last termination of the container - message(message):: __terminatedMixin({message: message}), - // (brief) reason from the last termination of the container - reason(reason):: __terminatedMixin({reason: reason}), - // Signal from the last termination of the container - signal(signal):: __terminatedMixin({signal: signal}), - // Time at which previous execution of the container started - startedAt:: { - local __startedAtMixin(startedAt) = __terminatedMixin({startedAt+: startedAt}), - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - terminatedType:: hidden.core.v1.containerStateTerminated, - // Details about a waiting container - waiting:: { - local __waitingMixin(waiting) = {waiting+: waiting}, - mixinInstance(waiting):: __waitingMixin(waiting), - // Message regarding why the container is not yet running. - message(message):: __waitingMixin({message: message}), - // (brief) reason the container is not yet running. - reason(reason):: __waitingMixin({reason: reason}), - }, - waitingType:: hidden.core.v1.containerStateWaiting, - }, - }, - // ContainerStateRunning is a running state of a container. - containerStateRunning:: { - new():: {}, - mixin:: { - // Time at which the container was last (re-)started - startedAt:: { - local __startedAtMixin(startedAt) = {startedAt+: startedAt}, - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - }, - // ContainerStateTerminated is a terminated state of a container. - containerStateTerminated:: { - new():: {}, - // Container's ID in the format 'docker://' - containerId(containerId):: {containerID: containerId}, - // Exit status from the last termination of the container - exitCode(exitCode):: {exitCode: exitCode}, - // Message regarding the last termination of the container - message(message):: {message: message}, - // (brief) reason from the last termination of the container - reason(reason):: {reason: reason}, - // Signal from the last termination of the container - signal(signal):: {signal: signal}, - mixin:: { - // Time at which the container last terminated - finishedAt:: { - local __finishedAtMixin(finishedAt) = {finishedAt+: finishedAt}, - mixinInstance(finishedAt):: __finishedAtMixin(finishedAt), - }, - finishedAtType:: hidden.meta.v1.time, - // Time at which previous execution of the container started - startedAt:: { - local __startedAtMixin(startedAt) = {startedAt+: startedAt}, - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - }, - // ContainerStateWaiting is a waiting state of a container. - containerStateWaiting:: { - new():: {}, - // Message regarding why the container is not yet running. - message(message):: {message: message}, - // (brief) reason the container is not yet running. - reason(reason):: {reason: reason}, - mixin:: { - }, - }, - // ContainerStatus contains details for the current status of this container. - containerStatus:: { - new():: {}, - // Container's ID in the format 'docker://'. - containerId(containerId):: {containerID: containerId}, - // The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images - image(image):: {image: image}, - // ImageID of the container's image. - imageId(imageId):: {imageID: imageId}, - // This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated. - name(name):: {name: name}, - // Specifies whether the container has passed its readiness probe. - ready(ready):: {ready: ready}, - // The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC. - restartCount(restartCount):: {restartCount: restartCount}, - mixin:: { - // Details about the container's last termination condition. - lastState:: { - local __lastStateMixin(lastState) = {lastState+: lastState}, - mixinInstance(lastState):: __lastStateMixin(lastState), - // Details about a running container - running:: { - local __runningMixin(running) = __lastStateMixin({running+: running}), - mixinInstance(running):: __runningMixin(running), - // Time at which the container was last (re-)started - startedAt:: { - local __startedAtMixin(startedAt) = __runningMixin({startedAt+: startedAt}), - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - runningType:: hidden.core.v1.containerStateRunning, - // Details about a terminated container - terminated:: { - local __terminatedMixin(terminated) = __lastStateMixin({terminated+: terminated}), - mixinInstance(terminated):: __terminatedMixin(terminated), - // Container's ID in the format 'docker://' - containerId(containerId):: __terminatedMixin({containerID: containerId}), - // Exit status from the last termination of the container - exitCode(exitCode):: __terminatedMixin({exitCode: exitCode}), - // Time at which the container last terminated - finishedAt:: { - local __finishedAtMixin(finishedAt) = __terminatedMixin({finishedAt+: finishedAt}), - mixinInstance(finishedAt):: __finishedAtMixin(finishedAt), - }, - finishedAtType:: hidden.meta.v1.time, - // Message regarding the last termination of the container - message(message):: __terminatedMixin({message: message}), - // (brief) reason from the last termination of the container - reason(reason):: __terminatedMixin({reason: reason}), - // Signal from the last termination of the container - signal(signal):: __terminatedMixin({signal: signal}), - // Time at which previous execution of the container started - startedAt:: { - local __startedAtMixin(startedAt) = __terminatedMixin({startedAt+: startedAt}), - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - terminatedType:: hidden.core.v1.containerStateTerminated, - // Details about a waiting container - waiting:: { - local __waitingMixin(waiting) = __lastStateMixin({waiting+: waiting}), - mixinInstance(waiting):: __waitingMixin(waiting), - // Message regarding why the container is not yet running. - message(message):: __waitingMixin({message: message}), - // (brief) reason the container is not yet running. - reason(reason):: __waitingMixin({reason: reason}), - }, - waitingType:: hidden.core.v1.containerStateWaiting, - }, - lastStateType:: hidden.core.v1.containerState, - // Details about the container's current condition. - state:: { - local __stateMixin(state) = {state+: state}, - mixinInstance(state):: __stateMixin(state), - // Details about a running container - running:: { - local __runningMixin(running) = __stateMixin({running+: running}), - mixinInstance(running):: __runningMixin(running), - // Time at which the container was last (re-)started - startedAt:: { - local __startedAtMixin(startedAt) = __runningMixin({startedAt+: startedAt}), - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - runningType:: hidden.core.v1.containerStateRunning, - // Details about a terminated container - terminated:: { - local __terminatedMixin(terminated) = __stateMixin({terminated+: terminated}), - mixinInstance(terminated):: __terminatedMixin(terminated), - // Container's ID in the format 'docker://' - containerId(containerId):: __terminatedMixin({containerID: containerId}), - // Exit status from the last termination of the container - exitCode(exitCode):: __terminatedMixin({exitCode: exitCode}), - // Time at which the container last terminated - finishedAt:: { - local __finishedAtMixin(finishedAt) = __terminatedMixin({finishedAt+: finishedAt}), - mixinInstance(finishedAt):: __finishedAtMixin(finishedAt), - }, - finishedAtType:: hidden.meta.v1.time, - // Message regarding the last termination of the container - message(message):: __terminatedMixin({message: message}), - // (brief) reason from the last termination of the container - reason(reason):: __terminatedMixin({reason: reason}), - // Signal from the last termination of the container - signal(signal):: __terminatedMixin({signal: signal}), - // Time at which previous execution of the container started - startedAt:: { - local __startedAtMixin(startedAt) = __terminatedMixin({startedAt+: startedAt}), - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - terminatedType:: hidden.core.v1.containerStateTerminated, - // Details about a waiting container - waiting:: { - local __waitingMixin(waiting) = __stateMixin({waiting+: waiting}), - mixinInstance(waiting):: __waitingMixin(waiting), - // Message regarding why the container is not yet running. - message(message):: __waitingMixin({message: message}), - // (brief) reason the container is not yet running. - reason(reason):: __waitingMixin({reason: reason}), - }, - waitingType:: hidden.core.v1.containerStateWaiting, - }, - stateType:: hidden.core.v1.containerState, - }, - }, - // DaemonEndpoint contains information about a single Daemon endpoint. - daemonEndpoint:: { - new():: {}, - // Port number of the given endpoint. - port(port):: {Port: port}, - mixin:: { - }, - }, - // Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode. - downwardApiProjection:: { - new():: {}, - // Items is a list of DownwardAPIVolume file - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.downwardApiVolumeFile, - mixin:: { - }, - }, - // DownwardAPIVolumeFile represents information to create the file containing the pod field - downwardApiVolumeFile:: { - new():: {}, - // Optional: mode bits to use on this file, must be a value between 0 and 0777. 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(mode):: {mode: mode}, - // 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(path):: {path: path}, - mixin:: { - // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. - fieldRef:: { - local __fieldRefMixin(fieldRef) = {fieldRef+: fieldRef}, - mixinInstance(fieldRef):: __fieldRefMixin(fieldRef), - // Path of the field to select in the specified API version. - fieldPath(fieldPath):: __fieldRefMixin({fieldPath: fieldPath}), - }, - fieldRefType:: hidden.core.v1.objectFieldSelector, - // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - resourceFieldRef:: { - local __resourceFieldRefMixin(resourceFieldRef) = {resourceFieldRef+: resourceFieldRef}, - mixinInstance(resourceFieldRef):: __resourceFieldRefMixin(resourceFieldRef), - // Container name: required for volumes, optional for env vars - containerName(containerName):: __resourceFieldRefMixin({containerName: containerName}), - // Specifies the output format of the exposed resources, defaults to "1" - divisor:: { - local __divisorMixin(divisor) = __resourceFieldRefMixin({divisor+: divisor}), - mixinInstance(divisor):: __divisorMixin(divisor), - }, - divisorType:: hidden.core.resource.quantity, - // Required: resource to select - resource(resource):: __resourceFieldRefMixin({resource: resource}), - }, - resourceFieldRefType:: hidden.core.v1.resourceFieldSelector, - }, - }, - // DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. - downwardApiVolumeSource:: { - new():: {}, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: defaultMode}, - // Items is a list of downward API volume file - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.downwardApiVolumeFile, - mixin:: { - }, - }, - // Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling. - emptyDirVolumeSource:: { - new():: {}, - // 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(medium):: {medium: medium}, - mixin:: { - // 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:: { - local __sizeLimitMixin(sizeLimit) = {sizeLimit+: sizeLimit}, - mixinInstance(sizeLimit):: __sizeLimitMixin(sizeLimit), - }, - sizeLimitType:: hidden.core.resource.quantity, - }, - }, - // EndpointAddress is a tuple that describes single IP address. - endpointAddress:: { - new():: {}, - // The Hostname of this endpoint - hostname(hostname):: {hostname: hostname}, - // 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(ip):: {ip: ip}, - // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. - nodeName(nodeName):: {nodeName: nodeName}, - mixin:: { - // Reference to object providing the endpoint. - targetRef:: { - local __targetRefMixin(targetRef) = {targetRef+: targetRef}, - mixinInstance(targetRef):: __targetRefMixin(targetRef), - // 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(fieldPath):: __targetRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __targetRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - namespace(namespace):: __targetRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __targetRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - uid(uid):: __targetRefMixin({uid: uid}), - }, - targetRefType:: hidden.core.v1.objectReference, - }, - }, - // EndpointPort is a tuple that describes a single port. - endpointPort:: { - new():: {}, - // The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined. - name(name):: {name: name}, - // The port number of the endpoint. - port(port):: {port: port}, - // The IP protocol for this port. Must be UDP or TCP. Default is TCP. - protocol(protocol):: {protocol: protocol}, - mixin:: { - }, - }, - // 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 ] - endpointSubset:: { - new():: {}, - // 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(addresses):: if std.type(addresses) == "array" then {addresses+: addresses} else {addresses+: [addresses]}, - addressesType:: hidden.core.v1.endpointAddress, - // 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(notReadyAddresses):: if std.type(notReadyAddresses) == "array" then {notReadyAddresses+: notReadyAddresses} else {notReadyAddresses+: [notReadyAddresses]}, - notReadyAddressesType:: hidden.core.v1.endpointAddress, - // Port numbers available on the related IP addresses. - ports(ports):: if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - portsType:: hidden.core.v1.endpointPort, - mixin:: { - }, - }, - // EnvFromSource represents the source of a set of ConfigMaps - envFromSource:: { - new():: {}, - // An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - prefix(prefix):: {prefix: prefix}, - mixin:: { - // The ConfigMap to select from - configMapRef:: { - local __configMapRefMixin(configMapRef) = {configMapRef+: configMapRef}, - mixinInstance(configMapRef):: __configMapRefMixin(configMapRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __configMapRefMixin({name: name}), - // Specify whether the ConfigMap must be defined - optional(optional):: __configMapRefMixin({optional: optional}), - }, - configMapRefType:: hidden.core.v1.configMapEnvSource, - // The Secret to select from - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - // Specify whether the Secret must be defined - optional(optional):: __secretRefMixin({optional: optional}), - }, - secretRefType:: hidden.core.v1.secretEnvSource, - }, - }, - // EnvVar represents an environment variable present in a Container. - envVar:: { - new(name, value):: {} + self.name(name) + self.value(value), - fromSecretRef(name, secretRefName, secretRefKey):: {} + self.name(name) + self.mixin.valueFrom.secretKeyRef.name(secretRefName) + self.mixin.valueFrom.secretKeyRef.key(secretRefKey), - fromFieldPath(name, fieldPath):: {} + self.name(name) + self.mixin.valueFrom.fieldRef.fieldPath(fieldPath), - // Name of the environment variable. Must be a C_IDENTIFIER. - name(name):: {name: name}, - // Variable references $(VAR_NAME) are expanded using the previous 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". - value(value):: {value: value}, - mixin:: { - // Source for the environment variable's value. Cannot be used if value is not empty. - valueFrom:: { - local __valueFromMixin(valueFrom) = {valueFrom+: valueFrom}, - mixinInstance(valueFrom):: __valueFromMixin(valueFrom), - // Selects a key of a ConfigMap. - configMapKeyRef:: { - local __configMapKeyRefMixin(configMapKeyRef) = __valueFromMixin({configMapKeyRef+: configMapKeyRef}), - mixinInstance(configMapKeyRef):: __configMapKeyRefMixin(configMapKeyRef), - // The key to select. - key(key):: __configMapKeyRefMixin({key: key}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __configMapKeyRefMixin({name: name}), - // Specify whether the ConfigMap or it's key must be defined - optional(optional):: __configMapKeyRefMixin({optional: optional}), - }, - configMapKeyRefType:: hidden.core.v1.configMapKeySelector, - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP. - fieldRef:: { - local __fieldRefMixin(fieldRef) = __valueFromMixin({fieldRef+: fieldRef}), - mixinInstance(fieldRef):: __fieldRefMixin(fieldRef), - // Path of the field to select in the specified API version. - fieldPath(fieldPath):: __fieldRefMixin({fieldPath: fieldPath}), - }, - fieldRefType:: hidden.core.v1.objectFieldSelector, - // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - resourceFieldRef:: { - local __resourceFieldRefMixin(resourceFieldRef) = __valueFromMixin({resourceFieldRef+: resourceFieldRef}), - mixinInstance(resourceFieldRef):: __resourceFieldRefMixin(resourceFieldRef), - // Container name: required for volumes, optional for env vars - containerName(containerName):: __resourceFieldRefMixin({containerName: containerName}), - // Specifies the output format of the exposed resources, defaults to "1" - divisor:: { - local __divisorMixin(divisor) = __resourceFieldRefMixin({divisor+: divisor}), - mixinInstance(divisor):: __divisorMixin(divisor), - }, - divisorType:: hidden.core.resource.quantity, - // Required: resource to select - resource(resource):: __resourceFieldRefMixin({resource: resource}), - }, - resourceFieldRefType:: hidden.core.v1.resourceFieldSelector, - // Selects a key of a secret in the pod's namespace - secretKeyRef:: { - local __secretKeyRefMixin(secretKeyRef) = __valueFromMixin({secretKeyRef+: secretKeyRef}), - mixinInstance(secretKeyRef):: __secretKeyRefMixin(secretKeyRef), - // The key of the secret to select from. Must be a valid secret key. - key(key):: __secretKeyRefMixin({key: key}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretKeyRefMixin({name: name}), - // Specify whether the Secret or it's key must be defined - optional(optional):: __secretKeyRefMixin({optional: optional}), - }, - secretKeyRefType:: hidden.core.v1.secretKeySelector, - }, - valueFromType:: hidden.core.v1.envVarSource, - }, - }, - // EnvVarSource represents a source for the value of an EnvVar. - envVarSource:: { - new():: {}, - mixin:: { - // Selects a key of a ConfigMap. - configMapKeyRef:: { - local __configMapKeyRefMixin(configMapKeyRef) = {configMapKeyRef+: configMapKeyRef}, - mixinInstance(configMapKeyRef):: __configMapKeyRefMixin(configMapKeyRef), - // The key to select. - key(key):: __configMapKeyRefMixin({key: key}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __configMapKeyRefMixin({name: name}), - // Specify whether the ConfigMap or it's key must be defined - optional(optional):: __configMapKeyRefMixin({optional: optional}), - }, - configMapKeyRefType:: hidden.core.v1.configMapKeySelector, - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP. - fieldRef:: { - local __fieldRefMixin(fieldRef) = {fieldRef+: fieldRef}, - mixinInstance(fieldRef):: __fieldRefMixin(fieldRef), - // Path of the field to select in the specified API version. - fieldPath(fieldPath):: __fieldRefMixin({fieldPath: fieldPath}), - }, - fieldRefType:: hidden.core.v1.objectFieldSelector, - // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - resourceFieldRef:: { - local __resourceFieldRefMixin(resourceFieldRef) = {resourceFieldRef+: resourceFieldRef}, - mixinInstance(resourceFieldRef):: __resourceFieldRefMixin(resourceFieldRef), - // Container name: required for volumes, optional for env vars - containerName(containerName):: __resourceFieldRefMixin({containerName: containerName}), - // Specifies the output format of the exposed resources, defaults to "1" - divisor:: { - local __divisorMixin(divisor) = __resourceFieldRefMixin({divisor+: divisor}), - mixinInstance(divisor):: __divisorMixin(divisor), - }, - divisorType:: hidden.core.resource.quantity, - // Required: resource to select - resource(resource):: __resourceFieldRefMixin({resource: resource}), - }, - resourceFieldRefType:: hidden.core.v1.resourceFieldSelector, - // Selects a key of a secret in the pod's namespace - secretKeyRef:: { - local __secretKeyRefMixin(secretKeyRef) = {secretKeyRef+: secretKeyRef}, - mixinInstance(secretKeyRef):: __secretKeyRefMixin(secretKeyRef), - // The key of the secret to select from. Must be a valid secret key. - key(key):: __secretKeyRefMixin({key: key}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretKeyRefMixin({name: name}), - // Specify whether the Secret or it's key must be defined - optional(optional):: __secretKeyRefMixin({optional: optional}), - }, - secretKeyRefType:: hidden.core.v1.secretKeySelector, - }, - }, - // EventSource contains information for an event. - eventSource:: { - new():: {}, - // Component from which the event is generated. - component(component):: {component: component}, - // Node name on which the event is generated. - host(host):: {host: host}, - mixin:: { - }, - }, - // ExecAction describes a "run in container" action. - execAction:: { - new():: {}, - // 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(command):: if std.type(command) == "array" then {command+: command} else {command+: [command]}, - mixin:: { - }, - }, - // 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. - fcVolumeSource:: { - new():: {}, - // 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(fsType):: {fsType: fsType}, - // Required: FC target lun number - lun(lun):: {lun: lun}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // Required: FC target worldwide names (WWNs) - targetWwns(targetWwns):: if std.type(targetWwns) == "array" then {targetWWNs+: targetWwns} else {targetWWNs+: [targetWwns]}, - mixin:: { - }, - }, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - flexVolumeSource:: { - new():: {}, - // Driver is the name of the driver to use for this volume. - driver(driver):: {driver: 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(fsType):: {fsType: fsType}, - // Optional: Extra command options if any. - options(options):: {options+: options}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - mixin:: { - // 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:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // 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. - flockerVolumeSource:: { - new():: {}, - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - datasetName(datasetName):: {datasetName: datasetName}, - // UUID of the dataset. This is unique identifier of a Flocker dataset - datasetUuid(datasetUuid):: {datasetUUID: datasetUuid}, - mixin:: { - }, - }, - // 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. - gcePersistentDiskVolumeSource:: { - new():: {}, - // 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(fsType):: {fsType: 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(partition):: {partition: partition}, - // 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(pdName):: {pdName: pdName}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - readOnly(readOnly):: {readOnly: readOnly}, - mixin:: { - }, - }, - // 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. - gitRepoVolumeSource:: { - new():: {}, - // 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(directory):: {directory: directory}, - // Repository URL - repository(repository):: {repository: repository}, - // Commit hash for the specified revision. - revision(revision):: {revision: revision}, - mixin:: { - }, - }, - // Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. - glusterfsVolumeSource:: { - new():: {}, - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - endpoints(endpoints):: {endpoints: endpoints}, - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - path(path):: {path: path}, - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - readOnly(readOnly):: {readOnly: readOnly}, - mixin:: { - }, - }, - // HTTPGetAction describes an action based on HTTP Get requests. - httpGetAction:: { - new():: {}, - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host(host):: {host: host}, - // Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders(httpHeaders):: if std.type(httpHeaders) == "array" then {httpHeaders+: httpHeaders} else {httpHeaders+: [httpHeaders]}, - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - path(path):: {path: path}, - // 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(port):: {port: port}, - // Scheme to use for connecting to the host. Defaults to HTTP. - scheme(scheme):: {scheme: scheme}, - mixin:: { - }, - }, - // HTTPHeader describes a custom header to be used in HTTP probes - httpHeader:: { - new():: {}, - // The header field name - name(name):: {name: name}, - // The header field value - value(value):: {value: value}, - mixin:: { - }, - }, - // Handler defines a specific action that should be taken - handler:: { - new():: {}, - mixin:: { - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = {exec+: exec}, - mixinInstance(exec):: __execMixin(exec), - // 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(command):: if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = {httpGet+: httpGet}, - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host(host):: __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders(httpHeaders):: if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - path(path):: __httpGetMixin({path: path}), - // 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(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - scheme(scheme):: __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = {tcpSocket+: tcpSocket}, - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - host(host):: __tcpSocketMixin({host: host}), - // 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(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - }, - // HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. - hostAlias:: { - new():: {}, - // Hostnames for the above IP address. - hostnames(hostnames):: if std.type(hostnames) == "array" then {hostnames+: hostnames} else {hostnames+: [hostnames]}, - // IP address of the host file entry. - ip(ip):: {ip: ip}, - mixin:: { - }, - }, - // Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling. - hostPathVolumeSource:: { - new():: {}, - // Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - path(path):: {path: path}, - mixin:: { - }, - }, - // Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. - iscsiVolumeSource:: { - new():: {}, - // whether support iSCSI Discovery CHAP authentication - chapAuthDiscovery(chapAuthDiscovery):: {chapAuthDiscovery: chapAuthDiscovery}, - // whether support iSCSI Session CHAP authentication - chapAuthSession(chapAuthSession):: {chapAuthSession: 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(fsType):: {fsType: fsType}, - // Target iSCSI Qualified Name. - iqn(iqn):: {iqn: iqn}, - // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. - iscsiInterface(iscsiInterface):: {iscsiInterface: iscsiInterface}, - // iSCSI target lun number. - lun(lun):: {lun: lun}, - // 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(portals):: if std.type(portals) == "array" then {portals+: portals} else {portals+: [portals]}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - readOnly(readOnly):: {readOnly: readOnly}, - // 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(targetPortal):: {targetPortal: targetPortal}, - mixin:: { - // CHAP secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // Maps a string key to a path within a volume. - keyToPath:: { - new(key, path):: {} + self.key(key) + self.path(path), - // The key to project. - key(key):: {key: key}, - // Optional: mode bits to use on this file, must be a value between 0 and 0777. 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(mode):: {mode: mode}, - // 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(path):: {path: path}, - mixin:: { - }, - }, - // 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. - lifecycle:: { - new():: {}, - mixin:: { - // 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:: { - local __postStartMixin(postStart) = {postStart+: postStart}, - mixinInstance(postStart):: __postStartMixin(postStart), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __postStartMixin({exec+: exec}), - mixinInstance(exec):: __execMixin(exec), - // 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(command):: if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __postStartMixin({httpGet+: httpGet}), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host(host):: __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders(httpHeaders):: if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - path(path):: __httpGetMixin({path: path}), - // 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(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - scheme(scheme):: __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __postStartMixin({tcpSocket+: tcpSocket}), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - host(host):: __tcpSocketMixin({host: host}), - // 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(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - postStartType:: hidden.core.v1.handler, - // PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - preStop:: { - local __preStopMixin(preStop) = {preStop+: preStop}, - mixinInstance(preStop):: __preStopMixin(preStop), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __preStopMixin({exec+: exec}), - mixinInstance(exec):: __execMixin(exec), - // 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(command):: if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __preStopMixin({httpGet+: httpGet}), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host(host):: __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders(httpHeaders):: if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - path(path):: __httpGetMixin({path: path}), - // 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(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - scheme(scheme):: __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __preStopMixin({tcpSocket+: tcpSocket}), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - host(host):: __tcpSocketMixin({host: host}), - // 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(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - preStopType:: hidden.core.v1.handler, - }, - }, - // LimitRangeItem defines a min/max usage limit for any resource that matches on kind. - limitRangeItem:: { - new():: {}, - // Default resource requirement limit value by resource name if resource limit is omitted. - default(default):: {default+: default}, - // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. - defaultRequest(defaultRequest):: {defaultRequest+: defaultRequest}, - // Max usage constraints on this kind by resource name. - max(max):: {max+: 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(maxLimitRequestRatio):: {maxLimitRequestRatio+: maxLimitRequestRatio}, - // Min usage constraints on this kind by resource name. - min(min):: {min+: min}, - // Type of resource that this limit applies to. - type(type):: {type: type}, - mixin:: { - }, - }, - // LimitRangeSpec defines a min/max usage limit for resources that match on kind. - limitRangeSpec:: { - new():: {}, - // Limits is the list of LimitRangeItem objects that are enforced. - limits(limits):: if std.type(limits) == "array" then {limits+: limits} else {limits+: [limits]}, - limitsType:: hidden.core.v1.limitRangeItem, - mixin:: { - }, - }, - // LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point. - loadBalancerIngress:: { - new():: {}, - // Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers) - hostname(hostname):: {hostname: hostname}, - // IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers) - ip(ip):: {ip: ip}, - mixin:: { - }, - }, - // LoadBalancerStatus represents the status of a load-balancer. - loadBalancerStatus:: { - new():: {}, - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - ingress(ingress):: if std.type(ingress) == "array" then {ingress+: ingress} else {ingress+: [ingress]}, - ingressType:: hidden.core.v1.loadBalancerIngress, - mixin:: { - }, - }, - // LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - localObjectReference:: { - new():: {}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - mixin:: { - }, - }, - // Local represents directly-attached storage with node affinity - localVolumeSource:: { - new():: {}, - // The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device - path(path):: {path: path}, - mixin:: { - }, - }, - // Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling. - nfsVolumeSource:: { - new():: {}, - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - path(path):: {path: path}, - // 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(readOnly):: {readOnly: readOnly}, - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - server(server):: {server: server}, - mixin:: { - }, - }, - // NamespaceSpec describes the attributes on a Namespace. - namespaceSpec:: { - new():: {}, - // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers - finalizers(finalizers):: if std.type(finalizers) == "array" then {finalizers+: finalizers} else {finalizers+: [finalizers]}, - mixin:: { - }, - }, - // NamespaceStatus is information about the current status of a Namespace. - namespaceStatus:: { - new():: {}, - // Phase is the current lifecycle phase of the namespace. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#phases - phase(phase):: {phase: phase}, - mixin:: { - }, - }, - // NodeAddress contains information for the node's address. - nodeAddress:: { - new():: {}, - // The node address. - address(address):: {address: address}, - // Node address type, one of Hostname, ExternalIP or InternalIP. - type(type):: {type: type}, - mixin:: { - }, - }, - // Node affinity is a group of node affinity scheduling rules. - nodeAffinity:: { - new():: {}, - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - mixin:: { - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}, - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - }, - // NodeCondition contains condition information for a node. - nodeCondition:: { - new():: {}, - // Human readable message indicating details about last transition. - message(message):: {message: message}, - // (brief) reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Type of node condition. - type(type):: {type: type}, - mixin:: { - // Last time we got an update on a given condition. - lastHeartbeatTime:: { - local __lastHeartbeatTimeMixin(lastHeartbeatTime) = {lastHeartbeatTime+: lastHeartbeatTime}, - mixinInstance(lastHeartbeatTime):: __lastHeartbeatTimeMixin(lastHeartbeatTime), - }, - lastHeartbeatTimeType:: hidden.meta.v1.time, - // Last time the condition transit from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // NodeDaemonEndpoints lists ports opened by daemons running on the Node. - nodeDaemonEndpoints:: { - new():: {}, - mixin:: { - // Endpoint on which Kubelet is listening. - kubeletEndpoint:: { - local __kubeletEndpointMixin(kubeletEndpoint) = {kubeletEndpoint+: kubeletEndpoint}, - mixinInstance(kubeletEndpoint):: __kubeletEndpointMixin(kubeletEndpoint), - // Port number of the given endpoint. - port(port):: __kubeletEndpointMixin({Port: port}), - }, - kubeletEndpointType:: hidden.core.v1.daemonEndpoint, - }, - }, - // 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. - nodeSelector:: { - new():: {}, - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then {nodeSelectorTerms+: nodeSelectorTerms} else {nodeSelectorTerms+: [nodeSelectorTerms]}, - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - mixin:: { - }, - }, - // A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - nodeSelectorRequirement:: { - new():: {}, - // The label key that the selector applies to. - key(key):: {key: key}, - // Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - operator(operator):: {operator: 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(values):: if std.type(values) == "array" then {values+: values} else {values+: [values]}, - mixin:: { - }, - }, - // A null or empty node selector term matches no objects. - nodeSelectorTerm:: { - new():: {}, - // Required. A list of node selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then {matchExpressions+: matchExpressions} else {matchExpressions+: [matchExpressions]}, - matchExpressionsType:: hidden.core.v1.nodeSelectorRequirement, - mixin:: { - }, - }, - // NodeSpec describes the attributes that a node is created with. - nodeSpec:: { - new():: {}, - // External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated. - externalId(externalId):: {externalID: externalId}, - // PodCIDR represents the pod IP range assigned to the node. - podCidr(podCidr):: {podCIDR: podCidr}, - // ID of the node assigned by the cloud provider in the format: :// - providerId(providerId):: {providerID: providerId}, - // If specified, the node's taints. - taints(taints):: if std.type(taints) == "array" then {taints+: taints} else {taints+: [taints]}, - taintsType:: hidden.core.v1.taint, - // 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(unschedulable):: {unschedulable: unschedulable}, - mixin:: { - }, - }, - // NodeStatus is information about the current status of a node. - nodeStatus:: { - new():: {}, - // List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses - addresses(addresses):: if std.type(addresses) == "array" then {addresses+: addresses} else {addresses+: [addresses]}, - addressesType:: hidden.core.v1.nodeAddress, - // Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity. - allocatable(allocatable):: {allocatable+: allocatable}, - // Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - capacity(capacity):: {capacity+: capacity}, - // Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.core.v1.nodeCondition, - // List of container images on this node - images(images):: if std.type(images) == "array" then {images+: images} else {images+: [images]}, - imagesType:: hidden.core.v1.containerImage, - // NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated. - phase(phase):: {phase: phase}, - // List of volumes that are attached to the node. - volumesAttached(volumesAttached):: if std.type(volumesAttached) == "array" then {volumesAttached+: volumesAttached} else {volumesAttached+: [volumesAttached]}, - volumesAttachedType:: hidden.core.v1.attachedVolume, - // List of attachable volumes in use (mounted) by the node. - volumesInUse(volumesInUse):: if std.type(volumesInUse) == "array" then {volumesInUse+: volumesInUse} else {volumesInUse+: [volumesInUse]}, - mixin:: { - // Endpoints of daemons running on the Node. - daemonEndpoints:: { - local __daemonEndpointsMixin(daemonEndpoints) = {daemonEndpoints+: daemonEndpoints}, - mixinInstance(daemonEndpoints):: __daemonEndpointsMixin(daemonEndpoints), - // Endpoint on which Kubelet is listening. - kubeletEndpoint:: { - local __kubeletEndpointMixin(kubeletEndpoint) = __daemonEndpointsMixin({kubeletEndpoint+: kubeletEndpoint}), - mixinInstance(kubeletEndpoint):: __kubeletEndpointMixin(kubeletEndpoint), - // Port number of the given endpoint. - port(port):: __kubeletEndpointMixin({Port: port}), - }, - kubeletEndpointType:: hidden.core.v1.daemonEndpoint, - }, - daemonEndpointsType:: hidden.core.v1.nodeDaemonEndpoints, - // Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info - nodeInfo:: { - local __nodeInfoMixin(nodeInfo) = {nodeInfo+: nodeInfo}, - mixinInstance(nodeInfo):: __nodeInfoMixin(nodeInfo), - // The Architecture reported by the node - architecture(architecture):: __nodeInfoMixin({architecture: architecture}), - // Boot ID reported by the node. - bootId(bootId):: __nodeInfoMixin({bootID: bootId}), - // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). - containerRuntimeVersion(containerRuntimeVersion):: __nodeInfoMixin({containerRuntimeVersion: containerRuntimeVersion}), - // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). - kernelVersion(kernelVersion):: __nodeInfoMixin({kernelVersion: kernelVersion}), - // KubeProxy Version reported by the node. - kubeProxyVersion(kubeProxyVersion):: __nodeInfoMixin({kubeProxyVersion: kubeProxyVersion}), - // Kubelet Version reported by the node. - kubeletVersion(kubeletVersion):: __nodeInfoMixin({kubeletVersion: kubeletVersion}), - // MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - machineId(machineId):: __nodeInfoMixin({machineID: machineId}), - // The Operating System reported by the node - operatingSystem(operatingSystem):: __nodeInfoMixin({operatingSystem: operatingSystem}), - // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). - osImage(osImage):: __nodeInfoMixin({osImage: osImage}), - // SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html - systemUuid(systemUuid):: __nodeInfoMixin({systemUUID: systemUuid}), - }, - nodeInfoType:: hidden.core.v1.nodeSystemInfo, - }, - }, - // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. - nodeSystemInfo:: { - new():: {}, - // The Architecture reported by the node - architecture(architecture):: {architecture: architecture}, - // Boot ID reported by the node. - bootId(bootId):: {bootID: bootId}, - // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). - containerRuntimeVersion(containerRuntimeVersion):: {containerRuntimeVersion: containerRuntimeVersion}, - // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). - kernelVersion(kernelVersion):: {kernelVersion: kernelVersion}, - // KubeProxy Version reported by the node. - kubeProxyVersion(kubeProxyVersion):: {kubeProxyVersion: kubeProxyVersion}, - // Kubelet Version reported by the node. - kubeletVersion(kubeletVersion):: {kubeletVersion: kubeletVersion}, - // MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - machineId(machineId):: {machineID: machineId}, - // The Operating System reported by the node - operatingSystem(operatingSystem):: {operatingSystem: operatingSystem}, - // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). - osImage(osImage):: {osImage: osImage}, - // SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html - systemUuid(systemUuid):: {systemUUID: systemUuid}, - mixin:: { - }, - }, - // ObjectFieldSelector selects an APIVersioned field of an object. - objectFieldSelector:: { - new():: {}, - // Path of the field to select in the specified API version. - fieldPath(fieldPath):: {fieldPath: fieldPath}, - mixin:: { - }, - }, - // ObjectReference contains enough information to let you inspect or modify the referred object. - objectReference:: { - new():: {}, - // 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(fieldPath):: {fieldPath: fieldPath}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - namespace(namespace):: {namespace: namespace}, - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: {resourceVersion: resourceVersion}, - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - uid(uid):: {uid: uid}, - mixin:: { - }, - }, - // PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes - persistentVolumeClaimSpec:: { - new():: {}, - // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - accessModes(accessModes):: if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, - // Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - storageClassName(storageClassName):: {storageClassName: storageClassName}, - // VolumeName is the binding reference to the PersistentVolume backing this claim. - volumeName(volumeName):: {volumeName: volumeName}, - mixin:: { - // Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources:: { - local __resourcesMixin(resources) = {resources+: resources}, - mixinInstance(resources):: __resourcesMixin(resources), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - limits(limits):: __resourcesMixin({limits+: 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-compute-resources-container/ - requests(requests):: __resourcesMixin({requests+: requests}), - }, - resourcesType:: hidden.core.v1.resourceRequirements, - // A label query over volumes to consider for binding. - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - }, - // PersistentVolumeClaimStatus is the current status of a persistent volume claim. - persistentVolumeClaimStatus:: { - new():: {}, - // AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - accessModes(accessModes):: if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, - // Represents the actual resources of the underlying volume. - capacity(capacity):: {capacity+: capacity}, - // Phase represents the current phase of PersistentVolumeClaim. - phase(phase):: {phase: phase}, - mixin:: { - }, - }, - // 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). - persistentVolumeClaimVolumeSource:: { - new():: {}, - // 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(claimName):: {claimName: claimName}, - // Will force the ReadOnly setting in VolumeMounts. Default false. - readOnly(readOnly):: {readOnly: readOnly}, - mixin:: { - }, - }, - // PersistentVolumeSpec is the specification of a persistent volume. - persistentVolumeSpec:: { - new():: {}, - // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - accessModes(accessModes):: if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, - // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - capacity(capacity):: {capacity+: capacity}, - // What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming - persistentVolumeReclaimPolicy(persistentVolumeReclaimPolicy):: {persistentVolumeReclaimPolicy: persistentVolumeReclaimPolicy}, - // Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass. - storageClassName(storageClassName):: {storageClassName: storageClassName}, - mixin:: { - // 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:: { - local __awsElasticBlockStoreMixin(awsElasticBlockStore) = {awsElasticBlockStore+: awsElasticBlockStore}, - mixinInstance(awsElasticBlockStore):: __awsElasticBlockStoreMixin(awsElasticBlockStore), - // 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(fsType):: __awsElasticBlockStoreMixin({fsType: 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(partition):: __awsElasticBlockStoreMixin({partition: 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(readOnly):: __awsElasticBlockStoreMixin({readOnly: readOnly}), - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - volumeId(volumeId):: __awsElasticBlockStoreMixin({volumeID: volumeId}), - }, - awsElasticBlockStoreType:: hidden.core.v1.awsElasticBlockStoreVolumeSource, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk:: { - local __azureDiskMixin(azureDisk) = {azureDisk+: azureDisk}, - mixinInstance(azureDisk):: __azureDiskMixin(azureDisk), - // Host Caching mode: None, Read Only, Read Write. - cachingMode(cachingMode):: __azureDiskMixin({cachingMode: cachingMode}), - // The Name of the data disk in the blob storage - diskName(diskName):: __azureDiskMixin({diskName: diskName}), - // The URI the data disk in the blob storage - diskUri(diskUri):: __azureDiskMixin({diskURI: diskUri}), - // 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(fsType):: __azureDiskMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __azureDiskMixin({readOnly: readOnly}), - }, - azureDiskType:: hidden.core.v1.azureDiskVolumeSource, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile:: { - local __azureFileMixin(azureFile) = {azureFile+: azureFile}, - mixinInstance(azureFile):: __azureFileMixin(azureFile), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __azureFileMixin({readOnly: readOnly}), - // the name of secret that contains Azure Storage Account Name and Key - secretName(secretName):: __azureFileMixin({secretName: secretName}), - // Share Name - shareName(shareName):: __azureFileMixin({shareName: shareName}), - }, - azureFileType:: hidden.core.v1.azureFileVolumeSource, - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs:: { - local __cephfsMixin(cephfs) = {cephfs+: cephfs}, - mixinInstance(cephfs):: __cephfsMixin(cephfs), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then __cephfsMixin({monitors+: monitors}) else __cephfsMixin({monitors+: [monitors]}), - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - path(path):: __cephfsMixin({path: path}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - readOnly(readOnly):: __cephfsMixin({readOnly: readOnly}), - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretFile(secretFile):: __cephfsMixin({secretFile: secretFile}), - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __cephfsMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - user(user):: __cephfsMixin({user: user}), - }, - cephfsType:: hidden.core.v1.cephFsVolumeSource, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder:: { - local __cinderMixin(cinder) = {cinder+: cinder}, - mixinInstance(cinder):: __cinderMixin(cinder), - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - fsType(fsType):: __cinderMixin({fsType: fsType}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - readOnly(readOnly):: __cinderMixin({readOnly: readOnly}), - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - volumeId(volumeId):: __cinderMixin({volumeID: volumeId}), - }, - cinderType:: hidden.core.v1.cinderVolumeSource, - // 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:: { - local __claimRefMixin(claimRef) = {claimRef+: claimRef}, - mixinInstance(claimRef):: __claimRefMixin(claimRef), - // 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(fieldPath):: __claimRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __claimRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - namespace(namespace):: __claimRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __claimRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - uid(uid):: __claimRefMixin({uid: uid}), - }, - claimRefType:: hidden.core.v1.objectReference, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc:: { - local __fcMixin(fc) = {fc+: fc}, - mixinInstance(fc):: __fcMixin(fc), - // 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(fsType):: __fcMixin({fsType: fsType}), - // Required: FC target lun number - lun(lun):: __fcMixin({lun: lun}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __fcMixin({readOnly: readOnly}), - // Required: FC target worldwide names (WWNs) - targetWwns(targetWwns):: if std.type(targetWwns) == "array" then __fcMixin({targetWWNs+: targetWwns}) else __fcMixin({targetWWNs+: [targetWwns]}), - }, - fcType:: hidden.core.v1.fcVolumeSource, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - flexVolume:: { - local __flexVolumeMixin(flexVolume) = {flexVolume+: flexVolume}, - mixinInstance(flexVolume):: __flexVolumeMixin(flexVolume), - // Driver is the name of the driver to use for this volume. - driver(driver):: __flexVolumeMixin({driver: 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(fsType):: __flexVolumeMixin({fsType: fsType}), - // Optional: Extra command options if any. - options(options):: __flexVolumeMixin({options+: options}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __flexVolumeMixin({readOnly: 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:: { - local __secretRefMixin(secretRef) = __flexVolumeMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - flexVolumeType:: hidden.core.v1.flexVolumeSource, - // 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:: { - local __flockerMixin(flocker) = {flocker+: flocker}, - mixinInstance(flocker):: __flockerMixin(flocker), - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - datasetName(datasetName):: __flockerMixin({datasetName: datasetName}), - // UUID of the dataset. This is unique identifier of a Flocker dataset - datasetUuid(datasetUuid):: __flockerMixin({datasetUUID: datasetUuid}), - }, - flockerType:: hidden.core.v1.flockerVolumeSource, - // 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:: { - local __gcePersistentDiskMixin(gcePersistentDisk) = {gcePersistentDisk+: gcePersistentDisk}, - mixinInstance(gcePersistentDisk):: __gcePersistentDiskMixin(gcePersistentDisk), - // 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(fsType):: __gcePersistentDiskMixin({fsType: 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(partition):: __gcePersistentDiskMixin({partition: partition}), - // 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(pdName):: __gcePersistentDiskMixin({pdName: pdName}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - readOnly(readOnly):: __gcePersistentDiskMixin({readOnly: readOnly}), - }, - gcePersistentDiskType:: hidden.core.v1.gcePersistentDiskVolumeSource, - // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs:: { - local __glusterfsMixin(glusterfs) = {glusterfs+: glusterfs}, - mixinInstance(glusterfs):: __glusterfsMixin(glusterfs), - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - endpoints(endpoints):: __glusterfsMixin({endpoints: endpoints}), - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - path(path):: __glusterfsMixin({path: path}), - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - readOnly(readOnly):: __glusterfsMixin({readOnly: readOnly}), - }, - glusterfsType:: hidden.core.v1.glusterfsVolumeSource, - // 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:: { - local __hostPathMixin(hostPath) = {hostPath+: hostPath}, - mixinInstance(hostPath):: __hostPathMixin(hostPath), - // Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - path(path):: __hostPathMixin({path: path}), - }, - hostPathType:: hidden.core.v1.hostPathVolumeSource, - // 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:: { - local __iscsiMixin(iscsi) = {iscsi+: iscsi}, - mixinInstance(iscsi):: __iscsiMixin(iscsi), - // whether support iSCSI Discovery CHAP authentication - chapAuthDiscovery(chapAuthDiscovery):: __iscsiMixin({chapAuthDiscovery: chapAuthDiscovery}), - // whether support iSCSI Session CHAP authentication - chapAuthSession(chapAuthSession):: __iscsiMixin({chapAuthSession: 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(fsType):: __iscsiMixin({fsType: fsType}), - // Target iSCSI Qualified Name. - iqn(iqn):: __iscsiMixin({iqn: iqn}), - // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. - iscsiInterface(iscsiInterface):: __iscsiMixin({iscsiInterface: iscsiInterface}), - // iSCSI target lun number. - lun(lun):: __iscsiMixin({lun: lun}), - // 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(portals):: if std.type(portals) == "array" then __iscsiMixin({portals+: portals}) else __iscsiMixin({portals+: [portals]}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - readOnly(readOnly):: __iscsiMixin({readOnly: readOnly}), - // CHAP secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = __iscsiMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // 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(targetPortal):: __iscsiMixin({targetPortal: targetPortal}), - }, - iscsiType:: hidden.core.v1.iscsiVolumeSource, - // Local represents directly-attached storage with node affinity - localStorage:: { - local __localStorageMixin(localStorage) = {"local"+: localStorage}, - mixinInstance(localStorage):: __localStorageMixin(localStorage), - // The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device - path(path):: __localStorageMixin({path: path}), - }, - localStorageType:: hidden.core.v1.localVolumeSource, - // NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - nfs:: { - local __nfsMixin(nfs) = {nfs+: nfs}, - mixinInstance(nfs):: __nfsMixin(nfs), - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - path(path):: __nfsMixin({path: path}), - // 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(readOnly):: __nfsMixin({readOnly: readOnly}), - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - server(server):: __nfsMixin({server: server}), - }, - nfsType:: hidden.core.v1.nfsVolumeSource, - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk:: { - local __photonPersistentDiskMixin(photonPersistentDisk) = {photonPersistentDisk+: photonPersistentDisk}, - mixinInstance(photonPersistentDisk):: __photonPersistentDiskMixin(photonPersistentDisk), - // 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(fsType):: __photonPersistentDiskMixin({fsType: fsType}), - // ID that identifies Photon Controller persistent disk - pdId(pdId):: __photonPersistentDiskMixin({pdID: pdId}), - }, - photonPersistentDiskType:: hidden.core.v1.photonPersistentDiskVolumeSource, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume:: { - local __portworxVolumeMixin(portworxVolume) = {portworxVolume+: portworxVolume}, - mixinInstance(portworxVolume):: __portworxVolumeMixin(portworxVolume), - // 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(fsType):: __portworxVolumeMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __portworxVolumeMixin({readOnly: readOnly}), - // VolumeID uniquely identifies a Portworx volume - volumeId(volumeId):: __portworxVolumeMixin({volumeID: volumeId}), - }, - portworxVolumeType:: hidden.core.v1.portworxVolumeSource, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte:: { - local __quobyteMixin(quobyte) = {quobyte+: quobyte}, - mixinInstance(quobyte):: __quobyteMixin(quobyte), - // Group to map volume access to Default is no group - group(group):: __quobyteMixin({group: group}), - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - readOnly(readOnly):: __quobyteMixin({readOnly: readOnly}), - // 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(registry):: __quobyteMixin({registry: registry}), - // User to map volume access to Defaults to serivceaccount user - user(user):: __quobyteMixin({user: user}), - // Volume is a string that references an already created Quobyte volume by name. - volume(volume):: __quobyteMixin({volume: volume}), - }, - quobyteType:: hidden.core.v1.quobyteVolumeSource, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd:: { - local __rbdMixin(rbd) = {rbd+: rbd}, - mixinInstance(rbd):: __rbdMixin(rbd), - // 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(fsType):: __rbdMixin({fsType: fsType}), - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - image(image):: __rbdMixin({image: image}), - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - keyring(keyring):: __rbdMixin({keyring: keyring}), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then __rbdMixin({monitors+: monitors}) else __rbdMixin({monitors+: [monitors]}), - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - pool(pool):: __rbdMixin({pool: pool}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - readOnly(readOnly):: __rbdMixin({readOnly: readOnly}), - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __rbdMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - user(user):: __rbdMixin({user: user}), - }, - rbdType:: hidden.core.v1.rbdVolumeSource, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIo:: { - local __scaleIoMixin(scaleIo) = {scaleIO+: scaleIo}, - mixinInstance(scaleIo):: __scaleIoMixin(scaleIo), - // 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(fsType):: __scaleIoMixin({fsType: fsType}), - // The host address of the ScaleIO API Gateway. - gateway(gateway):: __scaleIoMixin({gateway: gateway}), - // The name of the Protection Domain for the configured storage (defaults to "default"). - protectionDomain(protectionDomain):: __scaleIoMixin({protectionDomain: protectionDomain}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __scaleIoMixin({readOnly: readOnly}), - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = __scaleIoMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // Flag to enable/disable SSL communication with Gateway, default false - sslEnabled(sslEnabled):: __scaleIoMixin({sslEnabled: sslEnabled}), - // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). - storageMode(storageMode):: __scaleIoMixin({storageMode: storageMode}), - // The Storage Pool associated with the protection domain (defaults to "default"). - storagePool(storagePool):: __scaleIoMixin({storagePool: storagePool}), - // The name of the storage system as configured in ScaleIO. - system(system):: __scaleIoMixin({system: system}), - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - volumeName(volumeName):: __scaleIoMixin({volumeName: volumeName}), - }, - scaleIoType:: hidden.core.v1.scaleIoVolumeSource, - // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md - storageos:: { - local __storageosMixin(storageos) = {storageos+: storageos}, - mixinInstance(storageos):: __storageosMixin(storageos), - // 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(fsType):: __storageosMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __storageosMixin({readOnly: readOnly}), - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = __storageosMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // 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(fieldPath):: __secretRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - namespace(namespace):: __secretRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __secretRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - uid(uid):: __secretRefMixin({uid: uid}), - }, - secretRefType:: hidden.core.v1.objectReference, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - volumeName(volumeName):: __storageosMixin({volumeName: 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(volumeNamespace):: __storageosMixin({volumeNamespace: volumeNamespace}), - }, - storageosType:: hidden.core.v1.storageOSPersistentVolumeSource, - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume:: { - local __vsphereVolumeMixin(vsphereVolume) = {vsphereVolume+: vsphereVolume}, - mixinInstance(vsphereVolume):: __vsphereVolumeMixin(vsphereVolume), - // 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(fsType):: __vsphereVolumeMixin({fsType: fsType}), - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - storagePolicyID(storagePolicyID):: __vsphereVolumeMixin({storagePolicyID: storagePolicyID}), - // Storage Policy Based Management (SPBM) profile name. - storagePolicyName(storagePolicyName):: __vsphereVolumeMixin({storagePolicyName: storagePolicyName}), - // Path that identifies vSphere volume vmdk - volumePath(volumePath):: __vsphereVolumeMixin({volumePath: volumePath}), - }, - vsphereVolumeType:: hidden.core.v1.vsphereVirtualDiskVolumeSource, - }, - }, - // PersistentVolumeStatus is the current status of a persistent volume. - persistentVolumeStatus:: { - new():: {}, - // A human-readable message indicating details about why the volume is in this state. - message(message):: {message: message}, - // Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase - phase(phase):: {phase: phase}, - // Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI. - reason(reason):: {reason: reason}, - mixin:: { - }, - }, - // Represents a Photon Controller persistent disk resource. - photonPersistentDiskVolumeSource:: { - new():: {}, - // 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(fsType):: {fsType: fsType}, - // ID that identifies Photon Controller persistent disk - pdId(pdId):: {pdID: pdId}, - mixin:: { - }, - }, - // Pod affinity is a group of inter pod affinity scheduling rules. - podAffinity:: { - new():: {}, - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - mixin:: { - }, - }, - // 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 tches that of any node on which a pod of the set of pods is running - podAffinityTerm:: { - new():: {}, - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - namespaces(namespaces):: if std.type(namespaces) == "array" then {namespaces+: namespaces} else {namespaces+: [namespaces]}, - // 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. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. - topologyKey(topologyKey):: {topologyKey: topologyKey}, - mixin:: { - // A label query over a set of resources, in this case pods. - labelSelector:: { - local __labelSelectorMixin(labelSelector) = {labelSelector+: labelSelector}, - mixinInstance(labelSelector):: __labelSelectorMixin(labelSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __labelSelectorMixin({matchExpressions+: matchExpressions}) else __labelSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __labelSelectorMixin({matchLabels+: matchLabels}), - }, - labelSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // Pod anti affinity is a group of inter pod anti affinity scheduling rules. - podAntiAffinity:: { - new():: {}, - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - mixin:: { - }, - }, - // PodCondition contains details for the current condition of this pod. - podCondition:: { - new():: {}, - // Human-readable message indicating details about last transition. - message(message):: {message: message}, - // Unique, one-word, CamelCase reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Type is the type of the condition. Currently only Ready. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - type(type):: {type: type}, - mixin:: { - // Last time we probed the condition. - lastProbeTime:: { - local __lastProbeTimeMixin(lastProbeTime) = {lastProbeTime+: lastProbeTime}, - mixinInstance(lastProbeTime):: __lastProbeTimeMixin(lastProbeTime), - }, - lastProbeTimeType:: hidden.meta.v1.time, - // Last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // 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. - podSecurityContext:: { - new():: {}, - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: {fsGroup: fsGroup}, - // 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(runAsNonRoot):: {runAsNonRoot: 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(runAsUser):: {runAsUser: runAsUser}, - // 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(supplementalGroups):: if std.type(supplementalGroups) == "array" then {supplementalGroups+: supplementalGroups} else {supplementalGroups+: [supplementalGroups]}, - mixin:: { - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = {seLinuxOptions+: seLinuxOptions}, - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - }, - // PodSpec is a description of a pod. - podSpec:: { - new():: {}, - // 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(activeDeadlineSeconds):: {activeDeadlineSeconds: activeDeadlineSeconds}, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: {automountServiceAccountToken: automountServiceAccountToken}, - // 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(containers):: if std.type(containers) == "array" then {containers+: containers} else {containers+: [containers]}, - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: {dnsPolicy: dnsPolicy}, - // 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(hostAliases):: if std.type(hostAliases) == "array" then {hostAliases+: hostAliases} else {hostAliases+: [hostAliases]}, - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: {hostIPC: hostIpc}, - // 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(hostNetwork):: {hostNetwork: hostNetwork}, - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: {hostPID: hostPid}, - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: {hostname: hostname}, - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then {imagePullSecrets+: imagePullSecrets} else {imagePullSecrets+: [imagePullSecrets]}, - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then {initContainers+: initContainers} else {initContainers+: [initContainers]}, - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: {nodeName: 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(nodeSelector):: {nodeSelector+: nodeSelector}, - // 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(restartPolicy):: {restartPolicy: restartPolicy}, - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: {schedulerName: schedulerName}, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: {serviceAccount: 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(serviceAccountName):: {serviceAccountName: serviceAccountName}, - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: {subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: {terminationGracePeriodSeconds: terminationGracePeriodSeconds}, - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then {tolerations+: tolerations} else {tolerations+: [tolerations]}, - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, - volumesType:: hidden.core.v1.volume, - mixin:: { - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = {affinity+: affinity}, - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. - securityContext:: { - local __securityContextMixin(securityContext) = {securityContext+: securityContext}, - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - }, - }, - // PodStatus represents information about the status of a pod. Status may trail the actual state of a system. - podStatus:: { - new():: {}, - // Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.core.v1.podCondition, - // The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - containerStatuses(containerStatuses):: if std.type(containerStatuses) == "array" then {containerStatuses+: containerStatuses} else {containerStatuses+: [containerStatuses]}, - containerStatusesType:: hidden.core.v1.containerStatus, - // IP address of the host to which the pod is assigned. Empty if not yet scheduled. - hostIp(hostIp):: {hostIP: hostIp}, - // The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - initContainerStatuses(initContainerStatuses):: if std.type(initContainerStatuses) == "array" then {initContainerStatuses+: initContainerStatuses} else {initContainerStatuses+: [initContainerStatuses]}, - initContainerStatusesType:: hidden.core.v1.containerStatus, - // A human readable message indicating details about why the pod is in this condition. - message(message):: {message: message}, - // Current condition of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase - phase(phase):: {phase: phase}, - // IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated. - podIp(podIp):: {podIP: podIp}, - // The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md - qosClass(qosClass):: {qosClass: qosClass}, - // A brief CamelCase message indicating details about why the pod is in this state. e.g. 'OutOfDisk' - reason(reason):: {reason: reason}, - mixin:: { - // RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod. - startTime:: { - local __startTimeMixin(startTime) = {startTime+: startTime}, - mixinInstance(startTime):: __startTimeMixin(startTime), - }, - startTimeType:: hidden.meta.v1.time, - }, - }, - // PodTemplateSpec describes the data a pod should have when created from a template - podTemplateSpec:: { - new():: {}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - }, - // PortworxVolumeSource represents a Portworx volume resource. - portworxVolumeSource:: { - new():: {}, - // 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(fsType):: {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // VolumeID uniquely identifies a Portworx volume - volumeId(volumeId):: {volumeID: volumeId}, - mixin:: { - }, - }, - // 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). - preferredSchedulingTerm:: { - new():: {}, - // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - weight(weight):: {weight: weight}, - mixin:: { - // A node selector term, associated with the corresponding weight. - preference:: { - local __preferenceMixin(preference) = {preference+: preference}, - mixinInstance(preference):: __preferenceMixin(preference), - // Required. A list of node selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __preferenceMixin({matchExpressions+: matchExpressions}) else __preferenceMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.core.v1.nodeSelectorRequirement, - }, - preferenceType:: hidden.core.v1.nodeSelectorTerm, - }, - }, - // Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. - probe:: { - new():: {}, - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - failureThreshold(failureThreshold):: {failureThreshold: failureThreshold}, - // 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(initialDelaySeconds):: {initialDelaySeconds: initialDelaySeconds}, - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - periodSeconds(periodSeconds):: {periodSeconds: periodSeconds}, - // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. - successThreshold(successThreshold):: {successThreshold: successThreshold}, - // 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(timeoutSeconds):: {timeoutSeconds: timeoutSeconds}, - mixin:: { - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = {exec+: exec}, - mixinInstance(exec):: __execMixin(exec), - // 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(command):: if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = {httpGet+: httpGet}, - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - host(host):: __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - httpHeaders(httpHeaders):: if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - path(path):: __httpGetMixin({path: path}), - // 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(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - scheme(scheme):: __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = {tcpSocket+: tcpSocket}, - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - host(host):: __tcpSocketMixin({host: host}), - // 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(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - }, - // Represents a projected volume source - projectedVolumeSource:: { - new():: {}, - // Mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: defaultMode}, - // list of volume projections - sources(sources):: if std.type(sources) == "array" then {sources+: sources} else {sources+: [sources]}, - sourcesType:: hidden.core.v1.volumeProjection, - mixin:: { - }, - }, - // Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling. - quobyteVolumeSource:: { - new():: {}, - // Group to map volume access to Default is no group - group(group):: {group: group}, - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - readOnly(readOnly):: {readOnly: readOnly}, - // 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(registry):: {registry: registry}, - // User to map volume access to Defaults to serivceaccount user - user(user):: {user: user}, - // Volume is a string that references an already created Quobyte volume by name. - volume(volume):: {volume: volume}, - mixin:: { - }, - }, - // Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. - rbdVolumeSource:: { - new():: {}, - // 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(fsType):: {fsType: fsType}, - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - image(image):: {image: image}, - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - keyring(keyring):: {keyring: keyring}, - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - pool(pool):: {pool: pool}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - readOnly(readOnly):: {readOnly: readOnly}, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - user(user):: {user: user}, - mixin:: { - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // ReplicationControllerCondition describes the state of a replication controller at a certain point. - replicationControllerCondition:: { - new():: {}, - // A human readable message indicating details about the transition. - message(message):: {message: message}, - // The reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Type of replication controller condition. - type(type):: {type: type}, - mixin:: { - // The last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // ReplicationControllerSpec is the specification of a replication controller. - replicationControllerSpec:: { - new():: {}, - // 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(minReadySeconds):: {minReadySeconds: 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(replicas):: {replicas: 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(selector):: {selector+: selector}, - mixin:: { - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // ReplicationControllerStatus represents the current status of a replication controller. - replicationControllerStatus:: { - new():: {}, - // The number of available replicas (ready for at least minReadySeconds) for this replication controller. - availableReplicas(availableReplicas):: {availableReplicas: availableReplicas}, - // Represents the latest available observations of a replication controller's current state. - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.core.v1.replicationControllerCondition, - // The number of pods that have labels matching the labels of the pod template of the replication controller. - fullyLabeledReplicas(fullyLabeledReplicas):: {fullyLabeledReplicas: fullyLabeledReplicas}, - // ObservedGeneration reflects the generation of the most recently observed replication controller. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - // The number of ready replicas for this replication controller. - readyReplicas(readyReplicas):: {readyReplicas: readyReplicas}, - // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller - replicas(replicas):: {replicas: replicas}, - mixin:: { - }, - }, - // ResourceFieldSelector represents container resources (cpu, memory) and their output format - resourceFieldSelector:: { - new():: {}, - // Container name: required for volumes, optional for env vars - containerName(containerName):: {containerName: containerName}, - // Required: resource to select - resource(resource):: {resource: resource}, - mixin:: { - // Specifies the output format of the exposed resources, defaults to "1" - divisor:: { - local __divisorMixin(divisor) = {divisor+: divisor}, - mixinInstance(divisor):: __divisorMixin(divisor), - }, - divisorType:: hidden.core.resource.quantity, - }, - }, - // ResourceQuotaSpec defines the desired hard limits to enforce for Quota. - resourceQuotaSpec:: { - new():: {}, - // Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md - hard(hard):: {hard+: hard}, - // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. - scopes(scopes):: if std.type(scopes) == "array" then {scopes+: scopes} else {scopes+: [scopes]}, - mixin:: { - }, - }, - // ResourceQuotaStatus defines the enforced hard limits and observed use. - resourceQuotaStatus:: { - new():: {}, - // Hard is the set of enforced hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md - hard(hard):: {hard+: hard}, - // Used is the current observed total usage of the resource in the namespace. - used(used):: {used+: used}, - mixin:: { - }, - }, - // ResourceRequirements describes the compute resource requirements. - resourceRequirements:: { - new():: {}, - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - limits(limits):: {limits+: 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-compute-resources-container/ - requests(requests):: {requests+: requests}, - mixin:: { - }, - }, - // SELinuxOptions are the labels to be applied to the container - seLinuxOptions:: { - new():: {}, - // Level is SELinux level label that applies to the container. - level(level):: {level: level}, - // Role is a SELinux role label that applies to the container. - role(role):: {role: role}, - // Type is a SELinux type label that applies to the container. - type(type):: {type: type}, - // User is a SELinux user label that applies to the container. - user(user):: {user: user}, - mixin:: { - }, - }, - // ScaleIOVolumeSource represents a persistent ScaleIO volume - scaleIoVolumeSource:: { - new():: {}, - // 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(fsType):: {fsType: fsType}, - // The host address of the ScaleIO API Gateway. - gateway(gateway):: {gateway: gateway}, - // The name of the Protection Domain for the configured storage (defaults to "default"). - protectionDomain(protectionDomain):: {protectionDomain: protectionDomain}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // Flag to enable/disable SSL communication with Gateway, default false - sslEnabled(sslEnabled):: {sslEnabled: sslEnabled}, - // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). - storageMode(storageMode):: {storageMode: storageMode}, - // The Storage Pool associated with the protection domain (defaults to "default"). - storagePool(storagePool):: {storagePool: storagePool}, - // The name of the storage system as configured in ScaleIO. - system(system):: {system: system}, - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - volumeName(volumeName):: {volumeName: volumeName}, - mixin:: { - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // 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. - secretEnvSource:: { - new():: {}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the Secret must be defined - optional(optional):: {optional: optional}, - mixin:: { - }, - }, - // SecretKeySelector selects a key of a Secret. - secretKeySelector:: { - new():: {}, - // The key of the secret to select from. Must be a valid secret key. - key(key):: {key: key}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the Secret or it's key must be defined - optional(optional):: {optional: optional}, - mixin:: { - }, - }, - // 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. - secretProjection:: { - new():: {}, - // 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: {name: name}, - // Specify whether the Secret or its key must be defined - optional(optional):: {optional: optional}, - mixin:: { - }, - }, - // 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. - secretVolumeSource:: { - new():: {}, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: {defaultMode: 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(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.keyToPath, - // Specify whether the Secret or it's keys must be defined - optional(optional):: {optional: optional}, - // Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - secretName(secretName):: {secretName: secretName}, - mixin:: { - }, - }, - // 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. - securityContext:: { - new():: {}, - // Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. - privileged(privileged):: {privileged: privileged}, - // Whether this container has a read-only root filesystem. Default is false. - readOnlyRootFilesystem(readOnlyRootFilesystem):: {readOnlyRootFilesystem: readOnlyRootFilesystem}, - // 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(runAsNonRoot):: {runAsNonRoot: 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(runAsUser):: {runAsUser: runAsUser}, - mixin:: { - // The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. - capabilities:: { - local __capabilitiesMixin(capabilities) = {capabilities+: capabilities}, - mixinInstance(capabilities):: __capabilitiesMixin(capabilities), - // Added capabilities - add(add):: if std.type(add) == "array" then __capabilitiesMixin({add+: add}) else __capabilitiesMixin({add+: [add]}), - // Removed capabilities - drop(drop):: if std.type(drop) == "array" then __capabilitiesMixin({drop+: drop}) else __capabilitiesMixin({drop+: [drop]}), - }, - capabilitiesType:: hidden.core.v1.capabilities, - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = {seLinuxOptions+: seLinuxOptions}, - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - }, - // ServicePort contains information on service's port. - servicePort:: { - new(port, targetPort):: {} + self.port(port) + self.targetPort(targetPort), - newNamed(name, port, targetPort):: {} + self.name(name) + self.port(port) + self.targetPort(targetPort), - // The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service. - name(name):: {name: name}, - // The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - nodePort(nodePort):: {nodePort: nodePort}, - // The port that will be exposed by this service. - port(port):: {port: port}, - // The IP protocol for this port. Supports "TCP" and "UDP". Default is TCP. - protocol(protocol):: {protocol: 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(targetPort):: {targetPort: targetPort}, - mixin:: { - }, - }, - // ServiceSpec describes the attributes that a user creates on a service. - serviceSpec:: { - new():: {}, - // clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - clusterIp(clusterIp):: {clusterIP: clusterIp}, - // 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(externalIps):: if std.type(externalIps) == "array" then {externalIPs+: externalIps} else {externalIPs+: [externalIps]}, - // externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName. - externalName(externalName):: {externalName: 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(externalTrafficPolicy):: {externalTrafficPolicy: externalTrafficPolicy}, - // healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local. - healthCheckNodePort(healthCheckNodePort):: {healthCheckNodePort: healthCheckNodePort}, - // 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(loadBalancerIp):: {loadBalancerIP: 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/configure-cloud-provider-firewall/ - loadBalancerSourceRanges(loadBalancerSourceRanges):: if std.type(loadBalancerSourceRanges) == "array" then {loadBalancerSourceRanges+: loadBalancerSourceRanges} else {loadBalancerSourceRanges+: [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(ports):: if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - portsType:: hidden.core.v1.servicePort, - // 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. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ - selector(selector):: {selector+: 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(sessionAffinity):: {sessionAffinity: sessionAffinity}, - // type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to the specified externalName. "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. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types - type(type):: {type: type}, - mixin:: { - }, - }, - // ServiceStatus represents the current status of a service. - serviceStatus:: { - new():: {}, - mixin:: { - // LoadBalancer contains the current status of the load-balancer, if one is present. - loadBalancer:: { - local __loadBalancerMixin(loadBalancer) = {loadBalancer+: loadBalancer}, - mixinInstance(loadBalancer):: __loadBalancerMixin(loadBalancer), - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - ingress(ingress):: if std.type(ingress) == "array" then __loadBalancerMixin({ingress+: ingress}) else __loadBalancerMixin({ingress+: [ingress]}), - ingressType:: hidden.core.v1.loadBalancerIngress, - }, - loadBalancerType:: hidden.core.v1.loadBalancerStatus, - }, - }, - // Represents a StorageOS persistent volume resource. - storageOSPersistentVolumeSource:: { - new():: {}, - // 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(fsType):: {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - volumeName(volumeName):: {volumeName: 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(volumeNamespace):: {volumeNamespace: volumeNamespace}, - mixin:: { - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // 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(fieldPath):: __secretRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - namespace(namespace):: __secretRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: __secretRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - uid(uid):: __secretRefMixin({uid: uid}), - }, - secretRefType:: hidden.core.v1.objectReference, - }, - }, - // Represents a StorageOS persistent volume resource. - storageOSVolumeSource:: { - new():: {}, - // 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(fsType):: {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: {readOnly: readOnly}, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - volumeName(volumeName):: {volumeName: 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(volumeNamespace):: {volumeNamespace: volumeNamespace}, - mixin:: { - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // TCPSocketAction describes an action based on opening a socket - tcpSocketAction:: { - new():: {}, - // Optional: Host name to connect to, defaults to the pod IP. - host(host):: {host: host}, - // 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(port):: {port: port}, - mixin:: { - }, - }, - // The node this Taint is attached to has the effect "effect" on any pod that that does not tolerate the Taint. - taint:: { - new():: {}, - // Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - effect(effect):: {effect: effect}, - // Required. The taint key to be applied to a node. - key(key):: {key: key}, - // Required. The taint value corresponding to the taint key. - value(value):: {value: value}, - mixin:: { - // TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints. - timeAdded:: { - local __timeAddedMixin(timeAdded) = {timeAdded+: timeAdded}, - mixinInstance(timeAdded):: __timeAddedMixin(timeAdded), - }, - timeAddedType:: hidden.meta.v1.time, - }, - }, - // The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - toleration:: { - new():: {}, - // Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - effect(effect):: {effect: 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(key):: {key: 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(operator):: {operator: 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(tolerationSeconds):: {tolerationSeconds: 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(value):: {value: value}, - mixin:: { - }, - }, - // Volume represents a named volume in a pod that may be accessed by any container in the pod. - volume:: { - fromConfigMap(name, configMapName, configMapItems):: {} + self.name(name) + self.mixin.configMap.name(configMapName) + self.mixin.configMap.items(configMapItems), - fromEmptyDir(name, emptyDir={}):: {} + self.name(name) + self.mixin.emptyDir.mixinInstance(emptyDir), - fromPersistentVolumeClaim(name, claimName):: {} + self.name(name) + self.mixin.persistentVolumeClaim.claimName(claimName), - fromHostPath(name, hostPath):: {} + self.name(name) + self.mixin.hostPath.path(hostPath), - // 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(name):: {name: name}, - mixin:: { - // 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:: { - local __awsElasticBlockStoreMixin(awsElasticBlockStore) = {awsElasticBlockStore+: awsElasticBlockStore}, - mixinInstance(awsElasticBlockStore):: __awsElasticBlockStoreMixin(awsElasticBlockStore), - // 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(fsType):: __awsElasticBlockStoreMixin({fsType: 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(partition):: __awsElasticBlockStoreMixin({partition: 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(readOnly):: __awsElasticBlockStoreMixin({readOnly: readOnly}), - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - volumeId(volumeId):: __awsElasticBlockStoreMixin({volumeID: volumeId}), - }, - awsElasticBlockStoreType:: hidden.core.v1.awsElasticBlockStoreVolumeSource, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk:: { - local __azureDiskMixin(azureDisk) = {azureDisk+: azureDisk}, - mixinInstance(azureDisk):: __azureDiskMixin(azureDisk), - // Host Caching mode: None, Read Only, Read Write. - cachingMode(cachingMode):: __azureDiskMixin({cachingMode: cachingMode}), - // The Name of the data disk in the blob storage - diskName(diskName):: __azureDiskMixin({diskName: diskName}), - // The URI the data disk in the blob storage - diskUri(diskUri):: __azureDiskMixin({diskURI: diskUri}), - // 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(fsType):: __azureDiskMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __azureDiskMixin({readOnly: readOnly}), - }, - azureDiskType:: hidden.core.v1.azureDiskVolumeSource, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile:: { - local __azureFileMixin(azureFile) = {azureFile+: azureFile}, - mixinInstance(azureFile):: __azureFileMixin(azureFile), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __azureFileMixin({readOnly: readOnly}), - // the name of secret that contains Azure Storage Account Name and Key - secretName(secretName):: __azureFileMixin({secretName: secretName}), - // Share Name - shareName(shareName):: __azureFileMixin({shareName: shareName}), - }, - azureFileType:: hidden.core.v1.azureFileVolumeSource, - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs:: { - local __cephfsMixin(cephfs) = {cephfs+: cephfs}, - mixinInstance(cephfs):: __cephfsMixin(cephfs), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then __cephfsMixin({monitors+: monitors}) else __cephfsMixin({monitors+: [monitors]}), - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - path(path):: __cephfsMixin({path: path}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - readOnly(readOnly):: __cephfsMixin({readOnly: readOnly}), - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretFile(secretFile):: __cephfsMixin({secretFile: secretFile}), - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __cephfsMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - user(user):: __cephfsMixin({user: user}), - }, - cephfsType:: hidden.core.v1.cephFsVolumeSource, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder:: { - local __cinderMixin(cinder) = {cinder+: cinder}, - mixinInstance(cinder):: __cinderMixin(cinder), - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - fsType(fsType):: __cinderMixin({fsType: fsType}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - readOnly(readOnly):: __cinderMixin({readOnly: readOnly}), - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - volumeId(volumeId):: __cinderMixin({volumeID: volumeId}), - }, - cinderType:: hidden.core.v1.cinderVolumeSource, - // ConfigMap represents a configMap that should populate this volume - configMap:: { - local __configMapMixin(configMap) = {configMap+: configMap}, - mixinInstance(configMap):: __configMapMixin(configMap), - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: __configMapMixin({defaultMode: 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(items):: if std.type(items) == "array" then __configMapMixin({items+: items}) else __configMapMixin({items+: [items]}), - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __configMapMixin({name: name}), - // Specify whether the ConfigMap or it's keys must be defined - optional(optional):: __configMapMixin({optional: optional}), - }, - configMapType:: hidden.core.v1.configMapVolumeSource, - // DownwardAPI represents downward API about the pod that should populate this volume - downwardApi:: { - local __downwardApiMixin(downwardApi) = {downwardAPI+: downwardApi}, - mixinInstance(downwardApi):: __downwardApiMixin(downwardApi), - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: __downwardApiMixin({defaultMode: defaultMode}), - // Items is a list of downward API volume file - items(items):: if std.type(items) == "array" then __downwardApiMixin({items+: items}) else __downwardApiMixin({items+: [items]}), - itemsType:: hidden.core.v1.downwardApiVolumeFile, - }, - downwardApiType:: hidden.core.v1.downwardApiVolumeSource, - // EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - emptyDir:: { - local __emptyDirMixin(emptyDir) = {emptyDir+: emptyDir}, - mixinInstance(emptyDir):: __emptyDirMixin(emptyDir), - // 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(medium):: __emptyDirMixin({medium: 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:: { - local __sizeLimitMixin(sizeLimit) = __emptyDirMixin({sizeLimit+: sizeLimit}), - mixinInstance(sizeLimit):: __sizeLimitMixin(sizeLimit), - }, - sizeLimitType:: hidden.core.resource.quantity, - }, - emptyDirType:: hidden.core.v1.emptyDirVolumeSource, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc:: { - local __fcMixin(fc) = {fc+: fc}, - mixinInstance(fc):: __fcMixin(fc), - // 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(fsType):: __fcMixin({fsType: fsType}), - // Required: FC target lun number - lun(lun):: __fcMixin({lun: lun}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __fcMixin({readOnly: readOnly}), - // Required: FC target worldwide names (WWNs) - targetWwns(targetWwns):: if std.type(targetWwns) == "array" then __fcMixin({targetWWNs+: targetWwns}) else __fcMixin({targetWWNs+: [targetWwns]}), - }, - fcType:: hidden.core.v1.fcVolumeSource, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - flexVolume:: { - local __flexVolumeMixin(flexVolume) = {flexVolume+: flexVolume}, - mixinInstance(flexVolume):: __flexVolumeMixin(flexVolume), - // Driver is the name of the driver to use for this volume. - driver(driver):: __flexVolumeMixin({driver: 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(fsType):: __flexVolumeMixin({fsType: fsType}), - // Optional: Extra command options if any. - options(options):: __flexVolumeMixin({options+: options}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __flexVolumeMixin({readOnly: 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:: { - local __secretRefMixin(secretRef) = __flexVolumeMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - flexVolumeType:: hidden.core.v1.flexVolumeSource, - // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - flocker:: { - local __flockerMixin(flocker) = {flocker+: flocker}, - mixinInstance(flocker):: __flockerMixin(flocker), - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - datasetName(datasetName):: __flockerMixin({datasetName: datasetName}), - // UUID of the dataset. This is unique identifier of a Flocker dataset - datasetUuid(datasetUuid):: __flockerMixin({datasetUUID: datasetUuid}), - }, - flockerType:: hidden.core.v1.flockerVolumeSource, - // 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:: { - local __gcePersistentDiskMixin(gcePersistentDisk) = {gcePersistentDisk+: gcePersistentDisk}, - mixinInstance(gcePersistentDisk):: __gcePersistentDiskMixin(gcePersistentDisk), - // 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(fsType):: __gcePersistentDiskMixin({fsType: 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(partition):: __gcePersistentDiskMixin({partition: partition}), - // 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(pdName):: __gcePersistentDiskMixin({pdName: pdName}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - readOnly(readOnly):: __gcePersistentDiskMixin({readOnly: readOnly}), - }, - gcePersistentDiskType:: hidden.core.v1.gcePersistentDiskVolumeSource, - // GitRepo represents a git repository at a particular revision. - gitRepo:: { - local __gitRepoMixin(gitRepo) = {gitRepo+: gitRepo}, - mixinInstance(gitRepo):: __gitRepoMixin(gitRepo), - // 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(directory):: __gitRepoMixin({directory: directory}), - // Repository URL - repository(repository):: __gitRepoMixin({repository: repository}), - // Commit hash for the specified revision. - revision(revision):: __gitRepoMixin({revision: revision}), - }, - gitRepoType:: hidden.core.v1.gitRepoVolumeSource, - // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs:: { - local __glusterfsMixin(glusterfs) = {glusterfs+: glusterfs}, - mixinInstance(glusterfs):: __glusterfsMixin(glusterfs), - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - endpoints(endpoints):: __glusterfsMixin({endpoints: endpoints}), - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - path(path):: __glusterfsMixin({path: path}), - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - readOnly(readOnly):: __glusterfsMixin({readOnly: readOnly}), - }, - glusterfsType:: hidden.core.v1.glusterfsVolumeSource, - // 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:: { - local __hostPathMixin(hostPath) = {hostPath+: hostPath}, - mixinInstance(hostPath):: __hostPathMixin(hostPath), - // Path of the directory on the host. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - path(path):: __hostPathMixin({path: path}), - }, - hostPathType:: hidden.core.v1.hostPathVolumeSource, - // ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md - iscsi:: { - local __iscsiMixin(iscsi) = {iscsi+: iscsi}, - mixinInstance(iscsi):: __iscsiMixin(iscsi), - // whether support iSCSI Discovery CHAP authentication - chapAuthDiscovery(chapAuthDiscovery):: __iscsiMixin({chapAuthDiscovery: chapAuthDiscovery}), - // whether support iSCSI Session CHAP authentication - chapAuthSession(chapAuthSession):: __iscsiMixin({chapAuthSession: 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(fsType):: __iscsiMixin({fsType: fsType}), - // Target iSCSI Qualified Name. - iqn(iqn):: __iscsiMixin({iqn: iqn}), - // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. - iscsiInterface(iscsiInterface):: __iscsiMixin({iscsiInterface: iscsiInterface}), - // iSCSI target lun number. - lun(lun):: __iscsiMixin({lun: lun}), - // 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(portals):: if std.type(portals) == "array" then __iscsiMixin({portals+: portals}) else __iscsiMixin({portals+: [portals]}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - readOnly(readOnly):: __iscsiMixin({readOnly: readOnly}), - // CHAP secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = __iscsiMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // 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(targetPortal):: __iscsiMixin({targetPortal: targetPortal}), - }, - iscsiType:: hidden.core.v1.iscsiVolumeSource, - // 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:: { - local __nfsMixin(nfs) = {nfs+: nfs}, - mixinInstance(nfs):: __nfsMixin(nfs), - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - path(path):: __nfsMixin({path: path}), - // 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(readOnly):: __nfsMixin({readOnly: readOnly}), - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - server(server):: __nfsMixin({server: server}), - }, - nfsType:: hidden.core.v1.nfsVolumeSource, - // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - persistentVolumeClaim:: { - local __persistentVolumeClaimMixin(persistentVolumeClaim) = {persistentVolumeClaim+: persistentVolumeClaim}, - mixinInstance(persistentVolumeClaim):: __persistentVolumeClaimMixin(persistentVolumeClaim), - // 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(claimName):: __persistentVolumeClaimMixin({claimName: claimName}), - // Will force the ReadOnly setting in VolumeMounts. Default false. - readOnly(readOnly):: __persistentVolumeClaimMixin({readOnly: readOnly}), - }, - persistentVolumeClaimType:: hidden.core.v1.persistentVolumeClaimVolumeSource, - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk:: { - local __photonPersistentDiskMixin(photonPersistentDisk) = {photonPersistentDisk+: photonPersistentDisk}, - mixinInstance(photonPersistentDisk):: __photonPersistentDiskMixin(photonPersistentDisk), - // 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(fsType):: __photonPersistentDiskMixin({fsType: fsType}), - // ID that identifies Photon Controller persistent disk - pdId(pdId):: __photonPersistentDiskMixin({pdID: pdId}), - }, - photonPersistentDiskType:: hidden.core.v1.photonPersistentDiskVolumeSource, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume:: { - local __portworxVolumeMixin(portworxVolume) = {portworxVolume+: portworxVolume}, - mixinInstance(portworxVolume):: __portworxVolumeMixin(portworxVolume), - // 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(fsType):: __portworxVolumeMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __portworxVolumeMixin({readOnly: readOnly}), - // VolumeID uniquely identifies a Portworx volume - volumeId(volumeId):: __portworxVolumeMixin({volumeID: volumeId}), - }, - portworxVolumeType:: hidden.core.v1.portworxVolumeSource, - // Items for all in one resources secrets, configmaps, and downward API - projected:: { - local __projectedMixin(projected) = {projected+: projected}, - mixinInstance(projected):: __projectedMixin(projected), - // Mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: __projectedMixin({defaultMode: defaultMode}), - // list of volume projections - sources(sources):: if std.type(sources) == "array" then __projectedMixin({sources+: sources}) else __projectedMixin({sources+: [sources]}), - sourcesType:: hidden.core.v1.volumeProjection, - }, - projectedType:: hidden.core.v1.projectedVolumeSource, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte:: { - local __quobyteMixin(quobyte) = {quobyte+: quobyte}, - mixinInstance(quobyte):: __quobyteMixin(quobyte), - // Group to map volume access to Default is no group - group(group):: __quobyteMixin({group: group}), - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - readOnly(readOnly):: __quobyteMixin({readOnly: readOnly}), - // 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(registry):: __quobyteMixin({registry: registry}), - // User to map volume access to Defaults to serivceaccount user - user(user):: __quobyteMixin({user: user}), - // Volume is a string that references an already created Quobyte volume by name. - volume(volume):: __quobyteMixin({volume: volume}), - }, - quobyteType:: hidden.core.v1.quobyteVolumeSource, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd:: { - local __rbdMixin(rbd) = {rbd+: rbd}, - mixinInstance(rbd):: __rbdMixin(rbd), - // 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(fsType):: __rbdMixin({fsType: fsType}), - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - image(image):: __rbdMixin({image: image}), - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - keyring(keyring):: __rbdMixin({keyring: keyring}), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - monitors(monitors):: if std.type(monitors) == "array" then __rbdMixin({monitors+: monitors}) else __rbdMixin({monitors+: [monitors]}), - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - pool(pool):: __rbdMixin({pool: pool}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - readOnly(readOnly):: __rbdMixin({readOnly: readOnly}), - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __rbdMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - user(user):: __rbdMixin({user: user}), - }, - rbdType:: hidden.core.v1.rbdVolumeSource, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIo:: { - local __scaleIoMixin(scaleIo) = {scaleIO+: scaleIo}, - mixinInstance(scaleIo):: __scaleIoMixin(scaleIo), - // 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(fsType):: __scaleIoMixin({fsType: fsType}), - // The host address of the ScaleIO API Gateway. - gateway(gateway):: __scaleIoMixin({gateway: gateway}), - // The name of the Protection Domain for the configured storage (defaults to "default"). - protectionDomain(protectionDomain):: __scaleIoMixin({protectionDomain: protectionDomain}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __scaleIoMixin({readOnly: readOnly}), - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = __scaleIoMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // Flag to enable/disable SSL communication with Gateway, default false - sslEnabled(sslEnabled):: __scaleIoMixin({sslEnabled: sslEnabled}), - // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). - storageMode(storageMode):: __scaleIoMixin({storageMode: storageMode}), - // The Storage Pool associated with the protection domain (defaults to "default"). - storagePool(storagePool):: __scaleIoMixin({storagePool: storagePool}), - // The name of the storage system as configured in ScaleIO. - system(system):: __scaleIoMixin({system: system}), - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - volumeName(volumeName):: __scaleIoMixin({volumeName: volumeName}), - }, - scaleIoType:: hidden.core.v1.scaleIoVolumeSource, - // Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - secret:: { - local __secretMixin(secret) = {secret+: secret}, - mixinInstance(secret):: __secretMixin(secret), - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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(defaultMode):: __secretMixin({defaultMode: 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(items):: if std.type(items) == "array" then __secretMixin({items+: items}) else __secretMixin({items+: [items]}), - itemsType:: hidden.core.v1.keyToPath, - // Specify whether the Secret or it's keys must be defined - optional(optional):: __secretMixin({optional: optional}), - // Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - secretName(secretName):: __secretMixin({secretName: secretName}), - }, - secretType:: hidden.core.v1.secretVolumeSource, - // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - storageos:: { - local __storageosMixin(storageos) = {storageos+: storageos}, - mixinInstance(storageos):: __storageosMixin(storageos), - // 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(fsType):: __storageosMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - readOnly(readOnly):: __storageosMixin({readOnly: readOnly}), - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = __storageosMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - volumeName(volumeName):: __storageosMixin({volumeName: 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(volumeNamespace):: __storageosMixin({volumeNamespace: volumeNamespace}), - }, - storageosType:: hidden.core.v1.storageOSVolumeSource, - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume:: { - local __vsphereVolumeMixin(vsphereVolume) = {vsphereVolume+: vsphereVolume}, - mixinInstance(vsphereVolume):: __vsphereVolumeMixin(vsphereVolume), - // 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(fsType):: __vsphereVolumeMixin({fsType: fsType}), - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - storagePolicyID(storagePolicyID):: __vsphereVolumeMixin({storagePolicyID: storagePolicyID}), - // Storage Policy Based Management (SPBM) profile name. - storagePolicyName(storagePolicyName):: __vsphereVolumeMixin({storagePolicyName: storagePolicyName}), - // Path that identifies vSphere volume vmdk - volumePath(volumePath):: __vsphereVolumeMixin({volumePath: volumePath}), - }, - vsphereVolumeType:: hidden.core.v1.vsphereVirtualDiskVolumeSource, - }, - }, - // VolumeMount describes a mounting of a Volume within a container. - volumeMount:: { - new(name, mountPath, readOnly=false):: {} + self.name(name) + self.mountPath(mountPath) + self.readOnly(readOnly), - // Path within the container at which the volume should be mounted. Must not contain ':'. - mountPath(mountPath):: {mountPath: mountPath}, - // This must match the Name of a Volume. - name(name):: {name: name}, - // Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - readOnly(readOnly):: {readOnly: readOnly}, - // Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). - subPath(subPath):: {subPath: subPath}, - mixin:: { - }, - }, - // Projection that may be projected along with other supported volume types - volumeProjection:: { - new():: {}, - mixin:: { - // information about the configMap data to project - configMap:: { - local __configMapMixin(configMap) = {configMap+: configMap}, - mixinInstance(configMap):: __configMapMixin(configMap), - // 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(items):: if std.type(items) == "array" then __configMapMixin({items+: items}) else __configMapMixin({items+: [items]}), - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __configMapMixin({name: name}), - // Specify whether the ConfigMap or it's keys must be defined - optional(optional):: __configMapMixin({optional: optional}), - }, - configMapType:: hidden.core.v1.configMapProjection, - // information about the downwardAPI data to project - downwardApi:: { - local __downwardApiMixin(downwardApi) = {downwardAPI+: downwardApi}, - mixinInstance(downwardApi):: __downwardApiMixin(downwardApi), - // Items is a list of DownwardAPIVolume file - items(items):: if std.type(items) == "array" then __downwardApiMixin({items+: items}) else __downwardApiMixin({items+: [items]}), - itemsType:: hidden.core.v1.downwardApiVolumeFile, - }, - downwardApiType:: hidden.core.v1.downwardApiProjection, - // information about the secret data to project - secret:: { - local __secretMixin(secret) = {secret+: secret}, - mixinInstance(secret):: __secretMixin(secret), - // 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(items):: if std.type(items) == "array" then __secretMixin({items+: items}) else __secretMixin({items+: [items]}), - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - name(name):: __secretMixin({name: name}), - // Specify whether the Secret or its key must be defined - optional(optional):: __secretMixin({optional: optional}), - }, - secretType:: hidden.core.v1.secretProjection, - }, - }, - // Represents a vSphere volume resource. - vsphereVirtualDiskVolumeSource:: { - new():: {}, - // 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(fsType):: {fsType: fsType}, - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - storagePolicyID(storagePolicyID):: {storagePolicyID: storagePolicyID}, - // Storage Policy Based Management (SPBM) profile name. - storagePolicyName(storagePolicyName):: {storagePolicyName: storagePolicyName}, - // Path that identifies vSphere volume vmdk - volumePath(volumePath):: {volumePath: volumePath}, - mixin:: { - }, - }, - // The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - weightedPodAffinityTerm:: { - new():: {}, - // weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - weight(weight):: {weight: weight}, - mixin:: { - // Required. A pod affinity term, associated with the corresponding weight. - podAffinityTerm:: { - local __podAffinityTermMixin(podAffinityTerm) = {podAffinityTerm+: podAffinityTerm}, - mixinInstance(podAffinityTerm):: __podAffinityTermMixin(podAffinityTerm), - // A label query over a set of resources, in this case pods. - labelSelector:: { - local __labelSelectorMixin(labelSelector) = __podAffinityTermMixin({labelSelector+: labelSelector}), - mixinInstance(labelSelector):: __labelSelectorMixin(labelSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __labelSelectorMixin({matchExpressions+: matchExpressions}) else __labelSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __labelSelectorMixin({matchLabels+: matchLabels}), - }, - labelSelectorType:: hidden.meta.v1.labelSelector, - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - namespaces(namespaces):: if std.type(namespaces) == "array" then __podAffinityTermMixin({namespaces+: namespaces}) else __podAffinityTermMixin({namespaces+: [namespaces]}), - // 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. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. - topologyKey(topologyKey):: __podAffinityTermMixin({topologyKey: topologyKey}), - }, - podAffinityTermType:: hidden.core.v1.podAffinityTerm, - }, - }, - }, - }, - extensions:: { - v1beta1:: { - local apiVersion = {apiVersion: "extensions/v1beta1"}, - // An APIVersion represents a single concrete version of an object model. - apiVersion:: { - new():: {}, - // Name of this version (e.g. 'v1'). - name(name):: {name: name}, - mixin:: { - }, - }, - // DaemonSetSpec is the specification of a daemon set. - daemonSetSpec:: { - new():: {}, - // 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(minReadySeconds):: {minReadySeconds: 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(revisionHistoryLimit):: {revisionHistoryLimit: revisionHistoryLimit}, - mixin:: { - // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = {updateStrategy+: updateStrategy}, - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDaemonSet, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. - type(type):: __updateStrategyMixin({type: type}), - }, - updateStrategyType:: hidden.extensions.v1beta1.daemonSetUpdateStrategy, - }, - }, - // DaemonSetStatus represents the current status of a daemon set. - daemonSetStatus:: { - new():: {}, - // Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. - collisionCount(collisionCount):: {collisionCount: collisionCount}, - // The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - currentNumberScheduled(currentNumberScheduled):: {currentNumberScheduled: currentNumberScheduled}, - // The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - desiredNumberScheduled(desiredNumberScheduled):: {desiredNumberScheduled: desiredNumberScheduled}, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds) - numberAvailable(numberAvailable):: {numberAvailable: numberAvailable}, - // The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - numberMisscheduled(numberMisscheduled):: {numberMisscheduled: numberMisscheduled}, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. - numberReady(numberReady):: {numberReady: numberReady}, - // The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds) - numberUnavailable(numberUnavailable):: {numberUnavailable: numberUnavailable}, - // The most recent generation observed by the daemon set controller. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - // The total number of nodes that are running updated daemon pod - updatedNumberScheduled(updatedNumberScheduled):: {updatedNumberScheduled: updatedNumberScheduled}, - mixin:: { - }, - }, - // - daemonSetUpdateStrategy:: { - new():: {}, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. - type(type):: {type: type}, - mixin:: { - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDaemonSet, - }, - }, - // DeploymentCondition describes the state of a deployment at a certain point. - deploymentCondition:: { - new():: {}, - // A human readable message indicating details about the transition. - message(message):: {message: message}, - // The reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Type of deployment condition. - type(type):: {type: type}, - mixin:: { - // Last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - // The last time this condition was updated. - lastUpdateTime:: { - local __lastUpdateTimeMixin(lastUpdateTime) = {lastUpdateTime+: lastUpdateTime}, - mixinInstance(lastUpdateTime):: __lastUpdateTimeMixin(lastUpdateTime), - }, - lastUpdateTimeType:: hidden.meta.v1.time, - }, - }, - // DeploymentSpec is the specification of the desired behavior of the Deployment. - deploymentSpec:: { - new():: {}, - // 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(minReadySeconds):: {minReadySeconds: minReadySeconds}, - // Indicates that the deployment is paused and will not be processed by the deployment controller. - paused(paused):: {paused: 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. Once autoRollback is implemented, the deployment controller will automatically rollback failed deployments. Note that progress will not be estimated during the time a deployment is paused. This is not set by default. - progressDeadlineSeconds(progressDeadlineSeconds):: {progressDeadlineSeconds: progressDeadlineSeconds}, - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - replicas(replicas):: {replicas: replicas}, - // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. - revisionHistoryLimit(revisionHistoryLimit):: {revisionHistoryLimit: revisionHistoryLimit}, - mixin:: { - // The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = {rollbackTo+: rollbackTo}, - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - revision(revision):: __rollbackToMixin({revision: revision}), - }, - rollbackToType:: hidden.extensions.v1beta1.rollbackConfig, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = {strategy+: strategy}, - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - maxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - maxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - type(type):: __strategyMixin({type: type}), - }, - strategyType:: hidden.extensions.v1beta1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // DeploymentStatus is the most recently observed status of the Deployment. - deploymentStatus:: { - new():: {}, - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - availableReplicas(availableReplicas):: {availableReplicas: availableReplicas}, - // Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. - collisionCount(collisionCount):: {collisionCount: collisionCount}, - // Represents the latest available observations of a deployment's current state. - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.extensions.v1beta1.deploymentCondition, - // The generation observed by the deployment controller. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - // Total number of ready pods targeted by this deployment. - readyReplicas(readyReplicas):: {readyReplicas: readyReplicas}, - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - replicas(replicas):: {replicas: replicas}, - // Total number of unavailable pods targeted by this deployment. - unavailableReplicas(unavailableReplicas):: {unavailableReplicas: unavailableReplicas}, - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - updatedReplicas(updatedReplicas):: {updatedReplicas: updatedReplicas}, - mixin:: { - }, - }, - // DeploymentStrategy describes how to replace existing pods with new ones. - deploymentStrategy:: { - new():: {}, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - type(type):: {type: type}, - mixin:: { - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - maxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - maxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDeployment, - }, - }, - // FSGroupStrategyOptions defines the strategy type and options used to create the strategy. - fsGroupStrategyOptions:: { - new():: {}, - // 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. - ranges(ranges):: if std.type(ranges) == "array" then {ranges+: ranges} else {ranges+: [ranges]}, - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - rule(rule):: {rule: rule}, - mixin:: { - }, - }, - // HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend. - httpIngressPath:: { - new():: {}, - // Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) 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 '/'. If unspecified, the path defaults to a catch all sending traffic to the backend. - path(path):: {path: path}, - mixin:: { - // Backend defines the referenced service endpoint to which the traffic will be forwarded to. - backend:: { - local __backendMixin(backend) = {backend+: backend}, - mixinInstance(backend):: __backendMixin(backend), - // Specifies the name of the referenced service. - serviceName(serviceName):: __backendMixin({serviceName: serviceName}), - // Specifies the port of the referenced service. - servicePort(servicePort):: __backendMixin({servicePort: servicePort}), - }, - backendType:: hidden.extensions.v1beta1.ingressBackend, - }, - }, - // 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 '#'. - httpIngressRuleValue:: { - new():: {}, - // A collection of paths that map requests to backends. - paths(paths):: if std.type(paths) == "array" then {paths+: paths} else {paths+: [paths]}, - pathsType:: hidden.extensions.v1beta1.httpIngressPath, - mixin:: { - }, - }, - // Host Port Range 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. - hostPortRange:: { - new():: {}, - // max is the end of the range, inclusive. - max(max):: {max: max}, - // min is the start of the range, inclusive. - min(min):: {min: min}, - mixin:: { - }, - }, - // ID Range provides a min/max of an allowed range of IDs. - idRange:: { - new():: {}, - // Max is the end of the range, inclusive. - max(max):: {max: max}, - // Min is the start of the range, inclusive. - min(min):: {min: min}, - mixin:: { - }, - }, - // IngressBackend describes all endpoints for a given service and port. - ingressBackend:: { - new():: {}, - // Specifies the name of the referenced service. - serviceName(serviceName):: {serviceName: serviceName}, - // Specifies the port of the referenced service. - servicePort(servicePort):: {servicePort: servicePort}, - mixin:: { - }, - }, - // 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. - ingressRule:: { - new():: {}, - // 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 the RFC: 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(host):: {host: host}, - mixin:: { - // - http:: { - local __httpMixin(http) = {http+: http}, - mixinInstance(http):: __httpMixin(http), - // A collection of paths that map requests to backends. - paths(paths):: if std.type(paths) == "array" then __httpMixin({paths+: paths}) else __httpMixin({paths+: [paths]}), - pathsType:: hidden.extensions.v1beta1.httpIngressPath, - }, - httpType:: hidden.extensions.v1beta1.httpIngressRuleValue, - }, - }, - // IngressSpec describes the Ingress the user wishes to exist. - ingressSpec:: { - new():: {}, - // 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(rules):: if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.extensions.v1beta1.ingressRule, - // 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(tls):: if std.type(tls) == "array" then {tls+: tls} else {tls+: [tls]}, - tlsType:: hidden.extensions.v1beta1.ingressTls, - mixin:: { - // A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. - backend:: { - local __backendMixin(backend) = {backend+: backend}, - mixinInstance(backend):: __backendMixin(backend), - // Specifies the name of the referenced service. - serviceName(serviceName):: __backendMixin({serviceName: serviceName}), - // Specifies the port of the referenced service. - servicePort(servicePort):: __backendMixin({servicePort: servicePort}), - }, - backendType:: hidden.extensions.v1beta1.ingressBackend, - }, - }, - // IngressStatus describe the current state of the Ingress. - ingressStatus:: { - new():: {}, - mixin:: { - // LoadBalancer contains the current status of the load-balancer. - loadBalancer:: { - local __loadBalancerMixin(loadBalancer) = {loadBalancer+: loadBalancer}, - mixinInstance(loadBalancer):: __loadBalancerMixin(loadBalancer), - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - ingress(ingress):: if std.type(ingress) == "array" then __loadBalancerMixin({ingress+: ingress}) else __loadBalancerMixin({ingress+: [ingress]}), - ingressType:: hidden.core.v1.loadBalancerIngress, - }, - loadBalancerType:: hidden.core.v1.loadBalancerStatus, - }, - }, - // IngressTLS describes the transport layer security associated with an Ingress. - ingressTls:: { - new():: {}, - // 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(hosts):: if std.type(hosts) == "array" then {hosts+: hosts} else {hosts+: [hosts]}, - // SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL 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(secretName):: {secretName: secretName}, - mixin:: { - }, - }, - // This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from. - networkPolicyIngressRule:: { - new():: {}, - // 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list. - from(from):: if std.type(from) == "array" then {from+: from} else {from+: [from]}, - fromType:: hidden.extensions.v1beta1.networkPolicyPeer, - // 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(ports):: if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - portsType:: hidden.extensions.v1beta1.networkPolicyPort, - mixin:: { - }, - }, - // - networkPolicyPeer:: { - new():: {}, - mixin:: { - // Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. - namespaceSelector:: { - local __namespaceSelectorMixin(namespaceSelector) = {namespaceSelector+: namespaceSelector}, - mixinInstance(namespaceSelector):: __namespaceSelectorMixin(namespaceSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __namespaceSelectorMixin({matchExpressions+: matchExpressions}) else __namespaceSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __namespaceSelectorMixin({matchLabels+: matchLabels}), - }, - namespaceSelectorType:: hidden.meta.v1.labelSelector, - // This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - podSelector:: { - local __podSelectorMixin(podSelector) = {podSelector+: podSelector}, - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __podSelectorMixin({matchLabels+: matchLabels}), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // - networkPolicyPort:: { - new():: {}, - // If specified, 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(port):: {port: port}, - // Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP. - protocol(protocol):: {protocol: protocol}, - mixin:: { - }, - }, - // - networkPolicySpec:: { - new():: {}, - // 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 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(ingress):: if std.type(ingress) == "array" then {ingress+: ingress} else {ingress+: [ingress]}, - ingressType:: hidden.extensions.v1beta1.networkPolicyIngressRule, - mixin:: { - // 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:: { - local __podSelectorMixin(podSelector) = {podSelector+: podSelector}, - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __podSelectorMixin({matchLabels+: matchLabels}), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // Pod Security Policy Spec defines the policy enforced. - podSecurityPolicySpec:: { - new():: {}, - // 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(allowedCapabilities):: if std.type(allowedCapabilities) == "array" then {allowedCapabilities+: allowedCapabilities} else {allowedCapabilities+: [allowedCapabilities]}, - // 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 capabiility in both DefaultAddCapabilities and RequiredDropCapabilities. - defaultAddCapabilities(defaultAddCapabilities):: if std.type(defaultAddCapabilities) == "array" then {defaultAddCapabilities+: defaultAddCapabilities} else {defaultAddCapabilities+: [defaultAddCapabilities]}, - // hostIPC determines if the policy allows the use of HostIPC in the pod spec. - hostIpc(hostIpc):: {hostIPC: hostIpc}, - // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. - hostNetwork(hostNetwork):: {hostNetwork: hostNetwork}, - // hostPID determines if the policy allows the use of HostPID in the pod spec. - hostPid(hostPid):: {hostPID: hostPid}, - // hostPorts determines which host port ranges are allowed to be exposed. - hostPorts(hostPorts):: if std.type(hostPorts) == "array" then {hostPorts+: hostPorts} else {hostPorts+: [hostPorts]}, - hostPortsType:: hidden.extensions.v1beta1.hostPortRange, - // privileged determines if a pod can request to be run as privileged. - privileged(privileged):: {privileged: 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(readOnlyRootFilesystem):: {readOnlyRootFilesystem: readOnlyRootFilesystem}, - // RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - requiredDropCapabilities(requiredDropCapabilities):: if std.type(requiredDropCapabilities) == "array" then {requiredDropCapabilities+: requiredDropCapabilities} else {requiredDropCapabilities+: [requiredDropCapabilities]}, - // volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used. - volumes(volumes):: if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, - mixin:: { - // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext. - fsGroup:: { - local __fsGroupMixin(fsGroup) = {fsGroup+: fsGroup}, - mixinInstance(fsGroup):: __fsGroupMixin(fsGroup), - // 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. - ranges(ranges):: if std.type(ranges) == "array" then __fsGroupMixin({ranges+: ranges}) else __fsGroupMixin({ranges+: [ranges]}), - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - rule(rule):: __fsGroupMixin({rule: rule}), - }, - fsGroupType:: hidden.extensions.v1beta1.fsGroupStrategyOptions, - // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. - runAsUser:: { - local __runAsUserMixin(runAsUser) = {runAsUser+: runAsUser}, - mixinInstance(runAsUser):: __runAsUserMixin(runAsUser), - // Ranges are the allowed ranges of uids that may be used. - ranges(ranges):: if std.type(ranges) == "array" then __runAsUserMixin({ranges+: ranges}) else __runAsUserMixin({ranges+: [ranges]}), - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. - rule(rule):: __runAsUserMixin({rule: rule}), - }, - runAsUserType:: hidden.extensions.v1beta1.runAsUserStrategyOptions, - // seLinux is the strategy that will dictate the allowable labels that may be set. - seLinux:: { - local __seLinuxMixin(seLinux) = {seLinux+: seLinux}, - mixinInstance(seLinux):: __seLinuxMixin(seLinux), - // type is the strategy that will dictate the allowable labels that may be set. - rule(rule):: __seLinuxMixin({rule: rule}), - // seLinuxOptions required to run as; required for MustRunAs More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md - seLinuxOptions:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __seLinuxMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - seLinuxType:: hidden.extensions.v1beta1.seLinuxStrategyOptions, - // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. - supplementalGroups:: { - local __supplementalGroupsMixin(supplementalGroups) = {supplementalGroups+: supplementalGroups}, - mixinInstance(supplementalGroups):: __supplementalGroupsMixin(supplementalGroups), - // 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. - ranges(ranges):: if std.type(ranges) == "array" then __supplementalGroupsMixin({ranges+: ranges}) else __supplementalGroupsMixin({ranges+: [ranges]}), - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - rule(rule):: __supplementalGroupsMixin({rule: rule}), - }, - supplementalGroupsType:: hidden.extensions.v1beta1.supplementalGroupsStrategyOptions, - }, - }, - // ReplicaSetCondition describes the state of a replica set at a certain point. - replicaSetCondition:: { - new():: {}, - // A human readable message indicating details about the transition. - message(message):: {message: message}, - // The reason for the condition's last transition. - reason(reason):: {reason: reason}, - // Type of replica set condition. - type(type):: {type: type}, - mixin:: { - // The last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // ReplicaSetSpec is the specification of a ReplicaSet. - replicaSetSpec:: { - new():: {}, - // 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(minReadySeconds):: {minReadySeconds: 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(replicas):: {replicas: replicas}, - mixin:: { - // Selector is a label query over pods that should match the replica count. If the 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 replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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(annotations):: __metadataMixin({annotations+: 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(clusterName):: __metadataMixin({clusterName: clusterName}), - // 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(deletionGracePeriodSeconds):: __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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(finalizers):: if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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(labels):: __metadataMixin({labels+: labels}), - // 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(name):: __metadataMixin({name: name}), - // Namespace defines the space within 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(namespace):: __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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(activeDeadlineSeconds):: __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - nodeSelectorTerms(nodeSelectorTerms):: if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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(preferredDuringSchedulingIgnoredDuringExecution):: if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. 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 will 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. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingRequiredDuringExecution,omitempty"` 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(requiredDuringSchedulingIgnoredDuringExecution):: if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - automountServiceAccountToken(automountServiceAccountToken):: __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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(containers):: if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - dnsPolicy(dnsPolicy):: __specMixin({dnsPolicy: dnsPolicy}), - // 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(hostAliases):: if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - hostIpc(hostIpc):: __specMixin({hostIPC: hostIpc}), - // 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(hostNetwork):: __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - hostPid(hostPid):: __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - hostname(hostname):: __specMixin({hostname: hostname}), - // 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(imagePullSecrets):: if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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(initContainers):: if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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(nodeName):: __specMixin({nodeName: 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(nodeSelector):: __specMixin({nodeSelector+: nodeSelector}), - // 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(restartPolicy):: __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - schedulerName(schedulerName):: __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - fsGroup(fsGroup):: __securityContextMixin({fsGroup: fsGroup}), - // 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(runAsNonRoot):: __securityContextMixin({runAsNonRoot: 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(runAsUser):: __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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(supplementalGroups):: if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - serviceAccount(serviceAccount):: __specMixin({serviceAccount: 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(serviceAccountName):: __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - subdomain(subdomain):: __specMixin({subdomain: 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 delete immediately. 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(terminationGracePeriodSeconds):: __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - tolerations(tolerations):: if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - volumes(volumes):: if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // ReplicaSetStatus represents the current status of a ReplicaSet. - replicaSetStatus:: { - new():: {}, - // The number of available replicas (ready for at least minReadySeconds) for this replica set. - availableReplicas(availableReplicas):: {availableReplicas: availableReplicas}, - // Represents the latest available observations of a replica set's current state. - conditions(conditions):: if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.extensions.v1beta1.replicaSetCondition, - // The number of pods that have labels matching the labels of the pod template of the replicaset. - fullyLabeledReplicas(fullyLabeledReplicas):: {fullyLabeledReplicas: fullyLabeledReplicas}, - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - // The number of ready replicas for this replica set. - readyReplicas(readyReplicas):: {readyReplicas: readyReplicas}, - // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller - replicas(replicas):: {replicas: replicas}, - mixin:: { - }, - }, - // - rollbackConfig:: { - new():: {}, - // The revision to rollback to. If set to 0, rollback to the last revision. - revision(revision):: {revision: revision}, - mixin:: { - }, - }, - // Spec to control the desired behavior of daemon set rolling update. - rollingUpdateDaemonSet:: { - new():: {}, - // 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. 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(maxUnavailable):: {maxUnavailable: maxUnavailable}, - mixin:: { - }, - }, - // Spec to control the desired behavior of rolling update. - rollingUpdateDeployment:: { - new():: {}, - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - maxSurge(maxSurge):: {maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - maxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, - mixin:: { - }, - }, - // Run A sUser Strategy Options defines the strategy type and any options used to create the strategy. - runAsUserStrategyOptions:: { - new():: {}, - // Ranges are the allowed ranges of uids that may be used. - ranges(ranges):: if std.type(ranges) == "array" then {ranges+: ranges} else {ranges+: [ranges]}, - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. - rule(rule):: {rule: rule}, - mixin:: { - }, - }, - // SELinux Strategy Options defines the strategy type and any options used to create the strategy. - seLinuxStrategyOptions:: { - new():: {}, - // type is the strategy that will dictate the allowable labels that may be set. - rule(rule):: {rule: rule}, - mixin:: { - // seLinuxOptions required to run as; required for MustRunAs More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md - seLinuxOptions:: { - local __seLinuxOptionsMixin(seLinuxOptions) = {seLinuxOptions+: seLinuxOptions}, - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - level(level):: __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - role(role):: __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - type(type):: __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - user(user):: __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - }, - // describes the attributes of a scale subresource - scaleSpec:: { - new():: {}, - // desired number of instances for the scaled object. - replicas(replicas):: {replicas: replicas}, - mixin:: { - }, - }, - // represents the current status of a scale subresource. - scaleStatus:: { - new():: {}, - // actual number of observed instances of the scaled object. - replicas(replicas):: {replicas: replicas}, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - selector(selector):: {selector+: selector}, - // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - targetSelector(targetSelector):: {targetSelector: targetSelector}, - mixin:: { - }, - }, - // SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. - supplementalGroupsStrategyOptions:: { - new():: {}, - // 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. - ranges(ranges):: if std.type(ranges) == "array" then {ranges+: ranges} else {ranges+: [ranges]}, - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - rule(rule):: {rule: rule}, - mixin:: { - }, - }, - }, - }, - meta:: { - v1:: { - local apiVersion = {apiVersion: "meta/v1"}, - // APIGroup contains the name, the supported versions, and the preferred version of a group. - apiGroup:: { - new():: {}, - // name is the name of the group. - name(name):: {name: name}, - // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - serverAddressByClientCidrs(serverAddressByClientCidrs):: if std.type(serverAddressByClientCidrs) == "array" then {serverAddressByClientCIDRs+: serverAddressByClientCidrs} else {serverAddressByClientCIDRs+: [serverAddressByClientCidrs]}, - serverAddressByClientCidrsType:: hidden.meta.v1.serverAddressByClientCidr, - // versions are the versions supported in this group. - versions(versions):: if std.type(versions) == "array" then {versions+: versions} else {versions+: [versions]}, - versionsType:: hidden.meta.v1.groupVersionForDiscovery, - mixin:: { - // preferredVersion is the version preferred by the API server, which probably is the storage version. - preferredVersion:: { - local __preferredVersionMixin(preferredVersion) = {preferredVersion+: preferredVersion}, - mixinInstance(preferredVersion):: __preferredVersionMixin(preferredVersion), - // groupVersion specifies the API group and version in the form "group/version" - groupVersion(groupVersion):: __preferredVersionMixin({groupVersion: groupVersion}), - // version specifies the version in the form of "version". This is to save the clients the trouble of splitting the GroupVersion. - version(version):: __preferredVersionMixin({version: version}), - }, - preferredVersionType:: hidden.meta.v1.groupVersionForDiscovery, - }, - }, - // APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis. - apiGroupList:: { - new():: {}, - // groups is a list of APIGroup. - groups(groups):: if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, - groupsType:: hidden.meta.v1.apiGroup, - mixin:: { - }, - }, - // APIResource specifies the name of a resource and whether it is namespaced. - apiResource:: { - new():: {}, - // categories is a list of the grouped resources this resource belongs to (e.g. 'all') - categories(categories):: if std.type(categories) == "array" then {categories+: categories} else {categories+: [categories]}, - // name is the plural name of the resource. - name(name):: {name: name}, - // namespaced indicates if a resource is namespaced or not. - namespaced(namespaced):: {namespaced: namespaced}, - // shortNames is a list of suggested short names of the resource. - shortNames(shortNames):: if std.type(shortNames) == "array" then {shortNames+: shortNames} else {shortNames+: [shortNames]}, - // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface. - singularName(singularName):: {singularName: singularName}, - // verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) - verbs(verbs):: if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - mixin:: { - }, - }, - // APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced. - apiResourceList:: { - new():: {}, - // groupVersion is the group and version this APIResourceList is for. - groupVersion(groupVersion):: {groupVersion: groupVersion}, - // resources contains the name of the resources and if they are namespaced. - resources(resources):: if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - resourcesType:: hidden.meta.v1.apiResource, - mixin:: { - }, - }, - // APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API. - apiVersions:: { - new():: {}, - // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - serverAddressByClientCidrs(serverAddressByClientCidrs):: if std.type(serverAddressByClientCidrs) == "array" then {serverAddressByClientCIDRs+: serverAddressByClientCidrs} else {serverAddressByClientCIDRs+: [serverAddressByClientCidrs]}, - serverAddressByClientCidrsType:: hidden.meta.v1.serverAddressByClientCidr, - // versions are the api versions that are available. - versions(versions):: if std.type(versions) == "array" then {versions+: versions} else {versions+: [versions]}, - mixin:: { - }, - }, - // DeleteOptions may be provided when deleting an API object. - deleteOptions:: { - new():: {}, - // 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(gracePeriodSeconds):: {gracePeriodSeconds: gracePeriodSeconds}, - // 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(orphanDependents):: {orphanDependents: orphanDependents}, - // 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. - propagationPolicy(propagationPolicy):: {propagationPolicy: propagationPolicy}, - mixin:: { - // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. - preconditions:: { - local __preconditionsMixin(preconditions) = {preconditions+: preconditions}, - mixinInstance(preconditions):: __preconditionsMixin(preconditions), - // Specifies the target UID. - uid(uid):: __preconditionsMixin({uid: uid}), - }, - preconditionsType:: hidden.meta.v1.preconditions, - }, - }, - // GroupVersion contains the "group/version" and "version" string of a version. It is made a struct to keep extensibility. - groupVersionForDiscovery:: { - new():: {}, - // groupVersion specifies the API group and version in the form "group/version" - groupVersion(groupVersion):: {groupVersion: groupVersion}, - // version specifies the version in the form of "version". This is to save the clients the trouble of splitting the GroupVersion. - version(version):: {version: version}, - mixin:: { - }, - }, - // Initializer is information about an initializer that has not yet completed. - initializer:: { - new():: {}, - // name of the process that is responsible for initializing this object. - name(name):: {name: name}, - mixin:: { - }, - }, - // Initializers tracks the progress of initialization. - initializers:: { - new():: {}, - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then {pending+: pending} else {pending+: [pending]}, - pendingType:: hidden.meta.v1.initializer, - mixin:: { - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = {result+: result}, - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - }, - // 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. - labelSelector:: { - new():: {}, - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then {matchExpressions+: matchExpressions} else {matchExpressions+: [matchExpressions]}, - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: {matchLabels+: matchLabels}, - mixin:: { - }, - }, - // A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - labelSelectorRequirement:: { - new():: {}, - // key is the label key that the selector applies to. - key(key):: {key: key}, - // operator represents a key's relationship to a set of values. Valid operators ard In, NotIn, Exists and DoesNotExist. - operator(operator):: {operator: 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(values):: if std.type(values) == "array" then {values+: values} else {values+: [values]}, - mixin:: { - }, - }, - // ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. - listMeta:: { - new():: {}, - // 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/api-conventions.md#concurrency-control-and-consistency - resourceVersion(resourceVersion):: {resourceVersion: resourceVersion}, - // SelfLink is a URL representing this object. Populated by the system. Read-only. - selfLink(selfLink):: {selfLink: selfLink}, - mixin:: { - }, - }, - // ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. - objectMeta:: { - new():: {}, - // 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(annotations):: {annotations+: 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(clusterName):: {clusterName: clusterName}, - // 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(deletionGracePeriodSeconds):: {deletionGracePeriodSeconds: deletionGracePeriodSeconds}, - // 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(finalizers):: if std.type(finalizers) == "array" then {finalizers+: finalizers} else {finalizers+: [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/api-conventions.md#idempotency - generateName(generateName):: {generateName: generateName}, - // 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(labels):: {labels+: labels}, - // 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(name):: {name: name}, - // Namespace defines the space within 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(namespace):: {namespace: namespace}, - mixin:: { - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = {initializers+: initializers}, - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - pending(pending):: if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - code(code):: __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - message(message):: __resultMixin({message: message}), - // 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(reason):: __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - }, - }, - // OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field. - ownerReference:: { - new():: {}, - // 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(blockOwnerDeletion):: {blockOwnerDeletion: blockOwnerDeletion}, - // If true, this reference points to the managing controller. - controller(controller):: {controller: controller}, - // Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names - name(name):: {name: name}, - // UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids - uid(uid):: {uid: uid}, - mixin:: { - }, - }, - // Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. - patch:: { - new():: {}, - mixin:: { - }, - }, - // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. - preconditions:: { - new():: {}, - // Specifies the target UID. - uid(uid):: {uid: uid}, - mixin:: { - }, - }, - // ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. - serverAddressByClientCidr:: { - new():: {}, - // The CIDR with which clients can match their IP to figure out the server address that they should use. - clientCidr(clientCidr):: {clientCIDR: clientCidr}, - // Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port. - serverAddress(serverAddress):: {serverAddress: serverAddress}, - mixin:: { - }, - }, - // Status is a return value for calls that don't return other objects. - status:: { - new():: {}, - // Suggested HTTP return code for this status, 0 if not set. - code(code):: {code: code}, - // A human-readable description of the status of this operation. - message(message):: {message: message}, - // 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(reason):: {reason: reason}, - mixin:: { - // 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:: { - local __detailsMixin(details) = {details+: details}, - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: __detailsMixin({name: name}), - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: __detailsMixin({retryAfterSeconds: 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(uid):: __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - }, - }, - // StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered. - statusCause:: { - new():: {}, - // 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(field):: {field: field}, - // A human-readable description of the cause of the error. This field may be presented as-is to a reader. - message(message):: {message: message}, - // A machine-readable description of the cause of the error. If this value is empty there is no information available. - reason(reason):: {reason: reason}, - mixin:: { - }, - }, - // 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. - statusDetails:: { - new():: {}, - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - causes(causes):: if std.type(causes) == "array" then {causes+: causes} else {causes+: [causes]}, - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - group(group):: {group: group}, - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - name(name):: {name: name}, - // If specified, the time in seconds before the operation should be retried. - retryAfterSeconds(retryAfterSeconds):: {retryAfterSeconds: 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(uid):: {uid: uid}, - mixin:: { - }, - }, - // - time:: { - new():: {}, - mixin:: { - }, - }, - // Event represents a single event to a watched resource. - watchEvent:: { - new():: {}, - // - type(type):: {type: type}, - mixin:: { - }, - }, - }, - }, - networking:: { - v1:: { - local apiVersion = {apiVersion: "networking/v1"}, - // 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. - networkPolicyIngressRule:: { - new():: {}, - // 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list. - from(from):: if std.type(from) == "array" then {from+: from} else {from+: [from]}, - fromType:: hidden.networking.v1.networkPolicyPeer, - // 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(ports):: if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - portsType:: hidden.networking.v1.networkPolicyPort, - mixin:: { - }, - }, - // NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields must be specified. - networkPolicyPeer:: { - new():: {}, - mixin:: { - // Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. - namespaceSelector:: { - local __namespaceSelectorMixin(namespaceSelector) = {namespaceSelector+: namespaceSelector}, - mixinInstance(namespaceSelector):: __namespaceSelectorMixin(namespaceSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __namespaceSelectorMixin({matchExpressions+: matchExpressions}) else __namespaceSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __namespaceSelectorMixin({matchLabels+: matchLabels}), - }, - namespaceSelectorType:: hidden.meta.v1.labelSelector, - // This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - podSelector:: { - local __podSelectorMixin(podSelector) = {podSelector+: podSelector}, - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __podSelectorMixin({matchLabels+: matchLabels}), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // NetworkPolicyPort describes a port to allow traffic on - networkPolicyPort:: { - new():: {}, - // 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. - port(port):: {port: port}, - // The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP. - protocol(protocol):: {protocol: protocol}, - mixin:: { - }, - }, - // NetworkPolicySpec provides the specification of a NetworkPolicy - networkPolicySpec:: { - new():: {}, - // 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(ingress):: if std.type(ingress) == "array" then {ingress+: ingress} else {ingress+: [ingress]}, - ingressType:: hidden.networking.v1.networkPolicyIngressRule, - mixin:: { - // 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:: { - local __podSelectorMixin(podSelector) = {podSelector+: podSelector}, - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __podSelectorMixin({matchLabels+: matchLabels}), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - }, - }, - policy:: { - v1beta1:: { - local apiVersion = {apiVersion: "policy/v1beta1"}, - // PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. - podDisruptionBudgetSpec:: { - new():: {}, - // 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(maxUnavailable):: {maxUnavailable: 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(minAvailable):: {minAvailable: minAvailable}, - mixin:: { - // Label query over pods whose evictions are managed by the disruption budget. - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - }, - // PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. - podDisruptionBudgetStatus:: { - new():: {}, - // current number of healthy pods - currentHealthy(currentHealthy):: {currentHealthy: currentHealthy}, - // minimum desired number of healthy pods - desiredHealthy(desiredHealthy):: {desiredHealthy: desiredHealthy}, - // DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. - disruptedPods(disruptedPods):: {disruptedPods+: disruptedPods}, - // Number of pod disruptions that are currently allowed. - disruptionsAllowed(disruptionsAllowed):: {disruptionsAllowed: disruptionsAllowed}, - // total number of pods counted by this disruption budget - expectedPods(expectedPods):: {expectedPods: expectedPods}, - // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status informatio is valid only if observedGeneration equals to PDB's object generation. - observedGeneration(observedGeneration):: {observedGeneration: observedGeneration}, - mixin:: { - }, - }, - }, - }, - rbac:: { - v1alpha1:: { - local apiVersion = {apiVersion: "rbac/v1alpha1"}, - // 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. - policyRule:: { - new():: {}, - // 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(apiGroups):: if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [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 This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. 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(nonResourceUrls):: if std.type(nonResourceUrls) == "array" then {nonResourceURLs+: nonResourceUrls} else {nonResourceURLs+: [nonResourceUrls]}, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - resourceNames(resourceNames):: if std.type(resourceNames) == "array" then {resourceNames+: resourceNames} else {resourceNames+: [resourceNames]}, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. - resources(resources):: if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - verbs(verbs):: if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - mixin:: { - }, - }, - // RoleRef contains information that points to the role being used - roleRef:: { - new():: {}, - // APIGroup is the group for the resource being referenced - apiGroup(apiGroup):: {apiGroup: apiGroup}, - // Name is the name of resource being referenced - name(name):: {name: name}, - mixin:: { - }, - }, - // 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. - subject:: { - new():: {}, - // Name of the object being referenced. - name(name):: {name: name}, - // 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(namespace):: {namespace: namespace}, - mixin:: { - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "rbac/v1beta1"}, - // 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. - policyRule:: { - new():: {}, - // 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(apiGroups):: if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [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(nonResourceUrls):: if std.type(nonResourceUrls) == "array" then {nonResourceURLs+: nonResourceUrls} else {nonResourceURLs+: [nonResourceUrls]}, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - resourceNames(resourceNames):: if std.type(resourceNames) == "array" then {resourceNames+: resourceNames} else {resourceNames+: [resourceNames]}, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. - resources(resources):: if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - verbs(verbs):: if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - mixin:: { - }, - }, - // RoleRef contains information that points to the role being used - roleRef:: { - new():: {}, - // APIGroup is the group for the resource being referenced - apiGroup(apiGroup):: {apiGroup: apiGroup}, - // Name is the name of resource being referenced - name(name):: {name: name}, - mixin:: { - }, - }, - // 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. - subject:: { - new():: {}, - // 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(apiGroup):: {apiGroup: apiGroup}, - // Name of the object being referenced. - name(name):: {name: name}, - // 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(namespace):: {namespace: namespace}, - mixin:: { - }, - }, - }, - }, - settings:: { - v1alpha1:: { - local apiVersion = {apiVersion: "settings/v1alpha1"}, - // PodPresetSpec is a description of a pod preset. - podPresetSpec:: { - new():: {}, - // Env defines the collection of EnvVar to inject into containers. - env(env):: if std.type(env) == "array" then {env+: env} else {env+: [env]}, - // EnvFrom defines the collection of EnvFromSource to inject into containers. - envFrom(envFrom):: if std.type(envFrom) == "array" then {envFrom+: envFrom} else {envFrom+: [envFrom]}, - envFromType:: hidden.core.v1.envFromSource, - envType:: hidden.core.v1.envVar, - // VolumeMounts defines the collection of VolumeMount to inject into containers. - volumeMounts(volumeMounts):: if std.type(volumeMounts) == "array" then {volumeMounts+: volumeMounts} else {volumeMounts+: [volumeMounts]}, - volumeMountsType:: hidden.core.v1.volumeMount, - // Volumes defines the collection of Volume to inject into the pod. - volumes(volumes):: if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, - volumesType:: hidden.core.v1.volume, - mixin:: { - // Selector is a label query over a set of resources, in this case pods. Required. - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - matchExpressions(matchExpressions):: if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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(matchLabels):: __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - }, - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.3/k.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.3/k.libsonnet deleted file mode 100644 index 702cdf64..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.3/k.libsonnet +++ /dev/null @@ -1,80 +0,0 @@ -local k8s = import "k8s.libsonnet"; - -local apps = k8s.apps; -local core = k8s.core; -local extensions = k8s.extensions; - -local hidden = { - mapContainers(f):: { - local podContainers = super.spec.template.spec.containers, - spec+: { - template+: { - spec+: { - // IMPORTANT: This overwrites the 'containers' field - // for this deployment. - containers: std.map(f, podContainers), - }, - }, - }, - }, - - mapContainersWithName(names, f) :: - local nameSet = - if std.type(names) == "array" - then std.set(names) - else std.set([names]); - local inNameSet(name) = std.length(std.setInter(nameSet, std.set([name]))) > 0; - self.mapContainers( - function(c) - if std.objectHas(c, "name") && inNameSet(c.name) - then f(c) - else c - ), -}; - -k8s + { - apps:: apps + { - v1beta1:: apps.v1beta1 + { - local v1beta1 = apps.v1beta1, - - daemonSet:: v1beta1.daemonSet + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - - deployment:: v1beta1.deployment + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - }, - }, - - core:: core + { - v1:: core.v1 + { - list:: { - new(items):: - {apiVersion: "v1"} + - {kind: "List"} + - self.items(items), - - items(items):: if std.type(items) == "array" then {items+: items} else {items+: [items]}, - }, - }, - }, - - extensions:: extensions + { - v1beta1:: extensions.v1beta1 + { - local v1beta1 = extensions.v1beta1, - - daemonSet:: v1beta1.daemonSet + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - - deployment:: v1beta1.deployment + { - mapContainers(f):: hidden.mapContainers(f), - mapContainersWithName(names, f):: hidden.mapContainersWithName(names, f), - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.3/k8s.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.3/k8s.libsonnet deleted file mode 100644 index 9d6038d7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.3/k8s.libsonnet +++ /dev/null @@ -1,25123 +0,0 @@ -// AUTOGENERATED from the Kubernetes OpenAPI specification. DO NOT MODIFY. -// Kubernetes version: v1.8.0 -// SHA of ksonnet-lib HEAD: 8ce7ccb863d6e8f899bfd5a307694dc356b15f76 -// SHA of Kubernetes HEAD OpenAPI spec is generated from: 0b9efaeb34a2fc51ff8e4d34ad9bc6375459c4a4 - -{ - admissionregistration:: { - v1alpha1:: { - local apiVersion = {apiVersion: "admissionregistration.k8s.io/v1alpha1"}, - // ExternalAdmissionHookConfiguration describes the configuration of initializers. - externalAdmissionHookConfiguration:: { - local kind = {kind: "ExternalAdmissionHookConfiguration"}, - new():: apiVersion + kind, - // ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations. - withExternalAdmissionHooks(externalAdmissionHooks):: self + if std.type(externalAdmissionHooks) == "array" then {externalAdmissionHooks: externalAdmissionHooks} else {externalAdmissionHooks: [externalAdmissionHooks]}, - // ExternalAdmissionHooks is a list of external admission webhooks and the affected resources and operations. - withExternalAdmissionHooksMixin(externalAdmissionHooks):: self + if std.type(externalAdmissionHooks) == "array" then {externalAdmissionHooks+: externalAdmissionHooks} else {externalAdmissionHooks+: [externalAdmissionHooks]}, - externalAdmissionHooksType:: hidden.admissionregistration.v1alpha1.externalAdmissionHook, - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ExternalAdmissionHookConfigurationList is a list of ExternalAdmissionHookConfiguration. - externalAdmissionHookConfigurationList:: { - local kind = {kind: "ExternalAdmissionHookConfigurationList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of ExternalAdmissionHookConfiguration. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of ExternalAdmissionHookConfiguration. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.admissionregistration.v1alpha1.externalAdmissionHookConfiguration, - mixin:: { - }, - }, - // InitializerConfiguration describes the configuration of initializers. - initializerConfiguration:: { - local kind = {kind: "InitializerConfiguration"}, - new():: apiVersion + kind, - // Initializers is a list of resources and their default initializers Order-sensitive. When merging multiple InitializerConfigurations, we sort the initializers from different InitializerConfigurations by the name of the InitializerConfigurations; the order of the initializers from the same InitializerConfiguration is preserved. - withInitializers(initializers):: self + if std.type(initializers) == "array" then {initializers: initializers} else {initializers: [initializers]}, - // Initializers is a list of resources and their default initializers Order-sensitive. When merging multiple InitializerConfigurations, we sort the initializers from different InitializerConfigurations by the name of the InitializerConfigurations; the order of the initializers from the same InitializerConfiguration is preserved. - withInitializersMixin(initializers):: self + if std.type(initializers) == "array" then {initializers+: initializers} else {initializers+: [initializers]}, - initializersType:: hidden.admissionregistration.v1alpha1.initializer, - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // InitializerConfigurationList is a list of InitializerConfiguration. - initializerConfigurationList:: { - local kind = {kind: "InitializerConfigurationList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of InitializerConfiguration. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of InitializerConfiguration. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.admissionregistration.v1alpha1.initializerConfiguration, - mixin:: { - }, - }, - }, - }, - apps:: { - v1beta1:: { - local apiVersion = {apiVersion: "apps/v1beta1"}, - // DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. 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. - controllerRevision:: { - local kind = {kind: "ControllerRevision"}, - new():: apiVersion + kind, - // Revision indicates the revision of the state represented by Data. - withRevision(revision):: self + {revision: revision}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ControllerRevisionList is a resource containing a list of ControllerRevision objects. - controllerRevisionList:: { - local kind = {kind: "ControllerRevisionList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is the list of ControllerRevisions - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is the list of ControllerRevisions - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apps.v1beta1.controllerRevision, - mixin:: { - }, - }, - // DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets. - deployment:: { - local kind = {kind: "Deployment"}, - new(name, replicas, containers, podLabels={app: name}):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.spec.withContainers(containers) + self.mixin.spec.template.metadata.withLabels(podLabels), - mixin:: { - // Standard object metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the Deployment. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: minReadySeconds}), - // Indicates that the deployment is paused. - withPaused(paused):: self + __specMixin({paused: 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. - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + __specMixin({progressDeadlineSeconds: progressDeadlineSeconds}), - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + __specMixin({replicas: 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 2. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), - // DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = __specMixin({rollbackTo+: rollbackTo}), - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + __rollbackToMixin({revision: revision}), - }, - rollbackToType:: hidden.apps.v1beta1.rollbackConfig, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = __specMixin({strategy+: strategy}), - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({type: type}), - }, - strategyType:: hidden.apps.v1beta1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.apps.v1beta1.deploymentSpec, - }, - }, - // DeploymentList is a list of Deployments. - deploymentList:: { - local kind = {kind: "DeploymentList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is the list of Deployments. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is the list of Deployments. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apps.v1beta1.deployment, - mixin:: { - }, - }, - // DEPRECATED. DeploymentRollback stores the information required to rollback a deployment. - deploymentRollback:: { - local kind = {kind: "DeploymentRollback"}, - new(name):: apiVersion + kind + self.withName(name), - // Required: This must match the Name of a deployment. - withName(name):: self + {name: name}, - // The annotations to be updated to a deployment - withUpdatedAnnotations(updatedAnnotations):: self + {updatedAnnotations: updatedAnnotations}, - // The annotations to be updated to a deployment - withUpdatedAnnotationsMixin(updatedAnnotations):: self + {updatedAnnotations+: updatedAnnotations}, - mixin:: { - // The config of this deployment rollback. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = {rollbackTo+: rollbackTo}, - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + __rollbackToMixin({revision: revision}), - }, - rollbackToType:: hidden.apps.v1beta1.rollbackConfig, - }, - }, - // Scale represents a scaling request for a resource. - scale:: { - local kind = {kind: "Scale"}, - new(replicas):: apiVersion + kind + self.mixin.spec.withReplicas(replicas), - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // desired number of instances for the scaled object. - withReplicas(replicas):: self + __specMixin({replicas: replicas}), - }, - specType:: hidden.apps.v1beta1.scaleSpec, - }, - }, - // DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. 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. - statefulSet:: { - local kind = {kind: "StatefulSet"}, - new(name, replicas, containers, volumeClaims, podLabels={app: name}):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.spec.withContainers(containers) + self.mixin.spec.withVolumeClaimTemplates(volumeClaims) + self.mixin.spec.template.metadata.withLabels(podLabels), - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the desired identities of pods in this set. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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. - withPodManagementPolicy(podManagementPolicy):: self + __specMixin({podManagementPolicy: 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. - withReplicas(replicas):: self + __specMixin({replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), - // selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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. - withServiceName(serviceName):: self + __specMixin({serviceName: 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = __specMixin({updateStrategy+: updateStrategy}), - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. - withPartition(partition):: self + __rollingUpdateMixin({partition: partition}), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateStatefulSetStrategy, - // Type indicates the type of the StatefulSetUpdateStrategy. - withType(type):: self + __updateStrategyMixin({type: type}), - }, - updateStrategyType:: hidden.apps.v1beta1.statefulSetUpdateStrategy, - // 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. - withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then __specMixin({volumeClaimTemplates: volumeClaimTemplates}) else __specMixin({volumeClaimTemplates: [volumeClaimTemplates]}), - // 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. - withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then __specMixin({volumeClaimTemplates+: volumeClaimTemplates}) else __specMixin({volumeClaimTemplates+: [volumeClaimTemplates]}), - volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, - }, - specType:: hidden.apps.v1beta1.statefulSetSpec, - }, - }, - // StatefulSetList is a collection of StatefulSets. - statefulSetList:: { - local kind = {kind: "StatefulSetList"}, - new(items):: apiVersion + kind + self.withItems(items), - // - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apps.v1beta1.statefulSet, - mixin:: { - }, - }, - }, - v1beta2:: { - local apiVersion = {apiVersion: "apps/v1beta2"}, - // 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. - controllerRevision:: { - local kind = {kind: "ControllerRevision"}, - new():: apiVersion + kind, - // Revision indicates the revision of the state represented by Data. - withRevision(revision):: self + {revision: revision}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ControllerRevisionList is a resource containing a list of ControllerRevision objects. - controllerRevisionList:: { - local kind = {kind: "ControllerRevisionList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is the list of ControllerRevisions - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is the list of ControllerRevisions - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apps.v1beta2.controllerRevision, - mixin:: { - }, - }, - // DaemonSet represents the configuration of a daemon set. - daemonSet:: { - local kind = {kind: "DaemonSet"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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). - withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), - // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = __specMixin({updateStrategy+: updateStrategy}), - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDaemonSet, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. - withType(type):: self + __updateStrategyMixin({type: type}), - }, - updateStrategyType:: hidden.apps.v1beta2.daemonSetUpdateStrategy, - }, - specType:: hidden.apps.v1beta2.daemonSetSpec, - }, - }, - // DaemonSetList is a collection of daemon sets. - daemonSetList:: { - local kind = {kind: "DaemonSetList"}, - new(items):: apiVersion + kind + self.withItems(items), - // A list of daemon sets. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // A list of daemon sets. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apps.v1beta2.daemonSet, - mixin:: { - }, - }, - // Deployment enables declarative updates for Pods and ReplicaSets. - deployment:: { - local kind = {kind: "Deployment"}, - new(name, replicas, containers, podLabels={app: name}):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.spec.withContainers(containers) + self.mixin.spec.template.metadata.withLabels(podLabels), - mixin:: { - // Standard object metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the Deployment. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: minReadySeconds}), - // Indicates that the deployment is paused. - withPaused(paused):: self + __specMixin({paused: 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. - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + __specMixin({progressDeadlineSeconds: progressDeadlineSeconds}), - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + __specMixin({replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = __specMixin({strategy+: strategy}), - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({type: type}), - }, - strategyType:: hidden.apps.v1beta2.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.apps.v1beta2.deploymentSpec, - }, - }, - // DeploymentList is a list of Deployments. - deploymentList:: { - local kind = {kind: "DeploymentList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is the list of Deployments. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is the list of Deployments. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apps.v1beta2.deployment, - mixin:: { - }, - }, - // ReplicaSet represents the configuration of a ReplicaSet. - replicaSet:: { - local kind = {kind: "ReplicaSet"}, - new():: apiVersion + kind, - mixin:: { - // 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/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: 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 - withReplicas(replicas):: self + __specMixin({replicas: replicas}), - // Selector is a label query over pods that should match the replica count. If the 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 replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.apps.v1beta2.replicaSetSpec, - }, - }, - // ReplicaSetList is a collection of ReplicaSets. - replicaSetList:: { - local kind = {kind: "ReplicaSetList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apps.v1beta2.replicaSet, - mixin:: { - }, - }, - // Scale represents a scaling request for a resource. - scale:: { - local kind = {kind: "Scale"}, - new(replicas):: apiVersion + kind + self.mixin.spec.withReplicas(replicas), - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // desired number of instances for the scaled object. - withReplicas(replicas):: self + __specMixin({replicas: replicas}), - }, - specType:: hidden.apps.v1beta2.scaleSpec, - }, - }, - // 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. - statefulSet:: { - local kind = {kind: "StatefulSet"}, - new(name, replicas, containers, volumeClaims, podLabels={app: name}):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.spec.withContainers(containers) + self.mixin.spec.withVolumeClaimTemplates(volumeClaims) + self.mixin.spec.template.metadata.withLabels(podLabels), - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the desired identities of pods in this set. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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. - withPodManagementPolicy(podManagementPolicy):: self + __specMixin({podManagementPolicy: 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. - withReplicas(replicas):: self + __specMixin({replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), - // selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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. - withServiceName(serviceName):: self + __specMixin({serviceName: 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = __specMixin({updateStrategy+: updateStrategy}), - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. - withPartition(partition):: self + __rollingUpdateMixin({partition: partition}), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateStatefulSetStrategy, - // Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. - withType(type):: self + __updateStrategyMixin({type: type}), - }, - updateStrategyType:: hidden.apps.v1beta2.statefulSetUpdateStrategy, - // 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. - withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then __specMixin({volumeClaimTemplates: volumeClaimTemplates}) else __specMixin({volumeClaimTemplates: [volumeClaimTemplates]}), - // 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. - withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then __specMixin({volumeClaimTemplates+: volumeClaimTemplates}) else __specMixin({volumeClaimTemplates+: [volumeClaimTemplates]}), - volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, - }, - specType:: hidden.apps.v1beta2.statefulSetSpec, - }, - }, - // StatefulSetList is a collection of StatefulSets. - statefulSetList:: { - local kind = {kind: "StatefulSetList"}, - new(items):: apiVersion + kind + self.withItems(items), - // - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apps.v1beta2.statefulSet, - mixin:: { - }, - }, - }, - }, - authentication:: { - v1:: { - local apiVersion = {apiVersion: "authentication.k8s.io/v1"}, - // 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. - tokenReview:: { - local kind = {kind: "TokenReview"}, - new(token):: apiVersion + kind + self.mixin.spec.withToken(token), - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Token is the opaque bearer token. - withToken(token):: self + __specMixin({token: token}), - }, - specType:: hidden.authentication.v1.tokenReviewSpec, - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "authentication.k8s.io/v1beta1"}, - // 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. - tokenReview:: { - local kind = {kind: "TokenReview"}, - new(token):: apiVersion + kind + self.mixin.spec.withToken(token), - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Token is the opaque bearer token. - withToken(token):: self + __specMixin({token: token}), - }, - specType:: hidden.authentication.v1beta1.tokenReviewSpec, - }, - }, - }, - }, - authorization:: { - v1:: { - local apiVersion = {apiVersion: "authorization.k8s.io/v1"}, - // 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. - localSubjectAccessReview:: { - local kind = {kind: "LocalSubjectAccessReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtra(extra):: self + __specMixin({extra: extra}), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtraMixin(extra):: self + __specMixin({extra+: extra}), - // Groups is the groups you're testing for. - withGroups(groups):: self + if std.type(groups) == "array" then __specMixin({groups: groups}) else __specMixin({groups: [groups]}), - // Groups is the groups you're testing for. - withGroupsMixin(groups):: self + if std.type(groups) == "array" then __specMixin({groups+: groups}) else __specMixin({groups+: [groups]}), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - // UID information about the requesting user. - withUid(uid):: self + __specMixin({uid: 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 - withUser(user):: self + __specMixin({user: user}), - }, - specType:: hidden.authorization.v1.subjectAccessReviewSpec, - }, - }, - // 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 - selfSubjectAccessReview:: { - local kind = {kind: "SelfSubjectAccessReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated. user and groups must be empty - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - }, - specType:: hidden.authorization.v1.selfSubjectAccessReviewSpec, - }, - }, - // 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. - selfSubjectRulesReview:: { - local kind = {kind: "SelfSubjectRulesReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Namespace to evaluate rules for. Required. - withNamespace(namespace):: self + __specMixin({namespace: namespace}), - }, - specType:: hidden.authorization.v1.selfSubjectRulesReviewSpec, - }, - }, - // SubjectAccessReview checks whether or not a user or group can perform an action. - subjectAccessReview:: { - local kind = {kind: "SubjectAccessReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtra(extra):: self + __specMixin({extra: extra}), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtraMixin(extra):: self + __specMixin({extra+: extra}), - // Groups is the groups you're testing for. - withGroups(groups):: self + if std.type(groups) == "array" then __specMixin({groups: groups}) else __specMixin({groups: [groups]}), - // Groups is the groups you're testing for. - withGroupsMixin(groups):: self + if std.type(groups) == "array" then __specMixin({groups+: groups}) else __specMixin({groups+: [groups]}), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - // UID information about the requesting user. - withUid(uid):: self + __specMixin({uid: 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 - withUser(user):: self + __specMixin({user: user}), - }, - specType:: hidden.authorization.v1.subjectAccessReviewSpec, - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "authorization.k8s.io/v1beta1"}, - // 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. - localSubjectAccessReview:: { - local kind = {kind: "LocalSubjectAccessReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtra(extra):: self + __specMixin({extra: extra}), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtraMixin(extra):: self + __specMixin({extra+: extra}), - // Groups is the groups you're testing for. - withGroup(group):: self + if std.type(group) == "array" then __specMixin({group: group}) else __specMixin({group: [group]}), - // Groups is the groups you're testing for. - withGroupMixin(group):: self + if std.type(group) == "array" then __specMixin({group+: group}) else __specMixin({group+: [group]}), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - // UID information about the requesting user. - withUid(uid):: self + __specMixin({uid: uid}), - // User is the user you're testing for. If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups - withUser(user):: self + __specMixin({user: user}), - }, - specType:: hidden.authorization.v1beta1.subjectAccessReviewSpec, - }, - }, - // 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 - selfSubjectAccessReview:: { - local kind = {kind: "SelfSubjectAccessReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated. user and groups must be empty - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - }, - specType:: hidden.authorization.v1beta1.selfSubjectAccessReviewSpec, - }, - }, - // 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. - selfSubjectRulesReview:: { - local kind = {kind: "SelfSubjectRulesReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Namespace to evaluate rules for. Required. - withNamespace(namespace):: self + __specMixin({namespace: namespace}), - }, - specType:: hidden.authorization.v1beta1.selfSubjectRulesReviewSpec, - }, - }, - // SubjectAccessReview checks whether or not a user or group can perform an action. - subjectAccessReview:: { - local kind = {kind: "SubjectAccessReview"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtra(extra):: self + __specMixin({extra: extra}), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtraMixin(extra):: self + __specMixin({extra+: extra}), - // Groups is the groups you're testing for. - withGroup(group):: self + if std.type(group) == "array" then __specMixin({group: group}) else __specMixin({group: [group]}), - // Groups is the groups you're testing for. - withGroupMixin(group):: self + if std.type(group) == "array" then __specMixin({group+: group}) else __specMixin({group+: [group]}), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({nonResourceAttributes+: nonResourceAttributes}), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({resourceAttributes+: resourceAttributes}), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - // UID information about the requesting user. - withUid(uid):: self + __specMixin({uid: uid}), - // User is the user you're testing for. If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups - withUser(user):: self + __specMixin({user: user}), - }, - specType:: hidden.authorization.v1beta1.subjectAccessReviewSpec, - }, - }, - }, - }, - autoscaling:: { - v1:: { - local apiVersion = {apiVersion: "autoscaling/v1"}, - // configuration of a horizontal pod autoscaler. - horizontalPodAutoscaler:: { - local kind = {kind: "HorizontalPodAutoscaler"}, - new():: apiVersion + kind, - mixin:: { - // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. - withMaxReplicas(maxReplicas):: self + __specMixin({maxReplicas: maxReplicas}), - // lower limit for the number of pods that can be set by the autoscaler, default 1. - withMinReplicas(minReplicas):: self + __specMixin({minReplicas: minReplicas}), - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = __specMixin({scaleTargetRef+: scaleTargetRef}), - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __scaleTargetRefMixin({name: name}), - }, - scaleTargetRefType:: hidden.autoscaling.v1.crossVersionObjectReference, - // 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. - withTargetCpuUtilizationPercentage(targetCpuUtilizationPercentage):: self + __specMixin({targetCPUUtilizationPercentage: targetCpuUtilizationPercentage}), - }, - specType:: hidden.autoscaling.v1.horizontalPodAutoscalerSpec, - }, - }, - // list of horizontal pod autoscaler objects. - horizontalPodAutoscalerList:: { - local kind = {kind: "HorizontalPodAutoscalerList"}, - new(items):: apiVersion + kind + self.withItems(items), - // list of horizontal pod autoscaler objects. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // list of horizontal pod autoscaler objects. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.autoscaling.v1.horizontalPodAutoscaler, - mixin:: { - }, - }, - // Scale represents a scaling request for a resource. - scale:: { - local kind = {kind: "Scale"}, - new(replicas):: apiVersion + kind + self.mixin.spec.withReplicas(replicas), - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // desired number of instances for the scaled object. - withReplicas(replicas):: self + __specMixin({replicas: replicas}), - }, - specType:: hidden.autoscaling.v1.scaleSpec, - }, - }, - }, - v2beta1:: { - local apiVersion = {apiVersion: "autoscaling/v2beta1"}, - // 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. - horizontalPodAutoscaler:: { - local kind = {kind: "HorizontalPodAutoscaler"}, - new():: apiVersion + kind, - mixin:: { - // metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas. - withMaxReplicas(maxReplicas):: self + __specMixin({maxReplicas: maxReplicas}), - // 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. - withMetrics(metrics):: self + if std.type(metrics) == "array" then __specMixin({metrics: metrics}) else __specMixin({metrics: [metrics]}), - // 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. - withMetricsMixin(metrics):: self + if std.type(metrics) == "array" then __specMixin({metrics+: metrics}) else __specMixin({metrics+: [metrics]}), - metricsType:: hidden.autoscaling.v2beta1.metricSpec, - // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. - withMinReplicas(minReplicas):: self + __specMixin({minReplicas: minReplicas}), - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = __specMixin({scaleTargetRef+: scaleTargetRef}), - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __scaleTargetRefMixin({name: name}), - }, - scaleTargetRefType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, - }, - specType:: hidden.autoscaling.v2beta1.horizontalPodAutoscalerSpec, - }, - }, - // HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. - horizontalPodAutoscalerList:: { - local kind = {kind: "HorizontalPodAutoscalerList"}, - new(items):: apiVersion + kind + self.withItems(items), - // items is the list of horizontal pod autoscaler objects. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // items is the list of horizontal pod autoscaler objects. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.autoscaling.v2beta1.horizontalPodAutoscaler, - mixin:: { - }, - }, - }, - }, - batch:: { - v1:: { - local apiVersion = {apiVersion: "batch/v1"}, - // Job represents the configuration of a single job. - job:: { - local kind = {kind: "Job"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), - // 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/ - withCompletions(completions):: self + __specMixin({completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - withManualSelector(manualSelector):: self + __specMixin({manualSelector: 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/ - withParallelism(parallelism):: self + __specMixin({parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.batch.v1.jobSpec, - }, - }, - // JobList is a collection of jobs. - jobList:: { - local kind = {kind: "JobList"}, - new(items):: apiVersion + kind + self.withItems(items), - // items is the list of Jobs. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // items is the list of Jobs. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.batch.v1.job, - mixin:: { - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "batch/v1beta1"}, - // CronJob represents the configuration of a single cron job. - cronJob:: { - local kind = {kind: "CronJob"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Specifies how to treat concurrent executions of a Job. Defaults to Allow. - withConcurrencyPolicy(concurrencyPolicy):: self + __specMixin({concurrencyPolicy: concurrencyPolicy}), - // The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withFailedJobsHistoryLimit(failedJobsHistoryLimit):: self + __specMixin({failedJobsHistoryLimit: failedJobsHistoryLimit}), - // Specifies the job that will be created when executing a CronJob. - jobTemplate:: { - local __jobTemplateMixin(jobTemplate) = __specMixin({jobTemplate+: jobTemplate}), - mixinInstance(jobTemplate):: __jobTemplateMixin(jobTemplate), - // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __jobTemplateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __jobTemplateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), - // 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/ - withCompletions(completions):: self + __specMixin({completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - withManualSelector(manualSelector):: self + __specMixin({manualSelector: 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/ - withParallelism(parallelism):: self + __specMixin({parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.batch.v1.jobSpec, - }, - jobTemplateType:: hidden.batch.v1beta1.jobTemplateSpec, - // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - withSchedule(schedule):: self + __specMixin({schedule: schedule}), - // 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. - withStartingDeadlineSeconds(startingDeadlineSeconds):: self + __specMixin({startingDeadlineSeconds: startingDeadlineSeconds}), - // The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3. - withSuccessfulJobsHistoryLimit(successfulJobsHistoryLimit):: self + __specMixin({successfulJobsHistoryLimit: successfulJobsHistoryLimit}), - // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. - withSuspend(suspend):: self + __specMixin({suspend: suspend}), - }, - specType:: hidden.batch.v1beta1.cronJobSpec, - }, - }, - // CronJobList is a collection of cron jobs. - cronJobList:: { - local kind = {kind: "CronJobList"}, - new(items):: apiVersion + kind + self.withItems(items), - // items is the list of CronJobs. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // items is the list of CronJobs. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.batch.v1beta1.cronJob, - mixin:: { - }, - }, - }, - v2alpha1:: { - local apiVersion = {apiVersion: "batch/v2alpha1"}, - // CronJob represents the configuration of a single cron job. - cronJob:: { - local kind = {kind: "CronJob"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Specifies how to treat concurrent executions of a Job. Defaults to Allow. - withConcurrencyPolicy(concurrencyPolicy):: self + __specMixin({concurrencyPolicy: concurrencyPolicy}), - // The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. - withFailedJobsHistoryLimit(failedJobsHistoryLimit):: self + __specMixin({failedJobsHistoryLimit: failedJobsHistoryLimit}), - // Specifies the job that will be created when executing a CronJob. - jobTemplate:: { - local __jobTemplateMixin(jobTemplate) = __specMixin({jobTemplate+: jobTemplate}), - mixinInstance(jobTemplate):: __jobTemplateMixin(jobTemplate), - // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __jobTemplateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __jobTemplateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), - // 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/ - withCompletions(completions):: self + __specMixin({completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - withManualSelector(manualSelector):: self + __specMixin({manualSelector: 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/ - withParallelism(parallelism):: self + __specMixin({parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.batch.v1.jobSpec, - }, - jobTemplateType:: hidden.batch.v2alpha1.jobTemplateSpec, - // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - withSchedule(schedule):: self + __specMixin({schedule: schedule}), - // 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. - withStartingDeadlineSeconds(startingDeadlineSeconds):: self + __specMixin({startingDeadlineSeconds: startingDeadlineSeconds}), - // The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. - withSuccessfulJobsHistoryLimit(successfulJobsHistoryLimit):: self + __specMixin({successfulJobsHistoryLimit: successfulJobsHistoryLimit}), - // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. - withSuspend(suspend):: self + __specMixin({suspend: suspend}), - }, - specType:: hidden.batch.v2alpha1.cronJobSpec, - }, - }, - // CronJobList is a collection of cron jobs. - cronJobList:: { - local kind = {kind: "CronJobList"}, - new(items):: apiVersion + kind + self.withItems(items), - // items is the list of CronJobs. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // items is the list of CronJobs. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.batch.v2alpha1.cronJob, - mixin:: { - }, - }, - }, - }, - certificates:: { - v1beta1:: { - local apiVersion = {apiVersion: "certificates.k8s.io/v1beta1"}, - // Describes a certificate signing request - certificateSigningRequest:: { - local kind = {kind: "CertificateSigningRequest"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // The certificate request itself and any additional information. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Extra information about the requesting user. See user.Info interface for details. - withExtra(extra):: self + __specMixin({extra: extra}), - // Extra information about the requesting user. See user.Info interface for details. - withExtraMixin(extra):: self + __specMixin({extra+: extra}), - // Group information about the requesting user. See user.Info interface for details. - withGroups(groups):: self + if std.type(groups) == "array" then __specMixin({groups: groups}) else __specMixin({groups: [groups]}), - // Group information about the requesting user. See user.Info interface for details. - withGroupsMixin(groups):: self + if std.type(groups) == "array" then __specMixin({groups+: groups}) else __specMixin({groups+: [groups]}), - // Base64-encoded PKCS#10 CSR data - withRequest(request):: self + __specMixin({request: request}), - // UID information about the requesting user. See user.Info interface for details. - withUid(uid):: self + __specMixin({uid: uid}), - // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 - // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - withUsages(usages):: self + if std.type(usages) == "array" then __specMixin({usages: usages}) else __specMixin({usages: [usages]}), - // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 - // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - withUsagesMixin(usages):: self + if std.type(usages) == "array" then __specMixin({usages+: usages}) else __specMixin({usages+: [usages]}), - // Information about the requesting user. See user.Info interface for details. - withUsername(username):: self + __specMixin({username: username}), - }, - specType:: hidden.certificates.v1beta1.certificateSigningRequestSpec, - }, - }, - // - certificateSigningRequestList:: { - local kind = {kind: "CertificateSigningRequestList"}, - new(items):: apiVersion + kind + self.withItems(items), - // - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.certificates.v1beta1.certificateSigningRequest, - mixin:: { - }, - }, - }, - }, - core:: { - v1:: { - local apiVersion = {apiVersion: "v1"}, - // 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. - binding:: { - local kind = {kind: "Binding"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // The target object that you want to bind to the standard object. - target:: { - local __targetMixin(target) = {target+: target}, - mixinInstance(target):: __targetMixin(target), - // 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. - withFieldPath(fieldPath):: self + __targetMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __targetMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __targetMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __targetMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __targetMixin({uid: uid}), - }, - targetType:: hidden.core.v1.objectReference, - }, - }, - // ComponentStatus (and ComponentStatusList) holds the cluster validation info. - componentStatus:: { - local kind = {kind: "ComponentStatus"}, - new():: apiVersion + kind, - // List of component conditions observed - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // List of component conditions observed - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.core.v1.componentCondition, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // Status of all the conditions for the component as a list of ComponentStatus objects. - componentStatusList:: { - local kind = {kind: "ComponentStatusList"}, - new():: apiVersion + kind, - // List of ComponentStatus objects. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of ComponentStatus objects. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.componentStatus, - mixin:: { - }, - }, - // ConfigMap holds configuration data for pods to consume. - configMap:: { - local kind = {kind: "ConfigMap"}, - new(name, data):: apiVersion + kind + self.mixin.metadata.withName(name) + self.withData(data), - // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. - withData(data):: self + {data: data}, - // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. - withDataMixin(data):: self + {data+: data}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ConfigMapList is a resource containing a list of ConfigMap objects. - configMapList:: { - local kind = {kind: "ConfigMapList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is the list of ConfigMaps. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is the list of ConfigMaps. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.configMap, - mixin:: { - }, - }, - // 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}] - // }, - // ] - endpoints:: { - local kind = {kind: "Endpoints"}, - new():: apiVersion + kind, - // 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. - withSubsets(subsets):: self + if std.type(subsets) == "array" then {subsets: subsets} else {subsets: [subsets]}, - // 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. - withSubsetsMixin(subsets):: self + if std.type(subsets) == "array" then {subsets+: subsets} else {subsets+: [subsets]}, - subsetsType:: hidden.core.v1.endpointSubset, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // EndpointsList is a list of endpoints. - endpointsList:: { - local kind = {kind: "EndpointsList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of endpoints. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of endpoints. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.endpoints, - mixin:: { - }, - }, - // Event is a report of an event somewhere in the cluster. - event:: { - local kind = {kind: "Event"}, - new():: apiVersion + kind, - // The number of times this event has occurred. - withCount(count):: self + {count: count}, - // A human-readable description of the status of this operation. - withMessage(message):: self + {message: message}, - // This should be a short, machine understandable string that gives the reason for the transition into the object's current status. - withReason(reason):: self + {reason: reason}, - // Type of this event (Normal, Warning), new types could be added in the future - withType(type):: self + {type: type}, - mixin:: { - // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) - firstTimestamp:: { - local __firstTimestampMixin(firstTimestamp) = {firstTimestamp+: firstTimestamp}, - mixinInstance(firstTimestamp):: __firstTimestampMixin(firstTimestamp), - }, - firstTimestampType:: hidden.meta.v1.time, - // The object that this event is about. - involvedObject:: { - local __involvedObjectMixin(involvedObject) = {involvedObject+: involvedObject}, - mixinInstance(involvedObject):: __involvedObjectMixin(involvedObject), - // 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. - withFieldPath(fieldPath):: self + __involvedObjectMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __involvedObjectMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __involvedObjectMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __involvedObjectMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __involvedObjectMixin({uid: uid}), - }, - involvedObjectType:: hidden.core.v1.objectReference, - // The time at which the most recent occurrence of this event was recorded. - lastTimestamp:: { - local __lastTimestampMixin(lastTimestamp) = {lastTimestamp+: lastTimestamp}, - mixinInstance(lastTimestamp):: __lastTimestampMixin(lastTimestamp), - }, - lastTimestampType:: hidden.meta.v1.time, - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // The component reporting this event. Should be a short machine understandable string. - source:: { - local __sourceMixin(source) = {source+: source}, - mixinInstance(source):: __sourceMixin(source), - // Component from which the event is generated. - withComponent(component):: self + __sourceMixin({component: component}), - // Node name on which the event is generated. - withHost(host):: self + __sourceMixin({host: host}), - }, - sourceType:: hidden.core.v1.eventSource, - }, - }, - // EventList is a list of events. - eventList:: { - local kind = {kind: "EventList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of events - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of events - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.event, - mixin:: { - }, - }, - // LimitRange sets resource usage limits for each kind of resource in a Namespace. - limitRange:: { - local kind = {kind: "LimitRange"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Limits is the list of LimitRangeItem objects that are enforced. - withLimits(limits):: self + if std.type(limits) == "array" then __specMixin({limits: limits}) else __specMixin({limits: [limits]}), - // Limits is the list of LimitRangeItem objects that are enforced. - withLimitsMixin(limits):: self + if std.type(limits) == "array" then __specMixin({limits+: limits}) else __specMixin({limits+: [limits]}), - limitsType:: hidden.core.v1.limitRangeItem, - }, - specType:: hidden.core.v1.limitRangeSpec, - }, - }, - // LimitRangeList is a list of LimitRange items. - limitRangeList:: { - local kind = {kind: "LimitRangeList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of LimitRange objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of LimitRange objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_limit_range.md - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.limitRange, - mixin:: { - }, - }, - // Namespace provides a scope for Names. Use of multiple namespaces is optional. - namespace:: { - local kind = {kind: "Namespace"}, - new(name):: apiVersion + kind + self.mixin.metadata.withName(name), - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __specMixin({finalizers: finalizers}) else __specMixin({finalizers: [finalizers]}), - // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __specMixin({finalizers+: finalizers}) else __specMixin({finalizers+: [finalizers]}), - }, - specType:: hidden.core.v1.namespaceSpec, - }, - }, - // NamespaceList is a list of Namespaces. - namespaceList:: { - local kind = {kind: "NamespaceList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.namespace, - mixin:: { - }, - }, - // Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd). - node:: { - local kind = {kind: "Node"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field - configSource:: { - local __configSourceMixin(configSource) = __specMixin({configSource+: configSource}), - mixinInstance(configSource):: __configSourceMixin(configSource), - // - configMapRef:: { - local __configMapRefMixin(configMapRef) = __configSourceMixin({configMapRef+: configMapRef}), - mixinInstance(configMapRef):: __configMapRefMixin(configMapRef), - // 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. - withFieldPath(fieldPath):: self + __configMapRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __configMapRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __configMapRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __configMapRefMixin({uid: uid}), - }, - configMapRefType:: hidden.core.v1.objectReference, - }, - configSourceType:: hidden.core.v1.nodeConfigSource, - // External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated. - withExternalId(externalId):: self + __specMixin({externalID: externalId}), - // PodCIDR represents the pod IP range assigned to the node. - withPodCidr(podCidr):: self + __specMixin({podCIDR: podCidr}), - // ID of the node assigned by the cloud provider in the format: :// - withProviderId(providerId):: self + __specMixin({providerID: providerId}), - // If specified, the node's taints. - withTaints(taints):: self + if std.type(taints) == "array" then __specMixin({taints: taints}) else __specMixin({taints: [taints]}), - // If specified, the node's taints. - withTaintsMixin(taints):: self + if std.type(taints) == "array" then __specMixin({taints+: taints}) else __specMixin({taints+: [taints]}), - taintsType:: hidden.core.v1.taint, - // Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration - withUnschedulable(unschedulable):: self + __specMixin({unschedulable: unschedulable}), - }, - specType:: hidden.core.v1.nodeSpec, - }, - }, - // NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. - nodeConfigSource:: { - local kind = {kind: "NodeConfigSource"}, - new():: apiVersion + kind, - mixin:: { - // - configMapRef:: { - local __configMapRefMixin(configMapRef) = {configMapRef+: configMapRef}, - mixinInstance(configMapRef):: __configMapRefMixin(configMapRef), - // 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. - withFieldPath(fieldPath):: self + __configMapRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __configMapRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __configMapRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __configMapRefMixin({uid: uid}), - }, - configMapRefType:: hidden.core.v1.objectReference, - }, - }, - // NodeList is the whole list of all Nodes which have been registered with master. - nodeList:: { - local kind = {kind: "NodeList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of nodes - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of nodes - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.node, - mixin:: { - }, - }, - // 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 - persistentVolume:: { - local kind = {kind: "PersistentVolume"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - withAccessModes(accessModes):: self + if std.type(accessModes) == "array" then __specMixin({accessModes: accessModes}) else __specMixin({accessModes: [accessModes]}), - // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - withAccessModesMixin(accessModes):: self + if std.type(accessModes) == "array" then __specMixin({accessModes+: accessModes}) else __specMixin({accessModes+: [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:: { - local __awsElasticBlockStoreMixin(awsElasticBlockStore) = __specMixin({awsElasticBlockStore+: awsElasticBlockStore}), - mixinInstance(awsElasticBlockStore):: __awsElasticBlockStoreMixin(awsElasticBlockStore), - // 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 - withFsType(fsType):: self + __awsElasticBlockStoreMixin({fsType: 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). - withPartition(partition):: self + __awsElasticBlockStoreMixin({partition: 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 - withReadOnly(readOnly):: self + __awsElasticBlockStoreMixin({readOnly: readOnly}), - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - withVolumeId(volumeId):: self + __awsElasticBlockStoreMixin({volumeID: volumeId}), - }, - awsElasticBlockStoreType:: hidden.core.v1.awsElasticBlockStoreVolumeSource, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk:: { - local __azureDiskMixin(azureDisk) = __specMixin({azureDisk+: azureDisk}), - mixinInstance(azureDisk):: __azureDiskMixin(azureDisk), - // Host Caching mode: None, Read Only, Read Write. - withCachingMode(cachingMode):: self + __azureDiskMixin({cachingMode: cachingMode}), - // The Name of the data disk in the blob storage - withDiskName(diskName):: self + __azureDiskMixin({diskName: diskName}), - // The URI the data disk in the blob storage - withDiskUri(diskUri):: self + __azureDiskMixin({diskURI: diskUri}), - // 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. - withFsType(fsType):: self + __azureDiskMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __azureDiskMixin({readOnly: readOnly}), - }, - azureDiskType:: hidden.core.v1.azureDiskVolumeSource, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile:: { - local __azureFileMixin(azureFile) = __specMixin({azureFile+: azureFile}), - mixinInstance(azureFile):: __azureFileMixin(azureFile), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __azureFileMixin({readOnly: readOnly}), - // the name of secret that contains Azure Storage Account Name and Key - withSecretName(secretName):: self + __azureFileMixin({secretName: secretName}), - // the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod - withSecretNamespace(secretNamespace):: self + __azureFileMixin({secretNamespace: secretNamespace}), - // Share Name - withShareName(shareName):: self + __azureFileMixin({shareName: shareName}), - }, - azureFileType:: hidden.core.v1.azureFilePersistentVolumeSource, - // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - withCapacity(capacity):: self + __specMixin({capacity: capacity}), - // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - withCapacityMixin(capacity):: self + __specMixin({capacity+: capacity}), - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs:: { - local __cephfsMixin(cephfs) = __specMixin({cephfs+: cephfs}), - mixinInstance(cephfs):: __cephfsMixin(cephfs), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == "array" then __cephfsMixin({monitors: monitors}) else __cephfsMixin({monitors: [monitors]}), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then __cephfsMixin({monitors+: monitors}) else __cephfsMixin({monitors+: [monitors]}), - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - withPath(path):: self + __cephfsMixin({path: path}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withReadOnly(readOnly):: self + __cephfsMixin({readOnly: readOnly}), - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withSecretFile(secretFile):: self + __cephfsMixin({secretFile: secretFile}), - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __cephfsMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({name: name}), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({namespace: namespace}), - }, - secretRefType:: hidden.core.v1.secretReference, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withUser(user):: self + __cephfsMixin({user: user}), - }, - cephfsType:: hidden.core.v1.cephFSPersistentVolumeSource, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder:: { - local __cinderMixin(cinder) = __specMixin({cinder+: cinder}), - mixinInstance(cinder):: __cinderMixin(cinder), - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withFsType(fsType):: self + __cinderMixin({fsType: fsType}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withReadOnly(readOnly):: self + __cinderMixin({readOnly: readOnly}), - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withVolumeId(volumeId):: self + __cinderMixin({volumeID: volumeId}), - }, - cinderType:: hidden.core.v1.cinderVolumeSource, - // 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:: { - local __claimRefMixin(claimRef) = __specMixin({claimRef+: claimRef}), - mixinInstance(claimRef):: __claimRefMixin(claimRef), - // 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. - withFieldPath(fieldPath):: self + __claimRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __claimRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __claimRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __claimRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __claimRefMixin({uid: uid}), - }, - claimRefType:: hidden.core.v1.objectReference, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc:: { - local __fcMixin(fc) = __specMixin({fc+: fc}), - mixinInstance(fc):: __fcMixin(fc), - // 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. - withFsType(fsType):: self + __fcMixin({fsType: fsType}), - // Optional: FC target lun number - withLun(lun):: self + __fcMixin({lun: lun}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __fcMixin({readOnly: readOnly}), - // Optional: FC target worldwide names (WWNs) - withTargetWwns(targetWwns):: self + if std.type(targetWwns) == "array" then __fcMixin({targetWWNs: targetWwns}) else __fcMixin({targetWWNs: [targetWwns]}), - // Optional: FC target worldwide names (WWNs) - withTargetWwnsMixin(targetWwns):: self + if std.type(targetWwns) == "array" then __fcMixin({targetWWNs+: targetWwns}) else __fcMixin({targetWWNs+: [targetWwns]}), - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwids(wwids):: self + if std.type(wwids) == "array" then __fcMixin({wwids: wwids}) else __fcMixin({wwids: [wwids]}), - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwidsMixin(wwids):: self + if std.type(wwids) == "array" then __fcMixin({wwids+: wwids}) else __fcMixin({wwids+: [wwids]}), - }, - fcType:: hidden.core.v1.fcVolumeSource, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - flexVolume:: { - local __flexVolumeMixin(flexVolume) = __specMixin({flexVolume+: flexVolume}), - mixinInstance(flexVolume):: __flexVolumeMixin(flexVolume), - // Driver is the name of the driver to use for this volume. - withDriver(driver):: self + __flexVolumeMixin({driver: 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. - withFsType(fsType):: self + __flexVolumeMixin({fsType: fsType}), - // Optional: Extra command options if any. - withOptions(options):: self + __flexVolumeMixin({options: options}), - // Optional: Extra command options if any. - withOptionsMixin(options):: self + __flexVolumeMixin({options+: options}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __flexVolumeMixin({readOnly: 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:: { - local __secretRefMixin(secretRef) = __flexVolumeMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - flexVolumeType:: hidden.core.v1.flexVolumeSource, - // 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:: { - local __flockerMixin(flocker) = __specMixin({flocker+: flocker}), - mixinInstance(flocker):: __flockerMixin(flocker), - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - withDatasetName(datasetName):: self + __flockerMixin({datasetName: datasetName}), - // UUID of the dataset. This is unique identifier of a Flocker dataset - withDatasetUuid(datasetUuid):: self + __flockerMixin({datasetUUID: datasetUuid}), - }, - flockerType:: hidden.core.v1.flockerVolumeSource, - // 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:: { - local __gcePersistentDiskMixin(gcePersistentDisk) = __specMixin({gcePersistentDisk+: gcePersistentDisk}), - mixinInstance(gcePersistentDisk):: __gcePersistentDiskMixin(gcePersistentDisk), - // 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 - withFsType(fsType):: self + __gcePersistentDiskMixin({fsType: 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 - withPartition(partition):: self + __gcePersistentDiskMixin({partition: partition}), - // 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 - withPdName(pdName):: self + __gcePersistentDiskMixin({pdName: pdName}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - withReadOnly(readOnly):: self + __gcePersistentDiskMixin({readOnly: readOnly}), - }, - gcePersistentDiskType:: hidden.core.v1.gcePersistentDiskVolumeSource, - // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs:: { - local __glusterfsMixin(glusterfs) = __specMixin({glusterfs+: glusterfs}), - mixinInstance(glusterfs):: __glusterfsMixin(glusterfs), - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withEndpoints(endpoints):: self + __glusterfsMixin({endpoints: endpoints}), - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withPath(path):: self + __glusterfsMixin({path: path}), - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withReadOnly(readOnly):: self + __glusterfsMixin({readOnly: readOnly}), - }, - glusterfsType:: hidden.core.v1.glusterfsVolumeSource, - // 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:: { - local __hostPathMixin(hostPath) = __specMixin({hostPath+: hostPath}), - mixinInstance(hostPath):: __hostPathMixin(hostPath), - // 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 - withPath(path):: self + __hostPathMixin({path: path}), - // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - withType(type):: self + __hostPathMixin({type: type}), - }, - hostPathType:: hidden.core.v1.hostPathVolumeSource, - // 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:: { - local __iscsiMixin(iscsi) = __specMixin({iscsi+: iscsi}), - mixinInstance(iscsi):: __iscsiMixin(iscsi), - // whether support iSCSI Discovery CHAP authentication - withChapAuthDiscovery(chapAuthDiscovery):: self + __iscsiMixin({chapAuthDiscovery: chapAuthDiscovery}), - // whether support iSCSI Session CHAP authentication - withChapAuthSession(chapAuthSession):: self + __iscsiMixin({chapAuthSession: 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 - withFsType(fsType):: self + __iscsiMixin({fsType: fsType}), - // Custom iSCSI initiator name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - withInitiatorName(initiatorName):: self + __iscsiMixin({initiatorName: initiatorName}), - // Target iSCSI Qualified Name. - withIqn(iqn):: self + __iscsiMixin({iqn: iqn}), - // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. - withIscsiInterface(iscsiInterface):: self + __iscsiMixin({iscsiInterface: iscsiInterface}), - // iSCSI target lun number. - withLun(lun):: self + __iscsiMixin({lun: lun}), - // 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). - withPortals(portals):: self + if std.type(portals) == "array" then __iscsiMixin({portals: portals}) else __iscsiMixin({portals: [portals]}), - // 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). - withPortalsMixin(portals):: self + if std.type(portals) == "array" then __iscsiMixin({portals+: portals}) else __iscsiMixin({portals+: [portals]}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - withReadOnly(readOnly):: self + __iscsiMixin({readOnly: readOnly}), - // CHAP secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = __iscsiMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // 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). - withTargetPortal(targetPortal):: self + __iscsiMixin({targetPortal: targetPortal}), - }, - iscsiType:: hidden.core.v1.iscsiVolumeSource, - // Local represents directly-attached storage with node affinity - localStorage:: { - local __localStorageMixin(localStorage) = __specMixin({"local"+: localStorage}), - mixinInstance(localStorage):: __localStorageMixin(localStorage), - // The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device - withPath(path):: self + __localStorageMixin({path: path}), - }, - localStorageType:: hidden.core.v1.localVolumeSource, - // 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 - withMountOptions(mountOptions):: self + if std.type(mountOptions) == "array" then __specMixin({mountOptions: mountOptions}) else __specMixin({mountOptions: [mountOptions]}), - // 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 - withMountOptionsMixin(mountOptions):: self + if std.type(mountOptions) == "array" then __specMixin({mountOptions+: mountOptions}) else __specMixin({mountOptions+: [mountOptions]}), - // NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - nfs:: { - local __nfsMixin(nfs) = __specMixin({nfs+: nfs}), - mixinInstance(nfs):: __nfsMixin(nfs), - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withPath(path):: self + __nfsMixin({path: path}), - // 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 - withReadOnly(readOnly):: self + __nfsMixin({readOnly: readOnly}), - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withServer(server):: self + __nfsMixin({server: server}), - }, - nfsType:: hidden.core.v1.nfsVolumeSource, - // What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming - withPersistentVolumeReclaimPolicy(persistentVolumeReclaimPolicy):: self + __specMixin({persistentVolumeReclaimPolicy: persistentVolumeReclaimPolicy}), - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk:: { - local __photonPersistentDiskMixin(photonPersistentDisk) = __specMixin({photonPersistentDisk+: photonPersistentDisk}), - mixinInstance(photonPersistentDisk):: __photonPersistentDiskMixin(photonPersistentDisk), - // 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. - withFsType(fsType):: self + __photonPersistentDiskMixin({fsType: fsType}), - // ID that identifies Photon Controller persistent disk - withPdId(pdId):: self + __photonPersistentDiskMixin({pdID: pdId}), - }, - photonPersistentDiskType:: hidden.core.v1.photonPersistentDiskVolumeSource, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume:: { - local __portworxVolumeMixin(portworxVolume) = __specMixin({portworxVolume+: portworxVolume}), - mixinInstance(portworxVolume):: __portworxVolumeMixin(portworxVolume), - // 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. - withFsType(fsType):: self + __portworxVolumeMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __portworxVolumeMixin({readOnly: readOnly}), - // VolumeID uniquely identifies a Portworx volume - withVolumeId(volumeId):: self + __portworxVolumeMixin({volumeID: volumeId}), - }, - portworxVolumeType:: hidden.core.v1.portworxVolumeSource, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte:: { - local __quobyteMixin(quobyte) = __specMixin({quobyte+: quobyte}), - mixinInstance(quobyte):: __quobyteMixin(quobyte), - // Group to map volume access to Default is no group - withGroup(group):: self + __quobyteMixin({group: group}), - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - withReadOnly(readOnly):: self + __quobyteMixin({readOnly: readOnly}), - // 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 - withRegistry(registry):: self + __quobyteMixin({registry: registry}), - // User to map volume access to Defaults to serivceaccount user - withUser(user):: self + __quobyteMixin({user: user}), - // Volume is a string that references an already created Quobyte volume by name. - withVolume(volume):: self + __quobyteMixin({volume: volume}), - }, - quobyteType:: hidden.core.v1.quobyteVolumeSource, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd:: { - local __rbdMixin(rbd) = __specMixin({rbd+: rbd}), - mixinInstance(rbd):: __rbdMixin(rbd), - // 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 - withFsType(fsType):: self + __rbdMixin({fsType: fsType}), - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withImage(image):: self + __rbdMixin({image: image}), - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withKeyring(keyring):: self + __rbdMixin({keyring: keyring}), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == "array" then __rbdMixin({monitors: monitors}) else __rbdMixin({monitors: [monitors]}), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then __rbdMixin({monitors+: monitors}) else __rbdMixin({monitors+: [monitors]}), - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withPool(pool):: self + __rbdMixin({pool: pool}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withReadOnly(readOnly):: self + __rbdMixin({readOnly: readOnly}), - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __rbdMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withUser(user):: self + __rbdMixin({user: user}), - }, - rbdType:: hidden.core.v1.rbdVolumeSource, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIo:: { - local __scaleIoMixin(scaleIo) = __specMixin({scaleIO+: scaleIo}), - mixinInstance(scaleIo):: __scaleIoMixin(scaleIo), - // 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. - withFsType(fsType):: self + __scaleIoMixin({fsType: fsType}), - // The host address of the ScaleIO API Gateway. - withGateway(gateway):: self + __scaleIoMixin({gateway: gateway}), - // The name of the Protection Domain for the configured storage (defaults to "default"). - withProtectionDomain(protectionDomain):: self + __scaleIoMixin({protectionDomain: protectionDomain}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __scaleIoMixin({readOnly: readOnly}), - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = __scaleIoMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // Flag to enable/disable SSL communication with Gateway, default false - withSslEnabled(sslEnabled):: self + __scaleIoMixin({sslEnabled: sslEnabled}), - // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). - withStorageMode(storageMode):: self + __scaleIoMixin({storageMode: storageMode}), - // The Storage Pool associated with the protection domain (defaults to "default"). - withStoragePool(storagePool):: self + __scaleIoMixin({storagePool: storagePool}), - // The name of the storage system as configured in ScaleIO. - withSystem(system):: self + __scaleIoMixin({system: system}), - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - withVolumeName(volumeName):: self + __scaleIoMixin({volumeName: volumeName}), - }, - scaleIoType:: hidden.core.v1.scaleIoVolumeSource, - // Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass. - withStorageClassName(storageClassName):: self + __specMixin({storageClassName: storageClassName}), - // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md - storageos:: { - local __storageosMixin(storageos) = __specMixin({storageos+: storageos}), - mixinInstance(storageos):: __storageosMixin(storageos), - // 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. - withFsType(fsType):: self + __storageosMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __storageosMixin({readOnly: readOnly}), - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = __storageosMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // 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. - withFieldPath(fieldPath):: self + __secretRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __secretRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __secretRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __secretRefMixin({uid: uid}), - }, - secretRefType:: hidden.core.v1.objectReference, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - withVolumeName(volumeName):: self + __storageosMixin({volumeName: 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. - withVolumeNamespace(volumeNamespace):: self + __storageosMixin({volumeNamespace: volumeNamespace}), - }, - storageosType:: hidden.core.v1.storageOSPersistentVolumeSource, - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume:: { - local __vsphereVolumeMixin(vsphereVolume) = __specMixin({vsphereVolume+: vsphereVolume}), - mixinInstance(vsphereVolume):: __vsphereVolumeMixin(vsphereVolume), - // 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. - withFsType(fsType):: self + __vsphereVolumeMixin({fsType: fsType}), - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - withStoragePolicyId(storagePolicyId):: self + __vsphereVolumeMixin({storagePolicyID: storagePolicyId}), - // Storage Policy Based Management (SPBM) profile name. - withStoragePolicyName(storagePolicyName):: self + __vsphereVolumeMixin({storagePolicyName: storagePolicyName}), - // Path that identifies vSphere volume vmdk - withVolumePath(volumePath):: self + __vsphereVolumeMixin({volumePath: volumePath}), - }, - vsphereVolumeType:: hidden.core.v1.vsphereVirtualDiskVolumeSource, - }, - specType:: hidden.core.v1.persistentVolumeSpec, - }, - }, - // PersistentVolumeClaim is a user's request for and claim to a persistent volume - persistentVolumeClaim:: { - local kind = {kind: "PersistentVolumeClaim"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - withAccessModes(accessModes):: self + if std.type(accessModes) == "array" then __specMixin({accessModes: accessModes}) else __specMixin({accessModes: [accessModes]}), - // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - withAccessModesMixin(accessModes):: self + if std.type(accessModes) == "array" then __specMixin({accessModes+: accessModes}) else __specMixin({accessModes+: [accessModes]}), - // Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources:: { - local __resourcesMixin(resources) = __specMixin({resources+: resources}), - mixinInstance(resources):: __resourcesMixin(resources), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimits(limits):: self + __resourcesMixin({limits: limits}), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimitsMixin(limits):: self + __resourcesMixin({limits+: 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-compute-resources-container/ - withRequests(requests):: self + __resourcesMixin({requests: requests}), - // 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-compute-resources-container/ - withRequestsMixin(requests):: self + __resourcesMixin({requests+: requests}), - }, - resourcesType:: hidden.core.v1.resourceRequirements, - // A label query over volumes to consider for binding. - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - withStorageClassName(storageClassName):: self + __specMixin({storageClassName: storageClassName}), - // VolumeName is the binding reference to the PersistentVolume backing this claim. - withVolumeName(volumeName):: self + __specMixin({volumeName: volumeName}), - }, - specType:: hidden.core.v1.persistentVolumeClaimSpec, - }, - }, - // PersistentVolumeClaimList is a list of PersistentVolumeClaim items. - persistentVolumeClaimList:: { - local kind = {kind: "PersistentVolumeClaimList"}, - new(items):: apiVersion + kind + self.withItems(items), - // A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.persistentVolumeClaim, - mixin:: { - }, - }, - // PersistentVolumeList is a list of PersistentVolume items. - persistentVolumeList:: { - local kind = {kind: "PersistentVolumeList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.persistentVolume, - mixin:: { - }, - }, - // Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts. - pod:: { - local kind = {kind: "Pod"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - }, - // PodList is a list of Pods. - podList:: { - local kind = {kind: "PodList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.pod, - mixin:: { - }, - }, - // PodTemplate describes a template for creating copies of a predefined pod. - podTemplate:: { - local kind = {kind: "PodTemplate"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - template:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // PodTemplateList is a list of PodTemplates. - podTemplateList:: { - local kind = {kind: "PodTemplateList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of pod templates - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of pod templates - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.podTemplate, - mixin:: { - }, - }, - // ReplicationController represents the configuration of a replication controller. - replicationController:: { - local kind = {kind: "ReplicationController"}, - new():: apiVersion + kind, - mixin:: { - // 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/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: 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 - withReplicas(replicas):: self + __specMixin({replicas: 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 - withSelector(selector):: self + __specMixin({selector: selector}), - // 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 - withSelectorMixin(selector):: self + __specMixin({selector+: 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.core.v1.replicationControllerSpec, - }, - }, - // ReplicationControllerList is a collection of replication controllers. - replicationControllerList:: { - local kind = {kind: "ReplicationControllerList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.replicationController, - mixin:: { - }, - }, - // ResourceQuota sets aggregate quota restrictions enforced per namespace - resourceQuota:: { - local kind = {kind: "ResourceQuota"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md - withHard(hard):: self + __specMixin({hard: hard}), - // Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md - withHardMixin(hard):: self + __specMixin({hard+: hard}), - // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. - withScopes(scopes):: self + if std.type(scopes) == "array" then __specMixin({scopes: scopes}) else __specMixin({scopes: [scopes]}), - // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. - withScopesMixin(scopes):: self + if std.type(scopes) == "array" then __specMixin({scopes+: scopes}) else __specMixin({scopes+: [scopes]}), - }, - specType:: hidden.core.v1.resourceQuotaSpec, - }, - }, - // ResourceQuotaList is a list of ResourceQuota items. - resourceQuotaList:: { - local kind = {kind: "ResourceQuotaList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of ResourceQuota objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of ResourceQuota objects. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.resourceQuota, - mixin:: { - }, - }, - // Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes. - secret:: { - local kind = {kind: "Secret"}, - new(name, data, type="Opaque"):: apiVersion + kind + self.mixin.metadata.withName(name) + self.withData(data) + self.withType(type), - fromString(name, stringData, type="Opaque"):: apiVersion + kind + self.mixin.metadata.withName(name) + self.withStringData(stringData) + self.withType(type), - // 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 - withData(data):: self + {data: data}, - // 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 - withDataMixin(data):: self + {data+: data}, - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. - withStringData(stringData):: self + {stringData: stringData}, - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. - withStringDataMixin(stringData):: self + {stringData+: stringData}, - // Used to facilitate programmatic handling of secret data. - withType(type):: self + {type: type}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // SecretList is a list of Secret. - secretList:: { - local kind = {kind: "SecretList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.secret, - mixin:: { - }, - }, - // 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. - service:: { - local kind = {kind: "Service"}, - new(name, selector, ports):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withSelector(selector) + self.mixin.spec.withPorts(ports), - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - withClusterIp(clusterIp):: self + __specMixin({clusterIP: clusterIp}), - // 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. - withExternalIps(externalIps):: self + if std.type(externalIps) == "array" then __specMixin({externalIPs: externalIps}) else __specMixin({externalIPs: [externalIps]}), - // 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. - withExternalIpsMixin(externalIps):: self + if std.type(externalIps) == "array" then __specMixin({externalIPs+: externalIps}) else __specMixin({externalIPs+: [externalIps]}), - // externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName. - withExternalName(externalName):: self + __specMixin({externalName: 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. - withExternalTrafficPolicy(externalTrafficPolicy):: self + __specMixin({externalTrafficPolicy: externalTrafficPolicy}), - // healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local. - withHealthCheckNodePort(healthCheckNodePort):: self + __specMixin({healthCheckNodePort: healthCheckNodePort}), - // 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. - withLoadBalancerIp(loadBalancerIp):: self + __specMixin({loadBalancerIP: 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/configure-cloud-provider-firewall/ - withLoadBalancerSourceRanges(loadBalancerSourceRanges):: self + if std.type(loadBalancerSourceRanges) == "array" then __specMixin({loadBalancerSourceRanges: loadBalancerSourceRanges}) else __specMixin({loadBalancerSourceRanges: [loadBalancerSourceRanges]}), - // 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/configure-cloud-provider-firewall/ - withLoadBalancerSourceRangesMixin(loadBalancerSourceRanges):: self + if std.type(loadBalancerSourceRanges) == "array" then __specMixin({loadBalancerSourceRanges+: loadBalancerSourceRanges}) else __specMixin({loadBalancerSourceRanges+: [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 - withPorts(ports):: self + if std.type(ports) == "array" then __specMixin({ports: ports}) else __specMixin({ports: [ports]}), - // 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 - withPortsMixin(ports):: self + if std.type(ports) == "array" then __specMixin({ports+: ports}) else __specMixin({ports+: [ports]}), - portsType:: hidden.core.v1.servicePort, - // publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery. This field will replace the service.alpha.kubernetes.io/tolerate-unready-endpoints when that annotation is deprecated and all clients have been converted to use this field. - withPublishNotReadyAddresses(publishNotReadyAddresses):: self + __specMixin({publishNotReadyAddresses: 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. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ - withSelector(selector):: self + __specMixin({selector: selector}), - // 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. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ - withSelectorMixin(selector):: self + __specMixin({selector+: 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 - withSessionAffinity(sessionAffinity):: self + __specMixin({sessionAffinity: sessionAffinity}), - // sessionAffinityConfig contains the configurations of session affinity. - sessionAffinityConfig:: { - local __sessionAffinityConfigMixin(sessionAffinityConfig) = __specMixin({sessionAffinityConfig+: sessionAffinityConfig}), - mixinInstance(sessionAffinityConfig):: __sessionAffinityConfigMixin(sessionAffinityConfig), - // clientIP contains the configurations of Client IP based session affinity. - clientIp:: { - local __clientIpMixin(clientIp) = __sessionAffinityConfigMixin({clientIP+: clientIp}), - mixinInstance(clientIp):: __clientIpMixin(clientIp), - // 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). - withTimeoutSeconds(timeoutSeconds):: self + __clientIpMixin({timeoutSeconds: timeoutSeconds}), - }, - clientIpType:: hidden.core.v1.clientIPConfig, - }, - sessionAffinityConfigType:: hidden.core.v1.sessionAffinityConfig, - // type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to the specified externalName. "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. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types - withType(type):: self + __specMixin({type: type}), - }, - specType:: hidden.core.v1.serviceSpec, - }, - }, - // 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 - serviceAccount:: { - local kind = {kind: "ServiceAccount"}, - new(name):: apiVersion + kind + self.mixin.metadata.withName(name), - // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + {automountServiceAccountToken: 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then {imagePullSecrets: imagePullSecrets} else {imagePullSecrets: [imagePullSecrets]}, - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then {imagePullSecrets+: imagePullSecrets} else {imagePullSecrets+: [imagePullSecrets]}, - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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 - withSecrets(secrets):: self + if std.type(secrets) == "array" then {secrets: secrets} else {secrets: [secrets]}, - // 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 - withSecretsMixin(secrets):: self + if std.type(secrets) == "array" then {secrets+: secrets} else {secrets+: [secrets]}, - secretsType:: hidden.core.v1.objectReference, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ServiceAccountList is a list of ServiceAccount objects - serviceAccountList:: { - local kind = {kind: "ServiceAccountList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.serviceAccount, - mixin:: { - }, - }, - // ServiceList holds a list of services. - serviceList:: { - local kind = {kind: "ServiceList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of services - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of services - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.service, - mixin:: { - }, - }, - }, - }, - extensions:: { - v1beta1:: { - local apiVersion = {apiVersion: "extensions/v1beta1"}, - // DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set. - daemonSet:: { - local kind = {kind: "DaemonSet"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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). - withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), - // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = __specMixin({updateStrategy+: updateStrategy}), - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDaemonSet, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. - withType(type):: self + __updateStrategyMixin({type: type}), - }, - updateStrategyType:: hidden.extensions.v1beta1.daemonSetUpdateStrategy, - }, - specType:: hidden.extensions.v1beta1.daemonSetSpec, - }, - }, - // DaemonSetList is a collection of daemon sets. - daemonSetList:: { - local kind = {kind: "DaemonSetList"}, - new(items):: apiVersion + kind + self.withItems(items), - // A list of daemon sets. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // A list of daemon sets. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.daemonSet, - mixin:: { - }, - }, - // DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets. - deployment:: { - local kind = {kind: "Deployment"}, - new(name, replicas, containers, podLabels={app: name}):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.spec.withContainers(containers) + self.mixin.spec.template.metadata.withLabels(podLabels), - mixin:: { - // Standard object metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the Deployment. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: minReadySeconds}), - // Indicates that the deployment is paused and will not be processed by the deployment controller. - withPaused(paused):: self + __specMixin({paused: 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. This is not set by default. - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + __specMixin({progressDeadlineSeconds: progressDeadlineSeconds}), - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + __specMixin({replicas: replicas}), - // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({revisionHistoryLimit: revisionHistoryLimit}), - // DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = __specMixin({rollbackTo+: rollbackTo}), - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + __rollbackToMixin({revision: revision}), - }, - rollbackToType:: hidden.extensions.v1beta1.rollbackConfig, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = __specMixin({strategy+: strategy}), - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({type: type}), - }, - strategyType:: hidden.extensions.v1beta1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.extensions.v1beta1.deploymentSpec, - }, - }, - // DeploymentList is a list of Deployments. - deploymentList:: { - local kind = {kind: "DeploymentList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is the list of Deployments. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is the list of Deployments. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.deployment, - mixin:: { - }, - }, - // DEPRECATED. DeploymentRollback stores the information required to rollback a deployment. - deploymentRollback:: { - local kind = {kind: "DeploymentRollback"}, - new(name):: apiVersion + kind + self.withName(name), - // Required: This must match the Name of a deployment. - withName(name):: self + {name: name}, - // The annotations to be updated to a deployment - withUpdatedAnnotations(updatedAnnotations):: self + {updatedAnnotations: updatedAnnotations}, - // The annotations to be updated to a deployment - withUpdatedAnnotationsMixin(updatedAnnotations):: self + {updatedAnnotations+: updatedAnnotations}, - mixin:: { - // The config of this deployment rollback. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = {rollbackTo+: rollbackTo}, - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + __rollbackToMixin({revision: revision}), - }, - rollbackToType:: hidden.extensions.v1beta1.rollbackConfig, - }, - }, - // 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. - ingress:: { - local kind = {kind: "Ingress"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. - backend:: { - local __backendMixin(backend) = __specMixin({backend+: backend}), - mixinInstance(backend):: __backendMixin(backend), - // Specifies the name of the referenced service. - withServiceName(serviceName):: self + __backendMixin({serviceName: serviceName}), - // Specifies the port of the referenced service. - withServicePort(servicePort):: __backendMixin({servicePort: servicePort}), - }, - backendType:: hidden.extensions.v1beta1.ingressBackend, - // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. - withRules(rules):: self + if std.type(rules) == "array" then __specMixin({rules: rules}) else __specMixin({rules: [rules]}), - // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. - withRulesMixin(rules):: self + if std.type(rules) == "array" then __specMixin({rules+: rules}) else __specMixin({rules+: [rules]}), - rulesType:: hidden.extensions.v1beta1.ingressRule, - // 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. - withTls(tls):: self + if std.type(tls) == "array" then __specMixin({tls: tls}) else __specMixin({tls: [tls]}), - // 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. - withTlsMixin(tls):: self + if std.type(tls) == "array" then __specMixin({tls+: tls}) else __specMixin({tls+: [tls]}), - tlsType:: hidden.extensions.v1beta1.ingressTls, - }, - specType:: hidden.extensions.v1beta1.ingressSpec, - }, - }, - // IngressList is a collection of Ingress. - ingressList:: { - local kind = {kind: "IngressList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is the list of Ingress. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is the list of Ingress. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.ingress, - mixin:: { - }, - }, - // NetworkPolicy describes what network traffic is allowed for a set of Pods - networkPolicy:: { - local kind = {kind: "NetworkPolicy"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior for this NetworkPolicy. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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 - withEgress(egress):: self + if std.type(egress) == "array" then __specMixin({egress: egress}) else __specMixin({egress: [egress]}), - // 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 - withEgressMixin(egress):: self + if std.type(egress) == "array" then __specMixin({egress+: egress}) else __specMixin({egress+: [egress]}), - egressType:: hidden.extensions.v1beta1.networkPolicyEgressRule, - // 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 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). - withIngress(ingress):: self + if std.type(ingress) == "array" then __specMixin({ingress: ingress}) else __specMixin({ingress: [ingress]}), - // 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 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). - withIngressMixin(ingress):: self + if std.type(ingress) == "array" then __specMixin({ingress+: ingress}) else __specMixin({ingress+: [ingress]}), - ingressType:: hidden.extensions.v1beta1.networkPolicyIngressRule, - // 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:: { - local __podSelectorMixin(podSelector) = __specMixin({podSelector+: podSelector}), - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions: matchExpressions}) else __podSelectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __podSelectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({matchLabels+: matchLabels}), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - // 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 - withPolicyTypes(policyTypes):: self + if std.type(policyTypes) == "array" then __specMixin({policyTypes: policyTypes}) else __specMixin({policyTypes: [policyTypes]}), - // 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 - withPolicyTypesMixin(policyTypes):: self + if std.type(policyTypes) == "array" then __specMixin({policyTypes+: policyTypes}) else __specMixin({policyTypes+: [policyTypes]}), - }, - specType:: hidden.extensions.v1beta1.networkPolicySpec, - }, - }, - // Network Policy List is a list of NetworkPolicy objects. - networkPolicyList:: { - local kind = {kind: "NetworkPolicyList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of schema objects. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of schema objects. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.networkPolicy, - mixin:: { - }, - }, - // Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. - podSecurityPolicy:: { - local kind = {kind: "PodSecurityPolicy"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // spec defines the policy enforced. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // AllowPrivilegeEscalation determines if a pod can request to allow privilege escalation. - withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + __specMixin({allowPrivilegeEscalation: allowPrivilegeEscalation}), - // 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. - withAllowedCapabilities(allowedCapabilities):: self + if std.type(allowedCapabilities) == "array" then __specMixin({allowedCapabilities: allowedCapabilities}) else __specMixin({allowedCapabilities: [allowedCapabilities]}), - // 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. - withAllowedCapabilitiesMixin(allowedCapabilities):: self + if std.type(allowedCapabilities) == "array" then __specMixin({allowedCapabilities+: allowedCapabilities}) else __specMixin({allowedCapabilities+: [allowedCapabilities]}), - // is a white list of allowed host paths. Empty indicates that all host paths may be used. - withAllowedHostPaths(allowedHostPaths):: self + if std.type(allowedHostPaths) == "array" then __specMixin({allowedHostPaths: allowedHostPaths}) else __specMixin({allowedHostPaths: [allowedHostPaths]}), - // is a white list of allowed host paths. Empty indicates that all host paths may be used. - withAllowedHostPathsMixin(allowedHostPaths):: self + if std.type(allowedHostPaths) == "array" then __specMixin({allowedHostPaths+: allowedHostPaths}) else __specMixin({allowedHostPaths+: [allowedHostPaths]}), - allowedHostPathsType:: hidden.extensions.v1beta1.allowedHostPath, - // 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 capabiility in both DefaultAddCapabilities and RequiredDropCapabilities. - withDefaultAddCapabilities(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == "array" then __specMixin({defaultAddCapabilities: defaultAddCapabilities}) else __specMixin({defaultAddCapabilities: [defaultAddCapabilities]}), - // 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 capabiility in both DefaultAddCapabilities and RequiredDropCapabilities. - withDefaultAddCapabilitiesMixin(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == "array" then __specMixin({defaultAddCapabilities+: defaultAddCapabilities}) else __specMixin({defaultAddCapabilities+: [defaultAddCapabilities]}), - // DefaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process. - withDefaultAllowPrivilegeEscalation(defaultAllowPrivilegeEscalation):: self + __specMixin({defaultAllowPrivilegeEscalation: defaultAllowPrivilegeEscalation}), - // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext. - fsGroup:: { - local __fsGroupMixin(fsGroup) = __specMixin({fsGroup+: fsGroup}), - mixinInstance(fsGroup):: __fsGroupMixin(fsGroup), - // 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. - withRanges(ranges):: self + if std.type(ranges) == "array" then __fsGroupMixin({ranges: ranges}) else __fsGroupMixin({ranges: [ranges]}), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == "array" then __fsGroupMixin({ranges+: ranges}) else __fsGroupMixin({ranges+: [ranges]}), - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - withRule(rule):: self + __fsGroupMixin({rule: rule}), - }, - fsGroupType:: hidden.extensions.v1beta1.fsGroupStrategyOptions, - // hostIPC determines if the policy allows the use of HostIPC in the pod spec. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // hostPID determines if the policy allows the use of HostPID in the pod spec. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // hostPorts determines which host port ranges are allowed to be exposed. - withHostPorts(hostPorts):: self + if std.type(hostPorts) == "array" then __specMixin({hostPorts: hostPorts}) else __specMixin({hostPorts: [hostPorts]}), - // hostPorts determines which host port ranges are allowed to be exposed. - withHostPortsMixin(hostPorts):: self + if std.type(hostPorts) == "array" then __specMixin({hostPorts+: hostPorts}) else __specMixin({hostPorts+: [hostPorts]}), - hostPortsType:: hidden.extensions.v1beta1.hostPortRange, - // privileged determines if a pod can request to be run as privileged. - withPrivileged(privileged):: self + __specMixin({privileged: 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. - withReadOnlyRootFilesystem(readOnlyRootFilesystem):: self + __specMixin({readOnlyRootFilesystem: readOnlyRootFilesystem}), - // RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - withRequiredDropCapabilities(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == "array" then __specMixin({requiredDropCapabilities: requiredDropCapabilities}) else __specMixin({requiredDropCapabilities: [requiredDropCapabilities]}), - // RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - withRequiredDropCapabilitiesMixin(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == "array" then __specMixin({requiredDropCapabilities+: requiredDropCapabilities}) else __specMixin({requiredDropCapabilities+: [requiredDropCapabilities]}), - // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. - runAsUser:: { - local __runAsUserMixin(runAsUser) = __specMixin({runAsUser+: runAsUser}), - mixinInstance(runAsUser):: __runAsUserMixin(runAsUser), - // Ranges are the allowed ranges of uids that may be used. - withRanges(ranges):: self + if std.type(ranges) == "array" then __runAsUserMixin({ranges: ranges}) else __runAsUserMixin({ranges: [ranges]}), - // Ranges are the allowed ranges of uids that may be used. - withRangesMixin(ranges):: self + if std.type(ranges) == "array" then __runAsUserMixin({ranges+: ranges}) else __runAsUserMixin({ranges+: [ranges]}), - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. - withRule(rule):: self + __runAsUserMixin({rule: rule}), - }, - runAsUserType:: hidden.extensions.v1beta1.runAsUserStrategyOptions, - // seLinux is the strategy that will dictate the allowable labels that may be set. - seLinux:: { - local __seLinuxMixin(seLinux) = __specMixin({seLinux+: seLinux}), - mixinInstance(seLinux):: __seLinuxMixin(seLinux), - // type is the strategy that will dictate the allowable labels that may be set. - withRule(rule):: self + __seLinuxMixin({rule: rule}), - // seLinuxOptions required to run as; required for MustRunAs More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md - seLinuxOptions:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __seLinuxMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - seLinuxType:: hidden.extensions.v1beta1.seLinuxStrategyOptions, - // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. - supplementalGroups:: { - local __supplementalGroupsMixin(supplementalGroups) = __specMixin({supplementalGroups+: supplementalGroups}), - mixinInstance(supplementalGroups):: __supplementalGroupsMixin(supplementalGroups), - // 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. - withRanges(ranges):: self + if std.type(ranges) == "array" then __supplementalGroupsMixin({ranges: ranges}) else __supplementalGroupsMixin({ranges: [ranges]}), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == "array" then __supplementalGroupsMixin({ranges+: ranges}) else __supplementalGroupsMixin({ranges+: [ranges]}), - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - withRule(rule):: self + __supplementalGroupsMixin({rule: rule}), - }, - supplementalGroupsType:: hidden.extensions.v1beta1.supplementalGroupsStrategyOptions, - // volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used. - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used. - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - }, - specType:: hidden.extensions.v1beta1.podSecurityPolicySpec, - }, - }, - // Pod Security Policy List is a list of PodSecurityPolicy objects. - podSecurityPolicyList:: { - local kind = {kind: "PodSecurityPolicyList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of schema objects. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of schema objects. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.podSecurityPolicy, - mixin:: { - }, - }, - // DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for more information. ReplicaSet represents the configuration of a ReplicaSet. - replicaSet:: { - local kind = {kind: "ReplicaSet"}, - new():: apiVersion + kind, - mixin:: { - // 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/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({minReadySeconds: 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 - withReplicas(replicas):: self + __specMixin({replicas: replicas}), - // Selector is a label query over pods that should match the replica count. If the 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 replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.extensions.v1beta1.replicaSetSpec, - }, - }, - // ReplicaSetList is a collection of ReplicaSets. - replicaSetList:: { - local kind = {kind: "ReplicaSetList"}, - new(items):: apiVersion + kind + self.withItems(items), - // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.extensions.v1beta1.replicaSet, - mixin:: { - }, - }, - // represents a scaling request for a resource. - scale:: { - local kind = {kind: "Scale"}, - new(replicas):: apiVersion + kind + self.mixin.spec.withReplicas(replicas), - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // desired number of instances for the scaled object. - withReplicas(replicas):: self + __specMixin({replicas: replicas}), - }, - specType:: hidden.extensions.v1beta1.scaleSpec, - }, - }, - }, - }, - meta:: { - v1:: { - local apiVersion = {apiVersion: "meta/v1"}, - // APIGroup contains the name, the supported versions, and the preferred version of a group. - apiGroup:: { - local kind = {kind: "APIGroup"}, - new():: apiVersion + kind, - // name is the name of the group. - withName(name):: self + {name: name}, - // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - withServerAddressByClientCidrs(serverAddressByClientCidrs):: self + if std.type(serverAddressByClientCidrs) == "array" then {serverAddressByClientCIDRs: serverAddressByClientCidrs} else {serverAddressByClientCIDRs: [serverAddressByClientCidrs]}, - // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - withServerAddressByClientCidrsMixin(serverAddressByClientCidrs):: self + if std.type(serverAddressByClientCidrs) == "array" then {serverAddressByClientCIDRs+: serverAddressByClientCidrs} else {serverAddressByClientCIDRs+: [serverAddressByClientCidrs]}, - serverAddressByClientCidrsType:: hidden.meta.v1.serverAddressByClientCidr, - // versions are the versions supported in this group. - withVersions(versions):: self + if std.type(versions) == "array" then {versions: versions} else {versions: [versions]}, - // versions are the versions supported in this group. - withVersionsMixin(versions):: self + if std.type(versions) == "array" then {versions+: versions} else {versions+: [versions]}, - versionsType:: hidden.meta.v1.groupVersionForDiscovery, - mixin:: { - // preferredVersion is the version preferred by the API server, which probably is the storage version. - preferredVersion:: { - local __preferredVersionMixin(preferredVersion) = {preferredVersion+: preferredVersion}, - mixinInstance(preferredVersion):: __preferredVersionMixin(preferredVersion), - // groupVersion specifies the API group and version in the form "group/version" - withGroupVersion(groupVersion):: self + __preferredVersionMixin({groupVersion: groupVersion}), - // version specifies the version in the form of "version". This is to save the clients the trouble of splitting the GroupVersion. - withVersion(version):: self + __preferredVersionMixin({version: version}), - }, - preferredVersionType:: hidden.meta.v1.groupVersionForDiscovery, - }, - }, - // APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis. - apiGroupList:: { - local kind = {kind: "APIGroupList"}, - new():: apiVersion + kind, - // groups is a list of APIGroup. - withGroups(groups):: self + if std.type(groups) == "array" then {groups: groups} else {groups: [groups]}, - // groups is a list of APIGroup. - withGroupsMixin(groups):: self + if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, - groupsType:: hidden.meta.v1.apiGroup, - mixin:: { - }, - }, - // APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced. - apiResourceList:: { - local kind = {kind: "APIResourceList"}, - new():: apiVersion + kind, - // groupVersion is the group and version this APIResourceList is for. - withGroupVersion(groupVersion):: self + {groupVersion: groupVersion}, - // resources contains the name of the resources and if they are namespaced. - withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, - // resources contains the name of the resources and if they are namespaced. - withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - resourcesType:: hidden.meta.v1.apiResource, - mixin:: { - }, - }, - // APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API. - apiVersions:: { - local kind = {kind: "APIVersions"}, - new():: apiVersion + kind, - // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - withServerAddressByClientCidrs(serverAddressByClientCidrs):: self + if std.type(serverAddressByClientCidrs) == "array" then {serverAddressByClientCIDRs: serverAddressByClientCidrs} else {serverAddressByClientCIDRs: [serverAddressByClientCidrs]}, - // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - withServerAddressByClientCidrsMixin(serverAddressByClientCidrs):: self + if std.type(serverAddressByClientCidrs) == "array" then {serverAddressByClientCIDRs+: serverAddressByClientCidrs} else {serverAddressByClientCIDRs+: [serverAddressByClientCidrs]}, - serverAddressByClientCidrsType:: hidden.meta.v1.serverAddressByClientCidr, - // versions are the api versions that are available. - withVersions(versions):: self + if std.type(versions) == "array" then {versions: versions} else {versions: [versions]}, - // versions are the api versions that are available. - withVersionsMixin(versions):: self + if std.type(versions) == "array" then {versions+: versions} else {versions+: [versions]}, - mixin:: { - }, - }, - // DeleteOptions may be provided when deleting an API object. - deleteOptions:: { - local kind = {kind: "DeleteOptions"}, - new():: apiVersion + kind, - // 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. - withGracePeriodSeconds(gracePeriodSeconds):: self + {gracePeriodSeconds: gracePeriodSeconds}, - // 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. - withOrphanDependents(orphanDependents):: self + {orphanDependents: orphanDependents}, - // 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. - withPropagationPolicy(propagationPolicy):: self + {propagationPolicy: propagationPolicy}, - mixin:: { - // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. - preconditions:: { - local __preconditionsMixin(preconditions) = {preconditions+: preconditions}, - mixinInstance(preconditions):: __preconditionsMixin(preconditions), - // Specifies the target UID. - withUid(uid):: self + __preconditionsMixin({uid: uid}), - }, - preconditionsType:: hidden.meta.v1.preconditions, - }, - }, - // Status is a return value for calls that don't return other objects. - status:: { - local kind = {kind: "Status"}, - new():: apiVersion + kind, - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + {code: code}, - // A human-readable description of the status of this operation. - withMessage(message):: self + {message: message}, - // 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. - withReason(reason):: self + {reason: reason}, - mixin:: { - // 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:: { - local __detailsMixin(details) = {details+: details}, - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - }, - }, - // Event represents a single event to a watched resource. - watchEvent:: { - local kind = {kind: "WatchEvent"}, - new():: apiVersion + kind, - // - withType(type):: self + {type: type}, - mixin:: { - }, - }, - }, - }, - networking:: { - v1:: { - local apiVersion = {apiVersion: "networking.k8s.io/v1"}, - // NetworkPolicy describes what network traffic is allowed for a set of Pods - networkPolicy:: { - local kind = {kind: "NetworkPolicy"}, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior for this NetworkPolicy. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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 - withEgress(egress):: self + if std.type(egress) == "array" then __specMixin({egress: egress}) else __specMixin({egress: [egress]}), - // 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 - withEgressMixin(egress):: self + if std.type(egress) == "array" then __specMixin({egress+: egress}) else __specMixin({egress+: [egress]}), - egressType:: hidden.networking.v1.networkPolicyEgressRule, - // 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) - withIngress(ingress):: self + if std.type(ingress) == "array" then __specMixin({ingress: ingress}) else __specMixin({ingress: [ingress]}), - // 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) - withIngressMixin(ingress):: self + if std.type(ingress) == "array" then __specMixin({ingress+: ingress}) else __specMixin({ingress+: [ingress]}), - ingressType:: hidden.networking.v1.networkPolicyIngressRule, - // 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:: { - local __podSelectorMixin(podSelector) = __specMixin({podSelector+: podSelector}), - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions: matchExpressions}) else __podSelectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __podSelectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({matchLabels+: matchLabels}), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - // 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 - withPolicyTypes(policyTypes):: self + if std.type(policyTypes) == "array" then __specMixin({policyTypes: policyTypes}) else __specMixin({policyTypes: [policyTypes]}), - // 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 - withPolicyTypesMixin(policyTypes):: self + if std.type(policyTypes) == "array" then __specMixin({policyTypes+: policyTypes}) else __specMixin({policyTypes+: [policyTypes]}), - }, - specType:: hidden.networking.v1.networkPolicySpec, - }, - }, - // NetworkPolicyList is a list of NetworkPolicy objects. - networkPolicyList:: { - local kind = {kind: "NetworkPolicyList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of schema objects. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of schema objects. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.networking.v1.networkPolicy, - mixin:: { - }, - }, - }, - }, - policy:: { - v1beta1:: { - local apiVersion = {apiVersion: "policy/v1beta1"}, - // 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. - eviction:: { - local kind = {kind: "Eviction"}, - new():: apiVersion + kind, - mixin:: { - // DeleteOptions may be provided - deleteOptions:: { - local __deleteOptionsMixin(deleteOptions) = {deleteOptions+: deleteOptions}, - mixinInstance(deleteOptions):: __deleteOptionsMixin(deleteOptions), - // 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. - withGracePeriodSeconds(gracePeriodSeconds):: self + __deleteOptionsMixin({gracePeriodSeconds: gracePeriodSeconds}), - // 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. - withOrphanDependents(orphanDependents):: self + __deleteOptionsMixin({orphanDependents: orphanDependents}), - // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. - preconditions:: { - local __preconditionsMixin(preconditions) = __deleteOptionsMixin({preconditions+: preconditions}), - mixinInstance(preconditions):: __preconditionsMixin(preconditions), - // Specifies the target UID. - withUid(uid):: self + __preconditionsMixin({uid: uid}), - }, - preconditionsType:: hidden.meta.v1.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. - withPropagationPolicy(propagationPolicy):: self + __deleteOptionsMixin({propagationPolicy: propagationPolicy}), - }, - deleteOptionsType:: hidden.meta.v1.deleteOptions, - // ObjectMeta describes the pod that is being evicted. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods - podDisruptionBudget:: { - local kind = {kind: "PodDisruptionBudget"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the PodDisruptionBudget. - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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". - withMaxUnavailable(maxUnavailable):: __specMixin({maxUnavailable: 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%". - withMinAvailable(minAvailable):: __specMixin({minAvailable: minAvailable}), - // Label query over pods whose evictions are managed by the disruption budget. - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - specType:: hidden.policy.v1beta1.podDisruptionBudgetSpec, - }, - }, - // PodDisruptionBudgetList is a collection of PodDisruptionBudgets. - podDisruptionBudgetList:: { - local kind = {kind: "PodDisruptionBudgetList"}, - new(items):: apiVersion + kind + self.withItems(items), - // - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.policy.v1beta1.podDisruptionBudget, - mixin:: { - }, - }, - }, - }, - rbac:: { - v1:: { - local apiVersion = {apiVersion: "rbac.authorization.k8s.io/v1"}, - // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. - clusterRole:: { - local kind = {kind: "ClusterRole"}, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this ClusterRole - withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, - // Rules holds all the PolicyRules for this ClusterRole - withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.rbac.v1.policyRule, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. - clusterRoleBinding:: { - local kind = {kind: "ClusterRoleBinding"}, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - withSubjects(subjects):: self + if std.type(subjects) == "array" then {subjects: subjects} else {subjects: [subjects]}, - // Subjects holds references to the objects the role applies to. - withSubjectsMixin(subjects):: self + if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, - subjectsType:: hidden.rbac.v1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. - roleRef:: { - local __roleRefMixin(roleRef) = {roleRef+: roleRef}, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + __roleRefMixin({apiGroup: apiGroup}), - // Name is the name of resource being referenced - withName(name):: self + __roleRefMixin({name: name}), - }, - roleRefType:: hidden.rbac.v1.roleRef, - }, - }, - // ClusterRoleBindingList is a collection of ClusterRoleBindings - clusterRoleBindingList:: { - local kind = {kind: "ClusterRoleBindingList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of ClusterRoleBindings - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of ClusterRoleBindings - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1.clusterRoleBinding, - mixin:: { - }, - }, - // ClusterRoleList is a collection of ClusterRoles - clusterRoleList:: { - local kind = {kind: "ClusterRoleList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of ClusterRoles - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of ClusterRoles - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1.clusterRole, - mixin:: { - }, - }, - // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. - role:: { - local kind = {kind: "Role"}, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this Role - withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, - // Rules holds all the PolicyRules for this Role - withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.rbac.v1.policyRule, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // 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. - roleBinding:: { - local kind = {kind: "RoleBinding"}, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - withSubjects(subjects):: self + if std.type(subjects) == "array" then {subjects: subjects} else {subjects: [subjects]}, - // Subjects holds references to the objects the role applies to. - withSubjectsMixin(subjects):: self + if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, - subjectsType:: hidden.rbac.v1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __roleRefMixin(roleRef) = {roleRef+: roleRef}, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + __roleRefMixin({apiGroup: apiGroup}), - // Name is the name of resource being referenced - withName(name):: self + __roleRefMixin({name: name}), - }, - roleRefType:: hidden.rbac.v1.roleRef, - }, - }, - // RoleBindingList is a collection of RoleBindings - roleBindingList:: { - local kind = {kind: "RoleBindingList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of RoleBindings - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of RoleBindings - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1.roleBinding, - mixin:: { - }, - }, - // RoleList is a collection of Roles - roleList:: { - local kind = {kind: "RoleList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of Roles - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of Roles - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1.role, - mixin:: { - }, - }, - }, - v1alpha1:: { - local apiVersion = {apiVersion: "rbac.authorization.k8s.io/v1alpha1"}, - // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. - clusterRole:: { - local kind = {kind: "ClusterRole"}, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this ClusterRole - withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, - // Rules holds all the PolicyRules for this ClusterRole - withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.rbac.v1alpha1.policyRule, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. - clusterRoleBinding:: { - local kind = {kind: "ClusterRoleBinding"}, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - withSubjects(subjects):: self + if std.type(subjects) == "array" then {subjects: subjects} else {subjects: [subjects]}, - // Subjects holds references to the objects the role applies to. - withSubjectsMixin(subjects):: self + if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, - subjectsType:: hidden.rbac.v1alpha1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. - roleRef:: { - local __roleRefMixin(roleRef) = {roleRef+: roleRef}, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + __roleRefMixin({apiGroup: apiGroup}), - // Name is the name of resource being referenced - withName(name):: self + __roleRefMixin({name: name}), - }, - roleRefType:: hidden.rbac.v1alpha1.roleRef, - }, - }, - // ClusterRoleBindingList is a collection of ClusterRoleBindings - clusterRoleBindingList:: { - local kind = {kind: "ClusterRoleBindingList"}, - new():: apiVersion + kind, - // Items is a list of ClusterRoleBindings - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of ClusterRoleBindings - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1alpha1.clusterRoleBinding, - mixin:: { - }, - }, - // ClusterRoleList is a collection of ClusterRoles - clusterRoleList:: { - local kind = {kind: "ClusterRoleList"}, - new():: apiVersion + kind, - // Items is a list of ClusterRoles - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of ClusterRoles - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1alpha1.clusterRole, - mixin:: { - }, - }, - // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. - role:: { - local kind = {kind: "Role"}, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this Role - withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, - // Rules holds all the PolicyRules for this Role - withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.rbac.v1alpha1.policyRule, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // 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. - roleBinding:: { - local kind = {kind: "RoleBinding"}, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - withSubjects(subjects):: self + if std.type(subjects) == "array" then {subjects: subjects} else {subjects: [subjects]}, - // Subjects holds references to the objects the role applies to. - withSubjectsMixin(subjects):: self + if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, - subjectsType:: hidden.rbac.v1alpha1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __roleRefMixin(roleRef) = {roleRef+: roleRef}, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + __roleRefMixin({apiGroup: apiGroup}), - // Name is the name of resource being referenced - withName(name):: self + __roleRefMixin({name: name}), - }, - roleRefType:: hidden.rbac.v1alpha1.roleRef, - }, - }, - // RoleBindingList is a collection of RoleBindings - roleBindingList:: { - local kind = {kind: "RoleBindingList"}, - new():: apiVersion + kind, - // Items is a list of RoleBindings - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of RoleBindings - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1alpha1.roleBinding, - mixin:: { - }, - }, - // RoleList is a collection of Roles - roleList:: { - local kind = {kind: "RoleList"}, - new():: apiVersion + kind, - // Items is a list of Roles - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of Roles - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1alpha1.role, - mixin:: { - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "rbac.authorization.k8s.io/v1beta1"}, - // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. - clusterRole:: { - local kind = {kind: "ClusterRole"}, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this ClusterRole - withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, - // Rules holds all the PolicyRules for this ClusterRole - withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.rbac.v1beta1.policyRule, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. - clusterRoleBinding:: { - local kind = {kind: "ClusterRoleBinding"}, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - withSubjects(subjects):: self + if std.type(subjects) == "array" then {subjects: subjects} else {subjects: [subjects]}, - // Subjects holds references to the objects the role applies to. - withSubjectsMixin(subjects):: self + if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, - subjectsType:: hidden.rbac.v1beta1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. - roleRef:: { - local __roleRefMixin(roleRef) = {roleRef+: roleRef}, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + __roleRefMixin({apiGroup: apiGroup}), - // Name is the name of resource being referenced - withName(name):: self + __roleRefMixin({name: name}), - }, - roleRefType:: hidden.rbac.v1beta1.roleRef, - }, - }, - // ClusterRoleBindingList is a collection of ClusterRoleBindings - clusterRoleBindingList:: { - local kind = {kind: "ClusterRoleBindingList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of ClusterRoleBindings - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of ClusterRoleBindings - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1beta1.clusterRoleBinding, - mixin:: { - }, - }, - // ClusterRoleList is a collection of ClusterRoles - clusterRoleList:: { - local kind = {kind: "ClusterRoleList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of ClusterRoles - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of ClusterRoles - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1beta1.clusterRole, - mixin:: { - }, - }, - // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. - role:: { - local kind = {kind: "Role"}, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this Role - withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, - // Rules holds all the PolicyRules for this Role - withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.rbac.v1beta1.policyRule, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // 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. - roleBinding:: { - local kind = {kind: "RoleBinding"}, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - withSubjects(subjects):: self + if std.type(subjects) == "array" then {subjects: subjects} else {subjects: [subjects]}, - // Subjects holds references to the objects the role applies to. - withSubjectsMixin(subjects):: self + if std.type(subjects) == "array" then {subjects+: subjects} else {subjects+: [subjects]}, - subjectsType:: hidden.rbac.v1beta1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __roleRefMixin(roleRef) = {roleRef+: roleRef}, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + __roleRefMixin({apiGroup: apiGroup}), - // Name is the name of resource being referenced - withName(name):: self + __roleRefMixin({name: name}), - }, - roleRefType:: hidden.rbac.v1beta1.roleRef, - }, - }, - // RoleBindingList is a collection of RoleBindings - roleBindingList:: { - local kind = {kind: "RoleBindingList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of RoleBindings - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of RoleBindings - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1beta1.roleBinding, - mixin:: { - }, - }, - // RoleList is a collection of Roles - roleList:: { - local kind = {kind: "RoleList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of Roles - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of Roles - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.rbac.v1beta1.role, - mixin:: { - }, - }, - }, - }, - scheduling:: { - v1alpha1:: { - local apiVersion = {apiVersion: "scheduling.k8s.io/v1alpha1"}, - // PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer. - priorityClass:: { - local kind = {kind: "PriorityClass"}, - new():: apiVersion + kind, - // description is an arbitrary string that usually provides guidelines on when this priority class should be used. - withDescription(description):: self + {description: description}, - // globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. - withGlobalDefault(globalDefault):: self + {globalDefault: globalDefault}, - // 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. - withValue(value):: self + {value: value}, - mixin:: { - // Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // PriorityClassList is a collection of priority classes. - priorityClassList:: { - local kind = {kind: "PriorityClassList"}, - new(items):: apiVersion + kind + self.withItems(items), - // items is the list of PriorityClasses - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // items is the list of PriorityClasses - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.scheduling.v1alpha1.priorityClass, - mixin:: { - }, - }, - }, - }, - settings:: { - v1alpha1:: { - local apiVersion = {apiVersion: "settings.k8s.io/v1alpha1"}, - // PodPreset is a policy resource that defines additional runtime requirements for a Pod. - podPreset:: { - local kind = {kind: "PodPreset"}, - new():: apiVersion + kind, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Env defines the collection of EnvVar to inject into containers. - withEnv(env):: self + if std.type(env) == "array" then __specMixin({env: env}) else __specMixin({env: [env]}), - // Env defines the collection of EnvVar to inject into containers. - withEnvMixin(env):: self + if std.type(env) == "array" then __specMixin({env+: env}) else __specMixin({env+: [env]}), - // EnvFrom defines the collection of EnvFromSource to inject into containers. - withEnvFrom(envFrom):: self + if std.type(envFrom) == "array" then __specMixin({envFrom: envFrom}) else __specMixin({envFrom: [envFrom]}), - // EnvFrom defines the collection of EnvFromSource to inject into containers. - withEnvFromMixin(envFrom):: self + if std.type(envFrom) == "array" then __specMixin({envFrom+: envFrom}) else __specMixin({envFrom+: [envFrom]}), - envFromType:: hidden.core.v1.envFromSource, - envType:: hidden.core.v1.envVar, - // Selector is a label query over a set of resources, in this case pods. Required. - selector:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // VolumeMounts defines the collection of VolumeMount to inject into containers. - withVolumeMounts(volumeMounts):: self + if std.type(volumeMounts) == "array" then __specMixin({volumeMounts: volumeMounts}) else __specMixin({volumeMounts: [volumeMounts]}), - // VolumeMounts defines the collection of VolumeMount to inject into containers. - withVolumeMountsMixin(volumeMounts):: self + if std.type(volumeMounts) == "array" then __specMixin({volumeMounts+: volumeMounts}) else __specMixin({volumeMounts+: [volumeMounts]}), - volumeMountsType:: hidden.core.v1.volumeMount, - // Volumes defines the collection of Volume to inject into the pod. - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // Volumes defines the collection of Volume to inject into the pod. - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.settings.v1alpha1.podPresetSpec, - }, - }, - // PodPresetList is a list of PodPreset objects. - podPresetList:: { - local kind = {kind: "PodPresetList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is a list of schema objects. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of schema objects. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.settings.v1alpha1.podPreset, - mixin:: { - }, - }, - }, - }, - storage:: { - v1:: { - local apiVersion = {apiVersion: "storage.k8s.io/v1"}, - // 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. - storageClass:: { - local kind = {kind: "StorageClass"}, - new():: apiVersion + kind, - // AllowVolumeExpansion shows whether the storage class allow volume expand - withAllowVolumeExpansion(allowVolumeExpansion):: self + {allowVolumeExpansion: allowVolumeExpansion}, - // 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. - withMountOptions(mountOptions):: self + if std.type(mountOptions) == "array" then {mountOptions: mountOptions} else {mountOptions: [mountOptions]}, - // 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. - withMountOptionsMixin(mountOptions):: self + if std.type(mountOptions) == "array" then {mountOptions+: mountOptions} else {mountOptions+: [mountOptions]}, - // Parameters holds the parameters for the provisioner that should create volumes of this storage class. - withParameters(parameters):: self + {parameters: parameters}, - // Parameters holds the parameters for the provisioner that should create volumes of this storage class. - withParametersMixin(parameters):: self + {parameters+: parameters}, - // Provisioner indicates the type of the provisioner. - withProvisioner(provisioner):: self + {provisioner: provisioner}, - // Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete. - withReclaimPolicy(reclaimPolicy):: self + {reclaimPolicy: reclaimPolicy}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // StorageClassList is a collection of storage classes. - storageClassList:: { - local kind = {kind: "StorageClassList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is the list of StorageClasses - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is the list of StorageClasses - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.storage.v1.storageClass, - mixin:: { - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "storage.k8s.io/v1beta1"}, - // 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. - storageClass:: { - local kind = {kind: "StorageClass"}, - new():: apiVersion + kind, - // AllowVolumeExpansion shows whether the storage class allow volume expand - withAllowVolumeExpansion(allowVolumeExpansion):: self + {allowVolumeExpansion: allowVolumeExpansion}, - // 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. - withMountOptions(mountOptions):: self + if std.type(mountOptions) == "array" then {mountOptions: mountOptions} else {mountOptions: [mountOptions]}, - // 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. - withMountOptionsMixin(mountOptions):: self + if std.type(mountOptions) == "array" then {mountOptions+: mountOptions} else {mountOptions+: [mountOptions]}, - // Parameters holds the parameters for the provisioner that should create volumes of this storage class. - withParameters(parameters):: self + {parameters: parameters}, - // Parameters holds the parameters for the provisioner that should create volumes of this storage class. - withParametersMixin(parameters):: self + {parameters+: parameters}, - // Provisioner indicates the type of the provisioner. - withProvisioner(provisioner):: self + {provisioner: provisioner}, - // Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete. - withReclaimPolicy(reclaimPolicy):: self + {reclaimPolicy: reclaimPolicy}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // StorageClassList is a collection of storage classes. - storageClassList:: { - local kind = {kind: "StorageClassList"}, - new(items):: apiVersion + kind + self.withItems(items), - // Items is the list of StorageClasses - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is the list of StorageClasses - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.storage.v1beta1.storageClass, - mixin:: { - }, - }, - }, - }, - local hidden = { - admissionregistration:: { - v1alpha1:: { - local apiVersion = {apiVersion: "admissionregistration/v1alpha1"}, - // AdmissionHookClientConfig contains the information to make a TLS connection with the webhook - admissionHookClientConfig:: { - new():: {}, - // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required - withCaBundle(caBundle):: self + {caBundle: caBundle}, - mixin:: { - // Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required - service:: { - local __serviceMixin(service) = {service+: service}, - mixinInstance(service):: __serviceMixin(service), - // Name is the name of the service Required - withName(name):: self + __serviceMixin({name: name}), - // Namespace is the namespace of the service Required - withNamespace(namespace):: self + __serviceMixin({namespace: namespace}), - }, - serviceType:: hidden.admissionregistration.v1alpha1.serviceReference, - }, - }, - // ExternalAdmissionHook describes an external admission webhook and the resources and operations it applies to. - externalAdmissionHook:: { - new():: {}, - // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore. - withFailurePolicy(failurePolicy):: self + {failurePolicy: failurePolicy}, - // The name of the external 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. - withName(name):: self + {name: name}, - // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. - withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, - // Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. - withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.admissionregistration.v1alpha1.ruleWithOperations, - mixin:: { - // ClientConfig defines how to communicate with the hook. Required - clientConfig:: { - local __clientConfigMixin(clientConfig) = {clientConfig+: clientConfig}, - mixinInstance(clientConfig):: __clientConfigMixin(clientConfig), - // CABundle is a PEM encoded CA bundle which will be used to validate webhook's server certificate. Required - withCaBundle(caBundle):: self + __clientConfigMixin({caBundle: caBundle}), - // Service is a reference to the service for this webhook. If there is only one port open for the service, that port will be used. If there are multiple ports open, port 443 will be used if it is open, otherwise it is an error. Required - service:: { - local __serviceMixin(service) = __clientConfigMixin({service+: service}), - mixinInstance(service):: __serviceMixin(service), - // Name is the name of the service Required - withName(name):: self + __serviceMixin({name: name}), - // Namespace is the namespace of the service Required - withNamespace(namespace):: self + __serviceMixin({namespace: namespace}), - }, - serviceType:: hidden.admissionregistration.v1alpha1.serviceReference, - }, - clientConfigType:: hidden.admissionregistration.v1alpha1.admissionHookClientConfig, - }, - }, - // Initializer describes the name and the failure policy of an initializer, and what resources it applies to. - initializer:: { - new():: {}, - // Name is the identifier of the initializer. It will be added to the object that needs to be initialized. Name should be fully qualified, e.g., alwayspullimages.kubernetes.io, where "alwayspullimages" is the name of the webhook, and kubernetes.io is the name of the organization. Required - withName(name):: self + {name: name}, - // Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources. - withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, - // Rules describes what resources/subresources the initializer cares about. The initializer cares about an operation if it matches _any_ Rule. Rule.Resources must not include subresources. - withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.admissionregistration.v1alpha1.rule, - mixin:: { - }, - }, - // Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid. - rule:: { - new():: {}, - // APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. - withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, - // APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. - withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [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. - withApiVersions(apiVersions):: self + if std.type(apiVersions) == "array" then {apiVersions: apiVersions} else {apiVersions: [apiVersions]}, - // APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. - withApiVersionsMixin(apiVersions):: self + if std.type(apiVersions) == "array" then {apiVersions+: apiVersions} else {apiVersions+: [apiVersions]}, - // 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. - withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, - // 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. - withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - mixin:: { - }, - }, - // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid. - ruleWithOperations:: { - new():: {}, - // APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. - withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, - // APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. - withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [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. - withApiVersions(apiVersions):: self + if std.type(apiVersions) == "array" then {apiVersions: apiVersions} else {apiVersions: [apiVersions]}, - // APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. - withApiVersionsMixin(apiVersions):: self + if std.type(apiVersions) == "array" then {apiVersions+: apiVersions} else {apiVersions+: [apiVersions]}, - // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required. - withOperations(operations):: self + if std.type(operations) == "array" then {operations: operations} else {operations: [operations]}, - // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required. - withOperationsMixin(operations):: self + if std.type(operations) == "array" then {operations+: operations} else {operations+: [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. - withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, - // 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. - withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - mixin:: { - }, - }, - // ServiceReference holds a reference to Service.legacy.k8s.io - serviceReference:: { - new():: {}, - // Name is the name of the service Required - withName(name):: self + {name: name}, - // Namespace is the namespace of the service Required - withNamespace(namespace):: self + {namespace: namespace}, - mixin:: { - }, - }, - }, - }, - apiextensions:: { - v1beta1:: { - local apiVersion = {apiVersion: "apiextensions/v1beta1"}, - // CustomResourceDefinitionCondition contains details for the current condition of this pod. - customResourceDefinitionCondition:: { - new():: {}, - // Human-readable message indicating details about last transition. - withMessage(message):: self + {message: message}, - // Unique, one-word, CamelCase reason for the condition's last transition. - withReason(reason):: self + {reason: reason}, - // Type is the type of the condition. - withType(type):: self + {type: type}, - mixin:: { - // Last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // CustomResourceDefinitionList is a list of CustomResourceDefinition objects. - customResourceDefinitionList:: { - new():: {}, - // Items individual CustomResourceDefinitions - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items individual CustomResourceDefinitions - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apiextensions.v1beta1.customResourceDefinition, - mixin:: { - }, - }, - // CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition - customResourceDefinitionNames:: { - new():: {}, - // ListKind is the serialized kind of the list for this resource. Defaults to List. - withListKind(listKind):: self + {listKind: listKind}, - // Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase. - withPlural(plural):: self + {plural: plural}, - // ShortNames are short names for the resource. It must be all lowercase. - withShortNames(shortNames):: self + if std.type(shortNames) == "array" then {shortNames: shortNames} else {shortNames: [shortNames]}, - // ShortNames are short names for the resource. It must be all lowercase. - withShortNamesMixin(shortNames):: self + if std.type(shortNames) == "array" then {shortNames+: shortNames} else {shortNames+: [shortNames]}, - // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased - withSingular(singular):: self + {singular: singular}, - mixin:: { - }, - }, - // CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition - customResourceDefinitionStatus:: { - new():: {}, - // Conditions indicate state for particular aspects of a CustomResourceDefinition - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // Conditions indicate state for particular aspects of a CustomResourceDefinition - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.apiextensions.v1beta1.customResourceDefinitionCondition, - mixin:: { - // AcceptedNames are the names that are actually being used to serve discovery They may be different than the names in spec. - acceptedNames:: { - local __acceptedNamesMixin(acceptedNames) = {acceptedNames+: acceptedNames}, - mixinInstance(acceptedNames):: __acceptedNamesMixin(acceptedNames), - // ListKind is the serialized kind of the list for this resource. Defaults to List. - withListKind(listKind):: self + __acceptedNamesMixin({listKind: listKind}), - // Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase. - withPlural(plural):: self + __acceptedNamesMixin({plural: plural}), - // ShortNames are short names for the resource. It must be all lowercase. - withShortNames(shortNames):: self + if std.type(shortNames) == "array" then __acceptedNamesMixin({shortNames: shortNames}) else __acceptedNamesMixin({shortNames: [shortNames]}), - // ShortNames are short names for the resource. It must be all lowercase. - withShortNamesMixin(shortNames):: self + if std.type(shortNames) == "array" then __acceptedNamesMixin({shortNames+: shortNames}) else __acceptedNamesMixin({shortNames+: [shortNames]}), - // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased - withSingular(singular):: self + __acceptedNamesMixin({singular: singular}), - }, - acceptedNamesType:: hidden.apiextensions.v1beta1.customResourceDefinitionNames, - }, - }, - // ExternalDocumentation allows referencing an external resource for extended documentation. - externalDocumentation:: { - new():: {}, - // - withDescription(description):: self + {description: description}, - // - withUrl(url):: self + {url: url}, - mixin:: { - }, - }, - // JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. - json:: { - new():: {}, - // - withRaw(raw):: self + {Raw: raw}, - mixin:: { - }, - }, - }, - }, - apiregistration:: { - v1beta1:: { - local apiVersion = {apiVersion: "apiregistration/v1beta1"}, - // APIService represents a server for a particular GroupVersion. Name must be "version.group". - apiService:: { - new():: {}, - mixin:: { - // - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec contains information for locating and communicating with a server - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. - withCaBundle(caBundle):: self + __specMixin({caBundle: caBundle}), - // Group is the API group name this server hosts - withGroup(group):: self + __specMixin({group: group}), - // GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is prefered 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 - withGroupPriorityMinimum(groupPriorityMinimum):: self + __specMixin({groupPriorityMinimum: groupPriorityMinimum}), - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. - withInsecureSkipTlsVerify(insecureSkipTlsVerify):: self + __specMixin({insecureSkipTLSVerify: 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:: { - local __serviceMixin(service) = __specMixin({service+: service}), - mixinInstance(service):: __serviceMixin(service), - // Name is the name of the service - withName(name):: self + __serviceMixin({name: name}), - // Namespace is the namespace of the service - withNamespace(namespace):: self + __serviceMixin({namespace: namespace}), - }, - serviceType:: hidden.apiregistration.v1beta1.serviceReference, - // Version is the API version this server hosts. For example, "v1" - withVersion(version):: self + __specMixin({version: version}), - // 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). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) Since it's inside of a group, the number can be small, probably in the 10s. - withVersionPriority(versionPriority):: self + __specMixin({versionPriority: versionPriority}), - }, - specType:: hidden.apiregistration.v1beta1.apiServiceSpec, - }, - }, - // - apiServiceCondition:: { - new():: {}, - // Human-readable message indicating details about last transition. - withMessage(message):: self + {message: message}, - // Unique, one-word, CamelCase reason for the condition's last transition. - withReason(reason):: self + {reason: reason}, - // Type is the type of the condition. - withType(type):: self + {type: type}, - mixin:: { - // Last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // APIServiceList is a list of APIService objects. - apiServiceList:: { - new():: {}, - // - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.apiregistration.v1beta1.apiService, - mixin:: { - }, - }, - // APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification. - apiServiceSpec:: { - new():: {}, - // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. - withCaBundle(caBundle):: self + {caBundle: caBundle}, - // Group is the API group name this server hosts - withGroup(group):: self + {group: group}, - // GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is prefered 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 - withGroupPriorityMinimum(groupPriorityMinimum):: self + {groupPriorityMinimum: groupPriorityMinimum}, - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. - withInsecureSkipTlsVerify(insecureSkipTlsVerify):: self + {insecureSkipTLSVerify: insecureSkipTlsVerify}, - // Version is the API version this server hosts. For example, "v1" - withVersion(version):: self + {version: version}, - // 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). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) Since it's inside of a group, the number can be small, probably in the 10s. - withVersionPriority(versionPriority):: self + {versionPriority: versionPriority}, - mixin:: { - // 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:: { - local __serviceMixin(service) = {service+: service}, - mixinInstance(service):: __serviceMixin(service), - // Name is the name of the service - withName(name):: self + __serviceMixin({name: name}), - // Namespace is the namespace of the service - withNamespace(namespace):: self + __serviceMixin({namespace: namespace}), - }, - serviceType:: hidden.apiregistration.v1beta1.serviceReference, - }, - }, - // APIServiceStatus contains derived information about an API server - apiServiceStatus:: { - new():: {}, - // Current service state of apiService. - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // Current service state of apiService. - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.apiregistration.v1beta1.apiServiceCondition, - mixin:: { - }, - }, - // ServiceReference holds a reference to Service.legacy.k8s.io - serviceReference:: { - new():: {}, - // Name is the name of the service - withName(name):: self + {name: name}, - // Namespace is the namespace of the service - withNamespace(namespace):: self + {namespace: namespace}, - mixin:: { - }, - }, - }, - }, - apps:: { - v1beta1:: { - local apiVersion = {apiVersion: "apps/v1beta1"}, - // DeploymentCondition describes the state of a deployment at a certain point. - deploymentCondition:: { - new():: {}, - // A human readable message indicating details about the transition. - withMessage(message):: self + {message: message}, - // The reason for the condition's last transition. - withReason(reason):: self + {reason: reason}, - // Type of deployment condition. - withType(type):: self + {type: type}, - mixin:: { - // Last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - // The last time this condition was updated. - lastUpdateTime:: { - local __lastUpdateTimeMixin(lastUpdateTime) = {lastUpdateTime+: lastUpdateTime}, - mixinInstance(lastUpdateTime):: __lastUpdateTimeMixin(lastUpdateTime), - }, - lastUpdateTimeType:: hidden.meta.v1.time, - }, - }, - // DeploymentSpec is the specification of the desired behavior of the Deployment. - deploymentSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: minReadySeconds}, - // Indicates that the deployment is paused. - withPaused(paused):: self + {paused: 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. - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + {progressDeadlineSeconds: progressDeadlineSeconds}, - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + {replicas: 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 2. - withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, - mixin:: { - // DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = {rollbackTo+: rollbackTo}, - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + __rollbackToMixin({revision: revision}), - }, - rollbackToType:: hidden.apps.v1beta1.rollbackConfig, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = {strategy+: strategy}, - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({type: type}), - }, - strategyType:: hidden.apps.v1beta1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // DeploymentStatus is the most recently observed status of the Deployment. - deploymentStatus:: { - new():: {}, - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - withAvailableReplicas(availableReplicas):: self + {availableReplicas: availableReplicas}, - // Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. - withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, - // Represents the latest available observations of a deployment's current state. - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // Represents the latest available observations of a deployment's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.apps.v1beta1.deploymentCondition, - // The generation observed by the deployment controller. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - // Total number of ready pods targeted by this deployment. - withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - withReplicas(replicas):: self + {replicas: replicas}, - // Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. - withUnavailableReplicas(unavailableReplicas):: self + {unavailableReplicas: unavailableReplicas}, - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - withUpdatedReplicas(updatedReplicas):: self + {updatedReplicas: updatedReplicas}, - mixin:: { - }, - }, - // DeploymentStrategy describes how to replace existing pods with new ones. - deploymentStrategy:: { - new():: {}, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + {type: type}, - mixin:: { - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateDeployment, - }, - }, - // DEPRECATED. - rollbackConfig:: { - new():: {}, - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + {revision: revision}, - mixin:: { - }, - }, - // Spec to control the desired behavior of rolling update. - rollingUpdateDeployment:: { - new():: {}, - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - withMaxSurge(maxSurge):: {maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, - mixin:: { - }, - }, - // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. - rollingUpdateStatefulSetStrategy:: { - new():: {}, - // Partition indicates the ordinal at which the StatefulSet should be partitioned. - withPartition(partition):: self + {partition: partition}, - mixin:: { - }, - }, - // ScaleSpec describes the attributes of a scale subresource - scaleSpec:: { - new():: {}, - // desired number of instances for the scaled object. - withReplicas(replicas):: self + {replicas: replicas}, - mixin:: { - }, - }, - // ScaleStatus represents the current status of a scale subresource. - scaleStatus:: { - new():: {}, - // actual number of observed instances of the scaled object. - withReplicas(replicas):: self + {replicas: replicas}, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelector(selector):: self + {selector: selector}, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelectorMixin(selector):: self + {selector+: selector}, - // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - withTargetSelector(targetSelector):: self + {targetSelector: targetSelector}, - mixin:: { - }, - }, - // A StatefulSetSpec is the specification of a StatefulSet. - statefulSetSpec:: { - new():: {}, - // 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. - withPodManagementPolicy(podManagementPolicy):: self + {podManagementPolicy: 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. - withReplicas(replicas):: self + {replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, - // 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. - withServiceName(serviceName):: self + {serviceName: serviceName}, - // 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. - withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then {volumeClaimTemplates: volumeClaimTemplates} else {volumeClaimTemplates: [volumeClaimTemplates]}, - // 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. - withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then {volumeClaimTemplates+: volumeClaimTemplates} else {volumeClaimTemplates+: [volumeClaimTemplates]}, - volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, - mixin:: { - // selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = {updateStrategy+: updateStrategy}, - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. - withPartition(partition):: self + __rollingUpdateMixin({partition: partition}), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateStatefulSetStrategy, - // Type indicates the type of the StatefulSetUpdateStrategy. - withType(type):: self + __updateStrategyMixin({type: type}), - }, - updateStrategyType:: hidden.apps.v1beta1.statefulSetUpdateStrategy, - }, - }, - // StatefulSetStatus represents the current state of a StatefulSet. - statefulSetStatus:: { - new():: {}, - // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. - withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, - // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision. - withCurrentReplicas(currentReplicas):: self + {currentReplicas: currentReplicas}, - // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). - withCurrentRevision(currentRevision):: self + {currentRevision: currentRevision}, - // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. - withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, - // replicas is the number of Pods created by the StatefulSet controller. - withReplicas(replicas):: self + {replicas: replicas}, - // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) - withUpdateRevision(updateRevision):: self + {updateRevision: updateRevision}, - // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision. - withUpdatedReplicas(updatedReplicas):: self + {updatedReplicas: updatedReplicas}, - mixin:: { - }, - }, - // 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. - statefulSetUpdateStrategy:: { - new():: {}, - // Type indicates the type of the StatefulSetUpdateStrategy. - withType(type):: self + {type: type}, - mixin:: { - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. - withPartition(partition):: self + __rollingUpdateMixin({partition: partition}), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateStatefulSetStrategy, - }, - }, - }, - v1beta2:: { - local apiVersion = {apiVersion: "apps/v1beta2"}, - // DaemonSetSpec is the specification of a daemon set. - daemonSetSpec:: { - new():: {}, - // 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). - withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, - mixin:: { - // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = {updateStrategy+: updateStrategy}, - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDaemonSet, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. - withType(type):: self + __updateStrategyMixin({type: type}), - }, - updateStrategyType:: hidden.apps.v1beta2.daemonSetUpdateStrategy, - }, - }, - // DaemonSetStatus represents the current status of a daemon set. - daemonSetStatus:: { - new():: {}, - // Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. - withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, - // The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withCurrentNumberScheduled(currentNumberScheduled):: self + {currentNumberScheduled: currentNumberScheduled}, - // The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withDesiredNumberScheduled(desiredNumberScheduled):: self + {desiredNumberScheduled: desiredNumberScheduled}, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds) - withNumberAvailable(numberAvailable):: self + {numberAvailable: numberAvailable}, - // The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withNumberMisscheduled(numberMisscheduled):: self + {numberMisscheduled: numberMisscheduled}, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. - withNumberReady(numberReady):: self + {numberReady: numberReady}, - // The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds) - withNumberUnavailable(numberUnavailable):: self + {numberUnavailable: numberUnavailable}, - // The most recent generation observed by the daemon set controller. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - // The total number of nodes that are running updated daemon pod - withUpdatedNumberScheduled(updatedNumberScheduled):: self + {updatedNumberScheduled: updatedNumberScheduled}, - mixin:: { - }, - }, - // DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. - daemonSetUpdateStrategy:: { - new():: {}, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. - withType(type):: self + {type: type}, - mixin:: { - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDaemonSet, - }, - }, - // DeploymentCondition describes the state of a deployment at a certain point. - deploymentCondition:: { - new():: {}, - // A human readable message indicating details about the transition. - withMessage(message):: self + {message: message}, - // The reason for the condition's last transition. - withReason(reason):: self + {reason: reason}, - // Type of deployment condition. - withType(type):: self + {type: type}, - mixin:: { - // Last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - // The last time this condition was updated. - lastUpdateTime:: { - local __lastUpdateTimeMixin(lastUpdateTime) = {lastUpdateTime+: lastUpdateTime}, - mixinInstance(lastUpdateTime):: __lastUpdateTimeMixin(lastUpdateTime), - }, - lastUpdateTimeType:: hidden.meta.v1.time, - }, - }, - // DeploymentSpec is the specification of the desired behavior of the Deployment. - deploymentSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: minReadySeconds}, - // Indicates that the deployment is paused. - withPaused(paused):: self + {paused: 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. - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + {progressDeadlineSeconds: progressDeadlineSeconds}, - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + {replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, - mixin:: { - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = {strategy+: strategy}, - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({type: type}), - }, - strategyType:: hidden.apps.v1beta2.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // DeploymentStatus is the most recently observed status of the Deployment. - deploymentStatus:: { - new():: {}, - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - withAvailableReplicas(availableReplicas):: self + {availableReplicas: availableReplicas}, - // Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. - withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, - // Represents the latest available observations of a deployment's current state. - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // Represents the latest available observations of a deployment's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.apps.v1beta2.deploymentCondition, - // The generation observed by the deployment controller. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - // Total number of ready pods targeted by this deployment. - withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - withReplicas(replicas):: self + {replicas: replicas}, - // Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. - withUnavailableReplicas(unavailableReplicas):: self + {unavailableReplicas: unavailableReplicas}, - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - withUpdatedReplicas(updatedReplicas):: self + {updatedReplicas: updatedReplicas}, - mixin:: { - }, - }, - // DeploymentStrategy describes how to replace existing pods with new ones. - deploymentStrategy:: { - new():: {}, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + {type: type}, - mixin:: { - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDeployment, - }, - }, - // ReplicaSetCondition describes the state of a replica set at a certain point. - replicaSetCondition:: { - new():: {}, - // A human readable message indicating details about the transition. - withMessage(message):: self + {message: message}, - // The reason for the condition's last transition. - withReason(reason):: self + {reason: reason}, - // Type of replica set condition. - withType(type):: self + {type: type}, - mixin:: { - // The last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // ReplicaSetSpec is the specification of a ReplicaSet. - replicaSetSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: 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 - withReplicas(replicas):: self + {replicas: replicas}, - mixin:: { - // Selector is a label query over pods that should match the replica count. If the 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 replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // ReplicaSetStatus represents the current status of a ReplicaSet. - replicaSetStatus:: { - new():: {}, - // The number of available replicas (ready for at least minReadySeconds) for this replica set. - withAvailableReplicas(availableReplicas):: self + {availableReplicas: availableReplicas}, - // Represents the latest available observations of a replica set's current state. - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // Represents the latest available observations of a replica set's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.apps.v1beta2.replicaSetCondition, - // The number of pods that have labels matching the labels of the pod template of the replicaset. - withFullyLabeledReplicas(fullyLabeledReplicas):: self + {fullyLabeledReplicas: fullyLabeledReplicas}, - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - // The number of ready replicas for this replica set. - withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, - // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller - withReplicas(replicas):: self + {replicas: replicas}, - mixin:: { - }, - }, - // Spec to control the desired behavior of daemon set rolling update. - rollingUpdateDaemonSet:: { - new():: {}, - // 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. 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. - withMaxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, - mixin:: { - }, - }, - // Spec to control the desired behavior of rolling update. - rollingUpdateDeployment:: { - new():: {}, - // 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 RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - withMaxSurge(maxSurge):: {maxSurge: 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 RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, - mixin:: { - }, - }, - // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. - rollingUpdateStatefulSetStrategy:: { - new():: {}, - // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. - withPartition(partition):: self + {partition: partition}, - mixin:: { - }, - }, - // ScaleSpec describes the attributes of a scale subresource - scaleSpec:: { - new():: {}, - // desired number of instances for the scaled object. - withReplicas(replicas):: self + {replicas: replicas}, - mixin:: { - }, - }, - // ScaleStatus represents the current status of a scale subresource. - scaleStatus:: { - new():: {}, - // actual number of observed instances of the scaled object. - withReplicas(replicas):: self + {replicas: replicas}, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelector(selector):: self + {selector: selector}, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelectorMixin(selector):: self + {selector+: selector}, - // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - withTargetSelector(targetSelector):: self + {targetSelector: targetSelector}, - mixin:: { - }, - }, - // A StatefulSetSpec is the specification of a StatefulSet. - statefulSetSpec:: { - new():: {}, - // 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. - withPodManagementPolicy(podManagementPolicy):: self + {podManagementPolicy: 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. - withReplicas(replicas):: self + {replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, - // 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. - withServiceName(serviceName):: self + {serviceName: serviceName}, - // 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. - withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then {volumeClaimTemplates: volumeClaimTemplates} else {volumeClaimTemplates: [volumeClaimTemplates]}, - // 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. - withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == "array" then {volumeClaimTemplates+: volumeClaimTemplates} else {volumeClaimTemplates+: [volumeClaimTemplates]}, - volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, - mixin:: { - // selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = {updateStrategy+: updateStrategy}, - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. - withPartition(partition):: self + __rollingUpdateMixin({partition: partition}), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateStatefulSetStrategy, - // Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. - withType(type):: self + __updateStrategyMixin({type: type}), - }, - updateStrategyType:: hidden.apps.v1beta2.statefulSetUpdateStrategy, - }, - }, - // StatefulSetStatus represents the current state of a StatefulSet. - statefulSetStatus:: { - new():: {}, - // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. - withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, - // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision. - withCurrentReplicas(currentReplicas):: self + {currentReplicas: currentReplicas}, - // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). - withCurrentRevision(currentRevision):: self + {currentRevision: currentRevision}, - // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. - withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, - // replicas is the number of Pods created by the StatefulSet controller. - withReplicas(replicas):: self + {replicas: replicas}, - // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) - withUpdateRevision(updateRevision):: self + {updateRevision: updateRevision}, - // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision. - withUpdatedReplicas(updatedReplicas):: self + {updatedReplicas: updatedReplicas}, - mixin:: { - }, - }, - // 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. - statefulSetUpdateStrategy:: { - new():: {}, - // Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. - withType(type):: self + {type: type}, - mixin:: { - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. - withPartition(partition):: self + __rollingUpdateMixin({partition: partition}), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateStatefulSetStrategy, - }, - }, - }, - }, - authentication:: { - v1:: { - local apiVersion = {apiVersion: "authentication/v1"}, - // TokenReviewSpec is a description of the token authentication request. - tokenReviewSpec:: { - new():: {}, - // Token is the opaque bearer token. - withToken(token):: self + {token: token}, - mixin:: { - }, - }, - // TokenReviewStatus is the result of the token authentication request. - tokenReviewStatus:: { - new():: {}, - // Authenticated indicates that the token was associated with a known user. - withAuthenticated(authenticated):: self + {authenticated: authenticated}, - // Error indicates that the token couldn't be checked - withError(errorParam):: self + {"error": errorParam}, - mixin:: { - // User is the UserInfo associated with the provided token. - user:: { - local __userMixin(user) = {user+: user}, - mixinInstance(user):: __userMixin(user), - // Any additional information provided by the authenticator. - withExtra(extra):: self + __userMixin({extra: extra}), - // Any additional information provided by the authenticator. - withExtraMixin(extra):: self + __userMixin({extra+: extra}), - // The names of groups this user is a part of. - withGroups(groups):: self + if std.type(groups) == "array" then __userMixin({groups: groups}) else __userMixin({groups: [groups]}), - // The names of groups this user is a part of. - withGroupsMixin(groups):: self + if std.type(groups) == "array" then __userMixin({groups+: groups}) else __userMixin({groups+: [groups]}), - // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. - withUid(uid):: self + __userMixin({uid: uid}), - // The name that uniquely identifies this user among all active users. - withUsername(username):: self + __userMixin({username: username}), - }, - userType:: hidden.authentication.v1.userInfo, - }, - }, - // UserInfo holds the information about the user needed to implement the user.Info interface. - userInfo:: { - new():: {}, - // Any additional information provided by the authenticator. - withExtra(extra):: self + {extra: extra}, - // Any additional information provided by the authenticator. - withExtraMixin(extra):: self + {extra+: extra}, - // The names of groups this user is a part of. - withGroups(groups):: self + if std.type(groups) == "array" then {groups: groups} else {groups: [groups]}, - // The names of groups this user is a part of. - withGroupsMixin(groups):: self + if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, - // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. - withUid(uid):: self + {uid: uid}, - // The name that uniquely identifies this user among all active users. - withUsername(username):: self + {username: username}, - mixin:: { - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "authentication/v1beta1"}, - // TokenReviewSpec is a description of the token authentication request. - tokenReviewSpec:: { - new():: {}, - // Token is the opaque bearer token. - withToken(token):: self + {token: token}, - mixin:: { - }, - }, - // TokenReviewStatus is the result of the token authentication request. - tokenReviewStatus:: { - new():: {}, - // Authenticated indicates that the token was associated with a known user. - withAuthenticated(authenticated):: self + {authenticated: authenticated}, - // Error indicates that the token couldn't be checked - withError(errorParam):: self + {"error": errorParam}, - mixin:: { - // User is the UserInfo associated with the provided token. - user:: { - local __userMixin(user) = {user+: user}, - mixinInstance(user):: __userMixin(user), - // Any additional information provided by the authenticator. - withExtra(extra):: self + __userMixin({extra: extra}), - // Any additional information provided by the authenticator. - withExtraMixin(extra):: self + __userMixin({extra+: extra}), - // The names of groups this user is a part of. - withGroups(groups):: self + if std.type(groups) == "array" then __userMixin({groups: groups}) else __userMixin({groups: [groups]}), - // The names of groups this user is a part of. - withGroupsMixin(groups):: self + if std.type(groups) == "array" then __userMixin({groups+: groups}) else __userMixin({groups+: [groups]}), - // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. - withUid(uid):: self + __userMixin({uid: uid}), - // The name that uniquely identifies this user among all active users. - withUsername(username):: self + __userMixin({username: username}), - }, - userType:: hidden.authentication.v1beta1.userInfo, - }, - }, - // UserInfo holds the information about the user needed to implement the user.Info interface. - userInfo:: { - new():: {}, - // Any additional information provided by the authenticator. - withExtra(extra):: self + {extra: extra}, - // Any additional information provided by the authenticator. - withExtraMixin(extra):: self + {extra+: extra}, - // The names of groups this user is a part of. - withGroups(groups):: self + if std.type(groups) == "array" then {groups: groups} else {groups: [groups]}, - // The names of groups this user is a part of. - withGroupsMixin(groups):: self + if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, - // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. - withUid(uid):: self + {uid: uid}, - // The name that uniquely identifies this user among all active users. - withUsername(username):: self + {username: username}, - mixin:: { - }, - }, - }, - }, - authorization:: { - v1:: { - local apiVersion = {apiVersion: "authorization/v1"}, - // NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface - nonResourceAttributes:: { - new():: {}, - // Path is the URL path of the request - withPath(path):: self + {path: path}, - // Verb is the standard HTTP verb - withVerb(verb):: self + {verb: verb}, - mixin:: { - }, - }, - // NonResourceRule holds information that describes a rule for the non-resource - nonResourceRule:: { - new():: {}, - // 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. "*" means all. - withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs: nonResourceUrls} else {nonResourceURLs: [nonResourceUrls]}, - // 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. "*" means all. - withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs+: nonResourceUrls} else {nonResourceURLs+: [nonResourceUrls]}, - // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. - withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, - // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. - withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - mixin:: { - }, - }, - // ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface - resourceAttributes:: { - new():: {}, - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + {group: group}, - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + {name: 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 - withNamespace(namespace):: self + {namespace: namespace}, - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + {resource: resource}, - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + {subresource: subresource}, - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + {verb: verb}, - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + {version: version}, - mixin:: { - }, - }, - // ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - resourceRule:: { - new():: {}, - // 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. "*" means all. - withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, - // 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. "*" means all. - withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [apiGroups]}, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. - withResourceNames(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames: resourceNames} else {resourceNames: [resourceNames]}, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. - withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames+: resourceNames} else {resourceNames+: [resourceNames]}, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. "*" means all. - withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. "*" means all. - withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, - // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - mixin:: { - }, - }, - // SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set - selfSubjectAccessReviewSpec:: { - new():: {}, - mixin:: { - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = {nonResourceAttributes+: nonResourceAttributes}, - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = {resourceAttributes+: resourceAttributes}, - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - }, - }, - // - selfSubjectRulesReviewSpec:: { - new():: {}, - // Namespace to evaluate rules for. Required. - withNamespace(namespace):: self + {namespace: namespace}, - mixin:: { - }, - }, - // SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set - subjectAccessReviewSpec:: { - new():: {}, - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtra(extra):: self + {extra: extra}, - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtraMixin(extra):: self + {extra+: extra}, - // Groups is the groups you're testing for. - withGroups(groups):: self + if std.type(groups) == "array" then {groups: groups} else {groups: [groups]}, - // Groups is the groups you're testing for. - withGroupsMixin(groups):: self + if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, - // UID information about the requesting user. - withUid(uid):: self + {uid: 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 - withUser(user):: self + {user: user}, - mixin:: { - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = {nonResourceAttributes+: nonResourceAttributes}, - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = {resourceAttributes+: resourceAttributes}, - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - }, - }, - // SubjectAccessReviewStatus - subjectAccessReviewStatus:: { - new():: {}, - // Allowed is required. True if the action would be allowed, false otherwise. - withAllowed(allowed):: self + {allowed: allowed}, - // EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. - withEvaluationError(evaluationError):: self + {evaluationError: evaluationError}, - // Reason is optional. It indicates why a request was allowed or denied. - withReason(reason):: self + {reason: reason}, - mixin:: { - }, - }, - // SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete. - subjectRulesReviewStatus:: { - new():: {}, - // EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete. - withEvaluationError(evaluationError):: self + {evaluationError: evaluationError}, - // Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation. - withIncomplete(incomplete):: self + {incomplete: incomplete}, - // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withNonResourceRules(nonResourceRules):: self + if std.type(nonResourceRules) == "array" then {nonResourceRules: nonResourceRules} else {nonResourceRules: [nonResourceRules]}, - // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withNonResourceRulesMixin(nonResourceRules):: self + if std.type(nonResourceRules) == "array" then {nonResourceRules+: nonResourceRules} else {nonResourceRules+: [nonResourceRules]}, - nonResourceRulesType:: hidden.authorization.v1.nonResourceRule, - // ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withResourceRules(resourceRules):: self + if std.type(resourceRules) == "array" then {resourceRules: resourceRules} else {resourceRules: [resourceRules]}, - // ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withResourceRulesMixin(resourceRules):: self + if std.type(resourceRules) == "array" then {resourceRules+: resourceRules} else {resourceRules+: [resourceRules]}, - resourceRulesType:: hidden.authorization.v1.resourceRule, - mixin:: { - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "authorization/v1beta1"}, - // NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface - nonResourceAttributes:: { - new():: {}, - // Path is the URL path of the request - withPath(path):: self + {path: path}, - // Verb is the standard HTTP verb - withVerb(verb):: self + {verb: verb}, - mixin:: { - }, - }, - // NonResourceRule holds information that describes a rule for the non-resource - nonResourceRule:: { - new():: {}, - // 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. "*" means all. - withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs: nonResourceUrls} else {nonResourceURLs: [nonResourceUrls]}, - // 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. "*" means all. - withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs+: nonResourceUrls} else {nonResourceURLs+: [nonResourceUrls]}, - // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. - withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, - // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. - withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - mixin:: { - }, - }, - // ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface - resourceAttributes:: { - new():: {}, - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + {group: group}, - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + {name: 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 - withNamespace(namespace):: self + {namespace: namespace}, - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + {resource: resource}, - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + {subresource: subresource}, - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + {verb: verb}, - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + {version: version}, - mixin:: { - }, - }, - // ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - resourceRule:: { - new():: {}, - // 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. "*" means all. - withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, - // 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. "*" means all. - withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [apiGroups]}, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. - withResourceNames(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames: resourceNames} else {resourceNames: [resourceNames]}, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. - withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames+: resourceNames} else {resourceNames+: [resourceNames]}, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. "*" means all. - withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. "*" means all. - withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, - // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - mixin:: { - }, - }, - // SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set - selfSubjectAccessReviewSpec:: { - new():: {}, - mixin:: { - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = {nonResourceAttributes+: nonResourceAttributes}, - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = {resourceAttributes+: resourceAttributes}, - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - }, - }, - // - selfSubjectRulesReviewSpec:: { - new():: {}, - // Namespace to evaluate rules for. Required. - withNamespace(namespace):: self + {namespace: namespace}, - mixin:: { - }, - }, - // SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set - subjectAccessReviewSpec:: { - new():: {}, - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtra(extra):: self + {extra: extra}, - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtraMixin(extra):: self + {extra+: extra}, - // Groups is the groups you're testing for. - withGroup(group):: self + if std.type(group) == "array" then {group: group} else {group: [group]}, - // Groups is the groups you're testing for. - withGroupMixin(group):: self + if std.type(group) == "array" then {group+: group} else {group+: [group]}, - // UID information about the requesting user. - withUid(uid):: self + {uid: uid}, - // User is the user you're testing for. If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups - withUser(user):: self + {user: user}, - mixin:: { - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = {nonResourceAttributes+: nonResourceAttributes}, - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({path: path}), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({verb: verb}), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = {resourceAttributes+: resourceAttributes}, - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({group: group}), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({namespace: namespace}), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({resource: resource}), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({subresource: subresource}), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({verb: verb}), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({version: version}), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - }, - }, - // SubjectAccessReviewStatus - subjectAccessReviewStatus:: { - new():: {}, - // Allowed is required. True if the action would be allowed, false otherwise. - withAllowed(allowed):: self + {allowed: allowed}, - // EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. - withEvaluationError(evaluationError):: self + {evaluationError: evaluationError}, - // Reason is optional. It indicates why a request was allowed or denied. - withReason(reason):: self + {reason: reason}, - mixin:: { - }, - }, - // SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete. - subjectRulesReviewStatus:: { - new():: {}, - // EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete. - withEvaluationError(evaluationError):: self + {evaluationError: evaluationError}, - // Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation. - withIncomplete(incomplete):: self + {incomplete: incomplete}, - // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withNonResourceRules(nonResourceRules):: self + if std.type(nonResourceRules) == "array" then {nonResourceRules: nonResourceRules} else {nonResourceRules: [nonResourceRules]}, - // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withNonResourceRulesMixin(nonResourceRules):: self + if std.type(nonResourceRules) == "array" then {nonResourceRules+: nonResourceRules} else {nonResourceRules+: [nonResourceRules]}, - nonResourceRulesType:: hidden.authorization.v1beta1.nonResourceRule, - // ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withResourceRules(resourceRules):: self + if std.type(resourceRules) == "array" then {resourceRules: resourceRules} else {resourceRules: [resourceRules]}, - // ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withResourceRulesMixin(resourceRules):: self + if std.type(resourceRules) == "array" then {resourceRules+: resourceRules} else {resourceRules+: [resourceRules]}, - resourceRulesType:: hidden.authorization.v1beta1.resourceRule, - mixin:: { - }, - }, - }, - }, - autoscaling:: { - v1:: { - local apiVersion = {apiVersion: "autoscaling/v1"}, - // CrossVersionObjectReference contains enough information to let you identify the referred resource. - crossVersionObjectReference:: { - new():: {}, - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + {name: name}, - mixin:: { - }, - }, - // specification of a horizontal pod autoscaler. - horizontalPodAutoscalerSpec:: { - new():: {}, - // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. - withMaxReplicas(maxReplicas):: self + {maxReplicas: maxReplicas}, - // lower limit for the number of pods that can be set by the autoscaler, default 1. - withMinReplicas(minReplicas):: self + {minReplicas: 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. - withTargetCpuUtilizationPercentage(targetCpuUtilizationPercentage):: self + {targetCPUUtilizationPercentage: targetCpuUtilizationPercentage}, - mixin:: { - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = {scaleTargetRef+: scaleTargetRef}, - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __scaleTargetRefMixin({name: name}), - }, - scaleTargetRefType:: hidden.autoscaling.v1.crossVersionObjectReference, - }, - }, - // current status of a horizontal pod autoscaler - horizontalPodAutoscalerStatus:: { - new():: {}, - // current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU. - withCurrentCpuUtilizationPercentage(currentCpuUtilizationPercentage):: self + {currentCPUUtilizationPercentage: currentCpuUtilizationPercentage}, - // current number of replicas of pods managed by this autoscaler. - withCurrentReplicas(currentReplicas):: self + {currentReplicas: currentReplicas}, - // desired number of replicas of pods managed by this autoscaler. - withDesiredReplicas(desiredReplicas):: self + {desiredReplicas: desiredReplicas}, - // most recent generation observed by this autoscaler. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - mixin:: { - // last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed. - lastScaleTime:: { - local __lastScaleTimeMixin(lastScaleTime) = {lastScaleTime+: lastScaleTime}, - mixinInstance(lastScaleTime):: __lastScaleTimeMixin(lastScaleTime), - }, - lastScaleTimeType:: hidden.meta.v1.time, - }, - }, - // ScaleSpec describes the attributes of a scale subresource. - scaleSpec:: { - new():: {}, - // desired number of instances for the scaled object. - withReplicas(replicas):: self + {replicas: replicas}, - mixin:: { - }, - }, - // ScaleStatus represents the current status of a scale subresource. - scaleStatus:: { - new():: {}, - // actual number of observed instances of the scaled object. - withReplicas(replicas):: self + {replicas: replicas}, - // label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelector(selector):: self + {selector: selector}, - mixin:: { - }, - }, - }, - v2beta1:: { - local apiVersion = {apiVersion: "autoscaling/v2beta1"}, - // CrossVersionObjectReference contains enough information to let you identify the referred resource. - crossVersionObjectReference:: { - new():: {}, - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + {name: name}, - mixin:: { - }, - }, - // HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. - horizontalPodAutoscalerCondition:: { - new():: {}, - // message is a human-readable explanation containing details about the transition - withMessage(message):: self + {message: message}, - // reason is the reason for the condition's last transition. - withReason(reason):: self + {reason: reason}, - // type describes the current condition - withType(type):: self + {type: type}, - mixin:: { - // lastTransitionTime is the last time the condition transitioned from one status to another - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. - horizontalPodAutoscalerSpec:: { - new():: {}, - // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas. - withMaxReplicas(maxReplicas):: self + {maxReplicas: maxReplicas}, - // 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. - withMetrics(metrics):: self + if std.type(metrics) == "array" then {metrics: metrics} else {metrics: [metrics]}, - // 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. - withMetricsMixin(metrics):: self + if std.type(metrics) == "array" then {metrics+: metrics} else {metrics+: [metrics]}, - metricsType:: hidden.autoscaling.v2beta1.metricSpec, - // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. - withMinReplicas(minReplicas):: self + {minReplicas: minReplicas}, - mixin:: { - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = {scaleTargetRef+: scaleTargetRef}, - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __scaleTargetRefMixin({name: name}), - }, - scaleTargetRefType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, - }, - }, - // HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. - horizontalPodAutoscalerStatus:: { - new():: {}, - // conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met. - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met. - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.autoscaling.v2beta1.horizontalPodAutoscalerCondition, - // currentMetrics is the last read state of the metrics used by this autoscaler. - withCurrentMetrics(currentMetrics):: self + if std.type(currentMetrics) == "array" then {currentMetrics: currentMetrics} else {currentMetrics: [currentMetrics]}, - // currentMetrics is the last read state of the metrics used by this autoscaler. - withCurrentMetricsMixin(currentMetrics):: self + if std.type(currentMetrics) == "array" then {currentMetrics+: currentMetrics} else {currentMetrics+: [currentMetrics]}, - currentMetricsType:: hidden.autoscaling.v2beta1.metricStatus, - // currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler. - withCurrentReplicas(currentReplicas):: self + {currentReplicas: currentReplicas}, - // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler. - withDesiredReplicas(desiredReplicas):: self + {desiredReplicas: desiredReplicas}, - // observedGeneration is the most recent generation observed by this autoscaler. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - mixin:: { - // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed. - lastScaleTime:: { - local __lastScaleTimeMixin(lastScaleTime) = {lastScaleTime+: lastScaleTime}, - mixinInstance(lastScaleTime):: __lastScaleTimeMixin(lastScaleTime), - }, - lastScaleTimeType:: hidden.meta.v1.time, - }, - }, - // MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). - metricSpec:: { - new():: {}, - // type is the type of metric source. It should match one of the fields below. - withType(type):: self + {type: type}, - mixin:: { - // object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). - object:: { - local __objectMixin(object) = {object+: object}, - mixinInstance(object):: __objectMixin(object), - // metricName is the name of the metric in question. - withMetricName(metricName):: self + __objectMixin({metricName: metricName}), - // target is the described Kubernetes object. - target:: { - local __targetMixin(target) = __objectMixin({target+: target}), - mixinInstance(target):: __targetMixin(target), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __targetMixin({name: name}), - }, - targetType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, - // targetValue is the target value of the metric (as a quantity). - targetValue:: { - local __targetValueMixin(targetValue) = __objectMixin({targetValue+: targetValue}), - mixinInstance(targetValue):: __targetValueMixin(targetValue), - }, - targetValueType:: hidden.core.resource.quantity, - }, - objectType:: hidden.autoscaling.v2beta1.objectMetricSource, - // 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:: { - local __podsMixin(pods) = {pods+: pods}, - mixinInstance(pods):: __podsMixin(pods), - // metricName is the name of the metric in question - withMetricName(metricName):: self + __podsMixin({metricName: metricName}), - // targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity) - targetAverageValue:: { - local __targetAverageValueMixin(targetAverageValue) = __podsMixin({targetAverageValue+: targetAverageValue}), - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - }, - podsType:: hidden.autoscaling.v2beta1.podsMetricSource, - // 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:: { - local __resourceMixin(resource) = {resource+: resource}, - mixinInstance(resource):: __resourceMixin(resource), - // name is the name of the resource in question. - withName(name):: self + __resourceMixin({name: 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. - withTargetAverageUtilization(targetAverageUtilization):: self + __resourceMixin({targetAverageUtilization: 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:: { - local __targetAverageValueMixin(targetAverageValue) = __resourceMixin({targetAverageValue+: targetAverageValue}), - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - }, - resourceType:: hidden.autoscaling.v2beta1.resourceMetricSource, - }, - }, - // MetricStatus describes the last-read state of a single metric. - metricStatus:: { - new():: {}, - // type is the type of metric source. It will match one of the fields below. - withType(type):: self + {type: type}, - mixin:: { - // object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). - object:: { - local __objectMixin(object) = {object+: object}, - mixinInstance(object):: __objectMixin(object), - // currentValue is the current value of the metric (as a quantity). - currentValue:: { - local __currentValueMixin(currentValue) = __objectMixin({currentValue+: currentValue}), - mixinInstance(currentValue):: __currentValueMixin(currentValue), - }, - currentValueType:: hidden.core.resource.quantity, - // metricName is the name of the metric in question. - withMetricName(metricName):: self + __objectMixin({metricName: metricName}), - // target is the described Kubernetes object. - target:: { - local __targetMixin(target) = __objectMixin({target+: target}), - mixinInstance(target):: __targetMixin(target), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __targetMixin({name: name}), - }, - targetType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, - }, - objectType:: hidden.autoscaling.v2beta1.objectMetricStatus, - // 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:: { - local __podsMixin(pods) = {pods+: pods}, - mixinInstance(pods):: __podsMixin(pods), - // currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity) - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = __podsMixin({currentAverageValue+: currentAverageValue}), - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - // metricName is the name of the metric in question - withMetricName(metricName):: self + __podsMixin({metricName: metricName}), - }, - podsType:: hidden.autoscaling.v2beta1.podsMetricStatus, - // 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:: { - local __resourceMixin(resource) = {resource+: resource}, - mixinInstance(resource):: __resourceMixin(resource), - // currentAverageUtilization is the current 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. It will only be present if `targetAverageValue` was set in the corresponding metric specification. - withCurrentAverageUtilization(currentAverageUtilization):: self + __resourceMixin({currentAverageUtilization: currentAverageUtilization}), - // currentAverageValue is the current 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. It will always be set, regardless of the corresponding metric specification. - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = __resourceMixin({currentAverageValue+: currentAverageValue}), - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - // name is the name of the resource in question. - withName(name):: self + __resourceMixin({name: name}), - }, - resourceType:: hidden.autoscaling.v2beta1.resourceMetricStatus, - }, - }, - // ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). - objectMetricSource:: { - new():: {}, - // metricName is the name of the metric in question. - withMetricName(metricName):: self + {metricName: metricName}, - mixin:: { - // target is the described Kubernetes object. - target:: { - local __targetMixin(target) = {target+: target}, - mixinInstance(target):: __targetMixin(target), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __targetMixin({name: name}), - }, - targetType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, - // targetValue is the target value of the metric (as a quantity). - targetValue:: { - local __targetValueMixin(targetValue) = {targetValue+: targetValue}, - mixinInstance(targetValue):: __targetValueMixin(targetValue), - }, - targetValueType:: hidden.core.resource.quantity, - }, - }, - // ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). - objectMetricStatus:: { - new():: {}, - // metricName is the name of the metric in question. - withMetricName(metricName):: self + {metricName: metricName}, - mixin:: { - // currentValue is the current value of the metric (as a quantity). - currentValue:: { - local __currentValueMixin(currentValue) = {currentValue+: currentValue}, - mixinInstance(currentValue):: __currentValueMixin(currentValue), - }, - currentValueType:: hidden.core.resource.quantity, - // target is the described Kubernetes object. - target:: { - local __targetMixin(target) = {target+: target}, - mixinInstance(target):: __targetMixin(target), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __targetMixin({name: name}), - }, - targetType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, - }, - }, - // 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. - podsMetricSource:: { - new():: {}, - // metricName is the name of the metric in question - withMetricName(metricName):: self + {metricName: metricName}, - mixin:: { - // targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity) - targetAverageValue:: { - local __targetAverageValueMixin(targetAverageValue) = {targetAverageValue+: targetAverageValue}, - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - }, - }, - // PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second). - podsMetricStatus:: { - new():: {}, - // metricName is the name of the metric in question - withMetricName(metricName):: self + {metricName: metricName}, - mixin:: { - // currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity) - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = {currentAverageValue+: currentAverageValue}, - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - }, - }, - // 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. - resourceMetricSource:: { - new():: {}, - // name is the name of the resource in question. - withName(name):: self + {name: 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. - withTargetAverageUtilization(targetAverageUtilization):: self + {targetAverageUtilization: targetAverageUtilization}, - mixin:: { - // 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:: { - local __targetAverageValueMixin(targetAverageValue) = {targetAverageValue+: targetAverageValue}, - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - }, - }, - // ResourceMetricStatus indicates the current value of 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). 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. - resourceMetricStatus:: { - new():: {}, - // currentAverageUtilization is the current 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. It will only be present if `targetAverageValue` was set in the corresponding metric specification. - withCurrentAverageUtilization(currentAverageUtilization):: self + {currentAverageUtilization: currentAverageUtilization}, - // name is the name of the resource in question. - withName(name):: self + {name: name}, - mixin:: { - // currentAverageValue is the current 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. It will always be set, regardless of the corresponding metric specification. - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = {currentAverageValue+: currentAverageValue}, - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - }, - }, - }, - }, - batch:: { - v1:: { - local apiVersion = {apiVersion: "batch/v1"}, - // JobCondition describes current state of a job. - jobCondition:: { - new():: {}, - // Human readable message indicating details about last transition. - withMessage(message):: self + {message: message}, - // (brief) reason for the condition's last transition. - withReason(reason):: self + {reason: reason}, - // Type of job condition, Complete or Failed. - withType(type):: self + {type: type}, - mixin:: { - // Last time the condition was checked. - lastProbeTime:: { - local __lastProbeTimeMixin(lastProbeTime) = {lastProbeTime+: lastProbeTime}, - mixinInstance(lastProbeTime):: __lastProbeTimeMixin(lastProbeTime), - }, - lastProbeTimeType:: hidden.meta.v1.time, - // Last time the condition transit from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // JobSpec describes how the job execution will look like. - jobSpec:: { - new():: {}, - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + {activeDeadlineSeconds: activeDeadlineSeconds}, - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + {backoffLimit: backoffLimit}, - // 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/ - withCompletions(completions):: self + {completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - withManualSelector(manualSelector):: self + {manualSelector: 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/ - withParallelism(parallelism):: self + {parallelism: parallelism}, - mixin:: { - // 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:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // JobStatus represents the current state of a Job. - jobStatus:: { - new():: {}, - // The number of actively running pods. - withActive(active):: self + {active: active}, - // The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.batch.v1.jobCondition, - // The number of pods which reached phase Failed. - withFailed(failed):: self + {failed: failed}, - // The number of pods which reached phase Succeeded. - withSucceeded(succeeded):: self + {succeeded: succeeded}, - mixin:: { - // Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. - completionTime:: { - local __completionTimeMixin(completionTime) = {completionTime+: completionTime}, - mixinInstance(completionTime):: __completionTimeMixin(completionTime), - }, - completionTimeType:: hidden.meta.v1.time, - // Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. - startTime:: { - local __startTimeMixin(startTime) = {startTime+: startTime}, - mixinInstance(startTime):: __startTimeMixin(startTime), - }, - startTimeType:: hidden.meta.v1.time, - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "batch/v1beta1"}, - // CronJobSpec describes how the job execution will look like and when it will actually run. - cronJobSpec:: { - new():: {}, - // Specifies how to treat concurrent executions of a Job. Defaults to Allow. - withConcurrencyPolicy(concurrencyPolicy):: self + {concurrencyPolicy: concurrencyPolicy}, - // The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withFailedJobsHistoryLimit(failedJobsHistoryLimit):: self + {failedJobsHistoryLimit: failedJobsHistoryLimit}, - // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - withSchedule(schedule):: self + {schedule: schedule}, - // 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. - withStartingDeadlineSeconds(startingDeadlineSeconds):: self + {startingDeadlineSeconds: startingDeadlineSeconds}, - // The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3. - withSuccessfulJobsHistoryLimit(successfulJobsHistoryLimit):: self + {successfulJobsHistoryLimit: successfulJobsHistoryLimit}, - // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. - withSuspend(suspend):: self + {suspend: suspend}, - mixin:: { - // Specifies the job that will be created when executing a CronJob. - jobTemplate:: { - local __jobTemplateMixin(jobTemplate) = {jobTemplate+: jobTemplate}, - mixinInstance(jobTemplate):: __jobTemplateMixin(jobTemplate), - // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __jobTemplateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __jobTemplateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), - // 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/ - withCompletions(completions):: self + __specMixin({completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - withManualSelector(manualSelector):: self + __specMixin({manualSelector: 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/ - withParallelism(parallelism):: self + __specMixin({parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.batch.v1.jobSpec, - }, - jobTemplateType:: hidden.batch.v1beta1.jobTemplateSpec, - }, - }, - // CronJobStatus represents the current state of a cron job. - cronJobStatus:: { - new():: {}, - // A list of pointers to currently running jobs. - withActive(active):: self + if std.type(active) == "array" then {active: active} else {active: [active]}, - // A list of pointers to currently running jobs. - withActiveMixin(active):: self + if std.type(active) == "array" then {active+: active} else {active+: [active]}, - activeType:: hidden.core.v1.objectReference, - mixin:: { - // Information when was the last time the job was successfully scheduled. - lastScheduleTime:: { - local __lastScheduleTimeMixin(lastScheduleTime) = {lastScheduleTime+: lastScheduleTime}, - mixinInstance(lastScheduleTime):: __lastScheduleTimeMixin(lastScheduleTime), - }, - lastScheduleTimeType:: hidden.meta.v1.time, - }, - }, - // JobTemplateSpec describes the data a Job should have when created from a template - jobTemplateSpec:: { - new():: {}, - mixin:: { - // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), - // 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/ - withCompletions(completions):: self + __specMixin({completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - withManualSelector(manualSelector):: self + __specMixin({manualSelector: 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/ - withParallelism(parallelism):: self + __specMixin({parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.batch.v1.jobSpec, - }, - }, - }, - v2alpha1:: { - local apiVersion = {apiVersion: "batch/v2alpha1"}, - // CronJobSpec describes how the job execution will look like and when it will actually run. - cronJobSpec:: { - new():: {}, - // Specifies how to treat concurrent executions of a Job. Defaults to Allow. - withConcurrencyPolicy(concurrencyPolicy):: self + {concurrencyPolicy: concurrencyPolicy}, - // The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. - withFailedJobsHistoryLimit(failedJobsHistoryLimit):: self + {failedJobsHistoryLimit: failedJobsHistoryLimit}, - // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - withSchedule(schedule):: self + {schedule: schedule}, - // 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. - withStartingDeadlineSeconds(startingDeadlineSeconds):: self + {startingDeadlineSeconds: startingDeadlineSeconds}, - // The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. - withSuccessfulJobsHistoryLimit(successfulJobsHistoryLimit):: self + {successfulJobsHistoryLimit: successfulJobsHistoryLimit}, - // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. - withSuspend(suspend):: self + {suspend: suspend}, - mixin:: { - // Specifies the job that will be created when executing a CronJob. - jobTemplate:: { - local __jobTemplateMixin(jobTemplate) = {jobTemplate+: jobTemplate}, - mixinInstance(jobTemplate):: __jobTemplateMixin(jobTemplate), - // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __jobTemplateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __jobTemplateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), - // 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/ - withCompletions(completions):: self + __specMixin({completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - withManualSelector(manualSelector):: self + __specMixin({manualSelector: 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/ - withParallelism(parallelism):: self + __specMixin({parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.batch.v1.jobSpec, - }, - jobTemplateType:: hidden.batch.v2alpha1.jobTemplateSpec, - }, - }, - // CronJobStatus represents the current state of a cron job. - cronJobStatus:: { - new():: {}, - // A list of pointers to currently running jobs. - withActive(active):: self + if std.type(active) == "array" then {active: active} else {active: [active]}, - // A list of pointers to currently running jobs. - withActiveMixin(active):: self + if std.type(active) == "array" then {active+: active} else {active+: [active]}, - activeType:: hidden.core.v1.objectReference, - mixin:: { - // Information when was the last time the job was successfully scheduled. - lastScheduleTime:: { - local __lastScheduleTimeMixin(lastScheduleTime) = {lastScheduleTime+: lastScheduleTime}, - mixinInstance(lastScheduleTime):: __lastScheduleTimeMixin(lastScheduleTime), - }, - lastScheduleTimeType:: hidden.meta.v1.time, - }, - }, - // JobTemplateSpec describes the data a Job should have when created from a template - jobTemplateSpec:: { - new():: {}, - mixin:: { - // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + __specMixin({backoffLimit: backoffLimit}), - // 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/ - withCompletions(completions):: self + __specMixin({completions: 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://git.k8s.io/community/contributors/design-proposals/selector-generation.md - withManualSelector(manualSelector):: self + __specMixin({manualSelector: 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/ - withParallelism(parallelism):: self + __specMixin({parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({selector+: selector}), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({template+: template}), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.batch.v1.jobSpec, - }, - }, - }, - }, - certificates:: { - v1beta1:: { - local apiVersion = {apiVersion: "certificates/v1beta1"}, - // - certificateSigningRequestCondition:: { - new():: {}, - // human readable message with details about the request state - withMessage(message):: self + {message: message}, - // brief reason for the request state - withReason(reason):: self + {reason: reason}, - // request approval state, currently Approved or Denied. - withType(type):: self + {type: type}, - mixin:: { - // timestamp for the last update to this condition - lastUpdateTime:: { - local __lastUpdateTimeMixin(lastUpdateTime) = {lastUpdateTime+: lastUpdateTime}, - mixinInstance(lastUpdateTime):: __lastUpdateTimeMixin(lastUpdateTime), - }, - lastUpdateTimeType:: hidden.meta.v1.time, - }, - }, - // This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users. - certificateSigningRequestSpec:: { - new():: {}, - // Extra information about the requesting user. See user.Info interface for details. - withExtra(extra):: self + {extra: extra}, - // Extra information about the requesting user. See user.Info interface for details. - withExtraMixin(extra):: self + {extra+: extra}, - // Group information about the requesting user. See user.Info interface for details. - withGroups(groups):: self + if std.type(groups) == "array" then {groups: groups} else {groups: [groups]}, - // Group information about the requesting user. See user.Info interface for details. - withGroupsMixin(groups):: self + if std.type(groups) == "array" then {groups+: groups} else {groups+: [groups]}, - // Base64-encoded PKCS#10 CSR data - withRequest(request):: self + {request: request}, - // UID information about the requesting user. See user.Info interface for details. - withUid(uid):: self + {uid: uid}, - // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 - // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - withUsages(usages):: self + if std.type(usages) == "array" then {usages: usages} else {usages: [usages]}, - // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 - // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - withUsagesMixin(usages):: self + if std.type(usages) == "array" then {usages+: usages} else {usages+: [usages]}, - // Information about the requesting user. See user.Info interface for details. - withUsername(username):: self + {username: username}, - mixin:: { - }, - }, - // - certificateSigningRequestStatus:: { - new():: {}, - // If request was approved, the controller will place the issued certificate here. - withCertificate(certificate):: self + {certificate: certificate}, - // Conditions applied to the request, such as approval or denial. - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // Conditions applied to the request, such as approval or denial. - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.certificates.v1beta1.certificateSigningRequestCondition, - mixin:: { - }, - }, - }, - }, - core:: { - intstr:: { - local apiVersion = {apiVersion: "intstr"}, - // - intOrString:: { - new():: {}, - mixin:: { - }, - }, - }, - resource:: { - local apiVersion = {apiVersion: "resource"}, - // - quantity:: { - new():: {}, - mixin:: { - }, - }, - }, - v1:: { - local apiVersion = {apiVersion: "v1"}, - // 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. - awsElasticBlockStoreVolumeSource:: { - new():: {}, - // 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 - withFsType(fsType):: self + {fsType: 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). - withPartition(partition):: self + {partition: 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 - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - withVolumeId(volumeId):: self + {volumeID: volumeId}, - mixin:: { - }, - }, - // Affinity is a group of affinity scheduling rules. - affinity:: { - new():: {}, - mixin:: { - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = {nodeAffinity+: nodeAffinity}, - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = {podAffinity+: podAffinity}, - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = {podAntiAffinity+: podAntiAffinity}, - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - }, - // AttachedVolume describes a volume attached to a node - attachedVolume:: { - new():: {}, - // DevicePath represents the device path where the volume should be available - withDevicePath(devicePath):: self + {devicePath: devicePath}, - // Name of the attached volume - withName(name):: self + {name: name}, - mixin:: { - }, - }, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDiskVolumeSource:: { - new():: {}, - // Host Caching mode: None, Read Only, Read Write. - withCachingMode(cachingMode):: self + {cachingMode: cachingMode}, - // The Name of the data disk in the blob storage - withDiskName(diskName):: self + {diskName: diskName}, - // The URI the data disk in the blob storage - withDiskUri(diskUri):: self + {diskURI: diskUri}, - // 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. - withFsType(fsType):: self + {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - mixin:: { - }, - }, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFilePersistentVolumeSource:: { - new():: {}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // the name of secret that contains Azure Storage Account Name and Key - withSecretName(secretName):: self + {secretName: secretName}, - // the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod - withSecretNamespace(secretNamespace):: self + {secretNamespace: secretNamespace}, - // Share Name - withShareName(shareName):: self + {shareName: shareName}, - mixin:: { - }, - }, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFileVolumeSource:: { - new():: {}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // the name of secret that contains Azure Storage Account Name and Key - withSecretName(secretName):: self + {secretName: secretName}, - // Share Name - withShareName(shareName):: self + {shareName: shareName}, - mixin:: { - }, - }, - // Adds and removes POSIX capabilities from running containers. - capabilities:: { - new():: {}, - // Added capabilities - withAdd(add):: self + if std.type(add) == "array" then {add: add} else {add: [add]}, - // Added capabilities - withAddMixin(add):: self + if std.type(add) == "array" then {add+: add} else {add+: [add]}, - // Removed capabilities - withDrop(drop):: self + if std.type(drop) == "array" then {drop: drop} else {drop: [drop]}, - // Removed capabilities - withDropMixin(drop):: self + if std.type(drop) == "array" then {drop+: drop} else {drop+: [drop]}, - mixin:: { - }, - }, - // Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. - cephFSPersistentVolumeSource:: { - new():: {}, - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == "array" then {monitors: monitors} else {monitors: [monitors]}, - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - withPath(path):: self + {path: path}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withSecretFile(secretFile):: self + {secretFile: secretFile}, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withUser(user):: self + {user: user}, - mixin:: { - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({name: name}), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({namespace: namespace}), - }, - secretRefType:: hidden.core.v1.secretReference, - }, - }, - // Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. - cephFsVolumeSource:: { - new():: {}, - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == "array" then {monitors: monitors} else {monitors: [monitors]}, - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - withPath(path):: self + {path: path}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withSecretFile(secretFile):: self + {secretFile: secretFile}, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withUser(user):: self + {user: user}, - mixin:: { - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // 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. - cinderVolumeSource:: { - new():: {}, - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withFsType(fsType):: self + {fsType: fsType}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withVolumeId(volumeId):: self + {volumeID: volumeId}, - mixin:: { - }, - }, - // ClientIPConfig represents the configurations of Client IP based session affinity. - clientIPConfig:: { - new():: {}, - // 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). - withTimeoutSeconds(timeoutSeconds):: self + {timeoutSeconds: timeoutSeconds}, - mixin:: { - }, - }, - // Information about the condition of a component. - componentCondition:: { - new():: {}, - // Condition error code for a component. For example, a health check error code. - withError(errorParam):: self + {"error": errorParam}, - // Message about the condition for a component. For example, information about a health check. - withMessage(message):: self + {message: message}, - // Type of condition for a component. Valid value: "Healthy" - withType(type):: self + {type: type}, - mixin:: { - }, - }, - // 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. - configMapEnvSource:: { - new():: {}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + {name: name}, - // Specify whether the ConfigMap must be defined - withOptional(optional):: self + {optional: optional}, - mixin:: { - }, - }, - // Selects a key from a ConfigMap. - configMapKeySelector:: { - new():: {}, - // The key to select. - withKey(key):: self + {key: key}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + {name: name}, - // Specify whether the ConfigMap or it's key must be defined - withOptional(optional):: self + {optional: optional}, - mixin:: { - }, - }, - // 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. - configMapProjection:: { - new():: {}, - // 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 '..'. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + {name: name}, - // Specify whether the ConfigMap or it's keys must be defined - withOptional(optional):: self + {optional: optional}, - mixin:: { - }, - }, - // 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. - configMapVolumeSource:: { - new():: {}, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + {defaultMode: 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 '..'. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + {name: name}, - // Specify whether the ConfigMap or it's keys must be defined - withOptional(optional):: self + {optional: optional}, - mixin:: { - }, - }, - // A single application container that you want to run within a pod. - container:: { - new(name, image):: {} + self.withName(name) + self.withImage(image), - // 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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 - withArgs(args):: self + if std.type(args) == "array" then {args: args} else {args: [args]}, - // 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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 - withArgsMixin(args):: self + if std.type(args) == "array" then {args+: args} else {args+: [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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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 - withCommand(command):: self + if std.type(command) == "array" then {command: command} else {command: [command]}, - // 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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 - withCommandMixin(command):: self + if std.type(command) == "array" then {command+: command} else {command+: [command]}, - // List of environment variables to set in the container. Cannot be updated. - withEnv(env):: self + if std.type(env) == "array" then {env: env} else {env: [env]}, - // List of environment variables to set in the container. Cannot be updated. - withEnvMixin(env):: self + if std.type(env) == "array" then {env+: env} else {env+: [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. - withEnvFrom(envFrom):: self + if std.type(envFrom) == "array" then {envFrom: envFrom} else {envFrom: [envFrom]}, - // 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. - withEnvFromMixin(envFrom):: self + if std.type(envFrom) == "array" then {envFrom+: envFrom} else {envFrom+: [envFrom]}, - envFromType:: hidden.core.v1.envFromSource, - envType:: hidden.core.v1.envVar, - // 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. - withImage(image):: self + {image: 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 - withImagePullPolicy(imagePullPolicy):: self + {imagePullPolicy: imagePullPolicy}, - // Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. - withName(name):: self + {name: name}, - // 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. - withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, - // 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. - withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - portsType:: hidden.core.v1.containerPort, - // 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. - withStdin(stdin):: self + {stdin: 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 - withStdinOnce(stdinOnce):: self + {stdinOnce: 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. - withTerminationMessagePath(terminationMessagePath):: self + {terminationMessagePath: 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. - withTerminationMessagePolicy(terminationMessagePolicy):: self + {terminationMessagePolicy: terminationMessagePolicy}, - // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. - withTty(tty):: self + {tty: tty}, - // Pod volumes to mount into the container's filesystem. Cannot be updated. - withVolumeMounts(volumeMounts):: self + if std.type(volumeMounts) == "array" then {volumeMounts: volumeMounts} else {volumeMounts: [volumeMounts]}, - // Pod volumes to mount into the container's filesystem. Cannot be updated. - withVolumeMountsMixin(volumeMounts):: self + if std.type(volumeMounts) == "array" then {volumeMounts+: volumeMounts} else {volumeMounts+: [volumeMounts]}, - volumeMountsType:: hidden.core.v1.volumeMount, - // 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. - withWorkingDir(workingDir):: self + {workingDir: workingDir}, - mixin:: { - // Actions that the management system should take in response to container lifecycle events. Cannot be updated. - lifecycle:: { - local __lifecycleMixin(lifecycle) = {lifecycle+: lifecycle}, - mixinInstance(lifecycle):: __lifecycleMixin(lifecycle), - // 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:: { - local __postStartMixin(postStart) = __lifecycleMixin({postStart+: postStart}), - mixinInstance(postStart):: __postStartMixin(postStart), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __postStartMixin({exec+: exec}), - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), - // 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. - withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __postStartMixin({httpGet+: httpGet}), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({path: path}), - // 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. - withPort(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __postStartMixin({tcpSocket+: tcpSocket}), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({host: host}), - // 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. - withPort(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - postStartType:: hidden.core.v1.handler, - // PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - preStop:: { - local __preStopMixin(preStop) = __lifecycleMixin({preStop+: preStop}), - mixinInstance(preStop):: __preStopMixin(preStop), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __preStopMixin({exec+: exec}), - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), - // 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. - withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __preStopMixin({httpGet+: httpGet}), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({path: path}), - // 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. - withPort(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __preStopMixin({tcpSocket+: tcpSocket}), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({host: host}), - // 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. - withPort(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - preStopType:: hidden.core.v1.handler, - }, - lifecycleType:: hidden.core.v1.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:: { - local __livenessProbeMixin(livenessProbe) = {livenessProbe+: livenessProbe}, - mixinInstance(livenessProbe):: __livenessProbeMixin(livenessProbe), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __livenessProbeMixin({exec+: exec}), - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), - // 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. - withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - withFailureThreshold(failureThreshold):: self + __livenessProbeMixin({failureThreshold: failureThreshold}), - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __livenessProbeMixin({httpGet+: httpGet}), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({path: path}), - // 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. - withPort(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // 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 - withInitialDelaySeconds(initialDelaySeconds):: self + __livenessProbeMixin({initialDelaySeconds: initialDelaySeconds}), - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - withPeriodSeconds(periodSeconds):: self + __livenessProbeMixin({periodSeconds: periodSeconds}), - // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. - withSuccessThreshold(successThreshold):: self + __livenessProbeMixin({successThreshold: successThreshold}), - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __livenessProbeMixin({tcpSocket+: tcpSocket}), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({host: host}), - // 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. - withPort(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - // 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 - withTimeoutSeconds(timeoutSeconds):: self + __livenessProbeMixin({timeoutSeconds: timeoutSeconds}), - }, - livenessProbeType:: hidden.core.v1.probe, - // 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:: { - local __readinessProbeMixin(readinessProbe) = {readinessProbe+: readinessProbe}, - mixinInstance(readinessProbe):: __readinessProbeMixin(readinessProbe), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __readinessProbeMixin({exec+: exec}), - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), - // 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. - withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - withFailureThreshold(failureThreshold):: self + __readinessProbeMixin({failureThreshold: failureThreshold}), - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __readinessProbeMixin({httpGet+: httpGet}), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({path: path}), - // 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. - withPort(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // 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 - withInitialDelaySeconds(initialDelaySeconds):: self + __readinessProbeMixin({initialDelaySeconds: initialDelaySeconds}), - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - withPeriodSeconds(periodSeconds):: self + __readinessProbeMixin({periodSeconds: periodSeconds}), - // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. - withSuccessThreshold(successThreshold):: self + __readinessProbeMixin({successThreshold: successThreshold}), - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __readinessProbeMixin({tcpSocket+: tcpSocket}), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({host: host}), - // 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. - withPort(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - // 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 - withTimeoutSeconds(timeoutSeconds):: self + __readinessProbeMixin({timeoutSeconds: timeoutSeconds}), - }, - readinessProbeType:: hidden.core.v1.probe, - // Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources:: { - local __resourcesMixin(resources) = {resources+: resources}, - mixinInstance(resources):: __resourcesMixin(resources), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimits(limits):: self + __resourcesMixin({limits: limits}), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimitsMixin(limits):: self + __resourcesMixin({limits+: 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-compute-resources-container/ - withRequests(requests):: self + __resourcesMixin({requests: requests}), - // 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-compute-resources-container/ - withRequestsMixin(requests):: self + __resourcesMixin({requests+: requests}), - }, - resourcesType:: hidden.core.v1.resourceRequirements, - // Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md - securityContext:: { - local __securityContextMixin(securityContext) = {securityContext+: securityContext}, - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 - withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + __securityContextMixin({allowPrivilegeEscalation: allowPrivilegeEscalation}), - // The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. - capabilities:: { - local __capabilitiesMixin(capabilities) = __securityContextMixin({capabilities+: capabilities}), - mixinInstance(capabilities):: __capabilitiesMixin(capabilities), - // Added capabilities - withAdd(add):: self + if std.type(add) == "array" then __capabilitiesMixin({add: add}) else __capabilitiesMixin({add: [add]}), - // Added capabilities - withAddMixin(add):: self + if std.type(add) == "array" then __capabilitiesMixin({add+: add}) else __capabilitiesMixin({add+: [add]}), - // Removed capabilities - withDrop(drop):: self + if std.type(drop) == "array" then __capabilitiesMixin({drop: drop}) else __capabilitiesMixin({drop: [drop]}), - // Removed capabilities - withDropMixin(drop):: self + if std.type(drop) == "array" then __capabilitiesMixin({drop+: drop}) else __capabilitiesMixin({drop+: [drop]}), - }, - capabilitiesType:: hidden.core.v1.capabilities, - // Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. - withPrivileged(privileged):: self + __securityContextMixin({privileged: privileged}), - // Whether this container has a read-only root filesystem. Default is false. - withReadOnlyRootFilesystem(readOnlyRootFilesystem):: self + __securityContextMixin({readOnlyRootFilesystem: readOnlyRootFilesystem}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - securityContextType:: hidden.core.v1.securityContext, - }, - }, - // Describe a container image - containerImage:: { - new():: {}, - // Names by which this image is known. e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"] - withNames(names):: self + if std.type(names) == "array" then {names: names} else {names: [names]}, - // Names by which this image is known. e.g. ["gcr.io/google_containers/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"] - withNamesMixin(names):: self + if std.type(names) == "array" then {names+: names} else {names+: [names]}, - // The size of the image in bytes. - withSizeBytes(sizeBytes):: self + {sizeBytes: sizeBytes}, - mixin:: { - }, - }, - // ContainerPort represents a network port in a single container. - containerPort:: { - new(containerPort):: {} + self.withContainerPort(containerPort), - newNamed(name, containerPort):: {} + self.withName(name) + self.withContainerPort(containerPort), - // Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. - withContainerPort(containerPort):: self + {containerPort: containerPort}, - // What host IP to bind the external port to. - withHostIp(hostIp):: self + {hostIP: 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. - withHostPort(hostPort):: self + {hostPort: 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. - withName(name):: self + {name: name}, - // Protocol for port. Must be UDP or TCP. Defaults to "TCP". - withProtocol(protocol):: self + {protocol: protocol}, - mixin:: { - }, - }, - // ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting. - containerState:: { - new():: {}, - mixin:: { - // Details about a running container - running:: { - local __runningMixin(running) = {running+: running}, - mixinInstance(running):: __runningMixin(running), - // Time at which the container was last (re-)started - startedAt:: { - local __startedAtMixin(startedAt) = __runningMixin({startedAt+: startedAt}), - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - runningType:: hidden.core.v1.containerStateRunning, - // Details about a terminated container - terminated:: { - local __terminatedMixin(terminated) = {terminated+: terminated}, - mixinInstance(terminated):: __terminatedMixin(terminated), - // Container's ID in the format 'docker://' - withContainerId(containerId):: self + __terminatedMixin({containerID: containerId}), - // Exit status from the last termination of the container - withExitCode(exitCode):: self + __terminatedMixin({exitCode: exitCode}), - // Time at which the container last terminated - finishedAt:: { - local __finishedAtMixin(finishedAt) = __terminatedMixin({finishedAt+: finishedAt}), - mixinInstance(finishedAt):: __finishedAtMixin(finishedAt), - }, - finishedAtType:: hidden.meta.v1.time, - // Message regarding the last termination of the container - withMessage(message):: self + __terminatedMixin({message: message}), - // (brief) reason from the last termination of the container - withReason(reason):: self + __terminatedMixin({reason: reason}), - // Signal from the last termination of the container - withSignal(signal):: self + __terminatedMixin({signal: signal}), - // Time at which previous execution of the container started - startedAt:: { - local __startedAtMixin(startedAt) = __terminatedMixin({startedAt+: startedAt}), - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - terminatedType:: hidden.core.v1.containerStateTerminated, - // Details about a waiting container - waiting:: { - local __waitingMixin(waiting) = {waiting+: waiting}, - mixinInstance(waiting):: __waitingMixin(waiting), - // Message regarding why the container is not yet running. - withMessage(message):: self + __waitingMixin({message: message}), - // (brief) reason the container is not yet running. - withReason(reason):: self + __waitingMixin({reason: reason}), - }, - waitingType:: hidden.core.v1.containerStateWaiting, - }, - }, - // ContainerStateRunning is a running state of a container. - containerStateRunning:: { - new():: {}, - mixin:: { - // Time at which the container was last (re-)started - startedAt:: { - local __startedAtMixin(startedAt) = {startedAt+: startedAt}, - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - }, - // ContainerStateTerminated is a terminated state of a container. - containerStateTerminated:: { - new():: {}, - // Container's ID in the format 'docker://' - withContainerId(containerId):: self + {containerID: containerId}, - // Exit status from the last termination of the container - withExitCode(exitCode):: self + {exitCode: exitCode}, - // Message regarding the last termination of the container - withMessage(message):: self + {message: message}, - // (brief) reason from the last termination of the container - withReason(reason):: self + {reason: reason}, - // Signal from the last termination of the container - withSignal(signal):: self + {signal: signal}, - mixin:: { - // Time at which the container last terminated - finishedAt:: { - local __finishedAtMixin(finishedAt) = {finishedAt+: finishedAt}, - mixinInstance(finishedAt):: __finishedAtMixin(finishedAt), - }, - finishedAtType:: hidden.meta.v1.time, - // Time at which previous execution of the container started - startedAt:: { - local __startedAtMixin(startedAt) = {startedAt+: startedAt}, - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - }, - // ContainerStateWaiting is a waiting state of a container. - containerStateWaiting:: { - new():: {}, - // Message regarding why the container is not yet running. - withMessage(message):: self + {message: message}, - // (brief) reason the container is not yet running. - withReason(reason):: self + {reason: reason}, - mixin:: { - }, - }, - // ContainerStatus contains details for the current status of this container. - containerStatus:: { - new():: {}, - // Container's ID in the format 'docker://'. - withContainerId(containerId):: self + {containerID: containerId}, - // The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images - withImage(image):: self + {image: image}, - // ImageID of the container's image. - withImageId(imageId):: self + {imageID: imageId}, - // This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated. - withName(name):: self + {name: name}, - // Specifies whether the container has passed its readiness probe. - withReady(ready):: self + {ready: ready}, - // The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC. - withRestartCount(restartCount):: self + {restartCount: restartCount}, - mixin:: { - // Details about the container's last termination condition. - lastState:: { - local __lastStateMixin(lastState) = {lastState+: lastState}, - mixinInstance(lastState):: __lastStateMixin(lastState), - // Details about a running container - running:: { - local __runningMixin(running) = __lastStateMixin({running+: running}), - mixinInstance(running):: __runningMixin(running), - // Time at which the container was last (re-)started - startedAt:: { - local __startedAtMixin(startedAt) = __runningMixin({startedAt+: startedAt}), - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - runningType:: hidden.core.v1.containerStateRunning, - // Details about a terminated container - terminated:: { - local __terminatedMixin(terminated) = __lastStateMixin({terminated+: terminated}), - mixinInstance(terminated):: __terminatedMixin(terminated), - // Container's ID in the format 'docker://' - withContainerId(containerId):: self + __terminatedMixin({containerID: containerId}), - // Exit status from the last termination of the container - withExitCode(exitCode):: self + __terminatedMixin({exitCode: exitCode}), - // Time at which the container last terminated - finishedAt:: { - local __finishedAtMixin(finishedAt) = __terminatedMixin({finishedAt+: finishedAt}), - mixinInstance(finishedAt):: __finishedAtMixin(finishedAt), - }, - finishedAtType:: hidden.meta.v1.time, - // Message regarding the last termination of the container - withMessage(message):: self + __terminatedMixin({message: message}), - // (brief) reason from the last termination of the container - withReason(reason):: self + __terminatedMixin({reason: reason}), - // Signal from the last termination of the container - withSignal(signal):: self + __terminatedMixin({signal: signal}), - // Time at which previous execution of the container started - startedAt:: { - local __startedAtMixin(startedAt) = __terminatedMixin({startedAt+: startedAt}), - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - terminatedType:: hidden.core.v1.containerStateTerminated, - // Details about a waiting container - waiting:: { - local __waitingMixin(waiting) = __lastStateMixin({waiting+: waiting}), - mixinInstance(waiting):: __waitingMixin(waiting), - // Message regarding why the container is not yet running. - withMessage(message):: self + __waitingMixin({message: message}), - // (brief) reason the container is not yet running. - withReason(reason):: self + __waitingMixin({reason: reason}), - }, - waitingType:: hidden.core.v1.containerStateWaiting, - }, - lastStateType:: hidden.core.v1.containerState, - // Details about the container's current condition. - state:: { - local __stateMixin(state) = {state+: state}, - mixinInstance(state):: __stateMixin(state), - // Details about a running container - running:: { - local __runningMixin(running) = __stateMixin({running+: running}), - mixinInstance(running):: __runningMixin(running), - // Time at which the container was last (re-)started - startedAt:: { - local __startedAtMixin(startedAt) = __runningMixin({startedAt+: startedAt}), - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - runningType:: hidden.core.v1.containerStateRunning, - // Details about a terminated container - terminated:: { - local __terminatedMixin(terminated) = __stateMixin({terminated+: terminated}), - mixinInstance(terminated):: __terminatedMixin(terminated), - // Container's ID in the format 'docker://' - withContainerId(containerId):: self + __terminatedMixin({containerID: containerId}), - // Exit status from the last termination of the container - withExitCode(exitCode):: self + __terminatedMixin({exitCode: exitCode}), - // Time at which the container last terminated - finishedAt:: { - local __finishedAtMixin(finishedAt) = __terminatedMixin({finishedAt+: finishedAt}), - mixinInstance(finishedAt):: __finishedAtMixin(finishedAt), - }, - finishedAtType:: hidden.meta.v1.time, - // Message regarding the last termination of the container - withMessage(message):: self + __terminatedMixin({message: message}), - // (brief) reason from the last termination of the container - withReason(reason):: self + __terminatedMixin({reason: reason}), - // Signal from the last termination of the container - withSignal(signal):: self + __terminatedMixin({signal: signal}), - // Time at which previous execution of the container started - startedAt:: { - local __startedAtMixin(startedAt) = __terminatedMixin({startedAt+: startedAt}), - mixinInstance(startedAt):: __startedAtMixin(startedAt), - }, - startedAtType:: hidden.meta.v1.time, - }, - terminatedType:: hidden.core.v1.containerStateTerminated, - // Details about a waiting container - waiting:: { - local __waitingMixin(waiting) = __stateMixin({waiting+: waiting}), - mixinInstance(waiting):: __waitingMixin(waiting), - // Message regarding why the container is not yet running. - withMessage(message):: self + __waitingMixin({message: message}), - // (brief) reason the container is not yet running. - withReason(reason):: self + __waitingMixin({reason: reason}), - }, - waitingType:: hidden.core.v1.containerStateWaiting, - }, - stateType:: hidden.core.v1.containerState, - }, - }, - // DaemonEndpoint contains information about a single Daemon endpoint. - daemonEndpoint:: { - new():: {}, - // Port number of the given endpoint. - withPort(port):: self + {Port: port}, - mixin:: { - }, - }, - // Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode. - downwardApiProjection:: { - new():: {}, - // Items is a list of DownwardAPIVolume file - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of DownwardAPIVolume file - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.downwardApiVolumeFile, - mixin:: { - }, - }, - // DownwardAPIVolumeFile represents information to create the file containing the pod field - downwardApiVolumeFile:: { - new():: {}, - // Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. - withMode(mode):: self + {mode: mode}, - // 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 '..' - withPath(path):: self + {path: path}, - mixin:: { - // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. - fieldRef:: { - local __fieldRefMixin(fieldRef) = {fieldRef+: fieldRef}, - mixinInstance(fieldRef):: __fieldRefMixin(fieldRef), - // Path of the field to select in the specified API version. - withFieldPath(fieldPath):: self + __fieldRefMixin({fieldPath: fieldPath}), - }, - fieldRefType:: hidden.core.v1.objectFieldSelector, - // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - resourceFieldRef:: { - local __resourceFieldRefMixin(resourceFieldRef) = {resourceFieldRef+: resourceFieldRef}, - mixinInstance(resourceFieldRef):: __resourceFieldRefMixin(resourceFieldRef), - // Container name: required for volumes, optional for env vars - withContainerName(containerName):: self + __resourceFieldRefMixin({containerName: containerName}), - // Specifies the output format of the exposed resources, defaults to "1" - divisor:: { - local __divisorMixin(divisor) = __resourceFieldRefMixin({divisor+: divisor}), - mixinInstance(divisor):: __divisorMixin(divisor), - }, - divisorType:: hidden.core.resource.quantity, - // Required: resource to select - withResource(resource):: self + __resourceFieldRefMixin({resource: resource}), - }, - resourceFieldRefType:: hidden.core.v1.resourceFieldSelector, - }, - }, - // DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. - downwardApiVolumeSource:: { - new():: {}, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + {defaultMode: defaultMode}, - // Items is a list of downward API volume file - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // Items is a list of downward API volume file - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.downwardApiVolumeFile, - mixin:: { - }, - }, - // Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling. - emptyDirVolumeSource:: { - new():: {}, - // 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 - withMedium(medium):: self + {medium: medium}, - mixin:: { - // 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:: { - local __sizeLimitMixin(sizeLimit) = {sizeLimit+: sizeLimit}, - mixinInstance(sizeLimit):: __sizeLimitMixin(sizeLimit), - }, - sizeLimitType:: hidden.core.resource.quantity, - }, - }, - // EndpointAddress is a tuple that describes single IP address. - endpointAddress:: { - new():: {}, - // The Hostname of this endpoint - withHostname(hostname):: self + {hostname: hostname}, - // 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. - withIp(ip):: self + {ip: ip}, - // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. - withNodeName(nodeName):: self + {nodeName: nodeName}, - mixin:: { - // Reference to object providing the endpoint. - targetRef:: { - local __targetRefMixin(targetRef) = {targetRef+: targetRef}, - mixinInstance(targetRef):: __targetRefMixin(targetRef), - // 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. - withFieldPath(fieldPath):: self + __targetRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __targetRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __targetRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __targetRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __targetRefMixin({uid: uid}), - }, - targetRefType:: hidden.core.v1.objectReference, - }, - }, - // EndpointPort is a tuple that describes a single port. - endpointPort:: { - new():: {}, - // The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined. - withName(name):: self + {name: name}, - // The port number of the endpoint. - withPort(port):: self + {port: port}, - // The IP protocol for this port. Must be UDP or TCP. Default is TCP. - withProtocol(protocol):: self + {protocol: protocol}, - mixin:: { - }, - }, - // 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 ] - endpointSubset:: { - new():: {}, - // 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. - withAddresses(addresses):: self + if std.type(addresses) == "array" then {addresses: addresses} else {addresses: [addresses]}, - // 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. - withAddressesMixin(addresses):: self + if std.type(addresses) == "array" then {addresses+: addresses} else {addresses+: [addresses]}, - addressesType:: hidden.core.v1.endpointAddress, - // 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. - withNotReadyAddresses(notReadyAddresses):: self + if std.type(notReadyAddresses) == "array" then {notReadyAddresses: notReadyAddresses} else {notReadyAddresses: [notReadyAddresses]}, - // 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. - withNotReadyAddressesMixin(notReadyAddresses):: self + if std.type(notReadyAddresses) == "array" then {notReadyAddresses+: notReadyAddresses} else {notReadyAddresses+: [notReadyAddresses]}, - notReadyAddressesType:: hidden.core.v1.endpointAddress, - // Port numbers available on the related IP addresses. - withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, - // Port numbers available on the related IP addresses. - withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - portsType:: hidden.core.v1.endpointPort, - mixin:: { - }, - }, - // EnvFromSource represents the source of a set of ConfigMaps - envFromSource:: { - new():: {}, - // An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - withPrefix(prefix):: self + {prefix: prefix}, - mixin:: { - // The ConfigMap to select from - configMapRef:: { - local __configMapRefMixin(configMapRef) = {configMapRef+: configMapRef}, - mixinInstance(configMapRef):: __configMapRefMixin(configMapRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapRefMixin({name: name}), - // Specify whether the ConfigMap must be defined - withOptional(optional):: self + __configMapRefMixin({optional: optional}), - }, - configMapRefType:: hidden.core.v1.configMapEnvSource, - // The Secret to select from - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - // Specify whether the Secret must be defined - withOptional(optional):: self + __secretRefMixin({optional: optional}), - }, - secretRefType:: hidden.core.v1.secretEnvSource, - }, - }, - // EnvVar represents an environment variable present in a Container. - envVar:: { - new(name, value):: {} + self.withName(name) + self.withValue(value), - fromSecretRef(name, secretRefName, secretRefKey):: {} + self.withName(name) + self.mixin.valueFrom.secretKeyRef.withName(secretRefName) + self.mixin.valueFrom.secretKeyRef.withKey(secretRefKey), - fromFieldPath(name, fieldPath):: {} + self.withName(name) + self.mixin.valueFrom.fieldRef.withFieldPath(fieldPath), - // Name of the environment variable. Must be a C_IDENTIFIER. - withName(name):: self + {name: name}, - // Variable references $(VAR_NAME) are expanded using the previous 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". - withValue(value):: self + {value: value}, - mixin:: { - // Source for the environment variable's value. Cannot be used if value is not empty. - valueFrom:: { - local __valueFromMixin(valueFrom) = {valueFrom+: valueFrom}, - mixinInstance(valueFrom):: __valueFromMixin(valueFrom), - // Selects a key of a ConfigMap. - configMapKeyRef:: { - local __configMapKeyRefMixin(configMapKeyRef) = __valueFromMixin({configMapKeyRef+: configMapKeyRef}), - mixinInstance(configMapKeyRef):: __configMapKeyRefMixin(configMapKeyRef), - // The key to select. - withKey(key):: self + __configMapKeyRefMixin({key: key}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapKeyRefMixin({name: name}), - // Specify whether the ConfigMap or it's key must be defined - withOptional(optional):: self + __configMapKeyRefMixin({optional: optional}), - }, - configMapKeyRefType:: hidden.core.v1.configMapKeySelector, - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP. - fieldRef:: { - local __fieldRefMixin(fieldRef) = __valueFromMixin({fieldRef+: fieldRef}), - mixinInstance(fieldRef):: __fieldRefMixin(fieldRef), - // Path of the field to select in the specified API version. - withFieldPath(fieldPath):: self + __fieldRefMixin({fieldPath: fieldPath}), - }, - fieldRefType:: hidden.core.v1.objectFieldSelector, - // 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:: { - local __resourceFieldRefMixin(resourceFieldRef) = __valueFromMixin({resourceFieldRef+: resourceFieldRef}), - mixinInstance(resourceFieldRef):: __resourceFieldRefMixin(resourceFieldRef), - // Container name: required for volumes, optional for env vars - withContainerName(containerName):: self + __resourceFieldRefMixin({containerName: containerName}), - // Specifies the output format of the exposed resources, defaults to "1" - divisor:: { - local __divisorMixin(divisor) = __resourceFieldRefMixin({divisor+: divisor}), - mixinInstance(divisor):: __divisorMixin(divisor), - }, - divisorType:: hidden.core.resource.quantity, - // Required: resource to select - withResource(resource):: self + __resourceFieldRefMixin({resource: resource}), - }, - resourceFieldRefType:: hidden.core.v1.resourceFieldSelector, - // Selects a key of a secret in the pod's namespace - secretKeyRef:: { - local __secretKeyRefMixin(secretKeyRef) = __valueFromMixin({secretKeyRef+: secretKeyRef}), - mixinInstance(secretKeyRef):: __secretKeyRefMixin(secretKeyRef), - // The key of the secret to select from. Must be a valid secret key. - withKey(key):: self + __secretKeyRefMixin({key: key}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretKeyRefMixin({name: name}), - // Specify whether the Secret or it's key must be defined - withOptional(optional):: self + __secretKeyRefMixin({optional: optional}), - }, - secretKeyRefType:: hidden.core.v1.secretKeySelector, - }, - valueFromType:: hidden.core.v1.envVarSource, - }, - }, - // EnvVarSource represents a source for the value of an EnvVar. - envVarSource:: { - new():: {}, - mixin:: { - // Selects a key of a ConfigMap. - configMapKeyRef:: { - local __configMapKeyRefMixin(configMapKeyRef) = {configMapKeyRef+: configMapKeyRef}, - mixinInstance(configMapKeyRef):: __configMapKeyRefMixin(configMapKeyRef), - // The key to select. - withKey(key):: self + __configMapKeyRefMixin({key: key}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapKeyRefMixin({name: name}), - // Specify whether the ConfigMap or it's key must be defined - withOptional(optional):: self + __configMapKeyRefMixin({optional: optional}), - }, - configMapKeyRefType:: hidden.core.v1.configMapKeySelector, - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP. - fieldRef:: { - local __fieldRefMixin(fieldRef) = {fieldRef+: fieldRef}, - mixinInstance(fieldRef):: __fieldRefMixin(fieldRef), - // Path of the field to select in the specified API version. - withFieldPath(fieldPath):: self + __fieldRefMixin({fieldPath: fieldPath}), - }, - fieldRefType:: hidden.core.v1.objectFieldSelector, - // 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:: { - local __resourceFieldRefMixin(resourceFieldRef) = {resourceFieldRef+: resourceFieldRef}, - mixinInstance(resourceFieldRef):: __resourceFieldRefMixin(resourceFieldRef), - // Container name: required for volumes, optional for env vars - withContainerName(containerName):: self + __resourceFieldRefMixin({containerName: containerName}), - // Specifies the output format of the exposed resources, defaults to "1" - divisor:: { - local __divisorMixin(divisor) = __resourceFieldRefMixin({divisor+: divisor}), - mixinInstance(divisor):: __divisorMixin(divisor), - }, - divisorType:: hidden.core.resource.quantity, - // Required: resource to select - withResource(resource):: self + __resourceFieldRefMixin({resource: resource}), - }, - resourceFieldRefType:: hidden.core.v1.resourceFieldSelector, - // Selects a key of a secret in the pod's namespace - secretKeyRef:: { - local __secretKeyRefMixin(secretKeyRef) = {secretKeyRef+: secretKeyRef}, - mixinInstance(secretKeyRef):: __secretKeyRefMixin(secretKeyRef), - // The key of the secret to select from. Must be a valid secret key. - withKey(key):: self + __secretKeyRefMixin({key: key}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretKeyRefMixin({name: name}), - // Specify whether the Secret or it's key must be defined - withOptional(optional):: self + __secretKeyRefMixin({optional: optional}), - }, - secretKeyRefType:: hidden.core.v1.secretKeySelector, - }, - }, - // EventSource contains information for an event. - eventSource:: { - new():: {}, - // Component from which the event is generated. - withComponent(component):: self + {component: component}, - // Node name on which the event is generated. - withHost(host):: self + {host: host}, - mixin:: { - }, - }, - // ExecAction describes a "run in container" action. - execAction:: { - new():: {}, - // 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. - withCommand(command):: self + if std.type(command) == "array" then {command: command} else {command: [command]}, - // 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. - withCommandMixin(command):: self + if std.type(command) == "array" then {command+: command} else {command+: [command]}, - mixin:: { - }, - }, - // 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. - fcVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + {fsType: fsType}, - // Optional: FC target lun number - withLun(lun):: self + {lun: lun}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // Optional: FC target worldwide names (WWNs) - withTargetWwns(targetWwns):: self + if std.type(targetWwns) == "array" then {targetWWNs: targetWwns} else {targetWWNs: [targetWwns]}, - // Optional: FC target worldwide names (WWNs) - withTargetWwnsMixin(targetWwns):: self + if std.type(targetWwns) == "array" then {targetWWNs+: targetWwns} else {targetWWNs+: [targetWwns]}, - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwids(wwids):: self + if std.type(wwids) == "array" then {wwids: wwids} else {wwids: [wwids]}, - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwidsMixin(wwids):: self + if std.type(wwids) == "array" then {wwids+: wwids} else {wwids+: [wwids]}, - mixin:: { - }, - }, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - flexVolumeSource:: { - new():: {}, - // Driver is the name of the driver to use for this volume. - withDriver(driver):: self + {driver: 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. - withFsType(fsType):: self + {fsType: fsType}, - // Optional: Extra command options if any. - withOptions(options):: self + {options: options}, - // Optional: Extra command options if any. - withOptionsMixin(options):: self + {options+: options}, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - mixin:: { - // 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:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // 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. - flockerVolumeSource:: { - new():: {}, - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - withDatasetName(datasetName):: self + {datasetName: datasetName}, - // UUID of the dataset. This is unique identifier of a Flocker dataset - withDatasetUuid(datasetUuid):: self + {datasetUUID: datasetUuid}, - mixin:: { - }, - }, - // 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. - gcePersistentDiskVolumeSource:: { - new():: {}, - // 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 - withFsType(fsType):: self + {fsType: 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 - withPartition(partition):: self + {partition: partition}, - // 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 - withPdName(pdName):: self + {pdName: pdName}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - withReadOnly(readOnly):: self + {readOnly: readOnly}, - mixin:: { - }, - }, - // 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. - gitRepoVolumeSource:: { - new():: {}, - // 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. - withDirectory(directory):: self + {directory: directory}, - // Repository URL - withRepository(repository):: self + {repository: repository}, - // Commit hash for the specified revision. - withRevision(revision):: self + {revision: revision}, - mixin:: { - }, - }, - // Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. - glusterfsVolumeSource:: { - new():: {}, - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withEndpoints(endpoints):: self + {endpoints: endpoints}, - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withPath(path):: self + {path: path}, - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withReadOnly(readOnly):: self + {readOnly: readOnly}, - mixin:: { - }, - }, - // HTTPGetAction describes an action based on HTTP Get requests. - httpGetAction:: { - new():: {}, - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + {host: host}, - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then {httpHeaders: httpHeaders} else {httpHeaders: [httpHeaders]}, - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then {httpHeaders+: httpHeaders} else {httpHeaders+: [httpHeaders]}, - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + {path: path}, - // 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. - withPort(port):: {port: port}, - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + {scheme: scheme}, - mixin:: { - }, - }, - // HTTPHeader describes a custom header to be used in HTTP probes - httpHeader:: { - new():: {}, - // The header field name - withName(name):: self + {name: name}, - // The header field value - withValue(value):: self + {value: value}, - mixin:: { - }, - }, - // Handler defines a specific action that should be taken - handler:: { - new():: {}, - mixin:: { - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = {exec+: exec}, - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), - // 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. - withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = {httpGet+: httpGet}, - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({path: path}), - // 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. - withPort(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = {tcpSocket+: tcpSocket}, - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({host: host}), - // 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. - withPort(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - }, - // HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. - hostAlias:: { - new():: {}, - // Hostnames for the above IP address. - withHostnames(hostnames):: self + if std.type(hostnames) == "array" then {hostnames: hostnames} else {hostnames: [hostnames]}, - // Hostnames for the above IP address. - withHostnamesMixin(hostnames):: self + if std.type(hostnames) == "array" then {hostnames+: hostnames} else {hostnames+: [hostnames]}, - // IP address of the host file entry. - withIp(ip):: self + {ip: ip}, - mixin:: { - }, - }, - // Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling. - hostPathVolumeSource:: { - new():: {}, - // 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 - withPath(path):: self + {path: path}, - // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - withType(type):: self + {type: type}, - mixin:: { - }, - }, - // Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. - iscsiVolumeSource:: { - new():: {}, - // whether support iSCSI Discovery CHAP authentication - withChapAuthDiscovery(chapAuthDiscovery):: self + {chapAuthDiscovery: chapAuthDiscovery}, - // whether support iSCSI Session CHAP authentication - withChapAuthSession(chapAuthSession):: self + {chapAuthSession: 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 - withFsType(fsType):: self + {fsType: fsType}, - // Custom iSCSI initiator name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - withInitiatorName(initiatorName):: self + {initiatorName: initiatorName}, - // Target iSCSI Qualified Name. - withIqn(iqn):: self + {iqn: iqn}, - // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. - withIscsiInterface(iscsiInterface):: self + {iscsiInterface: iscsiInterface}, - // iSCSI target lun number. - withLun(lun):: self + {lun: lun}, - // 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). - withPortals(portals):: self + if std.type(portals) == "array" then {portals: portals} else {portals: [portals]}, - // 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). - withPortalsMixin(portals):: self + if std.type(portals) == "array" then {portals+: portals} else {portals+: [portals]}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // 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). - withTargetPortal(targetPortal):: self + {targetPortal: targetPortal}, - mixin:: { - // CHAP secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // Maps a string key to a path within a volume. - keyToPath:: { - new(key, path):: {} + self.withKey(key) + self.withPath(path), - // The key to project. - withKey(key):: self + {key: key}, - // Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. - withMode(mode):: self + {mode: mode}, - // 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 '..'. - withPath(path):: self + {path: path}, - mixin:: { - }, - }, - // 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. - lifecycle:: { - new():: {}, - mixin:: { - // 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:: { - local __postStartMixin(postStart) = {postStart+: postStart}, - mixinInstance(postStart):: __postStartMixin(postStart), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __postStartMixin({exec+: exec}), - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), - // 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. - withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __postStartMixin({httpGet+: httpGet}), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({path: path}), - // 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. - withPort(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __postStartMixin({tcpSocket+: tcpSocket}), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({host: host}), - // 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. - withPort(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - postStartType:: hidden.core.v1.handler, - // PreStop is called immediately before a container is terminated. The container is terminated after the handler completes. The reason for termination is passed to the handler. Regardless of the outcome of the handler, the container is eventually terminated. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - preStop:: { - local __preStopMixin(preStop) = {preStop+: preStop}, - mixinInstance(preStop):: __preStopMixin(preStop), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __preStopMixin({exec+: exec}), - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), - // 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. - withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __preStopMixin({httpGet+: httpGet}), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({path: path}), - // 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. - withPort(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __preStopMixin({tcpSocket+: tcpSocket}), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({host: host}), - // 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. - withPort(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - preStopType:: hidden.core.v1.handler, - }, - }, - // LimitRangeItem defines a min/max usage limit for any resource that matches on kind. - limitRangeItem:: { - new():: {}, - // Default resource requirement limit value by resource name if resource limit is omitted. - withDefault(default):: self + {default: default}, - // Default resource requirement limit value by resource name if resource limit is omitted. - withDefaultMixin(default):: self + {default+: default}, - // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. - withDefaultRequest(defaultRequest):: self + {defaultRequest: defaultRequest}, - // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. - withDefaultRequestMixin(defaultRequest):: self + {defaultRequest+: defaultRequest}, - // Max usage constraints on this kind by resource name. - withMax(max):: self + {max: max}, - // Max usage constraints on this kind by resource name. - withMaxMixin(max):: self + {max+: 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. - withMaxLimitRequestRatio(maxLimitRequestRatio):: self + {maxLimitRequestRatio: maxLimitRequestRatio}, - // 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. - withMaxLimitRequestRatioMixin(maxLimitRequestRatio):: self + {maxLimitRequestRatio+: maxLimitRequestRatio}, - // Min usage constraints on this kind by resource name. - withMin(min):: self + {min: min}, - // Min usage constraints on this kind by resource name. - withMinMixin(min):: self + {min+: min}, - // Type of resource that this limit applies to. - withType(type):: self + {type: type}, - mixin:: { - }, - }, - // LimitRangeSpec defines a min/max usage limit for resources that match on kind. - limitRangeSpec:: { - new():: {}, - // Limits is the list of LimitRangeItem objects that are enforced. - withLimits(limits):: self + if std.type(limits) == "array" then {limits: limits} else {limits: [limits]}, - // Limits is the list of LimitRangeItem objects that are enforced. - withLimitsMixin(limits):: self + if std.type(limits) == "array" then {limits+: limits} else {limits+: [limits]}, - limitsType:: hidden.core.v1.limitRangeItem, - mixin:: { - }, - }, - // LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point. - loadBalancerIngress:: { - new():: {}, - // Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers) - withHostname(hostname):: self + {hostname: hostname}, - // IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers) - withIp(ip):: self + {ip: ip}, - mixin:: { - }, - }, - // LoadBalancerStatus represents the status of a load-balancer. - loadBalancerStatus:: { - new():: {}, - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngress(ingress):: self + if std.type(ingress) == "array" then {ingress: ingress} else {ingress: [ingress]}, - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngressMixin(ingress):: self + if std.type(ingress) == "array" then {ingress+: ingress} else {ingress+: [ingress]}, - ingressType:: hidden.core.v1.loadBalancerIngress, - mixin:: { - }, - }, - // LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - localObjectReference:: { - new():: {}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + {name: name}, - mixin:: { - }, - }, - // Local represents directly-attached storage with node affinity - localVolumeSource:: { - new():: {}, - // The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device - withPath(path):: self + {path: path}, - mixin:: { - }, - }, - // Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling. - nfsVolumeSource:: { - new():: {}, - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withPath(path):: self + {path: path}, - // 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 - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withServer(server):: self + {server: server}, - mixin:: { - }, - }, - // NamespaceSpec describes the attributes on a Namespace. - namespaceSpec:: { - new():: {}, - // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then {finalizers: finalizers} else {finalizers: [finalizers]}, - // Finalizers is an opaque list of values that must be empty to permanently remove object from storage. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#finalizers - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then {finalizers+: finalizers} else {finalizers+: [finalizers]}, - mixin:: { - }, - }, - // NamespaceStatus is information about the current status of a Namespace. - namespaceStatus:: { - new():: {}, - // Phase is the current lifecycle phase of the namespace. More info: https://git.k8s.io/community/contributors/design-proposals/namespaces.md#phases - withPhase(phase):: self + {phase: phase}, - mixin:: { - }, - }, - // NodeAddress contains information for the node's address. - nodeAddress:: { - new():: {}, - // The node address. - withAddress(address):: self + {address: address}, - // Node address type, one of Hostname, ExternalIP or InternalIP. - withType(type):: self + {type: type}, - mixin:: { - }, - }, - // Node affinity is a group of node affinity scheduling rules. - nodeAffinity:: { - new():: {}, - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}, - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - mixin:: { - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}, - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - }, - // NodeCondition contains condition information for a node. - nodeCondition:: { - new():: {}, - // Human readable message indicating details about last transition. - withMessage(message):: self + {message: message}, - // (brief) reason for the condition's last transition. - withReason(reason):: self + {reason: reason}, - // Type of node condition. - withType(type):: self + {type: type}, - mixin:: { - // Last time we got an update on a given condition. - lastHeartbeatTime:: { - local __lastHeartbeatTimeMixin(lastHeartbeatTime) = {lastHeartbeatTime+: lastHeartbeatTime}, - mixinInstance(lastHeartbeatTime):: __lastHeartbeatTimeMixin(lastHeartbeatTime), - }, - lastHeartbeatTimeType:: hidden.meta.v1.time, - // Last time the condition transit from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // NodeDaemonEndpoints lists ports opened by daemons running on the Node. - nodeDaemonEndpoints:: { - new():: {}, - mixin:: { - // Endpoint on which Kubelet is listening. - kubeletEndpoint:: { - local __kubeletEndpointMixin(kubeletEndpoint) = {kubeletEndpoint+: kubeletEndpoint}, - mixinInstance(kubeletEndpoint):: __kubeletEndpointMixin(kubeletEndpoint), - // Port number of the given endpoint. - withPort(port):: self + __kubeletEndpointMixin({Port: port}), - }, - kubeletEndpointType:: hidden.core.v1.daemonEndpoint, - }, - }, - // 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. - nodeSelector:: { - new():: {}, - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then {nodeSelectorTerms: nodeSelectorTerms} else {nodeSelectorTerms: [nodeSelectorTerms]}, - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then {nodeSelectorTerms+: nodeSelectorTerms} else {nodeSelectorTerms+: [nodeSelectorTerms]}, - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - mixin:: { - }, - }, - // A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - nodeSelectorRequirement:: { - new():: {}, - // The label key that the selector applies to. - withKey(key):: self + {key: key}, - // Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - withOperator(operator):: self + {operator: 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. - withValues(values):: self + if std.type(values) == "array" then {values: values} else {values: [values]}, - // 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. - withValuesMixin(values):: self + if std.type(values) == "array" then {values+: values} else {values+: [values]}, - mixin:: { - }, - }, - // A null or empty node selector term matches no objects. - nodeSelectorTerm:: { - new():: {}, - // Required. A list of node selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then {matchExpressions: matchExpressions} else {matchExpressions: [matchExpressions]}, - // Required. A list of node selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then {matchExpressions+: matchExpressions} else {matchExpressions+: [matchExpressions]}, - matchExpressionsType:: hidden.core.v1.nodeSelectorRequirement, - mixin:: { - }, - }, - // NodeSpec describes the attributes that a node is created with. - nodeSpec:: { - new():: {}, - // External ID of the node assigned by some machine database (e.g. a cloud provider). Deprecated. - withExternalId(externalId):: self + {externalID: externalId}, - // PodCIDR represents the pod IP range assigned to the node. - withPodCidr(podCidr):: self + {podCIDR: podCidr}, - // ID of the node assigned by the cloud provider in the format: :// - withProviderId(providerId):: self + {providerID: providerId}, - // If specified, the node's taints. - withTaints(taints):: self + if std.type(taints) == "array" then {taints: taints} else {taints: [taints]}, - // If specified, the node's taints. - withTaintsMixin(taints):: self + if std.type(taints) == "array" then {taints+: taints} else {taints+: [taints]}, - taintsType:: hidden.core.v1.taint, - // Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration - withUnschedulable(unschedulable):: self + {unschedulable: unschedulable}, - mixin:: { - // If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field - configSource:: { - local __configSourceMixin(configSource) = {configSource+: configSource}, - mixinInstance(configSource):: __configSourceMixin(configSource), - // - configMapRef:: { - local __configMapRefMixin(configMapRef) = __configSourceMixin({configMapRef+: configMapRef}), - mixinInstance(configMapRef):: __configMapRefMixin(configMapRef), - // 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. - withFieldPath(fieldPath):: self + __configMapRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __configMapRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __configMapRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __configMapRefMixin({uid: uid}), - }, - configMapRefType:: hidden.core.v1.objectReference, - }, - configSourceType:: hidden.core.v1.nodeConfigSource, - }, - }, - // NodeStatus is information about the current status of a node. - nodeStatus:: { - new():: {}, - // List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses - withAddresses(addresses):: self + if std.type(addresses) == "array" then {addresses: addresses} else {addresses: [addresses]}, - // List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses - withAddressesMixin(addresses):: self + if std.type(addresses) == "array" then {addresses+: addresses} else {addresses+: [addresses]}, - addressesType:: hidden.core.v1.nodeAddress, - // Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity. - withAllocatable(allocatable):: self + {allocatable: allocatable}, - // Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity. - withAllocatableMixin(allocatable):: self + {allocatable+: allocatable}, - // Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - withCapacity(capacity):: self + {capacity: capacity}, - // Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - withCapacityMixin(capacity):: self + {capacity+: capacity}, - // Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.core.v1.nodeCondition, - // List of container images on this node - withImages(images):: self + if std.type(images) == "array" then {images: images} else {images: [images]}, - // List of container images on this node - withImagesMixin(images):: self + if std.type(images) == "array" then {images+: images} else {images+: [images]}, - imagesType:: hidden.core.v1.containerImage, - // NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated. - withPhase(phase):: self + {phase: phase}, - // List of volumes that are attached to the node. - withVolumesAttached(volumesAttached):: self + if std.type(volumesAttached) == "array" then {volumesAttached: volumesAttached} else {volumesAttached: [volumesAttached]}, - // List of volumes that are attached to the node. - withVolumesAttachedMixin(volumesAttached):: self + if std.type(volumesAttached) == "array" then {volumesAttached+: volumesAttached} else {volumesAttached+: [volumesAttached]}, - volumesAttachedType:: hidden.core.v1.attachedVolume, - // List of attachable volumes in use (mounted) by the node. - withVolumesInUse(volumesInUse):: self + if std.type(volumesInUse) == "array" then {volumesInUse: volumesInUse} else {volumesInUse: [volumesInUse]}, - // List of attachable volumes in use (mounted) by the node. - withVolumesInUseMixin(volumesInUse):: self + if std.type(volumesInUse) == "array" then {volumesInUse+: volumesInUse} else {volumesInUse+: [volumesInUse]}, - mixin:: { - // Endpoints of daemons running on the Node. - daemonEndpoints:: { - local __daemonEndpointsMixin(daemonEndpoints) = {daemonEndpoints+: daemonEndpoints}, - mixinInstance(daemonEndpoints):: __daemonEndpointsMixin(daemonEndpoints), - // Endpoint on which Kubelet is listening. - kubeletEndpoint:: { - local __kubeletEndpointMixin(kubeletEndpoint) = __daemonEndpointsMixin({kubeletEndpoint+: kubeletEndpoint}), - mixinInstance(kubeletEndpoint):: __kubeletEndpointMixin(kubeletEndpoint), - // Port number of the given endpoint. - withPort(port):: self + __kubeletEndpointMixin({Port: port}), - }, - kubeletEndpointType:: hidden.core.v1.daemonEndpoint, - }, - daemonEndpointsType:: hidden.core.v1.nodeDaemonEndpoints, - // Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info - nodeInfo:: { - local __nodeInfoMixin(nodeInfo) = {nodeInfo+: nodeInfo}, - mixinInstance(nodeInfo):: __nodeInfoMixin(nodeInfo), - // The Architecture reported by the node - withArchitecture(architecture):: self + __nodeInfoMixin({architecture: architecture}), - // Boot ID reported by the node. - withBootId(bootId):: self + __nodeInfoMixin({bootID: bootId}), - // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). - withContainerRuntimeVersion(containerRuntimeVersion):: self + __nodeInfoMixin({containerRuntimeVersion: containerRuntimeVersion}), - // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). - withKernelVersion(kernelVersion):: self + __nodeInfoMixin({kernelVersion: kernelVersion}), - // KubeProxy Version reported by the node. - withKubeProxyVersion(kubeProxyVersion):: self + __nodeInfoMixin({kubeProxyVersion: kubeProxyVersion}), - // Kubelet Version reported by the node. - withKubeletVersion(kubeletVersion):: self + __nodeInfoMixin({kubeletVersion: kubeletVersion}), - // MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - withMachineId(machineId):: self + __nodeInfoMixin({machineID: machineId}), - // The Operating System reported by the node - withOperatingSystem(operatingSystem):: self + __nodeInfoMixin({operatingSystem: operatingSystem}), - // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). - withOsImage(osImage):: self + __nodeInfoMixin({osImage: osImage}), - // SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html - withSystemUuid(systemUuid):: self + __nodeInfoMixin({systemUUID: systemUuid}), - }, - nodeInfoType:: hidden.core.v1.nodeSystemInfo, - }, - }, - // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. - nodeSystemInfo:: { - new():: {}, - // The Architecture reported by the node - withArchitecture(architecture):: self + {architecture: architecture}, - // Boot ID reported by the node. - withBootId(bootId):: self + {bootID: bootId}, - // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). - withContainerRuntimeVersion(containerRuntimeVersion):: self + {containerRuntimeVersion: containerRuntimeVersion}, - // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). - withKernelVersion(kernelVersion):: self + {kernelVersion: kernelVersion}, - // KubeProxy Version reported by the node. - withKubeProxyVersion(kubeProxyVersion):: self + {kubeProxyVersion: kubeProxyVersion}, - // Kubelet Version reported by the node. - withKubeletVersion(kubeletVersion):: self + {kubeletVersion: kubeletVersion}, - // MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - withMachineId(machineId):: self + {machineID: machineId}, - // The Operating System reported by the node - withOperatingSystem(operatingSystem):: self + {operatingSystem: operatingSystem}, - // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). - withOsImage(osImage):: self + {osImage: osImage}, - // SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html - withSystemUuid(systemUuid):: self + {systemUUID: systemUuid}, - mixin:: { - }, - }, - // ObjectFieldSelector selects an APIVersioned field of an object. - objectFieldSelector:: { - new():: {}, - // Path of the field to select in the specified API version. - withFieldPath(fieldPath):: self + {fieldPath: fieldPath}, - mixin:: { - }, - }, - // ObjectReference contains enough information to let you inspect or modify the referred object. - objectReference:: { - new():: {}, - // 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. - withFieldPath(fieldPath):: self + {fieldPath: fieldPath}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + {name: name}, - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + {namespace: namespace}, - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + {resourceVersion: resourceVersion}, - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + {uid: uid}, - mixin:: { - }, - }, - // PersistentVolumeClaimCondition contails details about state of pvc - persistentVolumeClaimCondition:: { - new():: {}, - // Human-readable message indicating details about last transition. - withMessage(message):: self + {message: message}, - // Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized. - withReason(reason):: self + {reason: reason}, - // - withType(type):: self + {type: type}, - mixin:: { - // Last time we probed the condition. - lastProbeTime:: { - local __lastProbeTimeMixin(lastProbeTime) = {lastProbeTime+: lastProbeTime}, - mixinInstance(lastProbeTime):: __lastProbeTimeMixin(lastProbeTime), - }, - lastProbeTimeType:: hidden.meta.v1.time, - // Last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes - persistentVolumeClaimSpec:: { - new():: {}, - // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - withAccessModes(accessModes):: self + if std.type(accessModes) == "array" then {accessModes: accessModes} else {accessModes: [accessModes]}, - // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - withAccessModesMixin(accessModes):: self + if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, - // Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - withStorageClassName(storageClassName):: self + {storageClassName: storageClassName}, - // VolumeName is the binding reference to the PersistentVolume backing this claim. - withVolumeName(volumeName):: self + {volumeName: volumeName}, - mixin:: { - // Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources:: { - local __resourcesMixin(resources) = {resources+: resources}, - mixinInstance(resources):: __resourcesMixin(resources), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimits(limits):: self + __resourcesMixin({limits: limits}), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimitsMixin(limits):: self + __resourcesMixin({limits+: 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-compute-resources-container/ - withRequests(requests):: self + __resourcesMixin({requests: requests}), - // 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-compute-resources-container/ - withRequestsMixin(requests):: self + __resourcesMixin({requests+: requests}), - }, - resourcesType:: hidden.core.v1.resourceRequirements, - // A label query over volumes to consider for binding. - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - }, - // PersistentVolumeClaimStatus is the current status of a persistent volume claim. - persistentVolumeClaimStatus:: { - new():: {}, - // AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - withAccessModes(accessModes):: self + if std.type(accessModes) == "array" then {accessModes: accessModes} else {accessModes: [accessModes]}, - // AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - withAccessModesMixin(accessModes):: self + if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, - // Represents the actual resources of the underlying volume. - withCapacity(capacity):: self + {capacity: capacity}, - // Represents the actual resources of the underlying volume. - withCapacityMixin(capacity):: self + {capacity+: capacity}, - // Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.core.v1.persistentVolumeClaimCondition, - // Phase represents the current phase of PersistentVolumeClaim. - withPhase(phase):: self + {phase: phase}, - mixin:: { - }, - }, - // 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). - persistentVolumeClaimVolumeSource:: { - new():: {}, - // 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 - withClaimName(claimName):: self + {claimName: claimName}, - // Will force the ReadOnly setting in VolumeMounts. Default false. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - mixin:: { - }, - }, - // PersistentVolumeSpec is the specification of a persistent volume. - persistentVolumeSpec:: { - new():: {}, - // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - withAccessModes(accessModes):: self + if std.type(accessModes) == "array" then {accessModes: accessModes} else {accessModes: [accessModes]}, - // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - withAccessModesMixin(accessModes):: self + if std.type(accessModes) == "array" then {accessModes+: accessModes} else {accessModes+: [accessModes]}, - // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - withCapacity(capacity):: self + {capacity: capacity}, - // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - withCapacityMixin(capacity):: self + {capacity+: capacity}, - // 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 - withMountOptions(mountOptions):: self + if std.type(mountOptions) == "array" then {mountOptions: mountOptions} else {mountOptions: [mountOptions]}, - // 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 - withMountOptionsMixin(mountOptions):: self + if std.type(mountOptions) == "array" then {mountOptions+: mountOptions} else {mountOptions+: [mountOptions]}, - // What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming - withPersistentVolumeReclaimPolicy(persistentVolumeReclaimPolicy):: self + {persistentVolumeReclaimPolicy: persistentVolumeReclaimPolicy}, - // Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass. - withStorageClassName(storageClassName):: self + {storageClassName: storageClassName}, - mixin:: { - // 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:: { - local __awsElasticBlockStoreMixin(awsElasticBlockStore) = {awsElasticBlockStore+: awsElasticBlockStore}, - mixinInstance(awsElasticBlockStore):: __awsElasticBlockStoreMixin(awsElasticBlockStore), - // 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 - withFsType(fsType):: self + __awsElasticBlockStoreMixin({fsType: 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). - withPartition(partition):: self + __awsElasticBlockStoreMixin({partition: 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 - withReadOnly(readOnly):: self + __awsElasticBlockStoreMixin({readOnly: readOnly}), - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - withVolumeId(volumeId):: self + __awsElasticBlockStoreMixin({volumeID: volumeId}), - }, - awsElasticBlockStoreType:: hidden.core.v1.awsElasticBlockStoreVolumeSource, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk:: { - local __azureDiskMixin(azureDisk) = {azureDisk+: azureDisk}, - mixinInstance(azureDisk):: __azureDiskMixin(azureDisk), - // Host Caching mode: None, Read Only, Read Write. - withCachingMode(cachingMode):: self + __azureDiskMixin({cachingMode: cachingMode}), - // The Name of the data disk in the blob storage - withDiskName(diskName):: self + __azureDiskMixin({diskName: diskName}), - // The URI the data disk in the blob storage - withDiskUri(diskUri):: self + __azureDiskMixin({diskURI: diskUri}), - // 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. - withFsType(fsType):: self + __azureDiskMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __azureDiskMixin({readOnly: readOnly}), - }, - azureDiskType:: hidden.core.v1.azureDiskVolumeSource, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile:: { - local __azureFileMixin(azureFile) = {azureFile+: azureFile}, - mixinInstance(azureFile):: __azureFileMixin(azureFile), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __azureFileMixin({readOnly: readOnly}), - // the name of secret that contains Azure Storage Account Name and Key - withSecretName(secretName):: self + __azureFileMixin({secretName: secretName}), - // the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod - withSecretNamespace(secretNamespace):: self + __azureFileMixin({secretNamespace: secretNamespace}), - // Share Name - withShareName(shareName):: self + __azureFileMixin({shareName: shareName}), - }, - azureFileType:: hidden.core.v1.azureFilePersistentVolumeSource, - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs:: { - local __cephfsMixin(cephfs) = {cephfs+: cephfs}, - mixinInstance(cephfs):: __cephfsMixin(cephfs), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == "array" then __cephfsMixin({monitors: monitors}) else __cephfsMixin({monitors: [monitors]}), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then __cephfsMixin({monitors+: monitors}) else __cephfsMixin({monitors+: [monitors]}), - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - withPath(path):: self + __cephfsMixin({path: path}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withReadOnly(readOnly):: self + __cephfsMixin({readOnly: readOnly}), - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withSecretFile(secretFile):: self + __cephfsMixin({secretFile: secretFile}), - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __cephfsMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({name: name}), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({namespace: namespace}), - }, - secretRefType:: hidden.core.v1.secretReference, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withUser(user):: self + __cephfsMixin({user: user}), - }, - cephfsType:: hidden.core.v1.cephFSPersistentVolumeSource, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder:: { - local __cinderMixin(cinder) = {cinder+: cinder}, - mixinInstance(cinder):: __cinderMixin(cinder), - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withFsType(fsType):: self + __cinderMixin({fsType: fsType}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withReadOnly(readOnly):: self + __cinderMixin({readOnly: readOnly}), - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withVolumeId(volumeId):: self + __cinderMixin({volumeID: volumeId}), - }, - cinderType:: hidden.core.v1.cinderVolumeSource, - // 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:: { - local __claimRefMixin(claimRef) = {claimRef+: claimRef}, - mixinInstance(claimRef):: __claimRefMixin(claimRef), - // 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. - withFieldPath(fieldPath):: self + __claimRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __claimRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __claimRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __claimRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __claimRefMixin({uid: uid}), - }, - claimRefType:: hidden.core.v1.objectReference, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc:: { - local __fcMixin(fc) = {fc+: fc}, - mixinInstance(fc):: __fcMixin(fc), - // 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. - withFsType(fsType):: self + __fcMixin({fsType: fsType}), - // Optional: FC target lun number - withLun(lun):: self + __fcMixin({lun: lun}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __fcMixin({readOnly: readOnly}), - // Optional: FC target worldwide names (WWNs) - withTargetWwns(targetWwns):: self + if std.type(targetWwns) == "array" then __fcMixin({targetWWNs: targetWwns}) else __fcMixin({targetWWNs: [targetWwns]}), - // Optional: FC target worldwide names (WWNs) - withTargetWwnsMixin(targetWwns):: self + if std.type(targetWwns) == "array" then __fcMixin({targetWWNs+: targetWwns}) else __fcMixin({targetWWNs+: [targetWwns]}), - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwids(wwids):: self + if std.type(wwids) == "array" then __fcMixin({wwids: wwids}) else __fcMixin({wwids: [wwids]}), - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwidsMixin(wwids):: self + if std.type(wwids) == "array" then __fcMixin({wwids+: wwids}) else __fcMixin({wwids+: [wwids]}), - }, - fcType:: hidden.core.v1.fcVolumeSource, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - flexVolume:: { - local __flexVolumeMixin(flexVolume) = {flexVolume+: flexVolume}, - mixinInstance(flexVolume):: __flexVolumeMixin(flexVolume), - // Driver is the name of the driver to use for this volume. - withDriver(driver):: self + __flexVolumeMixin({driver: 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. - withFsType(fsType):: self + __flexVolumeMixin({fsType: fsType}), - // Optional: Extra command options if any. - withOptions(options):: self + __flexVolumeMixin({options: options}), - // Optional: Extra command options if any. - withOptionsMixin(options):: self + __flexVolumeMixin({options+: options}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __flexVolumeMixin({readOnly: 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:: { - local __secretRefMixin(secretRef) = __flexVolumeMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - flexVolumeType:: hidden.core.v1.flexVolumeSource, - // 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:: { - local __flockerMixin(flocker) = {flocker+: flocker}, - mixinInstance(flocker):: __flockerMixin(flocker), - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - withDatasetName(datasetName):: self + __flockerMixin({datasetName: datasetName}), - // UUID of the dataset. This is unique identifier of a Flocker dataset - withDatasetUuid(datasetUuid):: self + __flockerMixin({datasetUUID: datasetUuid}), - }, - flockerType:: hidden.core.v1.flockerVolumeSource, - // 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:: { - local __gcePersistentDiskMixin(gcePersistentDisk) = {gcePersistentDisk+: gcePersistentDisk}, - mixinInstance(gcePersistentDisk):: __gcePersistentDiskMixin(gcePersistentDisk), - // 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 - withFsType(fsType):: self + __gcePersistentDiskMixin({fsType: 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 - withPartition(partition):: self + __gcePersistentDiskMixin({partition: partition}), - // 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 - withPdName(pdName):: self + __gcePersistentDiskMixin({pdName: pdName}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - withReadOnly(readOnly):: self + __gcePersistentDiskMixin({readOnly: readOnly}), - }, - gcePersistentDiskType:: hidden.core.v1.gcePersistentDiskVolumeSource, - // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs:: { - local __glusterfsMixin(glusterfs) = {glusterfs+: glusterfs}, - mixinInstance(glusterfs):: __glusterfsMixin(glusterfs), - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withEndpoints(endpoints):: self + __glusterfsMixin({endpoints: endpoints}), - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withPath(path):: self + __glusterfsMixin({path: path}), - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withReadOnly(readOnly):: self + __glusterfsMixin({readOnly: readOnly}), - }, - glusterfsType:: hidden.core.v1.glusterfsVolumeSource, - // 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:: { - local __hostPathMixin(hostPath) = {hostPath+: hostPath}, - mixinInstance(hostPath):: __hostPathMixin(hostPath), - // 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 - withPath(path):: self + __hostPathMixin({path: path}), - // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - withType(type):: self + __hostPathMixin({type: type}), - }, - hostPathType:: hidden.core.v1.hostPathVolumeSource, - // 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:: { - local __iscsiMixin(iscsi) = {iscsi+: iscsi}, - mixinInstance(iscsi):: __iscsiMixin(iscsi), - // whether support iSCSI Discovery CHAP authentication - withChapAuthDiscovery(chapAuthDiscovery):: self + __iscsiMixin({chapAuthDiscovery: chapAuthDiscovery}), - // whether support iSCSI Session CHAP authentication - withChapAuthSession(chapAuthSession):: self + __iscsiMixin({chapAuthSession: 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 - withFsType(fsType):: self + __iscsiMixin({fsType: fsType}), - // Custom iSCSI initiator name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - withInitiatorName(initiatorName):: self + __iscsiMixin({initiatorName: initiatorName}), - // Target iSCSI Qualified Name. - withIqn(iqn):: self + __iscsiMixin({iqn: iqn}), - // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. - withIscsiInterface(iscsiInterface):: self + __iscsiMixin({iscsiInterface: iscsiInterface}), - // iSCSI target lun number. - withLun(lun):: self + __iscsiMixin({lun: lun}), - // 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). - withPortals(portals):: self + if std.type(portals) == "array" then __iscsiMixin({portals: portals}) else __iscsiMixin({portals: [portals]}), - // 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). - withPortalsMixin(portals):: self + if std.type(portals) == "array" then __iscsiMixin({portals+: portals}) else __iscsiMixin({portals+: [portals]}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - withReadOnly(readOnly):: self + __iscsiMixin({readOnly: readOnly}), - // CHAP secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = __iscsiMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // 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). - withTargetPortal(targetPortal):: self + __iscsiMixin({targetPortal: targetPortal}), - }, - iscsiType:: hidden.core.v1.iscsiVolumeSource, - // Local represents directly-attached storage with node affinity - localStorage:: { - local __localStorageMixin(localStorage) = {"local"+: localStorage}, - mixinInstance(localStorage):: __localStorageMixin(localStorage), - // The full path to the volume on the node For alpha, this path must be a directory Once block as a source is supported, then this path can point to a block device - withPath(path):: self + __localStorageMixin({path: path}), - }, - localStorageType:: hidden.core.v1.localVolumeSource, - // NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - nfs:: { - local __nfsMixin(nfs) = {nfs+: nfs}, - mixinInstance(nfs):: __nfsMixin(nfs), - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withPath(path):: self + __nfsMixin({path: path}), - // 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 - withReadOnly(readOnly):: self + __nfsMixin({readOnly: readOnly}), - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withServer(server):: self + __nfsMixin({server: server}), - }, - nfsType:: hidden.core.v1.nfsVolumeSource, - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk:: { - local __photonPersistentDiskMixin(photonPersistentDisk) = {photonPersistentDisk+: photonPersistentDisk}, - mixinInstance(photonPersistentDisk):: __photonPersistentDiskMixin(photonPersistentDisk), - // 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. - withFsType(fsType):: self + __photonPersistentDiskMixin({fsType: fsType}), - // ID that identifies Photon Controller persistent disk - withPdId(pdId):: self + __photonPersistentDiskMixin({pdID: pdId}), - }, - photonPersistentDiskType:: hidden.core.v1.photonPersistentDiskVolumeSource, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume:: { - local __portworxVolumeMixin(portworxVolume) = {portworxVolume+: portworxVolume}, - mixinInstance(portworxVolume):: __portworxVolumeMixin(portworxVolume), - // 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. - withFsType(fsType):: self + __portworxVolumeMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __portworxVolumeMixin({readOnly: readOnly}), - // VolumeID uniquely identifies a Portworx volume - withVolumeId(volumeId):: self + __portworxVolumeMixin({volumeID: volumeId}), - }, - portworxVolumeType:: hidden.core.v1.portworxVolumeSource, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte:: { - local __quobyteMixin(quobyte) = {quobyte+: quobyte}, - mixinInstance(quobyte):: __quobyteMixin(quobyte), - // Group to map volume access to Default is no group - withGroup(group):: self + __quobyteMixin({group: group}), - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - withReadOnly(readOnly):: self + __quobyteMixin({readOnly: readOnly}), - // 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 - withRegistry(registry):: self + __quobyteMixin({registry: registry}), - // User to map volume access to Defaults to serivceaccount user - withUser(user):: self + __quobyteMixin({user: user}), - // Volume is a string that references an already created Quobyte volume by name. - withVolume(volume):: self + __quobyteMixin({volume: volume}), - }, - quobyteType:: hidden.core.v1.quobyteVolumeSource, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd:: { - local __rbdMixin(rbd) = {rbd+: rbd}, - mixinInstance(rbd):: __rbdMixin(rbd), - // 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 - withFsType(fsType):: self + __rbdMixin({fsType: fsType}), - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withImage(image):: self + __rbdMixin({image: image}), - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withKeyring(keyring):: self + __rbdMixin({keyring: keyring}), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == "array" then __rbdMixin({monitors: monitors}) else __rbdMixin({monitors: [monitors]}), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then __rbdMixin({monitors+: monitors}) else __rbdMixin({monitors+: [monitors]}), - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withPool(pool):: self + __rbdMixin({pool: pool}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withReadOnly(readOnly):: self + __rbdMixin({readOnly: readOnly}), - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __rbdMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withUser(user):: self + __rbdMixin({user: user}), - }, - rbdType:: hidden.core.v1.rbdVolumeSource, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIo:: { - local __scaleIoMixin(scaleIo) = {scaleIO+: scaleIo}, - mixinInstance(scaleIo):: __scaleIoMixin(scaleIo), - // 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. - withFsType(fsType):: self + __scaleIoMixin({fsType: fsType}), - // The host address of the ScaleIO API Gateway. - withGateway(gateway):: self + __scaleIoMixin({gateway: gateway}), - // The name of the Protection Domain for the configured storage (defaults to "default"). - withProtectionDomain(protectionDomain):: self + __scaleIoMixin({protectionDomain: protectionDomain}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __scaleIoMixin({readOnly: readOnly}), - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = __scaleIoMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // Flag to enable/disable SSL communication with Gateway, default false - withSslEnabled(sslEnabled):: self + __scaleIoMixin({sslEnabled: sslEnabled}), - // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). - withStorageMode(storageMode):: self + __scaleIoMixin({storageMode: storageMode}), - // The Storage Pool associated with the protection domain (defaults to "default"). - withStoragePool(storagePool):: self + __scaleIoMixin({storagePool: storagePool}), - // The name of the storage system as configured in ScaleIO. - withSystem(system):: self + __scaleIoMixin({system: system}), - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - withVolumeName(volumeName):: self + __scaleIoMixin({volumeName: volumeName}), - }, - scaleIoType:: hidden.core.v1.scaleIoVolumeSource, - // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md - storageos:: { - local __storageosMixin(storageos) = {storageos+: storageos}, - mixinInstance(storageos):: __storageosMixin(storageos), - // 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. - withFsType(fsType):: self + __storageosMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __storageosMixin({readOnly: readOnly}), - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = __storageosMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // 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. - withFieldPath(fieldPath):: self + __secretRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __secretRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __secretRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __secretRefMixin({uid: uid}), - }, - secretRefType:: hidden.core.v1.objectReference, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - withVolumeName(volumeName):: self + __storageosMixin({volumeName: 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. - withVolumeNamespace(volumeNamespace):: self + __storageosMixin({volumeNamespace: volumeNamespace}), - }, - storageosType:: hidden.core.v1.storageOSPersistentVolumeSource, - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume:: { - local __vsphereVolumeMixin(vsphereVolume) = {vsphereVolume+: vsphereVolume}, - mixinInstance(vsphereVolume):: __vsphereVolumeMixin(vsphereVolume), - // 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. - withFsType(fsType):: self + __vsphereVolumeMixin({fsType: fsType}), - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - withStoragePolicyId(storagePolicyId):: self + __vsphereVolumeMixin({storagePolicyID: storagePolicyId}), - // Storage Policy Based Management (SPBM) profile name. - withStoragePolicyName(storagePolicyName):: self + __vsphereVolumeMixin({storagePolicyName: storagePolicyName}), - // Path that identifies vSphere volume vmdk - withVolumePath(volumePath):: self + __vsphereVolumeMixin({volumePath: volumePath}), - }, - vsphereVolumeType:: hidden.core.v1.vsphereVirtualDiskVolumeSource, - }, - }, - // PersistentVolumeStatus is the current status of a persistent volume. - persistentVolumeStatus:: { - new():: {}, - // A human-readable message indicating details about why the volume is in this state. - withMessage(message):: self + {message: message}, - // Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase - withPhase(phase):: self + {phase: phase}, - // Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI. - withReason(reason):: self + {reason: reason}, - mixin:: { - }, - }, - // Represents a Photon Controller persistent disk resource. - photonPersistentDiskVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + {fsType: fsType}, - // ID that identifies Photon Controller persistent disk - withPdId(pdId):: self + {pdID: pdId}, - mixin:: { - }, - }, - // Pod affinity is a group of inter pod affinity scheduling rules. - podAffinity:: { - new():: {}, - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}, - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - mixin:: { - }, - }, - // 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 tches that of any node on which a pod of the set of pods is running - podAffinityTerm:: { - new():: {}, - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - withNamespaces(namespaces):: self + if std.type(namespaces) == "array" then {namespaces: namespaces} else {namespaces: [namespaces]}, - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - withNamespacesMixin(namespaces):: self + if std.type(namespaces) == "array" then {namespaces+: namespaces} else {namespaces+: [namespaces]}, - // 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. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. - withTopologyKey(topologyKey):: self + {topologyKey: topologyKey}, - mixin:: { - // A label query over a set of resources, in this case pods. - labelSelector:: { - local __labelSelectorMixin(labelSelector) = {labelSelector+: labelSelector}, - mixinInstance(labelSelector):: __labelSelectorMixin(labelSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __labelSelectorMixin({matchExpressions: matchExpressions}) else __labelSelectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __labelSelectorMixin({matchExpressions+: matchExpressions}) else __labelSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __labelSelectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __labelSelectorMixin({matchLabels+: matchLabels}), - }, - labelSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // Pod anti affinity is a group of inter pod anti affinity scheduling rules. - podAntiAffinity:: { - new():: {}, - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}, - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then {preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution} else {preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}, - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then {requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution} else {requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - mixin:: { - }, - }, - // PodCondition contains details for the current condition of this pod. - podCondition:: { - new():: {}, - // Human-readable message indicating details about last transition. - withMessage(message):: self + {message: message}, - // Unique, one-word, CamelCase reason for the condition's last transition. - withReason(reason):: self + {reason: reason}, - // Type is the type of the condition. Currently only Ready. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - withType(type):: self + {type: type}, - mixin:: { - // Last time we probed the condition. - lastProbeTime:: { - local __lastProbeTimeMixin(lastProbeTime) = {lastProbeTime+: lastProbeTime}, - mixinInstance(lastProbeTime):: __lastProbeTimeMixin(lastProbeTime), - }, - lastProbeTimeType:: hidden.meta.v1.time, - // Last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // 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. - podSecurityContext:: { - new():: {}, - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + {fsGroup: fsGroup}, - // 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. - withRunAsNonRoot(runAsNonRoot):: self + {runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + {runAsUser: runAsUser}, - // 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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then {supplementalGroups: supplementalGroups} else {supplementalGroups: [supplementalGroups]}, - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then {supplementalGroups+: supplementalGroups} else {supplementalGroups+: [supplementalGroups]}, - mixin:: { - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = {seLinuxOptions+: seLinuxOptions}, - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - }, - // PodSpec is a description of a pod. - podSpec:: { - new():: {}, - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + {activeDeadlineSeconds: activeDeadlineSeconds}, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + {automountServiceAccountToken: automountServiceAccountToken}, - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then {containers: containers} else {containers: [containers]}, - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then {containers+: containers} else {containers+: [containers]}, - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + {dnsPolicy: dnsPolicy}, - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then {hostAliases: hostAliases} else {hostAliases: [hostAliases]}, - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then {hostAliases+: hostAliases} else {hostAliases+: [hostAliases]}, - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + {hostIPC: hostIpc}, - // 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. - withHostNetwork(hostNetwork):: self + {hostNetwork: hostNetwork}, - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + {hostPID: hostPid}, - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + {hostname: hostname}, - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then {imagePullSecrets: imagePullSecrets} else {imagePullSecrets: [imagePullSecrets]}, - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then {imagePullSecrets+: imagePullSecrets} else {imagePullSecrets+: [imagePullSecrets]}, - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then {initContainers: initContainers} else {initContainers: [initContainers]}, - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then {initContainers+: initContainers} else {initContainers+: [initContainers]}, - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + {nodeName: 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/ - withNodeSelector(nodeSelector):: self + {nodeSelector: nodeSelector}, - // 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/ - withNodeSelectorMixin(nodeSelector):: self + {nodeSelector+: nodeSelector}, - // 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. - withPriority(priority):: self + {priority: priority}, - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + {priorityClassName: priorityClassName}, - // 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 - withRestartPolicy(restartPolicy):: self + {restartPolicy: restartPolicy}, - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + {schedulerName: schedulerName}, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + {serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + {serviceAccountName: serviceAccountName}, - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + {subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + {terminationGracePeriodSeconds: terminationGracePeriodSeconds}, - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then {tolerations: tolerations} else {tolerations: [tolerations]}, - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then {tolerations+: tolerations} else {tolerations+: [tolerations]}, - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then {volumes: volumes} else {volumes: [volumes]}, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, - volumesType:: hidden.core.v1.volume, - mixin:: { - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = {affinity+: affinity}, - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. - securityContext:: { - local __securityContextMixin(securityContext) = {securityContext+: securityContext}, - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - }, - }, - // PodStatus represents information about the status of a pod. Status may trail the actual state of a system. - podStatus:: { - new():: {}, - // Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.core.v1.podCondition, - // The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - withContainerStatuses(containerStatuses):: self + if std.type(containerStatuses) == "array" then {containerStatuses: containerStatuses} else {containerStatuses: [containerStatuses]}, - // The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - withContainerStatusesMixin(containerStatuses):: self + if std.type(containerStatuses) == "array" then {containerStatuses+: containerStatuses} else {containerStatuses+: [containerStatuses]}, - containerStatusesType:: hidden.core.v1.containerStatus, - // IP address of the host to which the pod is assigned. Empty if not yet scheduled. - withHostIp(hostIp):: self + {hostIP: hostIp}, - // The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - withInitContainerStatuses(initContainerStatuses):: self + if std.type(initContainerStatuses) == "array" then {initContainerStatuses: initContainerStatuses} else {initContainerStatuses: [initContainerStatuses]}, - // The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - withInitContainerStatusesMixin(initContainerStatuses):: self + if std.type(initContainerStatuses) == "array" then {initContainerStatuses+: initContainerStatuses} else {initContainerStatuses+: [initContainerStatuses]}, - initContainerStatusesType:: hidden.core.v1.containerStatus, - // A human readable message indicating details about why the pod is in this condition. - withMessage(message):: self + {message: message}, - // Current condition of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase - withPhase(phase):: self + {phase: phase}, - // IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated. - withPodIp(podIp):: self + {podIP: podIp}, - // The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md - withQosClass(qosClass):: self + {qosClass: qosClass}, - // A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted' - withReason(reason):: self + {reason: reason}, - mixin:: { - // RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod. - startTime:: { - local __startTimeMixin(startTime) = {startTime+: startTime}, - mixinInstance(startTime):: __startTimeMixin(startTime), - }, - startTimeType:: hidden.meta.v1.time, - }, - }, - // PodTemplateSpec describes the data a pod should have when created from a template - podTemplateSpec:: { - new():: {}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = {metadata+: metadata}, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = {spec+: spec}, - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - }, - // PortworxVolumeSource represents a Portworx volume resource. - portworxVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // VolumeID uniquely identifies a Portworx volume - withVolumeId(volumeId):: self + {volumeID: volumeId}, - mixin:: { - }, - }, - // 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). - preferredSchedulingTerm:: { - new():: {}, - // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - withWeight(weight):: self + {weight: weight}, - mixin:: { - // A node selector term, associated with the corresponding weight. - preference:: { - local __preferenceMixin(preference) = {preference+: preference}, - mixinInstance(preference):: __preferenceMixin(preference), - // Required. A list of node selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __preferenceMixin({matchExpressions: matchExpressions}) else __preferenceMixin({matchExpressions: [matchExpressions]}), - // Required. A list of node selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __preferenceMixin({matchExpressions+: matchExpressions}) else __preferenceMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.core.v1.nodeSelectorRequirement, - }, - preferenceType:: hidden.core.v1.nodeSelectorTerm, - }, - }, - // Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. - probe:: { - new():: {}, - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - withFailureThreshold(failureThreshold):: self + {failureThreshold: failureThreshold}, - // 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 - withInitialDelaySeconds(initialDelaySeconds):: self + {initialDelaySeconds: initialDelaySeconds}, - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - withPeriodSeconds(periodSeconds):: self + {periodSeconds: periodSeconds}, - // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. - withSuccessThreshold(successThreshold):: self + {successThreshold: successThreshold}, - // 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 - withTimeoutSeconds(timeoutSeconds):: self + {timeoutSeconds: timeoutSeconds}, - mixin:: { - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = {exec+: exec}, - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == "array" then __execMixin({command: command}) else __execMixin({command: [command]}), - // 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. - withCommandMixin(command):: self + if std.type(command) == "array" then __execMixin({command+: command}) else __execMixin({command+: [command]}), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = {httpGet+: httpGet}, - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({host: host}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders: httpHeaders}) else __httpGetMixin({httpHeaders: [httpHeaders]}), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == "array" then __httpGetMixin({httpHeaders+: httpHeaders}) else __httpGetMixin({httpHeaders+: [httpHeaders]}), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({path: path}), - // 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. - withPort(port):: __httpGetMixin({port: port}), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({scheme: scheme}), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = {tcpSocket+: tcpSocket}, - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({host: host}), - // 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. - withPort(port):: __tcpSocketMixin({port: port}), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - }, - // Represents a projected volume source - projectedVolumeSource:: { - new():: {}, - // Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + {defaultMode: defaultMode}, - // list of volume projections - withSources(sources):: self + if std.type(sources) == "array" then {sources: sources} else {sources: [sources]}, - // list of volume projections - withSourcesMixin(sources):: self + if std.type(sources) == "array" then {sources+: sources} else {sources+: [sources]}, - sourcesType:: hidden.core.v1.volumeProjection, - mixin:: { - }, - }, - // Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling. - quobyteVolumeSource:: { - new():: {}, - // Group to map volume access to Default is no group - withGroup(group):: self + {group: group}, - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // 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 - withRegistry(registry):: self + {registry: registry}, - // User to map volume access to Defaults to serivceaccount user - withUser(user):: self + {user: user}, - // Volume is a string that references an already created Quobyte volume by name. - withVolume(volume):: self + {volume: volume}, - mixin:: { - }, - }, - // Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. - rbdVolumeSource:: { - new():: {}, - // 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 - withFsType(fsType):: self + {fsType: fsType}, - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withImage(image):: self + {image: image}, - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withKeyring(keyring):: self + {keyring: keyring}, - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == "array" then {monitors: monitors} else {monitors: [monitors]}, - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then {monitors+: monitors} else {monitors+: [monitors]}, - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withPool(pool):: self + {pool: pool}, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withUser(user):: self + {user: user}, - mixin:: { - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // ReplicationControllerCondition describes the state of a replication controller at a certain point. - replicationControllerCondition:: { - new():: {}, - // A human readable message indicating details about the transition. - withMessage(message):: self + {message: message}, - // The reason for the condition's last transition. - withReason(reason):: self + {reason: reason}, - // Type of replication controller condition. - withType(type):: self + {type: type}, - mixin:: { - // The last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // ReplicationControllerSpec is the specification of a replication controller. - replicationControllerSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: 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 - withReplicas(replicas):: self + {replicas: 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 - withSelector(selector):: self + {selector: selector}, - // 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 - withSelectorMixin(selector):: self + {selector+: selector}, - mixin:: { - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // ReplicationControllerStatus represents the current status of a replication controller. - replicationControllerStatus:: { - new():: {}, - // The number of available replicas (ready for at least minReadySeconds) for this replication controller. - withAvailableReplicas(availableReplicas):: self + {availableReplicas: availableReplicas}, - // Represents the latest available observations of a replication controller's current state. - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // Represents the latest available observations of a replication controller's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.core.v1.replicationControllerCondition, - // The number of pods that have labels matching the labels of the pod template of the replication controller. - withFullyLabeledReplicas(fullyLabeledReplicas):: self + {fullyLabeledReplicas: fullyLabeledReplicas}, - // ObservedGeneration reflects the generation of the most recently observed replication controller. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - // The number of ready replicas for this replication controller. - withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, - // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller - withReplicas(replicas):: self + {replicas: replicas}, - mixin:: { - }, - }, - // ResourceFieldSelector represents container resources (cpu, memory) and their output format - resourceFieldSelector:: { - new():: {}, - // Container name: required for volumes, optional for env vars - withContainerName(containerName):: self + {containerName: containerName}, - // Required: resource to select - withResource(resource):: self + {resource: resource}, - mixin:: { - // Specifies the output format of the exposed resources, defaults to "1" - divisor:: { - local __divisorMixin(divisor) = {divisor+: divisor}, - mixinInstance(divisor):: __divisorMixin(divisor), - }, - divisorType:: hidden.core.resource.quantity, - }, - }, - // ResourceQuotaSpec defines the desired hard limits to enforce for Quota. - resourceQuotaSpec:: { - new():: {}, - // Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md - withHard(hard):: self + {hard: hard}, - // Hard is the set of desired hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md - withHardMixin(hard):: self + {hard+: hard}, - // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. - withScopes(scopes):: self + if std.type(scopes) == "array" then {scopes: scopes} else {scopes: [scopes]}, - // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. - withScopesMixin(scopes):: self + if std.type(scopes) == "array" then {scopes+: scopes} else {scopes+: [scopes]}, - mixin:: { - }, - }, - // ResourceQuotaStatus defines the enforced hard limits and observed use. - resourceQuotaStatus:: { - new():: {}, - // Hard is the set of enforced hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md - withHard(hard):: self + {hard: hard}, - // Hard is the set of enforced hard limits for each named resource. More info: https://git.k8s.io/community/contributors/design-proposals/admission_control_resource_quota.md - withHardMixin(hard):: self + {hard+: hard}, - // Used is the current observed total usage of the resource in the namespace. - withUsed(used):: self + {used: used}, - // Used is the current observed total usage of the resource in the namespace. - withUsedMixin(used):: self + {used+: used}, - mixin:: { - }, - }, - // ResourceRequirements describes the compute resource requirements. - resourceRequirements:: { - new():: {}, - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimits(limits):: self + {limits: limits}, - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimitsMixin(limits):: self + {limits+: 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-compute-resources-container/ - withRequests(requests):: self + {requests: requests}, - // 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-compute-resources-container/ - withRequestsMixin(requests):: self + {requests+: requests}, - mixin:: { - }, - }, - // SELinuxOptions are the labels to be applied to the container - seLinuxOptions:: { - new():: {}, - // Level is SELinux level label that applies to the container. - withLevel(level):: self + {level: level}, - // Role is a SELinux role label that applies to the container. - withRole(role):: self + {role: role}, - // Type is a SELinux type label that applies to the container. - withType(type):: self + {type: type}, - // User is a SELinux user label that applies to the container. - withUser(user):: self + {user: user}, - mixin:: { - }, - }, - // ScaleIOVolumeSource represents a persistent ScaleIO volume - scaleIoVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + {fsType: fsType}, - // The host address of the ScaleIO API Gateway. - withGateway(gateway):: self + {gateway: gateway}, - // The name of the Protection Domain for the configured storage (defaults to "default"). - withProtectionDomain(protectionDomain):: self + {protectionDomain: protectionDomain}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // Flag to enable/disable SSL communication with Gateway, default false - withSslEnabled(sslEnabled):: self + {sslEnabled: sslEnabled}, - // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). - withStorageMode(storageMode):: self + {storageMode: storageMode}, - // The Storage Pool associated with the protection domain (defaults to "default"). - withStoragePool(storagePool):: self + {storagePool: storagePool}, - // The name of the storage system as configured in ScaleIO. - withSystem(system):: self + {system: system}, - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - withVolumeName(volumeName):: self + {volumeName: volumeName}, - mixin:: { - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // 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. - secretEnvSource:: { - new():: {}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + {name: name}, - // Specify whether the Secret must be defined - withOptional(optional):: self + {optional: optional}, - mixin:: { - }, - }, - // SecretKeySelector selects a key of a Secret. - secretKeySelector:: { - new():: {}, - // The key of the secret to select from. Must be a valid secret key. - withKey(key):: self + {key: key}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + {name: name}, - // Specify whether the Secret or it's key must be defined - withOptional(optional):: self + {optional: optional}, - mixin:: { - }, - }, - // 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. - secretProjection:: { - new():: {}, - // 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 '..'. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + {name: name}, - // Specify whether the Secret or its key must be defined - withOptional(optional):: self + {optional: optional}, - mixin:: { - }, - }, - // SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace - secretReference:: { - new():: {}, - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + {name: name}, - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + {namespace: namespace}, - mixin:: { - }, - }, - // 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. - secretVolumeSource:: { - new():: {}, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + {defaultMode: 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 '..'. - withItems(items):: self + if std.type(items) == "array" then {items: items} else {items: [items]}, - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == "array" then {items+: items} else {items+: [items]}, - itemsType:: hidden.core.v1.keyToPath, - // Specify whether the Secret or it's keys must be defined - withOptional(optional):: self + {optional: optional}, - // Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - withSecretName(secretName):: self + {secretName: secretName}, - mixin:: { - }, - }, - // 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. - securityContext:: { - new():: {}, - // 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 - withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + {allowPrivilegeEscalation: allowPrivilegeEscalation}, - // Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. - withPrivileged(privileged):: self + {privileged: privileged}, - // Whether this container has a read-only root filesystem. Default is false. - withReadOnlyRootFilesystem(readOnlyRootFilesystem):: self + {readOnlyRootFilesystem: readOnlyRootFilesystem}, - // 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. - withRunAsNonRoot(runAsNonRoot):: self + {runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + {runAsUser: runAsUser}, - mixin:: { - // The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. - capabilities:: { - local __capabilitiesMixin(capabilities) = {capabilities+: capabilities}, - mixinInstance(capabilities):: __capabilitiesMixin(capabilities), - // Added capabilities - withAdd(add):: self + if std.type(add) == "array" then __capabilitiesMixin({add: add}) else __capabilitiesMixin({add: [add]}), - // Added capabilities - withAddMixin(add):: self + if std.type(add) == "array" then __capabilitiesMixin({add+: add}) else __capabilitiesMixin({add+: [add]}), - // Removed capabilities - withDrop(drop):: self + if std.type(drop) == "array" then __capabilitiesMixin({drop: drop}) else __capabilitiesMixin({drop: [drop]}), - // Removed capabilities - withDropMixin(drop):: self + if std.type(drop) == "array" then __capabilitiesMixin({drop+: drop}) else __capabilitiesMixin({drop+: [drop]}), - }, - capabilitiesType:: hidden.core.v1.capabilities, - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = {seLinuxOptions+: seLinuxOptions}, - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - }, - // ServicePort contains information on service's port. - servicePort:: { - new(port, targetPort):: {} + self.withPort(port) + self.withTargetPort(targetPort), - newNamed(name, port, targetPort):: {} + self.withName(name) + self.withPort(port) + self.withTargetPort(targetPort), - // The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service. - withName(name):: self + {name: name}, - // The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - withNodePort(nodePort):: self + {nodePort: nodePort}, - // The port that will be exposed by this service. - withPort(port):: self + {port: port}, - // The IP protocol for this port. Supports "TCP" and "UDP". Default is TCP. - withProtocol(protocol):: self + {protocol: 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 - withTargetPort(targetPort):: {targetPort: targetPort}, - mixin:: { - }, - }, - // ServiceSpec describes the attributes that a user creates on a service. - serviceSpec:: { - new():: {}, - // clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - withClusterIp(clusterIp):: self + {clusterIP: clusterIp}, - // 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. - withExternalIps(externalIps):: self + if std.type(externalIps) == "array" then {externalIPs: externalIps} else {externalIPs: [externalIps]}, - // 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. - withExternalIpsMixin(externalIps):: self + if std.type(externalIps) == "array" then {externalIPs+: externalIps} else {externalIPs+: [externalIps]}, - // externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid DNS name and requires Type to be ExternalName. - withExternalName(externalName):: self + {externalName: 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. - withExternalTrafficPolicy(externalTrafficPolicy):: self + {externalTrafficPolicy: externalTrafficPolicy}, - // healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local. - withHealthCheckNodePort(healthCheckNodePort):: self + {healthCheckNodePort: healthCheckNodePort}, - // 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. - withLoadBalancerIp(loadBalancerIp):: self + {loadBalancerIP: 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/configure-cloud-provider-firewall/ - withLoadBalancerSourceRanges(loadBalancerSourceRanges):: self + if std.type(loadBalancerSourceRanges) == "array" then {loadBalancerSourceRanges: loadBalancerSourceRanges} else {loadBalancerSourceRanges: [loadBalancerSourceRanges]}, - // 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/configure-cloud-provider-firewall/ - withLoadBalancerSourceRangesMixin(loadBalancerSourceRanges):: self + if std.type(loadBalancerSourceRanges) == "array" then {loadBalancerSourceRanges+: loadBalancerSourceRanges} else {loadBalancerSourceRanges+: [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 - withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, - // 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 - withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - portsType:: hidden.core.v1.servicePort, - // publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery. This field will replace the service.alpha.kubernetes.io/tolerate-unready-endpoints when that annotation is deprecated and all clients have been converted to use this field. - withPublishNotReadyAddresses(publishNotReadyAddresses):: self + {publishNotReadyAddresses: 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. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ - withSelector(selector):: self + {selector: selector}, - // 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. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ - withSelectorMixin(selector):: self + {selector+: 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 - withSessionAffinity(sessionAffinity):: self + {sessionAffinity: sessionAffinity}, - // type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to the specified externalName. "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. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types - withType(type):: self + {type: type}, - mixin:: { - // sessionAffinityConfig contains the configurations of session affinity. - sessionAffinityConfig:: { - local __sessionAffinityConfigMixin(sessionAffinityConfig) = {sessionAffinityConfig+: sessionAffinityConfig}, - mixinInstance(sessionAffinityConfig):: __sessionAffinityConfigMixin(sessionAffinityConfig), - // clientIP contains the configurations of Client IP based session affinity. - clientIp:: { - local __clientIpMixin(clientIp) = __sessionAffinityConfigMixin({clientIP+: clientIp}), - mixinInstance(clientIp):: __clientIpMixin(clientIp), - // 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). - withTimeoutSeconds(timeoutSeconds):: self + __clientIpMixin({timeoutSeconds: timeoutSeconds}), - }, - clientIpType:: hidden.core.v1.clientIPConfig, - }, - sessionAffinityConfigType:: hidden.core.v1.sessionAffinityConfig, - }, - }, - // ServiceStatus represents the current status of a service. - serviceStatus:: { - new():: {}, - mixin:: { - // LoadBalancer contains the current status of the load-balancer, if one is present. - loadBalancer:: { - local __loadBalancerMixin(loadBalancer) = {loadBalancer+: loadBalancer}, - mixinInstance(loadBalancer):: __loadBalancerMixin(loadBalancer), - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngress(ingress):: self + if std.type(ingress) == "array" then __loadBalancerMixin({ingress: ingress}) else __loadBalancerMixin({ingress: [ingress]}), - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngressMixin(ingress):: self + if std.type(ingress) == "array" then __loadBalancerMixin({ingress+: ingress}) else __loadBalancerMixin({ingress+: [ingress]}), - ingressType:: hidden.core.v1.loadBalancerIngress, - }, - loadBalancerType:: hidden.core.v1.loadBalancerStatus, - }, - }, - // SessionAffinityConfig represents the configurations of session affinity. - sessionAffinityConfig:: { - new():: {}, - mixin:: { - // clientIP contains the configurations of Client IP based session affinity. - clientIp:: { - local __clientIpMixin(clientIp) = {clientIP+: clientIp}, - mixinInstance(clientIp):: __clientIpMixin(clientIp), - // 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). - withTimeoutSeconds(timeoutSeconds):: self + __clientIpMixin({timeoutSeconds: timeoutSeconds}), - }, - clientIpType:: hidden.core.v1.clientIPConfig, - }, - }, - // Represents a StorageOS persistent volume resource. - storageOSPersistentVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - withVolumeName(volumeName):: self + {volumeName: 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. - withVolumeNamespace(volumeNamespace):: self + {volumeNamespace: volumeNamespace}, - mixin:: { - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // 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. - withFieldPath(fieldPath):: self + __secretRefMixin({fieldPath: fieldPath}), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __secretRefMixin({namespace: namespace}), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __secretRefMixin({resourceVersion: resourceVersion}), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __secretRefMixin({uid: uid}), - }, - secretRefType:: hidden.core.v1.objectReference, - }, - }, - // Represents a StorageOS persistent volume resource. - storageOSVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + {fsType: fsType}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - withVolumeName(volumeName):: self + {volumeName: 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. - withVolumeNamespace(volumeNamespace):: self + {volumeNamespace: volumeNamespace}, - mixin:: { - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = {secretRef+: secretRef}, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // TCPSocketAction describes an action based on opening a socket - tcpSocketAction:: { - new():: {}, - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + {host: host}, - // 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. - withPort(port):: {port: port}, - mixin:: { - }, - }, - // The node this Taint is attached to has the "effect" on any pod that does not tolerate the Taint. - taint:: { - new():: {}, - // Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - withEffect(effect):: self + {effect: effect}, - // Required. The taint key to be applied to a node. - withKey(key):: self + {key: key}, - // Required. The taint value corresponding to the taint key. - withValue(value):: self + {value: value}, - mixin:: { - // TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints. - timeAdded:: { - local __timeAddedMixin(timeAdded) = {timeAdded+: timeAdded}, - mixinInstance(timeAdded):: __timeAddedMixin(timeAdded), - }, - timeAddedType:: hidden.meta.v1.time, - }, - }, - // The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - toleration:: { - new():: {}, - // Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - withEffect(effect):: self + {effect: 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. - withKey(key):: self + {key: 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. - withOperator(operator):: self + {operator: 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. - withTolerationSeconds(tolerationSeconds):: self + {tolerationSeconds: 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. - withValue(value):: self + {value: value}, - mixin:: { - }, - }, - // Volume represents a named volume in a pod that may be accessed by any container in the pod. - volume:: { - fromConfigMap(name, configMapName, configMapItems):: {} + self.withName(name) + self.mixin.configMap.withName(configMapName) + self.mixin.configMap.withItems(configMapItems), - fromEmptyDir(name, emptyDir={}):: {} + self.withName(name) + self.mixin.emptyDir.mixinInstance(emptyDir), - fromPersistentVolumeClaim(name, claimName):: {} + self.withName(name) + self.mixin.persistentVolumeClaim.withClaimName(claimName), - fromHostPath(name, hostPath):: {} + self.withName(name) + self.mixin.hostPath.withPath(hostPath), - fromSecret(name, secretName):: {} + self.withName(name) + self.mixin.secret.withSecretName(secretName), - // 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 - withName(name):: self + {name: name}, - mixin:: { - // 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:: { - local __awsElasticBlockStoreMixin(awsElasticBlockStore) = {awsElasticBlockStore+: awsElasticBlockStore}, - mixinInstance(awsElasticBlockStore):: __awsElasticBlockStoreMixin(awsElasticBlockStore), - // 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 - withFsType(fsType):: self + __awsElasticBlockStoreMixin({fsType: 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). - withPartition(partition):: self + __awsElasticBlockStoreMixin({partition: 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 - withReadOnly(readOnly):: self + __awsElasticBlockStoreMixin({readOnly: readOnly}), - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - withVolumeId(volumeId):: self + __awsElasticBlockStoreMixin({volumeID: volumeId}), - }, - awsElasticBlockStoreType:: hidden.core.v1.awsElasticBlockStoreVolumeSource, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk:: { - local __azureDiskMixin(azureDisk) = {azureDisk+: azureDisk}, - mixinInstance(azureDisk):: __azureDiskMixin(azureDisk), - // Host Caching mode: None, Read Only, Read Write. - withCachingMode(cachingMode):: self + __azureDiskMixin({cachingMode: cachingMode}), - // The Name of the data disk in the blob storage - withDiskName(diskName):: self + __azureDiskMixin({diskName: diskName}), - // The URI the data disk in the blob storage - withDiskUri(diskUri):: self + __azureDiskMixin({diskURI: diskUri}), - // 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. - withFsType(fsType):: self + __azureDiskMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __azureDiskMixin({readOnly: readOnly}), - }, - azureDiskType:: hidden.core.v1.azureDiskVolumeSource, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile:: { - local __azureFileMixin(azureFile) = {azureFile+: azureFile}, - mixinInstance(azureFile):: __azureFileMixin(azureFile), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __azureFileMixin({readOnly: readOnly}), - // the name of secret that contains Azure Storage Account Name and Key - withSecretName(secretName):: self + __azureFileMixin({secretName: secretName}), - // Share Name - withShareName(shareName):: self + __azureFileMixin({shareName: shareName}), - }, - azureFileType:: hidden.core.v1.azureFileVolumeSource, - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs:: { - local __cephfsMixin(cephfs) = {cephfs+: cephfs}, - mixinInstance(cephfs):: __cephfsMixin(cephfs), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == "array" then __cephfsMixin({monitors: monitors}) else __cephfsMixin({monitors: [monitors]}), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then __cephfsMixin({monitors+: monitors}) else __cephfsMixin({monitors+: [monitors]}), - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - withPath(path):: self + __cephfsMixin({path: path}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withReadOnly(readOnly):: self + __cephfsMixin({readOnly: readOnly}), - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withSecretFile(secretFile):: self + __cephfsMixin({secretFile: secretFile}), - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __cephfsMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withUser(user):: self + __cephfsMixin({user: user}), - }, - cephfsType:: hidden.core.v1.cephFsVolumeSource, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder:: { - local __cinderMixin(cinder) = {cinder+: cinder}, - mixinInstance(cinder):: __cinderMixin(cinder), - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withFsType(fsType):: self + __cinderMixin({fsType: fsType}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withReadOnly(readOnly):: self + __cinderMixin({readOnly: readOnly}), - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withVolumeId(volumeId):: self + __cinderMixin({volumeID: volumeId}), - }, - cinderType:: hidden.core.v1.cinderVolumeSource, - // ConfigMap represents a configMap that should populate this volume - configMap:: { - local __configMapMixin(configMap) = {configMap+: configMap}, - mixinInstance(configMap):: __configMapMixin(configMap), - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + __configMapMixin({defaultMode: 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 '..'. - withItems(items):: self + if std.type(items) == "array" then __configMapMixin({items: items}) else __configMapMixin({items: [items]}), - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == "array" then __configMapMixin({items+: items}) else __configMapMixin({items+: [items]}), - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapMixin({name: name}), - // Specify whether the ConfigMap or it's keys must be defined - withOptional(optional):: self + __configMapMixin({optional: optional}), - }, - configMapType:: hidden.core.v1.configMapVolumeSource, - // DownwardAPI represents downward API about the pod that should populate this volume - downwardApi:: { - local __downwardApiMixin(downwardApi) = {downwardAPI+: downwardApi}, - mixinInstance(downwardApi):: __downwardApiMixin(downwardApi), - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + __downwardApiMixin({defaultMode: defaultMode}), - // Items is a list of downward API volume file - withItems(items):: self + if std.type(items) == "array" then __downwardApiMixin({items: items}) else __downwardApiMixin({items: [items]}), - // Items is a list of downward API volume file - withItemsMixin(items):: self + if std.type(items) == "array" then __downwardApiMixin({items+: items}) else __downwardApiMixin({items+: [items]}), - itemsType:: hidden.core.v1.downwardApiVolumeFile, - }, - downwardApiType:: hidden.core.v1.downwardApiVolumeSource, - // EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - emptyDir:: { - local __emptyDirMixin(emptyDir) = {emptyDir+: emptyDir}, - mixinInstance(emptyDir):: __emptyDirMixin(emptyDir), - // 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 - withMedium(medium):: self + __emptyDirMixin({medium: 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:: { - local __sizeLimitMixin(sizeLimit) = __emptyDirMixin({sizeLimit+: sizeLimit}), - mixinInstance(sizeLimit):: __sizeLimitMixin(sizeLimit), - }, - sizeLimitType:: hidden.core.resource.quantity, - }, - emptyDirType:: hidden.core.v1.emptyDirVolumeSource, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc:: { - local __fcMixin(fc) = {fc+: fc}, - mixinInstance(fc):: __fcMixin(fc), - // 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. - withFsType(fsType):: self + __fcMixin({fsType: fsType}), - // Optional: FC target lun number - withLun(lun):: self + __fcMixin({lun: lun}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __fcMixin({readOnly: readOnly}), - // Optional: FC target worldwide names (WWNs) - withTargetWwns(targetWwns):: self + if std.type(targetWwns) == "array" then __fcMixin({targetWWNs: targetWwns}) else __fcMixin({targetWWNs: [targetWwns]}), - // Optional: FC target worldwide names (WWNs) - withTargetWwnsMixin(targetWwns):: self + if std.type(targetWwns) == "array" then __fcMixin({targetWWNs+: targetWwns}) else __fcMixin({targetWWNs+: [targetWwns]}), - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwids(wwids):: self + if std.type(wwids) == "array" then __fcMixin({wwids: wwids}) else __fcMixin({wwids: [wwids]}), - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwidsMixin(wwids):: self + if std.type(wwids) == "array" then __fcMixin({wwids+: wwids}) else __fcMixin({wwids+: [wwids]}), - }, - fcType:: hidden.core.v1.fcVolumeSource, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. This is an alpha feature and may change in future. - flexVolume:: { - local __flexVolumeMixin(flexVolume) = {flexVolume+: flexVolume}, - mixinInstance(flexVolume):: __flexVolumeMixin(flexVolume), - // Driver is the name of the driver to use for this volume. - withDriver(driver):: self + __flexVolumeMixin({driver: 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. - withFsType(fsType):: self + __flexVolumeMixin({fsType: fsType}), - // Optional: Extra command options if any. - withOptions(options):: self + __flexVolumeMixin({options: options}), - // Optional: Extra command options if any. - withOptionsMixin(options):: self + __flexVolumeMixin({options+: options}), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __flexVolumeMixin({readOnly: 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:: { - local __secretRefMixin(secretRef) = __flexVolumeMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - flexVolumeType:: hidden.core.v1.flexVolumeSource, - // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - flocker:: { - local __flockerMixin(flocker) = {flocker+: flocker}, - mixinInstance(flocker):: __flockerMixin(flocker), - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - withDatasetName(datasetName):: self + __flockerMixin({datasetName: datasetName}), - // UUID of the dataset. This is unique identifier of a Flocker dataset - withDatasetUuid(datasetUuid):: self + __flockerMixin({datasetUUID: datasetUuid}), - }, - flockerType:: hidden.core.v1.flockerVolumeSource, - // 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:: { - local __gcePersistentDiskMixin(gcePersistentDisk) = {gcePersistentDisk+: gcePersistentDisk}, - mixinInstance(gcePersistentDisk):: __gcePersistentDiskMixin(gcePersistentDisk), - // 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 - withFsType(fsType):: self + __gcePersistentDiskMixin({fsType: 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 - withPartition(partition):: self + __gcePersistentDiskMixin({partition: partition}), - // 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 - withPdName(pdName):: self + __gcePersistentDiskMixin({pdName: pdName}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - withReadOnly(readOnly):: self + __gcePersistentDiskMixin({readOnly: readOnly}), - }, - gcePersistentDiskType:: hidden.core.v1.gcePersistentDiskVolumeSource, - // GitRepo represents a git repository at a particular revision. - gitRepo:: { - local __gitRepoMixin(gitRepo) = {gitRepo+: gitRepo}, - mixinInstance(gitRepo):: __gitRepoMixin(gitRepo), - // 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. - withDirectory(directory):: self + __gitRepoMixin({directory: directory}), - // Repository URL - withRepository(repository):: self + __gitRepoMixin({repository: repository}), - // Commit hash for the specified revision. - withRevision(revision):: self + __gitRepoMixin({revision: revision}), - }, - gitRepoType:: hidden.core.v1.gitRepoVolumeSource, - // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs:: { - local __glusterfsMixin(glusterfs) = {glusterfs+: glusterfs}, - mixinInstance(glusterfs):: __glusterfsMixin(glusterfs), - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withEndpoints(endpoints):: self + __glusterfsMixin({endpoints: endpoints}), - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withPath(path):: self + __glusterfsMixin({path: path}), - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withReadOnly(readOnly):: self + __glusterfsMixin({readOnly: readOnly}), - }, - glusterfsType:: hidden.core.v1.glusterfsVolumeSource, - // 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:: { - local __hostPathMixin(hostPath) = {hostPath+: hostPath}, - mixinInstance(hostPath):: __hostPathMixin(hostPath), - // 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 - withPath(path):: self + __hostPathMixin({path: path}), - // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - withType(type):: self + __hostPathMixin({type: type}), - }, - hostPathType:: hidden.core.v1.hostPathVolumeSource, - // ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md - iscsi:: { - local __iscsiMixin(iscsi) = {iscsi+: iscsi}, - mixinInstance(iscsi):: __iscsiMixin(iscsi), - // whether support iSCSI Discovery CHAP authentication - withChapAuthDiscovery(chapAuthDiscovery):: self + __iscsiMixin({chapAuthDiscovery: chapAuthDiscovery}), - // whether support iSCSI Session CHAP authentication - withChapAuthSession(chapAuthSession):: self + __iscsiMixin({chapAuthSession: 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 - withFsType(fsType):: self + __iscsiMixin({fsType: fsType}), - // Custom iSCSI initiator name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - withInitiatorName(initiatorName):: self + __iscsiMixin({initiatorName: initiatorName}), - // Target iSCSI Qualified Name. - withIqn(iqn):: self + __iscsiMixin({iqn: iqn}), - // Optional: Defaults to 'default' (tcp). iSCSI interface name that uses an iSCSI transport. - withIscsiInterface(iscsiInterface):: self + __iscsiMixin({iscsiInterface: iscsiInterface}), - // iSCSI target lun number. - withLun(lun):: self + __iscsiMixin({lun: lun}), - // 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). - withPortals(portals):: self + if std.type(portals) == "array" then __iscsiMixin({portals: portals}) else __iscsiMixin({portals: [portals]}), - // 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). - withPortalsMixin(portals):: self + if std.type(portals) == "array" then __iscsiMixin({portals+: portals}) else __iscsiMixin({portals+: [portals]}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - withReadOnly(readOnly):: self + __iscsiMixin({readOnly: readOnly}), - // CHAP secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = __iscsiMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // 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). - withTargetPortal(targetPortal):: self + __iscsiMixin({targetPortal: targetPortal}), - }, - iscsiType:: hidden.core.v1.iscsiVolumeSource, - // 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:: { - local __nfsMixin(nfs) = {nfs+: nfs}, - mixinInstance(nfs):: __nfsMixin(nfs), - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withPath(path):: self + __nfsMixin({path: path}), - // 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 - withReadOnly(readOnly):: self + __nfsMixin({readOnly: readOnly}), - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withServer(server):: self + __nfsMixin({server: server}), - }, - nfsType:: hidden.core.v1.nfsVolumeSource, - // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - persistentVolumeClaim:: { - local __persistentVolumeClaimMixin(persistentVolumeClaim) = {persistentVolumeClaim+: persistentVolumeClaim}, - mixinInstance(persistentVolumeClaim):: __persistentVolumeClaimMixin(persistentVolumeClaim), - // 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 - withClaimName(claimName):: self + __persistentVolumeClaimMixin({claimName: claimName}), - // Will force the ReadOnly setting in VolumeMounts. Default false. - withReadOnly(readOnly):: self + __persistentVolumeClaimMixin({readOnly: readOnly}), - }, - persistentVolumeClaimType:: hidden.core.v1.persistentVolumeClaimVolumeSource, - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk:: { - local __photonPersistentDiskMixin(photonPersistentDisk) = {photonPersistentDisk+: photonPersistentDisk}, - mixinInstance(photonPersistentDisk):: __photonPersistentDiskMixin(photonPersistentDisk), - // 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. - withFsType(fsType):: self + __photonPersistentDiskMixin({fsType: fsType}), - // ID that identifies Photon Controller persistent disk - withPdId(pdId):: self + __photonPersistentDiskMixin({pdID: pdId}), - }, - photonPersistentDiskType:: hidden.core.v1.photonPersistentDiskVolumeSource, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume:: { - local __portworxVolumeMixin(portworxVolume) = {portworxVolume+: portworxVolume}, - mixinInstance(portworxVolume):: __portworxVolumeMixin(portworxVolume), - // 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. - withFsType(fsType):: self + __portworxVolumeMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __portworxVolumeMixin({readOnly: readOnly}), - // VolumeID uniquely identifies a Portworx volume - withVolumeId(volumeId):: self + __portworxVolumeMixin({volumeID: volumeId}), - }, - portworxVolumeType:: hidden.core.v1.portworxVolumeSource, - // Items for all in one resources secrets, configmaps, and downward API - projected:: { - local __projectedMixin(projected) = {projected+: projected}, - mixinInstance(projected):: __projectedMixin(projected), - // Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + __projectedMixin({defaultMode: defaultMode}), - // list of volume projections - withSources(sources):: self + if std.type(sources) == "array" then __projectedMixin({sources: sources}) else __projectedMixin({sources: [sources]}), - // list of volume projections - withSourcesMixin(sources):: self + if std.type(sources) == "array" then __projectedMixin({sources+: sources}) else __projectedMixin({sources+: [sources]}), - sourcesType:: hidden.core.v1.volumeProjection, - }, - projectedType:: hidden.core.v1.projectedVolumeSource, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte:: { - local __quobyteMixin(quobyte) = {quobyte+: quobyte}, - mixinInstance(quobyte):: __quobyteMixin(quobyte), - // Group to map volume access to Default is no group - withGroup(group):: self + __quobyteMixin({group: group}), - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - withReadOnly(readOnly):: self + __quobyteMixin({readOnly: readOnly}), - // 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 - withRegistry(registry):: self + __quobyteMixin({registry: registry}), - // User to map volume access to Defaults to serivceaccount user - withUser(user):: self + __quobyteMixin({user: user}), - // Volume is a string that references an already created Quobyte volume by name. - withVolume(volume):: self + __quobyteMixin({volume: volume}), - }, - quobyteType:: hidden.core.v1.quobyteVolumeSource, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd:: { - local __rbdMixin(rbd) = {rbd+: rbd}, - mixinInstance(rbd):: __rbdMixin(rbd), - // 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 - withFsType(fsType):: self + __rbdMixin({fsType: fsType}), - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withImage(image):: self + __rbdMixin({image: image}), - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withKeyring(keyring):: self + __rbdMixin({keyring: keyring}), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == "array" then __rbdMixin({monitors: monitors}) else __rbdMixin({monitors: [monitors]}), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == "array" then __rbdMixin({monitors+: monitors}) else __rbdMixin({monitors+: [monitors]}), - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withPool(pool):: self + __rbdMixin({pool: pool}), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withReadOnly(readOnly):: self + __rbdMixin({readOnly: readOnly}), - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __rbdMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withUser(user):: self + __rbdMixin({user: user}), - }, - rbdType:: hidden.core.v1.rbdVolumeSource, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIo:: { - local __scaleIoMixin(scaleIo) = {scaleIO+: scaleIo}, - mixinInstance(scaleIo):: __scaleIoMixin(scaleIo), - // 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. - withFsType(fsType):: self + __scaleIoMixin({fsType: fsType}), - // The host address of the ScaleIO API Gateway. - withGateway(gateway):: self + __scaleIoMixin({gateway: gateway}), - // The name of the Protection Domain for the configured storage (defaults to "default"). - withProtectionDomain(protectionDomain):: self + __scaleIoMixin({protectionDomain: protectionDomain}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __scaleIoMixin({readOnly: readOnly}), - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = __scaleIoMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // Flag to enable/disable SSL communication with Gateway, default false - withSslEnabled(sslEnabled):: self + __scaleIoMixin({sslEnabled: sslEnabled}), - // Indicates whether the storage for a volume should be thick or thin (defaults to "thin"). - withStorageMode(storageMode):: self + __scaleIoMixin({storageMode: storageMode}), - // The Storage Pool associated with the protection domain (defaults to "default"). - withStoragePool(storagePool):: self + __scaleIoMixin({storagePool: storagePool}), - // The name of the storage system as configured in ScaleIO. - withSystem(system):: self + __scaleIoMixin({system: system}), - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - withVolumeName(volumeName):: self + __scaleIoMixin({volumeName: volumeName}), - }, - scaleIoType:: hidden.core.v1.scaleIoVolumeSource, - // Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - secret:: { - local __secretMixin(secret) = {secret+: secret}, - mixinInstance(secret):: __secretMixin(secret), - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + __secretMixin({defaultMode: 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 '..'. - withItems(items):: self + if std.type(items) == "array" then __secretMixin({items: items}) else __secretMixin({items: [items]}), - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == "array" then __secretMixin({items+: items}) else __secretMixin({items+: [items]}), - itemsType:: hidden.core.v1.keyToPath, - // Specify whether the Secret or it's keys must be defined - withOptional(optional):: self + __secretMixin({optional: optional}), - // Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - withSecretName(secretName):: self + __secretMixin({secretName: secretName}), - }, - secretType:: hidden.core.v1.secretVolumeSource, - // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - storageos:: { - local __storageosMixin(storageos) = {storageos+: storageos}, - mixinInstance(storageos):: __storageosMixin(storageos), - // 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. - withFsType(fsType):: self + __storageosMixin({fsType: fsType}), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __storageosMixin({readOnly: readOnly}), - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = __storageosMixin({secretRef+: secretRef}), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({name: name}), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - withVolumeName(volumeName):: self + __storageosMixin({volumeName: 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. - withVolumeNamespace(volumeNamespace):: self + __storageosMixin({volumeNamespace: volumeNamespace}), - }, - storageosType:: hidden.core.v1.storageOSVolumeSource, - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume:: { - local __vsphereVolumeMixin(vsphereVolume) = {vsphereVolume+: vsphereVolume}, - mixinInstance(vsphereVolume):: __vsphereVolumeMixin(vsphereVolume), - // 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. - withFsType(fsType):: self + __vsphereVolumeMixin({fsType: fsType}), - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - withStoragePolicyId(storagePolicyId):: self + __vsphereVolumeMixin({storagePolicyID: storagePolicyId}), - // Storage Policy Based Management (SPBM) profile name. - withStoragePolicyName(storagePolicyName):: self + __vsphereVolumeMixin({storagePolicyName: storagePolicyName}), - // Path that identifies vSphere volume vmdk - withVolumePath(volumePath):: self + __vsphereVolumeMixin({volumePath: volumePath}), - }, - vsphereVolumeType:: hidden.core.v1.vsphereVirtualDiskVolumeSource, - }, - }, - // VolumeMount describes a mounting of a Volume within a container. - volumeMount:: { - new(name, mountPath, readOnly=false):: {} + self.withName(name) + self.withMountPath(mountPath) + self.withReadOnly(readOnly), - // Path within the container at which the volume should be mounted. Must not contain ':'. - withMountPath(mountPath):: self + {mountPath: mountPath}, - // mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationHostToContainer is used. This field is alpha in 1.8 and can be reworked or removed in a future release. - withMountPropagation(mountPropagation):: self + {mountPropagation: mountPropagation}, - // This must match the Name of a Volume. - withName(name):: self + {name: name}, - // Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - withReadOnly(readOnly):: self + {readOnly: readOnly}, - // Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). - withSubPath(subPath):: self + {subPath: subPath}, - mixin:: { - }, - }, - // Projection that may be projected along with other supported volume types - volumeProjection:: { - new():: {}, - mixin:: { - // information about the configMap data to project - configMap:: { - local __configMapMixin(configMap) = {configMap+: configMap}, - mixinInstance(configMap):: __configMapMixin(configMap), - // 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 '..'. - withItems(items):: self + if std.type(items) == "array" then __configMapMixin({items: items}) else __configMapMixin({items: [items]}), - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == "array" then __configMapMixin({items+: items}) else __configMapMixin({items+: [items]}), - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapMixin({name: name}), - // Specify whether the ConfigMap or it's keys must be defined - withOptional(optional):: self + __configMapMixin({optional: optional}), - }, - configMapType:: hidden.core.v1.configMapProjection, - // information about the downwardAPI data to project - downwardApi:: { - local __downwardApiMixin(downwardApi) = {downwardAPI+: downwardApi}, - mixinInstance(downwardApi):: __downwardApiMixin(downwardApi), - // Items is a list of DownwardAPIVolume file - withItems(items):: self + if std.type(items) == "array" then __downwardApiMixin({items: items}) else __downwardApiMixin({items: [items]}), - // Items is a list of DownwardAPIVolume file - withItemsMixin(items):: self + if std.type(items) == "array" then __downwardApiMixin({items+: items}) else __downwardApiMixin({items+: [items]}), - itemsType:: hidden.core.v1.downwardApiVolumeFile, - }, - downwardApiType:: hidden.core.v1.downwardApiProjection, - // information about the secret data to project - secret:: { - local __secretMixin(secret) = {secret+: secret}, - mixinInstance(secret):: __secretMixin(secret), - // 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 '..'. - withItems(items):: self + if std.type(items) == "array" then __secretMixin({items: items}) else __secretMixin({items: [items]}), - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == "array" then __secretMixin({items+: items}) else __secretMixin({items+: [items]}), - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretMixin({name: name}), - // Specify whether the Secret or its key must be defined - withOptional(optional):: self + __secretMixin({optional: optional}), - }, - secretType:: hidden.core.v1.secretProjection, - }, - }, - // Represents a vSphere volume resource. - vsphereVirtualDiskVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + {fsType: fsType}, - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - withStoragePolicyId(storagePolicyId):: self + {storagePolicyID: storagePolicyId}, - // Storage Policy Based Management (SPBM) profile name. - withStoragePolicyName(storagePolicyName):: self + {storagePolicyName: storagePolicyName}, - // Path that identifies vSphere volume vmdk - withVolumePath(volumePath):: self + {volumePath: volumePath}, - mixin:: { - }, - }, - // The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - weightedPodAffinityTerm:: { - new():: {}, - // weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - withWeight(weight):: self + {weight: weight}, - mixin:: { - // Required. A pod affinity term, associated with the corresponding weight. - podAffinityTerm:: { - local __podAffinityTermMixin(podAffinityTerm) = {podAffinityTerm+: podAffinityTerm}, - mixinInstance(podAffinityTerm):: __podAffinityTermMixin(podAffinityTerm), - // A label query over a set of resources, in this case pods. - labelSelector:: { - local __labelSelectorMixin(labelSelector) = __podAffinityTermMixin({labelSelector+: labelSelector}), - mixinInstance(labelSelector):: __labelSelectorMixin(labelSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __labelSelectorMixin({matchExpressions: matchExpressions}) else __labelSelectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __labelSelectorMixin({matchExpressions+: matchExpressions}) else __labelSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __labelSelectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __labelSelectorMixin({matchLabels+: matchLabels}), - }, - labelSelectorType:: hidden.meta.v1.labelSelector, - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - withNamespaces(namespaces):: self + if std.type(namespaces) == "array" then __podAffinityTermMixin({namespaces: namespaces}) else __podAffinityTermMixin({namespaces: [namespaces]}), - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - withNamespacesMixin(namespaces):: self + if std.type(namespaces) == "array" then __podAffinityTermMixin({namespaces+: namespaces}) else __podAffinityTermMixin({namespaces+: [namespaces]}), - // 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. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as "all topologies" ("all topologies" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed. - withTopologyKey(topologyKey):: self + __podAffinityTermMixin({topologyKey: topologyKey}), - }, - podAffinityTermType:: hidden.core.v1.podAffinityTerm, - }, - }, - }, - }, - extensions:: { - v1beta1:: { - local apiVersion = {apiVersion: "extensions/v1beta1"}, - // defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined. - allowedHostPath:: { - new():: {}, - // 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` - withPathPrefix(pathPrefix):: self + {pathPrefix: pathPrefix}, - mixin:: { - }, - }, - // DaemonSetSpec is the specification of a daemon set. - daemonSetSpec:: { - new():: {}, - // 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). - withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, - mixin:: { - // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = {updateStrategy+: updateStrategy}, - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDaemonSet, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. - withType(type):: self + __updateStrategyMixin({type: type}), - }, - updateStrategyType:: hidden.extensions.v1beta1.daemonSetUpdateStrategy, - }, - }, - // DaemonSetStatus represents the current status of a daemon set. - daemonSetStatus:: { - new():: {}, - // Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. - withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, - // The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withCurrentNumberScheduled(currentNumberScheduled):: self + {currentNumberScheduled: currentNumberScheduled}, - // The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withDesiredNumberScheduled(desiredNumberScheduled):: self + {desiredNumberScheduled: desiredNumberScheduled}, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds) - withNumberAvailable(numberAvailable):: self + {numberAvailable: numberAvailable}, - // The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withNumberMisscheduled(numberMisscheduled):: self + {numberMisscheduled: numberMisscheduled}, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. - withNumberReady(numberReady):: self + {numberReady: numberReady}, - // The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds) - withNumberUnavailable(numberUnavailable):: self + {numberUnavailable: numberUnavailable}, - // The most recent generation observed by the daemon set controller. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - // The total number of nodes that are running updated daemon pod - withUpdatedNumberScheduled(updatedNumberScheduled):: self + {updatedNumberScheduled: updatedNumberScheduled}, - mixin:: { - }, - }, - // - daemonSetUpdateStrategy:: { - new():: {}, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. - withType(type):: self + {type: type}, - mixin:: { - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDaemonSet, - }, - }, - // DeploymentCondition describes the state of a deployment at a certain point. - deploymentCondition:: { - new():: {}, - // A human readable message indicating details about the transition. - withMessage(message):: self + {message: message}, - // The reason for the condition's last transition. - withReason(reason):: self + {reason: reason}, - // Type of deployment condition. - withType(type):: self + {type: type}, - mixin:: { - // Last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - // The last time this condition was updated. - lastUpdateTime:: { - local __lastUpdateTimeMixin(lastUpdateTime) = {lastUpdateTime+: lastUpdateTime}, - mixinInstance(lastUpdateTime):: __lastUpdateTimeMixin(lastUpdateTime), - }, - lastUpdateTimeType:: hidden.meta.v1.time, - }, - }, - // DeploymentSpec is the specification of the desired behavior of the Deployment. - deploymentSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: minReadySeconds}, - // Indicates that the deployment is paused and will not be processed by the deployment controller. - withPaused(paused):: self + {paused: 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. This is not set by default. - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + {progressDeadlineSeconds: progressDeadlineSeconds}, - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + {replicas: replicas}, - // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. - withRevisionHistoryLimit(revisionHistoryLimit):: self + {revisionHistoryLimit: revisionHistoryLimit}, - mixin:: { - // DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = {rollbackTo+: rollbackTo}, - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + __rollbackToMixin({revision: revision}), - }, - rollbackToType:: hidden.extensions.v1beta1.rollbackConfig, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = {strategy+: strategy}, - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({rollingUpdate+: rollingUpdate}), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({type: type}), - }, - strategyType:: hidden.extensions.v1beta1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // DeploymentStatus is the most recently observed status of the Deployment. - deploymentStatus:: { - new():: {}, - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - withAvailableReplicas(availableReplicas):: self + {availableReplicas: availableReplicas}, - // Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. - withCollisionCount(collisionCount):: self + {collisionCount: collisionCount}, - // Represents the latest available observations of a deployment's current state. - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // Represents the latest available observations of a deployment's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.extensions.v1beta1.deploymentCondition, - // The generation observed by the deployment controller. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - // Total number of ready pods targeted by this deployment. - withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - withReplicas(replicas):: self + {replicas: replicas}, - // Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. - withUnavailableReplicas(unavailableReplicas):: self + {unavailableReplicas: unavailableReplicas}, - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - withUpdatedReplicas(updatedReplicas):: self + {updatedReplicas: updatedReplicas}, - mixin:: { - }, - }, - // DeploymentStrategy describes how to replace existing pods with new ones. - deploymentStrategy:: { - new():: {}, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + {type: type}, - mixin:: { - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = {rollingUpdate+: rollingUpdate}, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - withMaxSurge(maxSurge):: __rollingUpdateMixin({maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: __rollingUpdateMixin({maxUnavailable: maxUnavailable}), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDeployment, - }, - }, - // FSGroupStrategyOptions defines the strategy type and options used to create the strategy. - fsGroupStrategyOptions:: { - new():: {}, - // 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. - withRanges(ranges):: self + if std.type(ranges) == "array" then {ranges: ranges} else {ranges: [ranges]}, - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == "array" then {ranges+: ranges} else {ranges+: [ranges]}, - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - withRule(rule):: self + {rule: rule}, - mixin:: { - }, - }, - // HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend. - httpIngressPath:: { - new():: {}, - // Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) 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 '/'. If unspecified, the path defaults to a catch all sending traffic to the backend. - withPath(path):: self + {path: path}, - mixin:: { - // Backend defines the referenced service endpoint to which the traffic will be forwarded to. - backend:: { - local __backendMixin(backend) = {backend+: backend}, - mixinInstance(backend):: __backendMixin(backend), - // Specifies the name of the referenced service. - withServiceName(serviceName):: self + __backendMixin({serviceName: serviceName}), - // Specifies the port of the referenced service. - withServicePort(servicePort):: __backendMixin({servicePort: servicePort}), - }, - backendType:: hidden.extensions.v1beta1.ingressBackend, - }, - }, - // 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 '#'. - httpIngressRuleValue:: { - new():: {}, - // A collection of paths that map requests to backends. - withPaths(paths):: self + if std.type(paths) == "array" then {paths: paths} else {paths: [paths]}, - // A collection of paths that map requests to backends. - withPathsMixin(paths):: self + if std.type(paths) == "array" then {paths+: paths} else {paths+: [paths]}, - pathsType:: hidden.extensions.v1beta1.httpIngressPath, - mixin:: { - }, - }, - // Host Port Range 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. - hostPortRange:: { - new():: {}, - // max is the end of the range, inclusive. - withMax(max):: self + {max: max}, - // min is the start of the range, inclusive. - withMin(min):: self + {min: min}, - mixin:: { - }, - }, - // ID Range provides a min/max of an allowed range of IDs. - idRange:: { - new():: {}, - // Max is the end of the range, inclusive. - withMax(max):: self + {max: max}, - // Min is the start of the range, inclusive. - withMin(min):: self + {min: min}, - mixin:: { - }, - }, - // IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") 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. - ipBlock:: { - new():: {}, - // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" - withCidr(cidr):: self + {cidr: cidr}, - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExcept(except):: self + if std.type(except) == "array" then {except: except} else {except: [except]}, - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExceptMixin(except):: self + if std.type(except) == "array" then {except+: except} else {except+: [except]}, - mixin:: { - }, - }, - // IngressBackend describes all endpoints for a given service and port. - ingressBackend:: { - new():: {}, - // Specifies the name of the referenced service. - withServiceName(serviceName):: self + {serviceName: serviceName}, - // Specifies the port of the referenced service. - withServicePort(servicePort):: {servicePort: servicePort}, - mixin:: { - }, - }, - // 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. - ingressRule:: { - new():: {}, - // 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 the RFC: 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. - withHost(host):: self + {host: host}, - mixin:: { - // - http:: { - local __httpMixin(http) = {http+: http}, - mixinInstance(http):: __httpMixin(http), - // A collection of paths that map requests to backends. - withPaths(paths):: self + if std.type(paths) == "array" then __httpMixin({paths: paths}) else __httpMixin({paths: [paths]}), - // A collection of paths that map requests to backends. - withPathsMixin(paths):: self + if std.type(paths) == "array" then __httpMixin({paths+: paths}) else __httpMixin({paths+: [paths]}), - pathsType:: hidden.extensions.v1beta1.httpIngressPath, - }, - httpType:: hidden.extensions.v1beta1.httpIngressRuleValue, - }, - }, - // IngressSpec describes the Ingress the user wishes to exist. - ingressSpec:: { - new():: {}, - // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. - withRules(rules):: self + if std.type(rules) == "array" then {rules: rules} else {rules: [rules]}, - // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. - withRulesMixin(rules):: self + if std.type(rules) == "array" then {rules+: rules} else {rules+: [rules]}, - rulesType:: hidden.extensions.v1beta1.ingressRule, - // 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. - withTls(tls):: self + if std.type(tls) == "array" then {tls: tls} else {tls: [tls]}, - // 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. - withTlsMixin(tls):: self + if std.type(tls) == "array" then {tls+: tls} else {tls+: [tls]}, - tlsType:: hidden.extensions.v1beta1.ingressTls, - mixin:: { - // A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. - backend:: { - local __backendMixin(backend) = {backend+: backend}, - mixinInstance(backend):: __backendMixin(backend), - // Specifies the name of the referenced service. - withServiceName(serviceName):: self + __backendMixin({serviceName: serviceName}), - // Specifies the port of the referenced service. - withServicePort(servicePort):: __backendMixin({servicePort: servicePort}), - }, - backendType:: hidden.extensions.v1beta1.ingressBackend, - }, - }, - // IngressStatus describe the current state of the Ingress. - ingressStatus:: { - new():: {}, - mixin:: { - // LoadBalancer contains the current status of the load-balancer. - loadBalancer:: { - local __loadBalancerMixin(loadBalancer) = {loadBalancer+: loadBalancer}, - mixinInstance(loadBalancer):: __loadBalancerMixin(loadBalancer), - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngress(ingress):: self + if std.type(ingress) == "array" then __loadBalancerMixin({ingress: ingress}) else __loadBalancerMixin({ingress: [ingress]}), - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngressMixin(ingress):: self + if std.type(ingress) == "array" then __loadBalancerMixin({ingress+: ingress}) else __loadBalancerMixin({ingress+: [ingress]}), - ingressType:: hidden.core.v1.loadBalancerIngress, - }, - loadBalancerType:: hidden.core.v1.loadBalancerStatus, - }, - }, - // IngressTLS describes the transport layer security associated with an Ingress. - ingressTls:: { - new():: {}, - // 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. - withHosts(hosts):: self + if std.type(hosts) == "array" then {hosts: hosts} else {hosts: [hosts]}, - // 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. - withHostsMixin(hosts):: self + if std.type(hosts) == "array" then {hosts+: hosts} else {hosts+: [hosts]}, - // SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL 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. - withSecretName(secretName):: self + {secretName: secretName}, - mixin:: { - }, - }, - // 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 - networkPolicyEgressRule:: { - new():: {}, - // 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. - withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, - // 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. - withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - portsType:: hidden.extensions.v1beta1.networkPolicyPort, - // 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. - withTo(to):: self + if std.type(to) == "array" then {to: to} else {to: [to]}, - // 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. - withToMixin(to):: self + if std.type(to) == "array" then {to+: to} else {to+: [to]}, - toType:: hidden.extensions.v1beta1.networkPolicyPeer, - mixin:: { - }, - }, - // This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from. - networkPolicyIngressRule:: { - new():: {}, - // 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list. - withFrom(from):: self + if std.type(from) == "array" then {from: from} else {from: [from]}, - // 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list. - withFromMixin(from):: self + if std.type(from) == "array" then {from+: from} else {from+: [from]}, - fromType:: hidden.extensions.v1beta1.networkPolicyPeer, - // 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. - withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, - // 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. - withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - portsType:: hidden.extensions.v1beta1.networkPolicyPort, - mixin:: { - }, - }, - // - networkPolicyPeer:: { - new():: {}, - mixin:: { - // IPBlock defines policy on a particular IPBlock - ipBlock:: { - local __ipBlockMixin(ipBlock) = {ipBlock+: ipBlock}, - mixinInstance(ipBlock):: __ipBlockMixin(ipBlock), - // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" - withCidr(cidr):: self + __ipBlockMixin({cidr: cidr}), - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExcept(except):: self + if std.type(except) == "array" then __ipBlockMixin({except: except}) else __ipBlockMixin({except: [except]}), - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExceptMixin(except):: self + if std.type(except) == "array" then __ipBlockMixin({except+: except}) else __ipBlockMixin({except+: [except]}), - }, - ipBlockType:: hidden.extensions.v1beta1.ipBlock, - // Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. - namespaceSelector:: { - local __namespaceSelectorMixin(namespaceSelector) = {namespaceSelector+: namespaceSelector}, - mixinInstance(namespaceSelector):: __namespaceSelectorMixin(namespaceSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __namespaceSelectorMixin({matchExpressions: matchExpressions}) else __namespaceSelectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __namespaceSelectorMixin({matchExpressions+: matchExpressions}) else __namespaceSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __namespaceSelectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __namespaceSelectorMixin({matchLabels+: matchLabels}), - }, - namespaceSelectorType:: hidden.meta.v1.labelSelector, - // This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - podSelector:: { - local __podSelectorMixin(podSelector) = {podSelector+: podSelector}, - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions: matchExpressions}) else __podSelectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __podSelectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({matchLabels+: matchLabels}), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // - networkPolicyPort:: { - new():: {}, - // If specified, 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. - withPort(port):: {port: port}, - // Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP. - withProtocol(protocol):: self + {protocol: protocol}, - mixin:: { - }, - }, - // - networkPolicySpec:: { - new():: {}, - // 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 - withEgress(egress):: self + if std.type(egress) == "array" then {egress: egress} else {egress: [egress]}, - // 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 - withEgressMixin(egress):: self + if std.type(egress) == "array" then {egress+: egress} else {egress+: [egress]}, - egressType:: hidden.extensions.v1beta1.networkPolicyEgressRule, - // 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 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). - withIngress(ingress):: self + if std.type(ingress) == "array" then {ingress: ingress} else {ingress: [ingress]}, - // 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 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). - withIngressMixin(ingress):: self + if std.type(ingress) == "array" then {ingress+: ingress} else {ingress+: [ingress]}, - ingressType:: hidden.extensions.v1beta1.networkPolicyIngressRule, - // 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 - withPolicyTypes(policyTypes):: self + if std.type(policyTypes) == "array" then {policyTypes: policyTypes} else {policyTypes: [policyTypes]}, - // 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 - withPolicyTypesMixin(policyTypes):: self + if std.type(policyTypes) == "array" then {policyTypes+: policyTypes} else {policyTypes+: [policyTypes]}, - mixin:: { - // 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:: { - local __podSelectorMixin(podSelector) = {podSelector+: podSelector}, - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions: matchExpressions}) else __podSelectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __podSelectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({matchLabels+: matchLabels}), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // Pod Security Policy Spec defines the policy enforced. - podSecurityPolicySpec:: { - new():: {}, - // AllowPrivilegeEscalation determines if a pod can request to allow privilege escalation. - withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + {allowPrivilegeEscalation: allowPrivilegeEscalation}, - // 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. - withAllowedCapabilities(allowedCapabilities):: self + if std.type(allowedCapabilities) == "array" then {allowedCapabilities: allowedCapabilities} else {allowedCapabilities: [allowedCapabilities]}, - // 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. - withAllowedCapabilitiesMixin(allowedCapabilities):: self + if std.type(allowedCapabilities) == "array" then {allowedCapabilities+: allowedCapabilities} else {allowedCapabilities+: [allowedCapabilities]}, - // is a white list of allowed host paths. Empty indicates that all host paths may be used. - withAllowedHostPaths(allowedHostPaths):: self + if std.type(allowedHostPaths) == "array" then {allowedHostPaths: allowedHostPaths} else {allowedHostPaths: [allowedHostPaths]}, - // is a white list of allowed host paths. Empty indicates that all host paths may be used. - withAllowedHostPathsMixin(allowedHostPaths):: self + if std.type(allowedHostPaths) == "array" then {allowedHostPaths+: allowedHostPaths} else {allowedHostPaths+: [allowedHostPaths]}, - allowedHostPathsType:: hidden.extensions.v1beta1.allowedHostPath, - // 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 capabiility in both DefaultAddCapabilities and RequiredDropCapabilities. - withDefaultAddCapabilities(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == "array" then {defaultAddCapabilities: defaultAddCapabilities} else {defaultAddCapabilities: [defaultAddCapabilities]}, - // 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 capabiility in both DefaultAddCapabilities and RequiredDropCapabilities. - withDefaultAddCapabilitiesMixin(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == "array" then {defaultAddCapabilities+: defaultAddCapabilities} else {defaultAddCapabilities+: [defaultAddCapabilities]}, - // DefaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process. - withDefaultAllowPrivilegeEscalation(defaultAllowPrivilegeEscalation):: self + {defaultAllowPrivilegeEscalation: defaultAllowPrivilegeEscalation}, - // hostIPC determines if the policy allows the use of HostIPC in the pod spec. - withHostIpc(hostIpc):: self + {hostIPC: hostIpc}, - // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. - withHostNetwork(hostNetwork):: self + {hostNetwork: hostNetwork}, - // hostPID determines if the policy allows the use of HostPID in the pod spec. - withHostPid(hostPid):: self + {hostPID: hostPid}, - // hostPorts determines which host port ranges are allowed to be exposed. - withHostPorts(hostPorts):: self + if std.type(hostPorts) == "array" then {hostPorts: hostPorts} else {hostPorts: [hostPorts]}, - // hostPorts determines which host port ranges are allowed to be exposed. - withHostPortsMixin(hostPorts):: self + if std.type(hostPorts) == "array" then {hostPorts+: hostPorts} else {hostPorts+: [hostPorts]}, - hostPortsType:: hidden.extensions.v1beta1.hostPortRange, - // privileged determines if a pod can request to be run as privileged. - withPrivileged(privileged):: self + {privileged: 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. - withReadOnlyRootFilesystem(readOnlyRootFilesystem):: self + {readOnlyRootFilesystem: readOnlyRootFilesystem}, - // RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - withRequiredDropCapabilities(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == "array" then {requiredDropCapabilities: requiredDropCapabilities} else {requiredDropCapabilities: [requiredDropCapabilities]}, - // RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - withRequiredDropCapabilitiesMixin(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == "array" then {requiredDropCapabilities+: requiredDropCapabilities} else {requiredDropCapabilities+: [requiredDropCapabilities]}, - // volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used. - withVolumes(volumes):: self + if std.type(volumes) == "array" then {volumes: volumes} else {volumes: [volumes]}, - // volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used. - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, - mixin:: { - // FSGroup is the strategy that will dictate what fs group is used by the SecurityContext. - fsGroup:: { - local __fsGroupMixin(fsGroup) = {fsGroup+: fsGroup}, - mixinInstance(fsGroup):: __fsGroupMixin(fsGroup), - // 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. - withRanges(ranges):: self + if std.type(ranges) == "array" then __fsGroupMixin({ranges: ranges}) else __fsGroupMixin({ranges: [ranges]}), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == "array" then __fsGroupMixin({ranges+: ranges}) else __fsGroupMixin({ranges+: [ranges]}), - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - withRule(rule):: self + __fsGroupMixin({rule: rule}), - }, - fsGroupType:: hidden.extensions.v1beta1.fsGroupStrategyOptions, - // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. - runAsUser:: { - local __runAsUserMixin(runAsUser) = {runAsUser+: runAsUser}, - mixinInstance(runAsUser):: __runAsUserMixin(runAsUser), - // Ranges are the allowed ranges of uids that may be used. - withRanges(ranges):: self + if std.type(ranges) == "array" then __runAsUserMixin({ranges: ranges}) else __runAsUserMixin({ranges: [ranges]}), - // Ranges are the allowed ranges of uids that may be used. - withRangesMixin(ranges):: self + if std.type(ranges) == "array" then __runAsUserMixin({ranges+: ranges}) else __runAsUserMixin({ranges+: [ranges]}), - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. - withRule(rule):: self + __runAsUserMixin({rule: rule}), - }, - runAsUserType:: hidden.extensions.v1beta1.runAsUserStrategyOptions, - // seLinux is the strategy that will dictate the allowable labels that may be set. - seLinux:: { - local __seLinuxMixin(seLinux) = {seLinux+: seLinux}, - mixinInstance(seLinux):: __seLinuxMixin(seLinux), - // type is the strategy that will dictate the allowable labels that may be set. - withRule(rule):: self + __seLinuxMixin({rule: rule}), - // seLinuxOptions required to run as; required for MustRunAs More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md - seLinuxOptions:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __seLinuxMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - seLinuxType:: hidden.extensions.v1beta1.seLinuxStrategyOptions, - // SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. - supplementalGroups:: { - local __supplementalGroupsMixin(supplementalGroups) = {supplementalGroups+: supplementalGroups}, - mixinInstance(supplementalGroups):: __supplementalGroupsMixin(supplementalGroups), - // 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. - withRanges(ranges):: self + if std.type(ranges) == "array" then __supplementalGroupsMixin({ranges: ranges}) else __supplementalGroupsMixin({ranges: [ranges]}), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == "array" then __supplementalGroupsMixin({ranges+: ranges}) else __supplementalGroupsMixin({ranges+: [ranges]}), - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - withRule(rule):: self + __supplementalGroupsMixin({rule: rule}), - }, - supplementalGroupsType:: hidden.extensions.v1beta1.supplementalGroupsStrategyOptions, - }, - }, - // ReplicaSetCondition describes the state of a replica set at a certain point. - replicaSetCondition:: { - new():: {}, - // A human readable message indicating details about the transition. - withMessage(message):: self + {message: message}, - // The reason for the condition's last transition. - withReason(reason):: self + {reason: reason}, - // Type of replica set condition. - withType(type):: self + {type: type}, - mixin:: { - // The last time the condition transitioned from one status to another. - lastTransitionTime:: { - local __lastTransitionTimeMixin(lastTransitionTime) = {lastTransitionTime+: lastTransitionTime}, - mixinInstance(lastTransitionTime):: __lastTransitionTimeMixin(lastTransitionTime), - }, - lastTransitionTimeType:: hidden.meta.v1.time, - }, - }, - // ReplicaSetSpec is the specification of a ReplicaSet. - replicaSetSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + {minReadySeconds: 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 - withReplicas(replicas):: self + {replicas: replicas}, - mixin:: { - // Selector is a label query over pods that should match the replica count. If the 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 replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = {template+: template}, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({metadata+: metadata}), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({annotations: annotations}), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({clusterName: clusterName}), - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + __metadataMixin({deletionGracePeriodSeconds: deletionGracePeriodSeconds}), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers: finalizers}) else __metadataMixin({finalizers: [finalizers]}), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then __metadataMixin({finalizers+: finalizers}) else __metadataMixin({finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({generateName: generateName}), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({initializers+: initializers}), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({labels: labels}), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({labels+: labels}), - // 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 - withName(name):: self + __metadataMixin({name: name}), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({namespace: namespace}), - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({spec+: spec}), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({activeDeadlineSeconds: activeDeadlineSeconds}), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({affinity+: affinity}), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({nodeAffinity+: nodeAffinity}), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __nodeAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms: [nodeSelectorTerms]}), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == "array" then __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: nodeSelectorTerms}) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({nodeSelectorTerms+: [nodeSelectorTerms]}), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({podAffinity+: podAffinity}), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({podAntiAffinity+: podAntiAffinity}), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution]}), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution]}), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == "array" then __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution}) else __podAntiAffinityMixin({requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution]}), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({automountServiceAccountToken: automountServiceAccountToken}), - // 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. - withContainers(containers):: self + if std.type(containers) == "array" then __specMixin({containers: containers}) else __specMixin({containers: [containers]}), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == "array" then __specMixin({containers+: containers}) else __specMixin({containers+: [containers]}), - containersType:: hidden.core.v1.container, - // Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to "ClusterFirst". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - withDnsPolicy(dnsPolicy):: self + __specMixin({dnsPolicy: dnsPolicy}), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases: hostAliases}) else __specMixin({hostAliases: [hostAliases]}), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == "array" then __specMixin({hostAliases+: hostAliases}) else __specMixin({hostAliases+: [hostAliases]}), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({hostIPC: hostIpc}), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({hostNetwork: hostNetwork}), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({hostPID: hostPid}), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({hostname: hostname}), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets: imagePullSecrets}) else __specMixin({imagePullSecrets: [imagePullSecrets]}), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == "array" then __specMixin({imagePullSecrets+: imagePullSecrets}) else __specMixin({imagePullSecrets+: [imagePullSecrets]}), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers: initContainers}) else __specMixin({initContainers: [initContainers]}), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == "array" then __specMixin({initContainers+: initContainers}) else __specMixin({initContainers+: [initContainers]}), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({nodeSelector: nodeSelector}), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({nodeSelector+: nodeSelector}), - // 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. - withPriority(priority):: self + __specMixin({priority: priority}), - // If specified, indicates the pod's priority. "SYSTEM" is a special keyword which indicates 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. - withPriorityClassName(priorityClassName):: self + __specMixin({priorityClassName: priorityClassName}), - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({restartPolicy: restartPolicy}), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({securityContext+: securityContext}), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({fsGroup: fsGroup}), - // 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({runAsUser: runAsUser}), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({seLinuxOptions+: seLinuxOptions}), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups: supplementalGroups}) else __securityContextMixin({supplementalGroups: [supplementalGroups]}), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == "array" then __securityContextMixin({supplementalGroups+: supplementalGroups}) else __securityContextMixin({supplementalGroups+: [supplementalGroups]}), - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({serviceAccountName: serviceAccountName}), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({terminationGracePeriodSeconds: terminationGracePeriodSeconds}), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations: tolerations}) else __specMixin({tolerations: [tolerations]}), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == "array" then __specMixin({tolerations+: tolerations}) else __specMixin({tolerations+: [tolerations]}), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes: volumes}) else __specMixin({volumes: [volumes]}), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then __specMixin({volumes+: volumes}) else __specMixin({volumes+: [volumes]}), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // ReplicaSetStatus represents the current status of a ReplicaSet. - replicaSetStatus:: { - new():: {}, - // The number of available replicas (ready for at least minReadySeconds) for this replica set. - withAvailableReplicas(availableReplicas):: self + {availableReplicas: availableReplicas}, - // Represents the latest available observations of a replica set's current state. - withConditions(conditions):: self + if std.type(conditions) == "array" then {conditions: conditions} else {conditions: [conditions]}, - // Represents the latest available observations of a replica set's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == "array" then {conditions+: conditions} else {conditions+: [conditions]}, - conditionsType:: hidden.extensions.v1beta1.replicaSetCondition, - // The number of pods that have labels matching the labels of the pod template of the replicaset. - withFullyLabeledReplicas(fullyLabeledReplicas):: self + {fullyLabeledReplicas: fullyLabeledReplicas}, - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - // The number of ready replicas for this replica set. - withReadyReplicas(readyReplicas):: self + {readyReplicas: readyReplicas}, - // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller - withReplicas(replicas):: self + {replicas: replicas}, - mixin:: { - }, - }, - // DEPRECATED. - rollbackConfig:: { - new():: {}, - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + {revision: revision}, - mixin:: { - }, - }, - // Spec to control the desired behavior of daemon set rolling update. - rollingUpdateDaemonSet:: { - new():: {}, - // 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. 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. - withMaxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, - mixin:: { - }, - }, - // Spec to control the desired behavior of rolling update. - rollingUpdateDeployment:: { - new():: {}, - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of desired pods. - withMaxSurge(maxSurge):: {maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: {maxUnavailable: maxUnavailable}, - mixin:: { - }, - }, - // Run A sUser Strategy Options defines the strategy type and any options used to create the strategy. - runAsUserStrategyOptions:: { - new():: {}, - // Ranges are the allowed ranges of uids that may be used. - withRanges(ranges):: self + if std.type(ranges) == "array" then {ranges: ranges} else {ranges: [ranges]}, - // Ranges are the allowed ranges of uids that may be used. - withRangesMixin(ranges):: self + if std.type(ranges) == "array" then {ranges+: ranges} else {ranges+: [ranges]}, - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate the allowable RunAsUser values that may be set. - withRule(rule):: self + {rule: rule}, - mixin:: { - }, - }, - // SELinux Strategy Options defines the strategy type and any options used to create the strategy. - seLinuxStrategyOptions:: { - new():: {}, - // type is the strategy that will dictate the allowable labels that may be set. - withRule(rule):: self + {rule: rule}, - mixin:: { - // seLinuxOptions required to run as; required for MustRunAs More info: https://git.k8s.io/community/contributors/design-proposals/security_context.md - seLinuxOptions:: { - local __seLinuxOptionsMixin(seLinuxOptions) = {seLinuxOptions+: seLinuxOptions}, - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({level: level}), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({role: role}), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({type: type}), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({user: user}), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - }, - // describes the attributes of a scale subresource - scaleSpec:: { - new():: {}, - // desired number of instances for the scaled object. - withReplicas(replicas):: self + {replicas: replicas}, - mixin:: { - }, - }, - // represents the current status of a scale subresource. - scaleStatus:: { - new():: {}, - // actual number of observed instances of the scaled object. - withReplicas(replicas):: self + {replicas: replicas}, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelector(selector):: self + {selector: selector}, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelectorMixin(selector):: self + {selector+: selector}, - // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - withTargetSelector(targetSelector):: self + {targetSelector: targetSelector}, - mixin:: { - }, - }, - // SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. - supplementalGroupsStrategyOptions:: { - new():: {}, - // 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. - withRanges(ranges):: self + if std.type(ranges) == "array" then {ranges: ranges} else {ranges: [ranges]}, - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == "array" then {ranges+: ranges} else {ranges+: [ranges]}, - rangesType:: hidden.extensions.v1beta1.idRange, - // Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - withRule(rule):: self + {rule: rule}, - mixin:: { - }, - }, - }, - }, - meta:: { - v1:: { - local apiVersion = {apiVersion: "meta/v1"}, - // APIResource specifies the name of a resource and whether it is namespaced. - apiResource:: { - new():: {}, - // categories is a list of the grouped resources this resource belongs to (e.g. 'all') - withCategories(categories):: self + if std.type(categories) == "array" then {categories: categories} else {categories: [categories]}, - // categories is a list of the grouped resources this resource belongs to (e.g. 'all') - withCategoriesMixin(categories):: self + if std.type(categories) == "array" then {categories+: categories} else {categories+: [categories]}, - // group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale". - withGroup(group):: self + {group: group}, - // name is the plural name of the resource. - withName(name):: self + {name: name}, - // namespaced indicates if a resource is namespaced or not. - withNamespaced(namespaced):: self + {namespaced: namespaced}, - // shortNames is a list of suggested short names of the resource. - withShortNames(shortNames):: self + if std.type(shortNames) == "array" then {shortNames: shortNames} else {shortNames: [shortNames]}, - // shortNames is a list of suggested short names of the resource. - withShortNamesMixin(shortNames):: self + if std.type(shortNames) == "array" then {shortNames+: shortNames} else {shortNames+: [shortNames]}, - // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface. - withSingularName(singularName):: self + {singularName: singularName}, - // verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) - withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, - // verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) - withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - // version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)". - withVersion(version):: self + {version: version}, - mixin:: { - }, - }, - // GroupVersion contains the "group/version" and "version" string of a version. It is made a struct to keep extensibility. - groupVersionForDiscovery:: { - new():: {}, - // groupVersion specifies the API group and version in the form "group/version" - withGroupVersion(groupVersion):: self + {groupVersion: groupVersion}, - // version specifies the version in the form of "version". This is to save the clients the trouble of splitting the GroupVersion. - withVersion(version):: self + {version: version}, - mixin:: { - }, - }, - // Initializer is information about an initializer that has not yet completed. - initializer:: { - new():: {}, - // name of the process that is responsible for initializing this object. - withName(name):: self + {name: name}, - mixin:: { - }, - }, - // Initializers tracks the progress of initialization. - initializers:: { - new():: {}, - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then {pending: pending} else {pending: [pending]}, - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then {pending+: pending} else {pending+: [pending]}, - pendingType:: hidden.meta.v1.initializer, - mixin:: { - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = {result+: result}, - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - }, - // 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. - labelSelector:: { - new():: {}, - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then {matchExpressions: matchExpressions} else {matchExpressions: [matchExpressions]}, - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then {matchExpressions+: matchExpressions} else {matchExpressions+: [matchExpressions]}, - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + {matchLabels: matchLabels}, - // 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. - withMatchLabelsMixin(matchLabels):: self + {matchLabels+: matchLabels}, - mixin:: { - }, - }, - // A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - labelSelectorRequirement:: { - new():: {}, - // key is the label key that the selector applies to. - withKey(key):: self + {key: key}, - // operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - withOperator(operator):: self + {operator: 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. - withValues(values):: self + if std.type(values) == "array" then {values: values} else {values: [values]}, - // 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. - withValuesMixin(values):: self + if std.type(values) == "array" then {values+: values} else {values+: [values]}, - mixin:: { - }, - }, - // ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. - listMeta:: { - new():: {}, - // 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 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. - withContinue(continue):: self + {continue: continue}, - // 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/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + {resourceVersion: resourceVersion}, - // selfLink is a URL representing this object. Populated by the system. Read-only. - withSelfLink(selfLink):: self + {selfLink: selfLink}, - mixin:: { - }, - }, - // ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. - objectMeta:: { - new():: {}, - // 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 - withAnnotations(annotations):: self + {annotations: annotations}, - // 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 - withAnnotationsMixin(annotations):: self + {annotations+: 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. - withClusterName(clusterName):: self + {clusterName: clusterName}, - // 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. - withDeletionGracePeriodSeconds(deletionGracePeriodSeconds):: self + {deletionGracePeriodSeconds: deletionGracePeriodSeconds}, - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == "array" then {finalizers: finalizers} else {finalizers: [finalizers]}, - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == "array" then {finalizers+: finalizers} else {finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + {generateName: generateName}, - // 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 - withLabels(labels):: self + {labels: labels}, - // 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 - withLabelsMixin(labels):: self + {labels+: labels}, - // 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 - withName(name):: self + {name: name}, - // Namespace defines the space within 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 - withNamespace(namespace):: self + {namespace: namespace}, - mixin:: { - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - initializers:: { - local __initializersMixin(initializers) = {initializers+: initializers}, - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending: pending}) else __initializersMixin({pending: [pending]}), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == "array" then __initializersMixin({pending+: pending}) else __initializersMixin({pending+: [pending]}), - pendingType:: hidden.meta.v1.initializer, - // If result is set with the Failure field, the object will be persisted to storage and then deleted, ensuring that other clients can observe the deletion. - result:: { - local __resultMixin(result) = __initializersMixin({result+: result}), - mixinInstance(result):: __resultMixin(result), - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + __resultMixin({code: 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:: { - local __detailsMixin(details) = __resultMixin({details+: details}), - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes: causes}) else __detailsMixin({causes: [causes]}), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then __detailsMixin({causes+: causes}) else __detailsMixin({causes+: [causes]}), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({group: group}), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({uid: uid}), - }, - detailsType:: hidden.meta.v1.statusDetails, - // A human-readable description of the status of this operation. - withMessage(message):: self + __resultMixin({message: message}), - // 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. - withReason(reason):: self + __resultMixin({reason: reason}), - }, - resultType:: hidden.meta.v1.status, - }, - initializersType:: hidden.meta.v1.initializers, - }, - }, - // OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field. - ownerReference:: { - new():: {}, - // 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. - withBlockOwnerDeletion(blockOwnerDeletion):: self + {blockOwnerDeletion: blockOwnerDeletion}, - // If true, this reference points to the managing controller. - withController(controller):: self + {controller: controller}, - // Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + {name: name}, - // UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids - withUid(uid):: self + {uid: uid}, - mixin:: { - }, - }, - // Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. - patch:: { - new():: {}, - mixin:: { - }, - }, - // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. - preconditions:: { - new():: {}, - // Specifies the target UID. - withUid(uid):: self + {uid: uid}, - mixin:: { - }, - }, - // ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. - serverAddressByClientCidr:: { - new():: {}, - // The CIDR with which clients can match their IP to figure out the server address that they should use. - withClientCidr(clientCidr):: self + {clientCIDR: clientCidr}, - // Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port. - withServerAddress(serverAddress):: self + {serverAddress: serverAddress}, - mixin:: { - }, - }, - // StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered. - statusCause:: { - new():: {}, - // 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" - withField(field):: self + {field: field}, - // A human-readable description of the cause of the error. This field may be presented as-is to a reader. - withMessage(message):: self + {message: message}, - // A machine-readable description of the cause of the error. If this value is empty there is no information available. - withReason(reason):: self + {reason: reason}, - mixin:: { - }, - }, - // 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. - statusDetails:: { - new():: {}, - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == "array" then {causes: causes} else {causes: [causes]}, - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == "array" then {causes+: causes} else {causes+: [causes]}, - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + {group: group}, - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + {name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + {retryAfterSeconds: 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 - withUid(uid):: self + {uid: uid}, - mixin:: { - }, - }, - // - time:: { - new():: {}, - mixin:: { - }, - }, - }, - }, - networking:: { - v1:: { - local apiVersion = {apiVersion: "networking/v1"}, - // IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") 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. - ipBlock:: { - new():: {}, - // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" - withCidr(cidr):: self + {cidr: cidr}, - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExcept(except):: self + if std.type(except) == "array" then {except: except} else {except: [except]}, - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExceptMixin(except):: self + if std.type(except) == "array" then {except+: except} else {except+: [except]}, - mixin:: { - }, - }, - // 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 - networkPolicyEgressRule:: { - new():: {}, - // 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. - withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, - // 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. - withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - portsType:: hidden.networking.v1.networkPolicyPort, - // 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. - withTo(to):: self + if std.type(to) == "array" then {to: to} else {to: [to]}, - // 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. - withToMixin(to):: self + if std.type(to) == "array" then {to+: to} else {to+: [to]}, - toType:: hidden.networking.v1.networkPolicyPeer, - mixin:: { - }, - }, - // 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. - networkPolicyIngressRule:: { - new():: {}, - // 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list. - withFrom(from):: self + if std.type(from) == "array" then {from: from} else {from: [from]}, - // 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list. - withFromMixin(from):: self + if std.type(from) == "array" then {from+: from} else {from+: [from]}, - fromType:: hidden.networking.v1.networkPolicyPeer, - // 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. - withPorts(ports):: self + if std.type(ports) == "array" then {ports: ports} else {ports: [ports]}, - // 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. - withPortsMixin(ports):: self + if std.type(ports) == "array" then {ports+: ports} else {ports+: [ports]}, - portsType:: hidden.networking.v1.networkPolicyPort, - mixin:: { - }, - }, - // NetworkPolicyPeer describes a peer to allow traffic from. Exactly one of its fields must be specified. - networkPolicyPeer:: { - new():: {}, - mixin:: { - // IPBlock defines policy on a particular IPBlock - ipBlock:: { - local __ipBlockMixin(ipBlock) = {ipBlock+: ipBlock}, - mixinInstance(ipBlock):: __ipBlockMixin(ipBlock), - // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" - withCidr(cidr):: self + __ipBlockMixin({cidr: cidr}), - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExcept(except):: self + if std.type(except) == "array" then __ipBlockMixin({except: except}) else __ipBlockMixin({except: [except]}), - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExceptMixin(except):: self + if std.type(except) == "array" then __ipBlockMixin({except+: except}) else __ipBlockMixin({except+: [except]}), - }, - ipBlockType:: hidden.networking.v1.ipBlock, - // Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If present but empty, this selector selects all namespaces. - namespaceSelector:: { - local __namespaceSelectorMixin(namespaceSelector) = {namespaceSelector+: namespaceSelector}, - mixinInstance(namespaceSelector):: __namespaceSelectorMixin(namespaceSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __namespaceSelectorMixin({matchExpressions: matchExpressions}) else __namespaceSelectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __namespaceSelectorMixin({matchExpressions+: matchExpressions}) else __namespaceSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __namespaceSelectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __namespaceSelectorMixin({matchLabels+: matchLabels}), - }, - namespaceSelectorType:: hidden.meta.v1.labelSelector, - // This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If present but empty, this selector selects all pods in this namespace. - podSelector:: { - local __podSelectorMixin(podSelector) = {podSelector+: podSelector}, - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions: matchExpressions}) else __podSelectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __podSelectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({matchLabels+: matchLabels}), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // NetworkPolicyPort describes a port to allow traffic on - networkPolicyPort:: { - new():: {}, - // 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. - withPort(port):: {port: port}, - // The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP. - withProtocol(protocol):: self + {protocol: protocol}, - mixin:: { - }, - }, - // NetworkPolicySpec provides the specification of a NetworkPolicy - networkPolicySpec:: { - new():: {}, - // 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 - withEgress(egress):: self + if std.type(egress) == "array" then {egress: egress} else {egress: [egress]}, - // 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 - withEgressMixin(egress):: self + if std.type(egress) == "array" then {egress+: egress} else {egress+: [egress]}, - egressType:: hidden.networking.v1.networkPolicyEgressRule, - // 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) - withIngress(ingress):: self + if std.type(ingress) == "array" then {ingress: ingress} else {ingress: [ingress]}, - // 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) - withIngressMixin(ingress):: self + if std.type(ingress) == "array" then {ingress+: ingress} else {ingress+: [ingress]}, - ingressType:: hidden.networking.v1.networkPolicyIngressRule, - // 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 - withPolicyTypes(policyTypes):: self + if std.type(policyTypes) == "array" then {policyTypes: policyTypes} else {policyTypes: [policyTypes]}, - // 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 - withPolicyTypesMixin(policyTypes):: self + if std.type(policyTypes) == "array" then {policyTypes+: policyTypes} else {policyTypes+: [policyTypes]}, - mixin:: { - // 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:: { - local __podSelectorMixin(podSelector) = {podSelector+: podSelector}, - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions: matchExpressions}) else __podSelectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __podSelectorMixin({matchExpressions+: matchExpressions}) else __podSelectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __podSelectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({matchLabels+: matchLabels}), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - }, - }, - policy:: { - v1beta1:: { - local apiVersion = {apiVersion: "policy/v1beta1"}, - // PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. - podDisruptionBudgetSpec:: { - new():: {}, - // 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". - withMaxUnavailable(maxUnavailable):: {maxUnavailable: 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%". - withMinAvailable(minAvailable):: {minAvailable: minAvailable}, - mixin:: { - // Label query over pods whose evictions are managed by the disruption budget. - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - }, - // PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. - podDisruptionBudgetStatus:: { - new():: {}, - // current number of healthy pods - withCurrentHealthy(currentHealthy):: self + {currentHealthy: currentHealthy}, - // minimum desired number of healthy pods - withDesiredHealthy(desiredHealthy):: self + {desiredHealthy: desiredHealthy}, - // DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. - withDisruptedPods(disruptedPods):: self + {disruptedPods: disruptedPods}, - // DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. - withDisruptedPodsMixin(disruptedPods):: self + {disruptedPods+: disruptedPods}, - // Number of pod disruptions that are currently allowed. - withDisruptionsAllowed(disruptionsAllowed):: self + {disruptionsAllowed: disruptionsAllowed}, - // total number of pods counted by this disruption budget - withExpectedPods(expectedPods):: self + {expectedPods: expectedPods}, - // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status informatio is valid only if observedGeneration equals to PDB's object generation. - withObservedGeneration(observedGeneration):: self + {observedGeneration: observedGeneration}, - mixin:: { - }, - }, - }, - }, - rbac:: { - v1:: { - local apiVersion = {apiVersion: "rbac/v1"}, - // 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. - policyRule:: { - new():: {}, - // 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. - withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, - // 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. - withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [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. - withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs: nonResourceUrls} else {nonResourceURLs: [nonResourceUrls]}, - // 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. - withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs+: nonResourceUrls} else {nonResourceURLs+: [nonResourceUrls]}, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - withResourceNames(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames: resourceNames} else {resourceNames: [resourceNames]}, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames+: resourceNames} else {resourceNames+: [resourceNames]}, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. - withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. - withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - mixin:: { - }, - }, - // RoleRef contains information that points to the role being used - roleRef:: { - new():: {}, - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + {apiGroup: apiGroup}, - // Name is the name of resource being referenced - withName(name):: self + {name: name}, - mixin:: { - }, - }, - // 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. - subject:: { - new():: {}, - // 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. - withApiGroup(apiGroup):: self + {apiGroup: apiGroup}, - // Name of the object being referenced. - withName(name):: self + {name: name}, - // 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. - withNamespace(namespace):: self + {namespace: namespace}, - mixin:: { - }, - }, - }, - v1alpha1:: { - local apiVersion = {apiVersion: "rbac/v1alpha1"}, - // 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. - policyRule:: { - new():: {}, - // 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. - withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, - // 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. - withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [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 This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. 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. - withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs: nonResourceUrls} else {nonResourceURLs: [nonResourceUrls]}, - // 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 This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. 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. - withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs+: nonResourceUrls} else {nonResourceURLs+: [nonResourceUrls]}, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - withResourceNames(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames: resourceNames} else {resourceNames: [resourceNames]}, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames+: resourceNames} else {resourceNames+: [resourceNames]}, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. - withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. - withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - mixin:: { - }, - }, - // RoleRef contains information that points to the role being used - roleRef:: { - new():: {}, - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + {apiGroup: apiGroup}, - // Name is the name of resource being referenced - withName(name):: self + {name: name}, - mixin:: { - }, - }, - // 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. - subject:: { - new():: {}, - // Name of the object being referenced. - withName(name):: self + {name: name}, - // 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. - withNamespace(namespace):: self + {namespace: namespace}, - mixin:: { - }, - }, - }, - v1beta1:: { - local apiVersion = {apiVersion: "rbac/v1beta1"}, - // 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. - policyRule:: { - new():: {}, - // 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. - withApiGroups(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups: apiGroups} else {apiGroups: [apiGroups]}, - // 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. - withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == "array" then {apiGroups+: apiGroups} else {apiGroups+: [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. - withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs: nonResourceUrls} else {nonResourceURLs: [nonResourceUrls]}, - // 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. - withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == "array" then {nonResourceURLs+: nonResourceUrls} else {nonResourceURLs+: [nonResourceUrls]}, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - withResourceNames(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames: resourceNames} else {resourceNames: [resourceNames]}, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == "array" then {resourceNames+: resourceNames} else {resourceNames+: [resourceNames]}, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. - withResources(resources):: self + if std.type(resources) == "array" then {resources: resources} else {resources: [resources]}, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. - withResourcesMixin(resources):: self + if std.type(resources) == "array" then {resources+: resources} else {resources+: [resources]}, - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - withVerbs(verbs):: self + if std.type(verbs) == "array" then {verbs: verbs} else {verbs: [verbs]}, - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - withVerbsMixin(verbs):: self + if std.type(verbs) == "array" then {verbs+: verbs} else {verbs+: [verbs]}, - mixin:: { - }, - }, - // RoleRef contains information that points to the role being used - roleRef:: { - new():: {}, - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + {apiGroup: apiGroup}, - // Name is the name of resource being referenced - withName(name):: self + {name: name}, - mixin:: { - }, - }, - // 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. - subject:: { - new():: {}, - // 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. - withApiGroup(apiGroup):: self + {apiGroup: apiGroup}, - // Name of the object being referenced. - withName(name):: self + {name: name}, - // 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. - withNamespace(namespace):: self + {namespace: namespace}, - mixin:: { - }, - }, - }, - }, - settings:: { - v1alpha1:: { - local apiVersion = {apiVersion: "settings/v1alpha1"}, - // PodPresetSpec is a description of a pod preset. - podPresetSpec:: { - new():: {}, - // Env defines the collection of EnvVar to inject into containers. - withEnv(env):: self + if std.type(env) == "array" then {env: env} else {env: [env]}, - // Env defines the collection of EnvVar to inject into containers. - withEnvMixin(env):: self + if std.type(env) == "array" then {env+: env} else {env+: [env]}, - // EnvFrom defines the collection of EnvFromSource to inject into containers. - withEnvFrom(envFrom):: self + if std.type(envFrom) == "array" then {envFrom: envFrom} else {envFrom: [envFrom]}, - // EnvFrom defines the collection of EnvFromSource to inject into containers. - withEnvFromMixin(envFrom):: self + if std.type(envFrom) == "array" then {envFrom+: envFrom} else {envFrom+: [envFrom]}, - envFromType:: hidden.core.v1.envFromSource, - envType:: hidden.core.v1.envVar, - // VolumeMounts defines the collection of VolumeMount to inject into containers. - withVolumeMounts(volumeMounts):: self + if std.type(volumeMounts) == "array" then {volumeMounts: volumeMounts} else {volumeMounts: [volumeMounts]}, - // VolumeMounts defines the collection of VolumeMount to inject into containers. - withVolumeMountsMixin(volumeMounts):: self + if std.type(volumeMounts) == "array" then {volumeMounts+: volumeMounts} else {volumeMounts+: [volumeMounts]}, - volumeMountsType:: hidden.core.v1.volumeMount, - // Volumes defines the collection of Volume to inject into the pod. - withVolumes(volumes):: self + if std.type(volumes) == "array" then {volumes: volumes} else {volumes: [volumes]}, - // Volumes defines the collection of Volume to inject into the pod. - withVolumesMixin(volumes):: self + if std.type(volumes) == "array" then {volumes+: volumes} else {volumes+: [volumes]}, - volumesType:: hidden.core.v1.volume, - mixin:: { - // Selector is a label query over a set of resources, in this case pods. Required. - selector:: { - local __selectorMixin(selector) = {selector+: selector}, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions: matchExpressions}) else __selectorMixin({matchExpressions: [matchExpressions]}), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == "array" then __selectorMixin({matchExpressions+: matchExpressions}) else __selectorMixin({matchExpressions+: [matchExpressions]}), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({matchLabels: matchLabels}), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({matchLabels+: matchLabels}), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - }, - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.4/k.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.4/k.libsonnet deleted file mode 100644 index c50661a4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.4/k.libsonnet +++ /dev/null @@ -1,123 +0,0 @@ -local k8s = import 'k8s.libsonnet'; -local fn = { - mapContainers(f):: { - local podContainers = super.spec.template.spec.containers, - spec+: { - template+: { - spec+: { - containers: std.map(f, podContainers), - }, - }, - }, - }, - mapContainersWithName(names, f):: - local nameSet = if std.type(names) == 'array' then std.set(names) else std.set([names]); - local inNameSet(name) = std.length(std.setInter(nameSet, std.set([name]))) > 0; - - self.mapContainers(function(c) if std.objectHas(c, 'name') && inNameSet(c.name) then f(c) else c), -}; - -k8s + { - apps:: k8s.apps + { - v1:: k8s.apps.v1 + { - daemonSet:: k8s.apps.v1.daemonSet + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - deployment:: k8s.apps.v1.deployment + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - replicaSet:: k8s.apps.v1.replicaSet + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - statefulSet:: k8s.apps.v1.statefulSet + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - v1beta1:: k8s.apps.v1beta1 + { - deployment:: k8s.apps.v1beta1.deployment + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - statefulSet:: k8s.apps.v1beta1.statefulSet + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - v1beta2:: k8s.apps.v1beta2 + { - daemonSet:: k8s.apps.v1beta2.daemonSet + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - deployment:: k8s.apps.v1beta2.deployment + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - replicaSet:: k8s.apps.v1beta2.replicaSet + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - statefulSet:: k8s.apps.v1beta2.statefulSet + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - }, - batch:: k8s.batch + { - v1:: k8s.batch.v1 + { - job:: k8s.batch.v1.job + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - v1beta1:: k8s.batch.v1beta1 + { - cronJob:: k8s.batch.v1beta1.cronJob + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - }, - core:: k8s.core + { - v1:: k8s.core.v1 + { - list:: { - new(items):: { - apiVersion: 'v1', - } + { - kind: 'List', - } + self.items(items), - items(items):: if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - }, - pod:: k8s.core.v1.pod + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - podTemplate:: k8s.core.v1.podTemplate + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - replicationController:: k8s.core.v1.replicationController + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - }, - extensions:: k8s.extensions + { - v1beta1:: k8s.extensions.v1beta1 + { - daemonSet:: k8s.extensions.v1beta1.daemonSet + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - deployment:: k8s.extensions.v1beta1.deployment + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - replicaSet:: k8s.extensions.v1beta1.replicaSet + { - mapContainers(f):: fn.mapContainers(f), - mapContainersWithName(names, f):: fn.mapContainersWithName(names, f), - }, - }, - }, -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.4/k8s.libsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.4/k8s.libsonnet deleted file mode 100644 index 2400f87f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/ksonnet.beta.4/k8s.libsonnet +++ /dev/null @@ -1,30584 +0,0 @@ -{ - __ksonnet: { - checksum: 'ae84879f3189d1d6cfa3e1cf79356fbdc05649900e71369875ba4a45a408863f', - kubernetesVersion: '1.14.0', - }, - admissionregistration:: { - v1beta1:: { - local apiVersion = { apiVersion: 'admissionregistration.k8s.io/v1beta1' }, - // MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. - mutatingWebhookConfiguration:: { - local kind = { kind: 'MutatingWebhookConfiguration' }, - new():: apiVersion + kind, - // Webhooks is a list of webhooks and the affected resources and operations. - withWebhooks(webhooks):: self + if std.type(webhooks) == 'array' then { webhooks: webhooks } else { webhooks: [webhooks] }, - // Webhooks is a list of webhooks and the affected resources and operations. - withWebhooksMixin(webhooks):: self + if std.type(webhooks) == 'array' then { webhooks+: webhooks } else { webhooks+: [webhooks] }, - webhooksType:: hidden.admissionregistration.v1beta1.webhook, - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it. - validatingWebhookConfiguration:: { - local kind = { kind: 'ValidatingWebhookConfiguration' }, - new():: apiVersion + kind, - // Webhooks is a list of webhooks and the affected resources and operations. - withWebhooks(webhooks):: self + if std.type(webhooks) == 'array' then { webhooks: webhooks } else { webhooks: [webhooks] }, - // Webhooks is a list of webhooks and the affected resources and operations. - withWebhooksMixin(webhooks):: self + if std.type(webhooks) == 'array' then { webhooks+: webhooks } else { webhooks+: [webhooks] }, - webhooksType:: hidden.admissionregistration.v1beta1.webhook, - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - }, - }, - apiextensions:: { - v1beta1:: { - local apiVersion = { apiVersion: 'apiextensions.k8s.io/v1beta1' }, - // CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. - customResourceDefinition:: { - local kind = { kind: 'CustomResourceDefinition' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec describes how the user wants the resources to appear - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. Optional, the global columns for all versions. Top-level and per-version columns are mutually exclusive. - withAdditionalPrinterColumns(additionalPrinterColumns):: self + if std.type(additionalPrinterColumns) == 'array' then __specMixin({ additionalPrinterColumns: additionalPrinterColumns }) else __specMixin({ additionalPrinterColumns: [additionalPrinterColumns] }), - // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. Optional, the global columns for all versions. Top-level and per-version columns are mutually exclusive. - withAdditionalPrinterColumnsMixin(additionalPrinterColumns):: self + if std.type(additionalPrinterColumns) == 'array' then __specMixin({ additionalPrinterColumns+: additionalPrinterColumns }) else __specMixin({ additionalPrinterColumns+: [additionalPrinterColumns] }), - additionalPrinterColumnsType:: hidden.apiextensions.v1beta1.customResourceColumnDefinition, - // `conversion` defines conversion settings for the CRD. - conversion:: { - local __conversionMixin(conversion) = __specMixin({ conversion+: conversion }), - mixinInstance(conversion):: __conversionMixin(conversion), - // ConversionReviewVersions is an ordered list of preferred `ConversionReview` 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, conversion 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. Default to `['v1beta1']`. - withConversionReviewVersions(conversionReviewVersions):: self + if std.type(conversionReviewVersions) == 'array' then __conversionMixin({ conversionReviewVersions: conversionReviewVersions }) else __conversionMixin({ conversionReviewVersions: [conversionReviewVersions] }), - // ConversionReviewVersions is an ordered list of preferred `ConversionReview` 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, conversion 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. Default to `['v1beta1']`. - withConversionReviewVersionsMixin(conversionReviewVersions):: self + if std.type(conversionReviewVersions) == 'array' then __conversionMixin({ conversionReviewVersions+: conversionReviewVersions }) else __conversionMixin({ conversionReviewVersions+: [conversionReviewVersions] }), - // `strategy` specifies the conversion strategy. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the CR. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information is needed for this option. - withStrategy(strategy):: self + __conversionMixin({ strategy: strategy }), - // `webhookClientConfig` is the instructions for how to call the webhook if strategy is `Webhook`. This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. - webhookClientConfig:: { - local __webhookClientConfigMixin(webhookClientConfig) = __conversionMixin({ webhookClientConfig+: webhookClientConfig }), - mixinInstance(webhookClientConfig):: __webhookClientConfigMixin(webhookClientConfig), - // `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. - withCaBundle(caBundle):: self + __webhookClientConfigMixin({ caBundle: 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`. - // - // Port 443 will be used if it is open, otherwise it is an error. - service:: { - local __serviceMixin(service) = __webhookClientConfigMixin({ service+: service }), - mixinInstance(service):: __serviceMixin(service), - // `name` is the name of the service. Required - withName(name):: self + __serviceMixin({ name: name }), - // `namespace` is the namespace of the service. Required - withNamespace(namespace):: self + __serviceMixin({ namespace: namespace }), - // `path` is an optional URL path which will be sent in any request to this service. - withPath(path):: self + __serviceMixin({ path: path }), - }, - serviceType:: hidden.apiextensions.v1beta1.serviceReference, - // `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. - withUrl(url):: self + __webhookClientConfigMixin({ url: url }), - }, - webhookClientConfigType:: hidden.apiextensions.v1beta1.webhookClientConfig, - }, - conversionType:: hidden.apiextensions.v1beta1.customResourceConversion, - // Group is the group this resource belongs in - withGroup(group):: self + __specMixin({ group: group }), - // Names are the names used to describe this custom resource - names:: { - local __namesMixin(names) = __specMixin({ names+: names }), - mixinInstance(names):: __namesMixin(names), - // Categories is a list of grouped resources custom resources belong to (e.g. 'all') - withCategories(categories):: self + if std.type(categories) == 'array' then __namesMixin({ categories: categories }) else __namesMixin({ categories: [categories] }), - // Categories is a list of grouped resources custom resources belong to (e.g. 'all') - withCategoriesMixin(categories):: self + if std.type(categories) == 'array' then __namesMixin({ categories+: categories }) else __namesMixin({ categories+: [categories] }), - // Kind is the serialized kind of the resource. It is normally CamelCase and singular. - withKind(kind):: self + __namesMixin({ kind: kind }), - // ListKind is the serialized kind of the list for this resource. Defaults to List. - withListKind(listKind):: self + __namesMixin({ listKind: listKind }), - // Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase. - withPlural(plural):: self + __namesMixin({ plural: plural }), - // ShortNames are short names for the resource. It must be all lowercase. - withShortNames(shortNames):: self + if std.type(shortNames) == 'array' then __namesMixin({ shortNames: shortNames }) else __namesMixin({ shortNames: [shortNames] }), - // ShortNames are short names for the resource. It must be all lowercase. - withShortNamesMixin(shortNames):: self + if std.type(shortNames) == 'array' then __namesMixin({ shortNames+: shortNames }) else __namesMixin({ shortNames+: [shortNames] }), - // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased - withSingular(singular):: self + __namesMixin({ singular: singular }), - }, - namesType:: hidden.apiextensions.v1beta1.customResourceDefinitionNames, - // Scope indicates whether this resource is cluster or namespace scoped. Default is namespaced - withScope(scope):: self + __specMixin({ scope: scope }), - // Subresources describes the subresources for CustomResource Optional, the global subresources for all versions. Top-level and per-version subresources are mutually exclusive. - subresources:: { - local __subresourcesMixin(subresources) = __specMixin({ subresources+: subresources }), - mixinInstance(subresources):: __subresourcesMixin(subresources), - // Scale denotes the scale subresource for CustomResources - scale:: { - local __scaleMixin(scale) = __subresourcesMixin({ scale+: scale }), - mixinInstance(scale):: __scaleMixin(scale), - // LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status. Must be set to work with HPA. If there is no value under the given path in the CustomResource, the status label selector value in the /scale subresource will default to the empty string. - withLabelSelectorPath(labelSelectorPath):: self + __scaleMixin({ labelSelectorPath: labelSelectorPath }), - // SpecReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the /scale subresource will return an error on GET. - withSpecReplicasPath(specReplicasPath):: self + __scaleMixin({ specReplicasPath: specReplicasPath }), - // StatusReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the status replica value in the /scale subresource will default to 0. - withStatusReplicasPath(statusReplicasPath):: self + __scaleMixin({ statusReplicasPath: statusReplicasPath }), - }, - scaleType:: hidden.apiextensions.v1beta1.customResourceSubresourceScale, - }, - subresourcesType:: hidden.apiextensions.v1beta1.customResourceSubresources, - // Validation describes the validation methods for CustomResources Optional, the global validation schema for all versions. Top-level and per-version schemas are mutually exclusive. - validation:: { - local __validationMixin(validation) = __specMixin({ validation+: validation }), - mixinInstance(validation):: __validationMixin(validation), - // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. - withOpenApiV3Schema(openApiV3Schema):: self + __validationMixin({ openAPIV3Schema: openApiV3Schema }), - // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. - withOpenApiV3SchemaMixin(openApiV3Schema):: self + __validationMixin({ openAPIV3Schema+: openApiV3Schema }), - openAPIV3SchemaType:: hidden.apiextensions.v1beta1.jsonSchemaProps, - }, - validationType:: hidden.apiextensions.v1beta1.customResourceValidation, - // Version is the version this resource belongs in Should be always first item in Versions field if provided. Optional, but at least one of Version or Versions must be set. Deprecated: Please use `Versions`. - withVersion(version):: self + __specMixin({ version: version }), - // Versions is the list of all supported versions for this resource. If Version field is provided, this field is optional. Validation: All versions must use the same validation schema for now. i.e., top level Validation field is applied to all of these versions. Order: The version name will be used to compute the order. 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. - withVersions(versions):: self + if std.type(versions) == 'array' then __specMixin({ versions: versions }) else __specMixin({ versions: [versions] }), - // Versions is the list of all supported versions for this resource. If Version field is provided, this field is optional. Validation: All versions must use the same validation schema for now. i.e., top level Validation field is applied to all of these versions. Order: The version name will be used to compute the order. 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. - withVersionsMixin(versions):: self + if std.type(versions) == 'array' then __specMixin({ versions+: versions }) else __specMixin({ versions+: [versions] }), - versionsType:: hidden.apiextensions.v1beta1.customResourceDefinitionVersion, - }, - specType:: hidden.apiextensions.v1beta1.customResourceDefinitionSpec, - }, - }, - }, - }, - apiregistration:: { - v1:: { - local apiVersion = { apiVersion: 'apiregistration.k8s.io/v1' }, - // APIService represents a server for a particular GroupVersion. Name must be "version.group". - apiService:: { - local kind = { kind: 'APIService' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec contains information for locating and communicating with a server - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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. - withCaBundle(caBundle):: self + __specMixin({ caBundle: caBundle }), - // Group is the API group name this server hosts - withGroup(group):: self + __specMixin({ group: group }), - // 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 - withGroupPriorityMinimum(groupPriorityMinimum):: self + __specMixin({ groupPriorityMinimum: groupPriorityMinimum }), - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. - withInsecureSkipTlsVerify(insecureSkipTlsVerify):: self + __specMixin({ insecureSkipTLSVerify: 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:: { - local __serviceMixin(service) = __specMixin({ service+: service }), - mixinInstance(service):: __serviceMixin(service), - // Name is the name of the service - withName(name):: self + __serviceMixin({ name: name }), - // Namespace is the namespace of the service - withNamespace(namespace):: self + __serviceMixin({ namespace: namespace }), - }, - serviceType:: hidden.apiregistration.v1.serviceReference, - // Version is the API version this server hosts. For example, "v1" - withVersion(version):: self + __specMixin({ version: version }), - // 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. - withVersionPriority(versionPriority):: self + __specMixin({ versionPriority: versionPriority }), - }, - specType:: hidden.apiregistration.v1.apiServiceSpec, - }, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'apiregistration.k8s.io/v1beta1' }, - // APIService represents a server for a particular GroupVersion. Name must be "version.group". - apiService:: { - local kind = { kind: 'APIService' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec contains information for locating and communicating with a server - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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. - withCaBundle(caBundle):: self + __specMixin({ caBundle: caBundle }), - // Group is the API group name this server hosts - withGroup(group):: self + __specMixin({ group: group }), - // 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 - withGroupPriorityMinimum(groupPriorityMinimum):: self + __specMixin({ groupPriorityMinimum: groupPriorityMinimum }), - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. - withInsecureSkipTlsVerify(insecureSkipTlsVerify):: self + __specMixin({ insecureSkipTLSVerify: 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:: { - local __serviceMixin(service) = __specMixin({ service+: service }), - mixinInstance(service):: __serviceMixin(service), - // Name is the name of the service - withName(name):: self + __serviceMixin({ name: name }), - // Namespace is the namespace of the service - withNamespace(namespace):: self + __serviceMixin({ namespace: namespace }), - }, - serviceType:: hidden.apiregistration.v1beta1.serviceReference, - // Version is the API version this server hosts. For example, "v1" - withVersion(version):: self + __specMixin({ version: version }), - // 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. - withVersionPriority(versionPriority):: self + __specMixin({ versionPriority: versionPriority }), - }, - specType:: hidden.apiregistration.v1beta1.apiServiceSpec, - }, - }, - }, - }, - apps:: { - v1:: { - local apiVersion = { apiVersion: 'apps/v1' }, - // 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. - controllerRevision:: { - local kind = { kind: 'ControllerRevision' }, - new():: apiVersion + kind, - // Revision indicates the revision of the state represented by Data. - withRevision(revision):: self + { revision: revision }, - mixin:: { - // Data is the serialized representation of the state. - data:: { - local __dataMixin(data) = { data+: data }, - mixinInstance(data):: __dataMixin(data), - // Raw is the underlying serialization of this object. - withRaw(raw):: self + __dataMixin({ Raw: raw }), - }, - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // DaemonSet represents the configuration of a daemon set. - daemonSet:: { - local kind = { kind: 'DaemonSet' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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). - withMinReadySeconds(minReadySeconds):: self + __specMixin({ minReadySeconds: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({ revisionHistoryLimit: revisionHistoryLimit }), - // 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:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = __specMixin({ updateStrategy+: updateStrategy }), - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1.rollingUpdateDaemonSet, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. - withType(type):: self + __updateStrategyMixin({ type: type }), - }, - updateStrategyType:: hidden.apps.v1.daemonSetUpdateStrategy, - }, - specType:: hidden.apps.v1.daemonSetSpec, - }, - }, - // Deployment enables declarative updates for Pods and ReplicaSets. - deployment:: { - local kind = { kind: 'Deployment' }, - new(name='', replicas=1, containers='', podLabels={ app: 'name' }):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.metadata.withLabels(podLabels) + self.mixin.spec.template.spec.withContainers(containers), - mixin:: { - // Standard object metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the Deployment. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({ minReadySeconds: minReadySeconds }), - // Indicates that the deployment is paused. - withPaused(paused):: self + __specMixin({ paused: 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. - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + __specMixin({ progressDeadlineSeconds: progressDeadlineSeconds }), - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + __specMixin({ replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({ revisionHistoryLimit: revisionHistoryLimit }), - // 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:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = __specMixin({ strategy+: strategy }), - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. - withMaxSurge(maxSurge):: self + __rollingUpdateMixin({ maxSurge: 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({ type: type }), - }, - strategyType:: hidden.apps.v1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.apps.v1.deploymentSpec, - }, - }, - // ReplicaSet ensures that a specified number of pod replicas are running at any given time. - replicaSet:: { - local kind = { kind: 'ReplicaSet' }, - new():: apiVersion + kind, - mixin:: { - // 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/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({ minReadySeconds: 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 - withReplicas(replicas):: self + __specMixin({ replicas: replicas }), - // 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:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.apps.v1.replicaSetSpec, - }, - }, - // 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. - statefulSet:: { - local kind = { kind: 'StatefulSet' }, - new(name='', replicas=1, containers='', volumeClaims='', podLabels={ app: 'name' }):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas).withVolumeClaimTemplates(volumeClaims) + self.mixin.spec.template.metadata.withLabels(podLabels) + self.mixin.spec.template.spec.withContainers(containers), - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the desired identities of pods in this set. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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. - withPodManagementPolicy(podManagementPolicy):: self + __specMixin({ podManagementPolicy: 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. - withReplicas(replicas):: self + __specMixin({ replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({ revisionHistoryLimit: revisionHistoryLimit }), - // 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:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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. - withServiceName(serviceName):: self + __specMixin({ serviceName: 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = __specMixin({ updateStrategy+: updateStrategy }), - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. - withPartition(partition):: self + __rollingUpdateMixin({ partition: partition }), - }, - rollingUpdateType:: hidden.apps.v1.rollingUpdateStatefulSetStrategy, - // Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. - withType(type):: self + __updateStrategyMixin({ type: type }), - }, - updateStrategyType:: hidden.apps.v1.statefulSetUpdateStrategy, - // 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. - withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == 'array' then __specMixin({ volumeClaimTemplates: volumeClaimTemplates }) else __specMixin({ volumeClaimTemplates: [volumeClaimTemplates] }), - // 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. - withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == 'array' then __specMixin({ volumeClaimTemplates+: volumeClaimTemplates }) else __specMixin({ volumeClaimTemplates+: [volumeClaimTemplates] }), - volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, - }, - specType:: hidden.apps.v1.statefulSetSpec, - }, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'apps/v1beta1' }, - // DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1beta2/ControllerRevision. See the release notes for more information. 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. - controllerRevision:: { - local kind = { kind: 'ControllerRevision' }, - new():: apiVersion + kind, - // Revision indicates the revision of the state represented by Data. - withRevision(revision):: self + { revision: revision }, - mixin:: { - // Data is the serialized representation of the state. - data:: { - local __dataMixin(data) = { data+: data }, - mixinInstance(data):: __dataMixin(data), - // Raw is the underlying serialization of this object. - withRaw(raw):: self + __dataMixin({ Raw: raw }), - }, - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets. - deployment:: { - local kind = { kind: 'Deployment' }, - new(name='', replicas=1, containers='', podLabels={ app: 'name' }):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.metadata.withLabels(podLabels) + self.mixin.spec.template.spec.withContainers(containers), - mixin:: { - // Standard object metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the Deployment. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({ minReadySeconds: minReadySeconds }), - // Indicates that the deployment is paused. - withPaused(paused):: self + __specMixin({ paused: 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. - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + __specMixin({ progressDeadlineSeconds: progressDeadlineSeconds }), - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + __specMixin({ replicas: 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 2. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({ revisionHistoryLimit: revisionHistoryLimit }), - // DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = __specMixin({ rollbackTo+: rollbackTo }), - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + __rollbackToMixin({ revision: revision }), - }, - rollbackToType:: hidden.apps.v1beta1.rollbackConfig, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = __specMixin({ strategy+: strategy }), - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. - withMaxSurge(maxSurge):: self + __rollingUpdateMixin({ maxSurge: 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({ type: type }), - }, - strategyType:: hidden.apps.v1beta1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.apps.v1beta1.deploymentSpec, - }, - }, - // DEPRECATED. DeploymentRollback stores the information required to rollback a deployment. - deploymentRollback:: { - local kind = { kind: 'DeploymentRollback' }, - new(name=''):: apiVersion + kind + self.withName(name), - // Required: This must match the Name of a deployment. - withName(name):: self + { name: name }, - // The annotations to be updated to a deployment - withUpdatedAnnotations(updatedAnnotations):: self + { updatedAnnotations: updatedAnnotations }, - // The annotations to be updated to a deployment - withUpdatedAnnotationsMixin(updatedAnnotations):: self + { updatedAnnotations+: updatedAnnotations }, - mixin:: { - // The config of this deployment rollback. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = { rollbackTo+: rollbackTo }, - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + __rollbackToMixin({ revision: revision }), - }, - rollbackToType:: hidden.apps.v1beta1.rollbackConfig, - }, - }, - // Scale represents a scaling request for a resource. - scale:: { - local kind = { kind: 'Scale' }, - new(replicas=1):: apiVersion + kind + self.mixin.spec.withReplicas(replicas), - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // desired number of instances for the scaled object. - withReplicas(replicas):: self + __specMixin({ replicas: replicas }), - }, - specType:: hidden.apps.v1beta1.scaleSpec, - }, - }, - // DEPRECATED - This group version of StatefulSet is deprecated by apps/v1beta2/StatefulSet. See the release notes for more information. 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. - statefulSet:: { - local kind = { kind: 'StatefulSet' }, - new(name='', replicas=1, containers='', volumeClaims='', podLabels={ app: 'name' }):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas).withVolumeClaimTemplates(volumeClaims) + self.mixin.spec.template.metadata.withLabels(podLabels) + self.mixin.spec.template.spec.withContainers(containers), - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the desired identities of pods in this set. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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. - withPodManagementPolicy(podManagementPolicy):: self + __specMixin({ podManagementPolicy: 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. - withReplicas(replicas):: self + __specMixin({ replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({ revisionHistoryLimit: revisionHistoryLimit }), - // selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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. - withServiceName(serviceName):: self + __specMixin({ serviceName: 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = __specMixin({ updateStrategy+: updateStrategy }), - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. - withPartition(partition):: self + __rollingUpdateMixin({ partition: partition }), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateStatefulSetStrategy, - // Type indicates the type of the StatefulSetUpdateStrategy. - withType(type):: self + __updateStrategyMixin({ type: type }), - }, - updateStrategyType:: hidden.apps.v1beta1.statefulSetUpdateStrategy, - // 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. - withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == 'array' then __specMixin({ volumeClaimTemplates: volumeClaimTemplates }) else __specMixin({ volumeClaimTemplates: [volumeClaimTemplates] }), - // 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. - withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == 'array' then __specMixin({ volumeClaimTemplates+: volumeClaimTemplates }) else __specMixin({ volumeClaimTemplates+: [volumeClaimTemplates] }), - volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, - }, - specType:: hidden.apps.v1beta1.statefulSetSpec, - }, - }, - }, - v1beta2:: { - local apiVersion = { apiVersion: 'apps/v1beta2' }, - // DEPRECATED - This group version of ControllerRevision is deprecated by apps/v1/ControllerRevision. See the release notes for more information. 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. - controllerRevision:: { - local kind = { kind: 'ControllerRevision' }, - new():: apiVersion + kind, - // Revision indicates the revision of the state represented by Data. - withRevision(revision):: self + { revision: revision }, - mixin:: { - // Data is the serialized representation of the state. - data:: { - local __dataMixin(data) = { data+: data }, - mixinInstance(data):: __dataMixin(data), - // Raw is the underlying serialization of this object. - withRaw(raw):: self + __dataMixin({ Raw: raw }), - }, - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // DEPRECATED - This group version of DaemonSet is deprecated by apps/v1/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set. - daemonSet:: { - local kind = { kind: 'DaemonSet' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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). - withMinReadySeconds(minReadySeconds):: self + __specMixin({ minReadySeconds: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({ revisionHistoryLimit: revisionHistoryLimit }), - // 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:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = __specMixin({ updateStrategy+: updateStrategy }), - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDaemonSet, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. - withType(type):: self + __updateStrategyMixin({ type: type }), - }, - updateStrategyType:: hidden.apps.v1beta2.daemonSetUpdateStrategy, - }, - specType:: hidden.apps.v1beta2.daemonSetSpec, - }, - }, - // DEPRECATED - This group version of Deployment is deprecated by apps/v1/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets. - deployment:: { - local kind = { kind: 'Deployment' }, - new(name='', replicas=1, containers='', podLabels={ app: 'name' }):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.metadata.withLabels(podLabels) + self.mixin.spec.template.spec.withContainers(containers), - mixin:: { - // Standard object metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the Deployment. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({ minReadySeconds: minReadySeconds }), - // Indicates that the deployment is paused. - withPaused(paused):: self + __specMixin({ paused: 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. - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + __specMixin({ progressDeadlineSeconds: progressDeadlineSeconds }), - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + __specMixin({ replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({ revisionHistoryLimit: revisionHistoryLimit }), - // 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:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = __specMixin({ strategy+: strategy }), - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. - withMaxSurge(maxSurge):: self + __rollingUpdateMixin({ maxSurge: 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({ type: type }), - }, - strategyType:: hidden.apps.v1beta2.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.apps.v1beta2.deploymentSpec, - }, - }, - // DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time. - replicaSet:: { - local kind = { kind: 'ReplicaSet' }, - new():: apiVersion + kind, - mixin:: { - // 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:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({ minReadySeconds: 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 - withReplicas(replicas):: self + __specMixin({ replicas: replicas }), - // 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:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.apps.v1beta2.replicaSetSpec, - }, - }, - // Scale represents a scaling request for a resource. - scale:: { - local kind = { kind: 'Scale' }, - new(replicas=1):: apiVersion + kind + self.mixin.spec.withReplicas(replicas), - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // desired number of instances for the scaled object. - withReplicas(replicas):: self + __specMixin({ replicas: replicas }), - }, - specType:: hidden.apps.v1beta2.scaleSpec, - }, - }, - // DEPRECATED - This group version of StatefulSet is deprecated by apps/v1/StatefulSet. See the release notes for more information. 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. - statefulSet:: { - local kind = { kind: 'StatefulSet' }, - new(name='', replicas=1, containers='', volumeClaims='', podLabels={ app: 'name' }):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas).withVolumeClaimTemplates(volumeClaims) + self.mixin.spec.template.metadata.withLabels(podLabels) + self.mixin.spec.template.spec.withContainers(containers), - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the desired identities of pods in this set. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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. - withPodManagementPolicy(podManagementPolicy):: self + __specMixin({ podManagementPolicy: 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. - withReplicas(replicas):: self + __specMixin({ replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({ revisionHistoryLimit: revisionHistoryLimit }), - // 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:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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. - withServiceName(serviceName):: self + __specMixin({ serviceName: 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = __specMixin({ updateStrategy+: updateStrategy }), - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. - withPartition(partition):: self + __rollingUpdateMixin({ partition: partition }), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateStatefulSetStrategy, - // Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. - withType(type):: self + __updateStrategyMixin({ type: type }), - }, - updateStrategyType:: hidden.apps.v1beta2.statefulSetUpdateStrategy, - // 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. - withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == 'array' then __specMixin({ volumeClaimTemplates: volumeClaimTemplates }) else __specMixin({ volumeClaimTemplates: [volumeClaimTemplates] }), - // 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. - withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == 'array' then __specMixin({ volumeClaimTemplates+: volumeClaimTemplates }) else __specMixin({ volumeClaimTemplates+: [volumeClaimTemplates] }), - volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, - }, - specType:: hidden.apps.v1beta2.statefulSetSpec, - }, - }, - }, - }, - authentication:: { - v1:: { - local apiVersion = { apiVersion: 'authentication.k8s.io/v1' }, - // 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. - tokenReview:: { - local kind = { kind: 'TokenReview' }, - new(token=''):: apiVersion + kind + self.mixin.spec.withToken(token), - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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. - withAudiences(audiences):: self + if std.type(audiences) == 'array' then __specMixin({ audiences: audiences }) else __specMixin({ audiences: [audiences] }), - // 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. - withAudiencesMixin(audiences):: self + if std.type(audiences) == 'array' then __specMixin({ audiences+: audiences }) else __specMixin({ audiences+: [audiences] }), - // Token is the opaque bearer token. - withToken(token):: self + __specMixin({ token: token }), - }, - specType:: hidden.authentication.v1.tokenReviewSpec, - }, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'authentication.k8s.io/v1beta1' }, - // 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. - tokenReview:: { - local kind = { kind: 'TokenReview' }, - new(token=''):: apiVersion + kind + self.mixin.spec.withToken(token), - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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. - withAudiences(audiences):: self + if std.type(audiences) == 'array' then __specMixin({ audiences: audiences }) else __specMixin({ audiences: [audiences] }), - // 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. - withAudiencesMixin(audiences):: self + if std.type(audiences) == 'array' then __specMixin({ audiences+: audiences }) else __specMixin({ audiences+: [audiences] }), - // Token is the opaque bearer token. - withToken(token):: self + __specMixin({ token: token }), - }, - specType:: hidden.authentication.v1beta1.tokenReviewSpec, - }, - }, - }, - }, - authorization:: { - v1:: { - local apiVersion = { apiVersion: 'authorization.k8s.io/v1' }, - // 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. - localSubjectAccessReview:: { - local kind = { kind: 'LocalSubjectAccessReview' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtra(extra):: self + __specMixin({ extra: extra }), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtraMixin(extra):: self + __specMixin({ extra+: extra }), - // Groups is the groups you're testing for. - withGroups(groups):: self + if std.type(groups) == 'array' then __specMixin({ groups: groups }) else __specMixin({ groups: [groups] }), - // Groups is the groups you're testing for. - withGroupsMixin(groups):: self + if std.type(groups) == 'array' then __specMixin({ groups+: groups }) else __specMixin({ groups+: [groups] }), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({ nonResourceAttributes+: nonResourceAttributes }), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({ path: path }), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({ verb: verb }), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({ resourceAttributes+: resourceAttributes }), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({ group: group }), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({ name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({ namespace: namespace }), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({ resource: resource }), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({ subresource: subresource }), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({ verb: verb }), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({ version: version }), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - // UID information about the requesting user. - withUid(uid):: self + __specMixin({ uid: 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 - withUser(user):: self + __specMixin({ user: user }), - }, - specType:: hidden.authorization.v1.subjectAccessReviewSpec, - }, - }, - // 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 - selfSubjectAccessReview:: { - local kind = { kind: 'SelfSubjectAccessReview' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated. user and groups must be empty - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({ nonResourceAttributes+: nonResourceAttributes }), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({ path: path }), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({ verb: verb }), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({ resourceAttributes+: resourceAttributes }), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({ group: group }), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({ name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({ namespace: namespace }), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({ resource: resource }), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({ subresource: subresource }), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({ verb: verb }), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({ version: version }), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - }, - specType:: hidden.authorization.v1.selfSubjectAccessReviewSpec, - }, - }, - // 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. - selfSubjectRulesReview:: { - local kind = { kind: 'SelfSubjectRulesReview' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // Namespace to evaluate rules for. Required. - withNamespace(namespace):: self + __specMixin({ namespace: namespace }), - }, - specType:: hidden.authorization.v1.selfSubjectRulesReviewSpec, - }, - }, - // SubjectAccessReview checks whether or not a user or group can perform an action. - subjectAccessReview:: { - local kind = { kind: 'SubjectAccessReview' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtra(extra):: self + __specMixin({ extra: extra }), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtraMixin(extra):: self + __specMixin({ extra+: extra }), - // Groups is the groups you're testing for. - withGroups(groups):: self + if std.type(groups) == 'array' then __specMixin({ groups: groups }) else __specMixin({ groups: [groups] }), - // Groups is the groups you're testing for. - withGroupsMixin(groups):: self + if std.type(groups) == 'array' then __specMixin({ groups+: groups }) else __specMixin({ groups+: [groups] }), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({ nonResourceAttributes+: nonResourceAttributes }), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({ path: path }), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({ verb: verb }), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({ resourceAttributes+: resourceAttributes }), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({ group: group }), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({ name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({ namespace: namespace }), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({ resource: resource }), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({ subresource: subresource }), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({ verb: verb }), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({ version: version }), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - // UID information about the requesting user. - withUid(uid):: self + __specMixin({ uid: 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 - withUser(user):: self + __specMixin({ user: user }), - }, - specType:: hidden.authorization.v1.subjectAccessReviewSpec, - }, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'authorization.k8s.io/v1beta1' }, - // 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. - localSubjectAccessReview:: { - local kind = { kind: 'LocalSubjectAccessReview' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtra(extra):: self + __specMixin({ extra: extra }), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtraMixin(extra):: self + __specMixin({ extra+: extra }), - // Groups is the groups you're testing for. - withGroup(group):: self + if std.type(group) == 'array' then __specMixin({ group: group }) else __specMixin({ group: [group] }), - // Groups is the groups you're testing for. - withGroupMixin(group):: self + if std.type(group) == 'array' then __specMixin({ group+: group }) else __specMixin({ group+: [group] }), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({ nonResourceAttributes+: nonResourceAttributes }), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({ path: path }), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({ verb: verb }), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({ resourceAttributes+: resourceAttributes }), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({ group: group }), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({ name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({ namespace: namespace }), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({ resource: resource }), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({ subresource: subresource }), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({ verb: verb }), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({ version: version }), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - // UID information about the requesting user. - withUid(uid):: self + __specMixin({ uid: uid }), - // User is the user you're testing for. If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups - withUser(user):: self + __specMixin({ user: user }), - }, - specType:: hidden.authorization.v1beta1.subjectAccessReviewSpec, - }, - }, - // 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 - selfSubjectAccessReview:: { - local kind = { kind: 'SelfSubjectAccessReview' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated. user and groups must be empty - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({ nonResourceAttributes+: nonResourceAttributes }), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({ path: path }), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({ verb: verb }), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({ resourceAttributes+: resourceAttributes }), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({ group: group }), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({ name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({ namespace: namespace }), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({ resource: resource }), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({ subresource: subresource }), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({ verb: verb }), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({ version: version }), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - }, - specType:: hidden.authorization.v1beta1.selfSubjectAccessReviewSpec, - }, - }, - // 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. - selfSubjectRulesReview:: { - local kind = { kind: 'SelfSubjectRulesReview' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // Namespace to evaluate rules for. Required. - withNamespace(namespace):: self + __specMixin({ namespace: namespace }), - }, - specType:: hidden.authorization.v1beta1.selfSubjectRulesReviewSpec, - }, - }, - // SubjectAccessReview checks whether or not a user or group can perform an action. - subjectAccessReview:: { - local kind = { kind: 'SubjectAccessReview' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec holds information about the request being evaluated - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtra(extra):: self + __specMixin({ extra: extra }), - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtraMixin(extra):: self + __specMixin({ extra+: extra }), - // Groups is the groups you're testing for. - withGroup(group):: self + if std.type(group) == 'array' then __specMixin({ group: group }) else __specMixin({ group: [group] }), - // Groups is the groups you're testing for. - withGroupMixin(group):: self + if std.type(group) == 'array' then __specMixin({ group+: group }) else __specMixin({ group+: [group] }), - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = __specMixin({ nonResourceAttributes+: nonResourceAttributes }), - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({ path: path }), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({ verb: verb }), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = __specMixin({ resourceAttributes+: resourceAttributes }), - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({ group: group }), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({ name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({ namespace: namespace }), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({ resource: resource }), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({ subresource: subresource }), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({ verb: verb }), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({ version: version }), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - // UID information about the requesting user. - withUid(uid):: self + __specMixin({ uid: uid }), - // User is the user you're testing for. If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups - withUser(user):: self + __specMixin({ user: user }), - }, - specType:: hidden.authorization.v1beta1.subjectAccessReviewSpec, - }, - }, - }, - }, - autoscaling:: { - v1:: { - local apiVersion = { apiVersion: 'autoscaling/v1' }, - // configuration of a horizontal pod autoscaler. - horizontalPodAutoscaler:: { - local kind = { kind: 'HorizontalPodAutoscaler' }, - new():: apiVersion + kind, - mixin:: { - // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. - withMaxReplicas(maxReplicas):: self + __specMixin({ maxReplicas: maxReplicas }), - // lower limit for the number of pods that can be set by the autoscaler, default 1. - withMinReplicas(minReplicas):: self + __specMixin({ minReplicas: minReplicas }), - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = __specMixin({ scaleTargetRef+: scaleTargetRef }), - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __scaleTargetRefMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __scaleTargetRefMixin({ name: name }), - }, - scaleTargetRefType:: hidden.autoscaling.v1.crossVersionObjectReference, - // 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. - withTargetCpuUtilizationPercentage(targetCpuUtilizationPercentage):: self + __specMixin({ targetCPUUtilizationPercentage: targetCpuUtilizationPercentage }), - }, - specType:: hidden.autoscaling.v1.horizontalPodAutoscalerSpec, - }, - }, - // Scale represents a scaling request for a resource. - scale:: { - local kind = { kind: 'Scale' }, - new(replicas=1):: apiVersion + kind + self.mixin.spec.withReplicas(replicas), - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // desired number of instances for the scaled object. - withReplicas(replicas):: self + __specMixin({ replicas: replicas }), - }, - specType:: hidden.autoscaling.v1.scaleSpec, - }, - }, - }, - v2beta1:: { - local apiVersion = { apiVersion: 'autoscaling/v2beta1' }, - // 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. - horizontalPodAutoscaler:: { - local kind = { kind: 'HorizontalPodAutoscaler' }, - new():: apiVersion + kind, - mixin:: { - // metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas. - withMaxReplicas(maxReplicas):: self + __specMixin({ maxReplicas: maxReplicas }), - // 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. - withMetrics(metrics):: self + if std.type(metrics) == 'array' then __specMixin({ metrics: metrics }) else __specMixin({ metrics: [metrics] }), - // 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. - withMetricsMixin(metrics):: self + if std.type(metrics) == 'array' then __specMixin({ metrics+: metrics }) else __specMixin({ metrics+: [metrics] }), - metricsType:: hidden.autoscaling.v2beta1.metricSpec, - // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. - withMinReplicas(minReplicas):: self + __specMixin({ minReplicas: minReplicas }), - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = __specMixin({ scaleTargetRef+: scaleTargetRef }), - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __scaleTargetRefMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __scaleTargetRefMixin({ name: name }), - }, - scaleTargetRefType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, - }, - specType:: hidden.autoscaling.v2beta1.horizontalPodAutoscalerSpec, - }, - }, - }, - v2beta2:: { - local apiVersion = { apiVersion: 'autoscaling/v2beta2' }, - // 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. - horizontalPodAutoscaler:: { - local kind = { kind: 'HorizontalPodAutoscaler' }, - new():: apiVersion + kind, - mixin:: { - // metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas. - withMaxReplicas(maxReplicas):: self + __specMixin({ maxReplicas: maxReplicas }), - // 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. - withMetrics(metrics):: self + if std.type(metrics) == 'array' then __specMixin({ metrics: metrics }) else __specMixin({ metrics: [metrics] }), - // 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. - withMetricsMixin(metrics):: self + if std.type(metrics) == 'array' then __specMixin({ metrics+: metrics }) else __specMixin({ metrics+: [metrics] }), - metricsType:: hidden.autoscaling.v2beta2.metricSpec, - // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. - withMinReplicas(minReplicas):: self + __specMixin({ minReplicas: minReplicas }), - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = __specMixin({ scaleTargetRef+: scaleTargetRef }), - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __scaleTargetRefMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __scaleTargetRefMixin({ name: name }), - }, - scaleTargetRefType:: hidden.autoscaling.v2beta2.crossVersionObjectReference, - }, - specType:: hidden.autoscaling.v2beta2.horizontalPodAutoscalerSpec, - }, - }, - }, - }, - batch:: { - v1:: { - local apiVersion = { apiVersion: 'batch/v1' }, - // Job represents the configuration of a single job. - job:: { - local kind = { kind: 'Job' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + __specMixin({ backoffLimit: backoffLimit }), - // 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/ - withCompletions(completions):: self + __specMixin({ completions: 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 - withManualSelector(manualSelector):: self + __specMixin({ manualSelector: 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/ - withParallelism(parallelism):: self + __specMixin({ parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // 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. - withTtlSecondsAfterFinished(ttlSecondsAfterFinished):: self + __specMixin({ ttlSecondsAfterFinished: ttlSecondsAfterFinished }), - }, - specType:: hidden.batch.v1.jobSpec, - }, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'batch/v1beta1' }, - // CronJob represents the configuration of a single cron job. - cronJob:: { - local kind = { kind: 'CronJob' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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 - withConcurrencyPolicy(concurrencyPolicy):: self + __specMixin({ concurrencyPolicy: concurrencyPolicy }), - // The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withFailedJobsHistoryLimit(failedJobsHistoryLimit):: self + __specMixin({ failedJobsHistoryLimit: failedJobsHistoryLimit }), - // Specifies the job that will be created when executing a CronJob. - jobTemplate:: { - local __jobTemplateMixin(jobTemplate) = __specMixin({ jobTemplate+: jobTemplate }), - mixinInstance(jobTemplate):: __jobTemplateMixin(jobTemplate), - // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __jobTemplateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __jobTemplateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + __specMixin({ backoffLimit: backoffLimit }), - // 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/ - withCompletions(completions):: self + __specMixin({ completions: 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 - withManualSelector(manualSelector):: self + __specMixin({ manualSelector: 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/ - withParallelism(parallelism):: self + __specMixin({ parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // 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. - withTtlSecondsAfterFinished(ttlSecondsAfterFinished):: self + __specMixin({ ttlSecondsAfterFinished: ttlSecondsAfterFinished }), - }, - specType:: hidden.batch.v1.jobSpec, - }, - jobTemplateType:: hidden.batch.v1beta1.jobTemplateSpec, - // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - withSchedule(schedule):: self + __specMixin({ schedule: schedule }), - // 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. - withStartingDeadlineSeconds(startingDeadlineSeconds):: self + __specMixin({ startingDeadlineSeconds: startingDeadlineSeconds }), - // The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3. - withSuccessfulJobsHistoryLimit(successfulJobsHistoryLimit):: self + __specMixin({ successfulJobsHistoryLimit: successfulJobsHistoryLimit }), - // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. - withSuspend(suspend):: self + __specMixin({ suspend: suspend }), - }, - specType:: hidden.batch.v1beta1.cronJobSpec, - }, - }, - }, - }, - certificates:: { - v1beta1:: { - local apiVersion = { apiVersion: 'certificates.k8s.io/v1beta1' }, - // Describes a certificate signing request - certificateSigningRequest:: { - local kind = { kind: 'CertificateSigningRequest' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // The certificate request itself and any additional information. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // Extra information about the requesting user. See user.Info interface for details. - withExtra(extra):: self + __specMixin({ extra: extra }), - // Extra information about the requesting user. See user.Info interface for details. - withExtraMixin(extra):: self + __specMixin({ extra+: extra }), - // Group information about the requesting user. See user.Info interface for details. - withGroups(groups):: self + if std.type(groups) == 'array' then __specMixin({ groups: groups }) else __specMixin({ groups: [groups] }), - // Group information about the requesting user. See user.Info interface for details. - withGroupsMixin(groups):: self + if std.type(groups) == 'array' then __specMixin({ groups+: groups }) else __specMixin({ groups+: [groups] }), - // Base64-encoded PKCS#10 CSR data - withRequest(request):: self + __specMixin({ request: request }), - // UID information about the requesting user. See user.Info interface for details. - withUid(uid):: self + __specMixin({ uid: uid }), - // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 - // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - withUsages(usages):: self + if std.type(usages) == 'array' then __specMixin({ usages: usages }) else __specMixin({ usages: [usages] }), - // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 - // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - withUsagesMixin(usages):: self + if std.type(usages) == 'array' then __specMixin({ usages+: usages }) else __specMixin({ usages+: [usages] }), - // Information about the requesting user. See user.Info interface for details. - withUsername(username):: self + __specMixin({ username: username }), - }, - specType:: hidden.certificates.v1beta1.certificateSigningRequestSpec, - }, - }, - }, - }, - coordination:: { - v1:: { - local apiVersion = { apiVersion: 'coordination.k8s.io/v1' }, - // Lease defines a lease concept. - lease:: { - local kind = { kind: 'Lease' }, - new():: apiVersion + kind, - mixin:: { - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // acquireTime is a time when the current lease was acquired. - withAcquireTime(acquireTime):: self + __specMixin({ acquireTime: acquireTime }), - // holderIdentity contains the identity of the holder of a current lease. - withHolderIdentity(holderIdentity):: self + __specMixin({ holderIdentity: 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. - withLeaseDurationSeconds(leaseDurationSeconds):: self + __specMixin({ leaseDurationSeconds: leaseDurationSeconds }), - // leaseTransitions is the number of transitions of a lease between holders. - withLeaseTransitions(leaseTransitions):: self + __specMixin({ leaseTransitions: leaseTransitions }), - // renewTime is a time when the current holder of a lease has last updated the lease. - withRenewTime(renewTime):: self + __specMixin({ renewTime: renewTime }), - }, - specType:: hidden.coordination.v1.leaseSpec, - }, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'coordination.k8s.io/v1beta1' }, - // Lease defines a lease concept. - lease:: { - local kind = { kind: 'Lease' }, - new():: apiVersion + kind, - mixin:: { - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // acquireTime is a time when the current lease was acquired. - withAcquireTime(acquireTime):: self + __specMixin({ acquireTime: acquireTime }), - // holderIdentity contains the identity of the holder of a current lease. - withHolderIdentity(holderIdentity):: self + __specMixin({ holderIdentity: 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. - withLeaseDurationSeconds(leaseDurationSeconds):: self + __specMixin({ leaseDurationSeconds: leaseDurationSeconds }), - // leaseTransitions is the number of transitions of a lease between holders. - withLeaseTransitions(leaseTransitions):: self + __specMixin({ leaseTransitions: leaseTransitions }), - // renewTime is a time when the current holder of a lease has last updated the lease. - withRenewTime(renewTime):: self + __specMixin({ renewTime: renewTime }), - }, - specType:: hidden.coordination.v1beta1.leaseSpec, - }, - }, - }, - }, - core:: { - v1:: { - local apiVersion = { apiVersion: 'v1' }, - // 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. - binding:: { - local kind = { kind: 'Binding' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // The target object that you want to bind to the standard object. - target:: { - local __targetMixin(target) = { target+: target }, - mixinInstance(target):: __targetMixin(target), - // 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. - withFieldPath(fieldPath):: self + __targetMixin({ fieldPath: fieldPath }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __targetMixin({ name: name }), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __targetMixin({ namespace: namespace }), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __targetMixin({ resourceVersion: resourceVersion }), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __targetMixin({ uid: uid }), - }, - targetType:: hidden.core.v1.objectReference, - }, - }, - // ConfigMap holds configuration data for pods to consume. - configMap:: { - local kind = { kind: 'ConfigMap' }, - new(name='', data=''):: apiVersion + kind + self.withData(data) + self.mixin.metadata.withName(name), - // 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. - withBinaryData(binaryData):: self + { binaryData: binaryData }, - // 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. - withBinaryDataMixin(binaryData):: self + { binaryData+: 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. - withData(data):: self + { data: data }, - // 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. - withDataMixin(data):: self + { data+: data }, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // 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}] - // }, - // ] - endpoints:: { - local kind = { kind: 'Endpoints' }, - new():: apiVersion + kind, - // 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. - withSubsets(subsets):: self + if std.type(subsets) == 'array' then { subsets: subsets } else { subsets: [subsets] }, - // 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. - withSubsetsMixin(subsets):: self + if std.type(subsets) == 'array' then { subsets+: subsets } else { subsets+: [subsets] }, - subsetsType:: hidden.core.v1.endpointSubset, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // Event is a report of an event somewhere in the cluster. - event:: { - local kind = { kind: 'Event' }, - new():: apiVersion + kind, - // What action was taken/failed regarding to the Regarding object. - withAction(action):: self + { action: action }, - // The number of times this event has occurred. - withCount(count):: self + { count: count }, - // Time when this Event was first observed. - withEventTime(eventTime):: self + { eventTime: eventTime }, - // The time at which the event was first recorded. (Time of server receipt is in TypeMeta.) - withFirstTimestamp(firstTimestamp):: self + { firstTimestamp: firstTimestamp }, - // The time at which the most recent occurrence of this event was recorded. - withLastTimestamp(lastTimestamp):: self + { lastTimestamp: lastTimestamp }, - // A human-readable description of the status of this operation. - withMessage(message):: self + { message: message }, - // This should be a short, machine understandable string that gives the reason for the transition into the object's current status. - withReason(reason):: self + { reason: reason }, - // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. - withReportingComponent(reportingComponent):: self + { reportingComponent: reportingComponent }, - // ID of the controller instance, e.g. `kubelet-xyzf`. - withReportingInstance(reportingInstance):: self + { reportingInstance: reportingInstance }, - // Type of this event (Normal, Warning), new types could be added in the future - withType(type):: self + { type: type }, - mixin:: { - // The object that this event is about. - involvedObject:: { - local __involvedObjectMixin(involvedObject) = { involvedObject+: involvedObject }, - mixinInstance(involvedObject):: __involvedObjectMixin(involvedObject), - // 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. - withFieldPath(fieldPath):: self + __involvedObjectMixin({ fieldPath: fieldPath }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __involvedObjectMixin({ name: name }), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __involvedObjectMixin({ namespace: namespace }), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __involvedObjectMixin({ resourceVersion: resourceVersion }), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __involvedObjectMixin({ uid: uid }), - }, - involvedObjectType:: hidden.core.v1.objectReference, - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Optional secondary object for more complex actions. - related:: { - local __relatedMixin(related) = { related+: related }, - mixinInstance(related):: __relatedMixin(related), - // 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. - withFieldPath(fieldPath):: self + __relatedMixin({ fieldPath: fieldPath }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __relatedMixin({ name: name }), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __relatedMixin({ namespace: namespace }), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __relatedMixin({ resourceVersion: resourceVersion }), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __relatedMixin({ uid: uid }), - }, - relatedType:: hidden.core.v1.objectReference, - // Data about the Event series this event represents or nil if it's a singleton Event. - series:: { - local __seriesMixin(series) = { series+: series }, - mixinInstance(series):: __seriesMixin(series), - // Number of occurrences in this series up to the last heartbeat time - withCount(count):: self + __seriesMixin({ count: count }), - // Time of the last occurrence observed - withLastObservedTime(lastObservedTime):: self + __seriesMixin({ lastObservedTime: lastObservedTime }), - // State of this Series: Ongoing or Finished - withState(state):: self + __seriesMixin({ state: state }), - }, - seriesType:: hidden.core.v1.eventSeries, - // The component reporting this event. Should be a short machine understandable string. - source:: { - local __sourceMixin(source) = { source+: source }, - mixinInstance(source):: __sourceMixin(source), - // Component from which the event is generated. - withComponent(component):: self + __sourceMixin({ component: component }), - // Node name on which the event is generated. - withHost(host):: self + __sourceMixin({ host: host }), - }, - sourceType:: hidden.core.v1.eventSource, - }, - }, - // LimitRange sets resource usage limits for each kind of resource in a Namespace. - limitRange:: { - local kind = { kind: 'LimitRange' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // Limits is the list of LimitRangeItem objects that are enforced. - withLimits(limits):: self + if std.type(limits) == 'array' then __specMixin({ limits: limits }) else __specMixin({ limits: [limits] }), - // Limits is the list of LimitRangeItem objects that are enforced. - withLimitsMixin(limits):: self + if std.type(limits) == 'array' then __specMixin({ limits+: limits }) else __specMixin({ limits+: [limits] }), - limitsType:: hidden.core.v1.limitRangeItem, - }, - specType:: hidden.core.v1.limitRangeSpec, - }, - }, - // Namespace provides a scope for Names. Use of multiple namespaces is optional. - namespace:: { - local kind = { kind: 'Namespace' }, - new(name=''):: apiVersion + kind + self.mixin.metadata.withName(name), - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the behavior of the Namespace. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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/ - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __specMixin({ finalizers: finalizers }) else __specMixin({ finalizers: [finalizers] }), - // 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/ - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __specMixin({ finalizers+: finalizers }) else __specMixin({ finalizers+: [finalizers] }), - }, - specType:: hidden.core.v1.namespaceSpec, - }, - }, - // Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd). - node:: { - local kind = { kind: 'Node' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the behavior of a node. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field - configSource:: { - local __configSourceMixin(configSource) = __specMixin({ configSource+: configSource }), - mixinInstance(configSource):: __configSourceMixin(configSource), - // ConfigMap is a reference to a Node's ConfigMap - configMap:: { - local __configMapMixin(configMap) = __configSourceMixin({ configMap+: configMap }), - mixinInstance(configMap):: __configMapMixin(configMap), - // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. - withKubeletConfigKey(kubeletConfigKey):: self + __configMapMixin({ kubeletConfigKey: kubeletConfigKey }), - // Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. - withName(name):: self + __configMapMixin({ name: name }), - // Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. - withNamespace(namespace):: self + __configMapMixin({ namespace: namespace }), - // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withResourceVersion(resourceVersion):: self + __configMapMixin({ resourceVersion: resourceVersion }), - // UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withUid(uid):: self + __configMapMixin({ uid: uid }), - }, - configMapType:: hidden.core.v1.configMapNodeConfigSource, - }, - configSourceType:: hidden.core.v1.nodeConfigSource, - // Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966 - withExternalId(externalId):: self + __specMixin({ externalID: externalId }), - // PodCIDR represents the pod IP range assigned to the node. - withPodCidr(podCidr):: self + __specMixin({ podCIDR: podCidr }), - // ID of the node assigned by the cloud provider in the format: :// - withProviderId(providerId):: self + __specMixin({ providerID: providerId }), - // If specified, the node's taints. - withTaints(taints):: self + if std.type(taints) == 'array' then __specMixin({ taints: taints }) else __specMixin({ taints: [taints] }), - // If specified, the node's taints. - withTaintsMixin(taints):: self + if std.type(taints) == 'array' then __specMixin({ taints+: taints }) else __specMixin({ taints+: [taints] }), - taintsType:: hidden.core.v1.taint, - // Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration - withUnschedulable(unschedulable):: self + __specMixin({ unschedulable: unschedulable }), - }, - specType:: hidden.core.v1.nodeSpec, - }, - }, - // 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 - persistentVolume:: { - local kind = { kind: 'PersistentVolume' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - withAccessModes(accessModes):: self + if std.type(accessModes) == 'array' then __specMixin({ accessModes: accessModes }) else __specMixin({ accessModes: [accessModes] }), - // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - withAccessModesMixin(accessModes):: self + if std.type(accessModes) == 'array' then __specMixin({ accessModes+: accessModes }) else __specMixin({ accessModes+: [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:: { - local __awsElasticBlockStoreMixin(awsElasticBlockStore) = __specMixin({ awsElasticBlockStore+: awsElasticBlockStore }), - mixinInstance(awsElasticBlockStore):: __awsElasticBlockStoreMixin(awsElasticBlockStore), - // 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 - withFsType(fsType):: self + __awsElasticBlockStoreMixin({ fsType: 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). - withPartition(partition):: self + __awsElasticBlockStoreMixin({ partition: 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 - withReadOnly(readOnly):: self + __awsElasticBlockStoreMixin({ readOnly: readOnly }), - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - withVolumeId(volumeId):: self + __awsElasticBlockStoreMixin({ volumeID: volumeId }), - }, - awsElasticBlockStoreType:: hidden.core.v1.awsElasticBlockStoreVolumeSource, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk:: { - local __azureDiskMixin(azureDisk) = __specMixin({ azureDisk+: azureDisk }), - mixinInstance(azureDisk):: __azureDiskMixin(azureDisk), - // Host Caching mode: None, Read Only, Read Write. - withCachingMode(cachingMode):: self + __azureDiskMixin({ cachingMode: cachingMode }), - // The Name of the data disk in the blob storage - withDiskName(diskName):: self + __azureDiskMixin({ diskName: diskName }), - // The URI the data disk in the blob storage - withDiskUri(diskUri):: self + __azureDiskMixin({ diskURI: diskUri }), - // 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. - withFsType(fsType):: self + __azureDiskMixin({ fsType: fsType }), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __azureDiskMixin({ readOnly: readOnly }), - }, - azureDiskType:: hidden.core.v1.azureDiskVolumeSource, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile:: { - local __azureFileMixin(azureFile) = __specMixin({ azureFile+: azureFile }), - mixinInstance(azureFile):: __azureFileMixin(azureFile), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __azureFileMixin({ readOnly: readOnly }), - // the name of secret that contains Azure Storage Account Name and Key - withSecretName(secretName):: self + __azureFileMixin({ secretName: secretName }), - // the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod - withSecretNamespace(secretNamespace):: self + __azureFileMixin({ secretNamespace: secretNamespace }), - // Share Name - withShareName(shareName):: self + __azureFileMixin({ shareName: shareName }), - }, - azureFileType:: hidden.core.v1.azureFilePersistentVolumeSource, - // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - withCapacity(capacity):: self + __specMixin({ capacity: capacity }), - // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - withCapacityMixin(capacity):: self + __specMixin({ capacity+: capacity }), - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs:: { - local __cephfsMixin(cephfs) = __specMixin({ cephfs+: cephfs }), - mixinInstance(cephfs):: __cephfsMixin(cephfs), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == 'array' then __cephfsMixin({ monitors: monitors }) else __cephfsMixin({ monitors: [monitors] }), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == 'array' then __cephfsMixin({ monitors+: monitors }) else __cephfsMixin({ monitors+: [monitors] }), - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - withPath(path):: self + __cephfsMixin({ path: path }), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withReadOnly(readOnly):: self + __cephfsMixin({ readOnly: readOnly }), - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withSecretFile(secretFile):: self + __cephfsMixin({ secretFile: secretFile }), - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __cephfsMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withUser(user):: self + __cephfsMixin({ user: user }), - }, - cephfsType:: hidden.core.v1.cephFsPersistentVolumeSource, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder:: { - local __cinderMixin(cinder) = __specMixin({ cinder+: cinder }), - mixinInstance(cinder):: __cinderMixin(cinder), - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withFsType(fsType):: self + __cinderMixin({ fsType: fsType }), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withReadOnly(readOnly):: self + __cinderMixin({ readOnly: readOnly }), - // Optional: points to a secret object containing parameters used to connect to OpenStack. - secretRef:: { - local __secretRefMixin(secretRef) = __cinderMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withVolumeId(volumeId):: self + __cinderMixin({ volumeID: volumeId }), - }, - cinderType:: hidden.core.v1.cinderPersistentVolumeSource, - // 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:: { - local __claimRefMixin(claimRef) = __specMixin({ claimRef+: claimRef }), - mixinInstance(claimRef):: __claimRefMixin(claimRef), - // 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. - withFieldPath(fieldPath):: self + __claimRefMixin({ fieldPath: fieldPath }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __claimRefMixin({ name: name }), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __claimRefMixin({ namespace: namespace }), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __claimRefMixin({ resourceVersion: resourceVersion }), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __claimRefMixin({ uid: uid }), - }, - claimRefType:: hidden.core.v1.objectReference, - // CSI represents storage that is handled by an external CSI driver (Beta feature). - csi:: { - local __csiMixin(csi) = __specMixin({ csi+: csi }), - mixinInstance(csi):: __csiMixin(csi), - // 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:: { - local __controllerPublishSecretRefMixin(controllerPublishSecretRef) = __csiMixin({ controllerPublishSecretRef+: controllerPublishSecretRef }), - mixinInstance(controllerPublishSecretRef):: __controllerPublishSecretRefMixin(controllerPublishSecretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __controllerPublishSecretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __controllerPublishSecretRefMixin({ namespace: namespace }), - }, - controllerPublishSecretRefType:: hidden.core.v1.secretReference, - // Driver is the name of the driver to use for this volume. Required. - withDriver(driver):: self + __csiMixin({ driver: driver }), - // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". - withFsType(fsType):: self + __csiMixin({ fsType: 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:: { - local __nodePublishSecretRefMixin(nodePublishSecretRef) = __csiMixin({ nodePublishSecretRef+: nodePublishSecretRef }), - mixinInstance(nodePublishSecretRef):: __nodePublishSecretRefMixin(nodePublishSecretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __nodePublishSecretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __nodePublishSecretRefMixin({ namespace: namespace }), - }, - nodePublishSecretRefType:: hidden.core.v1.secretReference, - // 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:: { - local __nodeStageSecretRefMixin(nodeStageSecretRef) = __csiMixin({ nodeStageSecretRef+: nodeStageSecretRef }), - mixinInstance(nodeStageSecretRef):: __nodeStageSecretRefMixin(nodeStageSecretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __nodeStageSecretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __nodeStageSecretRefMixin({ namespace: namespace }), - }, - nodeStageSecretRefType:: hidden.core.v1.secretReference, - // Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write). - withReadOnly(readOnly):: self + __csiMixin({ readOnly: readOnly }), - // Attributes of the volume to publish. - withVolumeAttributes(volumeAttributes):: self + __csiMixin({ volumeAttributes: volumeAttributes }), - // Attributes of the volume to publish. - withVolumeAttributesMixin(volumeAttributes):: self + __csiMixin({ volumeAttributes+: volumeAttributes }), - // VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required. - withVolumeHandle(volumeHandle):: self + __csiMixin({ volumeHandle: volumeHandle }), - }, - csiType:: hidden.core.v1.csiPersistentVolumeSource, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc:: { - local __fcMixin(fc) = __specMixin({ fc+: fc }), - mixinInstance(fc):: __fcMixin(fc), - // 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. - withFsType(fsType):: self + __fcMixin({ fsType: fsType }), - // Optional: FC target lun number - withLun(lun):: self + __fcMixin({ lun: lun }), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __fcMixin({ readOnly: readOnly }), - // Optional: FC target worldwide names (WWNs) - withTargetWwns(targetWwns):: self + if std.type(targetWwns) == 'array' then __fcMixin({ targetWWNs: targetWwns }) else __fcMixin({ targetWWNs: [targetWwns] }), - // Optional: FC target worldwide names (WWNs) - withTargetWwnsMixin(targetWwns):: self + if std.type(targetWwns) == 'array' then __fcMixin({ targetWWNs+: targetWwns }) else __fcMixin({ targetWWNs+: [targetWwns] }), - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwids(wwids):: self + if std.type(wwids) == 'array' then __fcMixin({ wwids: wwids }) else __fcMixin({ wwids: [wwids] }), - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwidsMixin(wwids):: self + if std.type(wwids) == 'array' then __fcMixin({ wwids+: wwids }) else __fcMixin({ wwids+: [wwids] }), - }, - fcType:: hidden.core.v1.fcVolumeSource, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. - flexVolume:: { - local __flexVolumeMixin(flexVolume) = __specMixin({ flexVolume+: flexVolume }), - mixinInstance(flexVolume):: __flexVolumeMixin(flexVolume), - // Driver is the name of the driver to use for this volume. - withDriver(driver):: self + __flexVolumeMixin({ driver: 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. - withFsType(fsType):: self + __flexVolumeMixin({ fsType: fsType }), - // Optional: Extra command options if any. - withOptions(options):: self + __flexVolumeMixin({ options: options }), - // Optional: Extra command options if any. - withOptionsMixin(options):: self + __flexVolumeMixin({ options+: options }), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __flexVolumeMixin({ readOnly: 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:: { - local __secretRefMixin(secretRef) = __flexVolumeMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - }, - flexVolumeType:: hidden.core.v1.flexPersistentVolumeSource, - // 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:: { - local __flockerMixin(flocker) = __specMixin({ flocker+: flocker }), - mixinInstance(flocker):: __flockerMixin(flocker), - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - withDatasetName(datasetName):: self + __flockerMixin({ datasetName: datasetName }), - // UUID of the dataset. This is unique identifier of a Flocker dataset - withDatasetUuid(datasetUuid):: self + __flockerMixin({ datasetUUID: datasetUuid }), - }, - flockerType:: hidden.core.v1.flockerVolumeSource, - // 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:: { - local __gcePersistentDiskMixin(gcePersistentDisk) = __specMixin({ gcePersistentDisk+: gcePersistentDisk }), - mixinInstance(gcePersistentDisk):: __gcePersistentDiskMixin(gcePersistentDisk), - // 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 - withFsType(fsType):: self + __gcePersistentDiskMixin({ fsType: 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 - withPartition(partition):: self + __gcePersistentDiskMixin({ partition: partition }), - // 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 - withPdName(pdName):: self + __gcePersistentDiskMixin({ pdName: pdName }), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - withReadOnly(readOnly):: self + __gcePersistentDiskMixin({ readOnly: readOnly }), - }, - gcePersistentDiskType:: hidden.core.v1.gcePersistentDiskVolumeSource, - // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs:: { - local __glusterfsMixin(glusterfs) = __specMixin({ glusterfs+: glusterfs }), - mixinInstance(glusterfs):: __glusterfsMixin(glusterfs), - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withEndpoints(endpoints):: self + __glusterfsMixin({ endpoints: endpoints }), - // 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://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withEndpointsNamespace(endpointsNamespace):: self + __glusterfsMixin({ endpointsNamespace: endpointsNamespace }), - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withPath(path):: self + __glusterfsMixin({ path: path }), - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withReadOnly(readOnly):: self + __glusterfsMixin({ readOnly: readOnly }), - }, - glusterfsType:: hidden.core.v1.glusterfsPersistentVolumeSource, - // 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:: { - local __hostPathMixin(hostPath) = __specMixin({ hostPath+: hostPath }), - mixinInstance(hostPath):: __hostPathMixin(hostPath), - // 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 - withPath(path):: self + __hostPathMixin({ path: path }), - // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - withType(type):: self + __hostPathMixin({ type: type }), - }, - hostPathType:: hidden.core.v1.hostPathVolumeSource, - // 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:: { - local __iscsiMixin(iscsi) = __specMixin({ iscsi+: iscsi }), - mixinInstance(iscsi):: __iscsiMixin(iscsi), - // whether support iSCSI Discovery CHAP authentication - withChapAuthDiscovery(chapAuthDiscovery):: self + __iscsiMixin({ chapAuthDiscovery: chapAuthDiscovery }), - // whether support iSCSI Session CHAP authentication - withChapAuthSession(chapAuthSession):: self + __iscsiMixin({ chapAuthSession: 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 - withFsType(fsType):: self + __iscsiMixin({ fsType: fsType }), - // Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - withInitiatorName(initiatorName):: self + __iscsiMixin({ initiatorName: initiatorName }), - // Target iSCSI Qualified Name. - withIqn(iqn):: self + __iscsiMixin({ iqn: iqn }), - // iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). - withIscsiInterface(iscsiInterface):: self + __iscsiMixin({ iscsiInterface: iscsiInterface }), - // iSCSI Target Lun number. - withLun(lun):: self + __iscsiMixin({ lun: lun }), - // 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). - withPortals(portals):: self + if std.type(portals) == 'array' then __iscsiMixin({ portals: portals }) else __iscsiMixin({ portals: [portals] }), - // 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). - withPortalsMixin(portals):: self + if std.type(portals) == 'array' then __iscsiMixin({ portals+: portals }) else __iscsiMixin({ portals+: [portals] }), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - withReadOnly(readOnly):: self + __iscsiMixin({ readOnly: readOnly }), - // CHAP Secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = __iscsiMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - // 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). - withTargetPortal(targetPortal):: self + __iscsiMixin({ targetPortal: targetPortal }), - }, - iscsiType:: hidden.core.v1.iscsiPersistentVolumeSource, - // Local represents directly-attached storage with node affinity - localStorage:: { - local __localStorageMixin(localStorage) = __specMixin({ localStorage+: localStorage }), - mixinInstance(localStorage):: __localStorageMixin(localStorage), - // 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. - withFsType(fsType):: self + __localStorageMixin({ fsType: fsType }), - // The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...). - withPath(path):: self + __localStorageMixin({ path: path }), - }, - localType:: hidden.core.v1.localVolumeSource, - // 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 - withMountOptions(mountOptions):: self + if std.type(mountOptions) == 'array' then __specMixin({ mountOptions: mountOptions }) else __specMixin({ mountOptions: [mountOptions] }), - // 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 - withMountOptionsMixin(mountOptions):: self + if std.type(mountOptions) == 'array' then __specMixin({ mountOptions+: mountOptions }) else __specMixin({ mountOptions+: [mountOptions] }), - // NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - nfs:: { - local __nfsMixin(nfs) = __specMixin({ nfs+: nfs }), - mixinInstance(nfs):: __nfsMixin(nfs), - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withPath(path):: self + __nfsMixin({ path: path }), - // 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 - withReadOnly(readOnly):: self + __nfsMixin({ readOnly: readOnly }), - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withServer(server):: self + __nfsMixin({ server: server }), - }, - nfsType:: hidden.core.v1.nfsVolumeSource, - // 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:: { - local __nodeAffinityMixin(nodeAffinity) = __specMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // Required specifies hard node constraints that must be met. - required:: { - local __requiredMixin(required) = __nodeAffinityMixin({ required+: required }), - mixinInstance(required):: __requiredMixin(required), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.volumeNodeAffinity, - // 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 - withPersistentVolumeReclaimPolicy(persistentVolumeReclaimPolicy):: self + __specMixin({ persistentVolumeReclaimPolicy: persistentVolumeReclaimPolicy }), - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk:: { - local __photonPersistentDiskMixin(photonPersistentDisk) = __specMixin({ photonPersistentDisk+: photonPersistentDisk }), - mixinInstance(photonPersistentDisk):: __photonPersistentDiskMixin(photonPersistentDisk), - // 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. - withFsType(fsType):: self + __photonPersistentDiskMixin({ fsType: fsType }), - // ID that identifies Photon Controller persistent disk - withPdId(pdId):: self + __photonPersistentDiskMixin({ pdID: pdId }), - }, - photonPersistentDiskType:: hidden.core.v1.photonPersistentDiskVolumeSource, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume:: { - local __portworxVolumeMixin(portworxVolume) = __specMixin({ portworxVolume+: portworxVolume }), - mixinInstance(portworxVolume):: __portworxVolumeMixin(portworxVolume), - // 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. - withFsType(fsType):: self + __portworxVolumeMixin({ fsType: fsType }), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __portworxVolumeMixin({ readOnly: readOnly }), - // VolumeID uniquely identifies a Portworx volume - withVolumeId(volumeId):: self + __portworxVolumeMixin({ volumeID: volumeId }), - }, - portworxVolumeType:: hidden.core.v1.portworxVolumeSource, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte:: { - local __quobyteMixin(quobyte) = __specMixin({ quobyte+: quobyte }), - mixinInstance(quobyte):: __quobyteMixin(quobyte), - // Group to map volume access to Default is no group - withGroup(group):: self + __quobyteMixin({ group: group }), - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - withReadOnly(readOnly):: self + __quobyteMixin({ readOnly: readOnly }), - // 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 - withRegistry(registry):: self + __quobyteMixin({ registry: registry }), - // Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin - withTenant(tenant):: self + __quobyteMixin({ tenant: tenant }), - // User to map volume access to Defaults to serivceaccount user - withUser(user):: self + __quobyteMixin({ user: user }), - // Volume is a string that references an already created Quobyte volume by name. - withVolume(volume):: self + __quobyteMixin({ volume: volume }), - }, - quobyteType:: hidden.core.v1.quobyteVolumeSource, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd:: { - local __rbdMixin(rbd) = __specMixin({ rbd+: rbd }), - mixinInstance(rbd):: __rbdMixin(rbd), - // 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 - withFsType(fsType):: self + __rbdMixin({ fsType: fsType }), - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withImage(image):: self + __rbdMixin({ image: image }), - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withKeyring(keyring):: self + __rbdMixin({ keyring: keyring }), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == 'array' then __rbdMixin({ monitors: monitors }) else __rbdMixin({ monitors: [monitors] }), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == 'array' then __rbdMixin({ monitors+: monitors }) else __rbdMixin({ monitors+: [monitors] }), - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withPool(pool):: self + __rbdMixin({ pool: pool }), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withReadOnly(readOnly):: self + __rbdMixin({ readOnly: readOnly }), - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __rbdMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withUser(user):: self + __rbdMixin({ user: user }), - }, - rbdType:: hidden.core.v1.rbdPersistentVolumeSource, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIo:: { - local __scaleIoMixin(scaleIo) = __specMixin({ scaleIo+: scaleIo }), - mixinInstance(scaleIo):: __scaleIoMixin(scaleIo), - // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs" - withFsType(fsType):: self + __scaleIoMixin({ fsType: fsType }), - // The host address of the ScaleIO API Gateway. - withGateway(gateway):: self + __scaleIoMixin({ gateway: gateway }), - // The name of the ScaleIO Protection Domain for the configured storage. - withProtectionDomain(protectionDomain):: self + __scaleIoMixin({ protectionDomain: protectionDomain }), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __scaleIoMixin({ readOnly: readOnly }), - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = __scaleIoMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - // Flag to enable/disable SSL communication with Gateway, default false - withSslEnabled(sslEnabled):: self + __scaleIoMixin({ sslEnabled: sslEnabled }), - // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. - withStorageMode(storageMode):: self + __scaleIoMixin({ storageMode: storageMode }), - // The ScaleIO Storage Pool associated with the protection domain. - withStoragePool(storagePool):: self + __scaleIoMixin({ storagePool: storagePool }), - // The name of the storage system as configured in ScaleIO. - withSystem(system):: self + __scaleIoMixin({ system: system }), - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - withVolumeName(volumeName):: self + __scaleIoMixin({ volumeName: volumeName }), - }, - scaleIOType:: hidden.core.v1.scaleIoPersistentVolumeSource, - // Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass. - withStorageClassName(storageClassName):: self + __specMixin({ storageClassName: storageClassName }), - // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md - storageos:: { - local __storageosMixin(storageos) = __specMixin({ storageos+: storageos }), - mixinInstance(storageos):: __storageosMixin(storageos), - // 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. - withFsType(fsType):: self + __storageosMixin({ fsType: fsType }), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __storageosMixin({ readOnly: readOnly }), - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = __storageosMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // 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. - withFieldPath(fieldPath):: self + __secretRefMixin({ fieldPath: fieldPath }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __secretRefMixin({ resourceVersion: resourceVersion }), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __secretRefMixin({ uid: uid }), - }, - secretRefType:: hidden.core.v1.objectReference, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - withVolumeName(volumeName):: self + __storageosMixin({ volumeName: 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. - withVolumeNamespace(volumeNamespace):: self + __storageosMixin({ volumeNamespace: volumeNamespace }), - }, - storageosType:: hidden.core.v1.storageOsPersistentVolumeSource, - // 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. This is a beta feature. - withVolumeMode(volumeMode):: self + __specMixin({ volumeMode: volumeMode }), - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume:: { - local __vsphereVolumeMixin(vsphereVolume) = __specMixin({ vsphereVolume+: vsphereVolume }), - mixinInstance(vsphereVolume):: __vsphereVolumeMixin(vsphereVolume), - // 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. - withFsType(fsType):: self + __vsphereVolumeMixin({ fsType: fsType }), - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - withStoragePolicyId(storagePolicyId):: self + __vsphereVolumeMixin({ storagePolicyID: storagePolicyId }), - // Storage Policy Based Management (SPBM) profile name. - withStoragePolicyName(storagePolicyName):: self + __vsphereVolumeMixin({ storagePolicyName: storagePolicyName }), - // Path that identifies vSphere volume vmdk - withVolumePath(volumePath):: self + __vsphereVolumeMixin({ volumePath: volumePath }), - }, - vsphereVolumeType:: hidden.core.v1.vsphereVirtualDiskVolumeSource, - }, - specType:: hidden.core.v1.persistentVolumeSpec, - }, - }, - // PersistentVolumeClaim is a user's request for and claim to a persistent volume - persistentVolumeClaim:: { - local kind = { kind: 'PersistentVolumeClaim' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - withAccessModes(accessModes):: self + if std.type(accessModes) == 'array' then __specMixin({ accessModes: accessModes }) else __specMixin({ accessModes: [accessModes] }), - // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - withAccessModesMixin(accessModes):: self + if std.type(accessModes) == 'array' then __specMixin({ accessModes+: accessModes }) else __specMixin({ accessModes+: [accessModes] }), - // This field requires the VolumeSnapshotDataSource alpha feature gate to be enabled and currently VolumeSnapshot is the only supported data source. If the provisioner can support VolumeSnapshot data source, it will create a new volume and data will be restored to the volume at the same time. If the provisioner does not support VolumeSnapshot data source, volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change. - dataSource:: { - local __dataSourceMixin(dataSource) = __specMixin({ dataSource+: dataSource }), - mixinInstance(dataSource):: __dataSourceMixin(dataSource), - // 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. - withApiGroup(apiGroup):: self + __dataSourceMixin({ apiGroup: apiGroup }), - // Kind is the type of resource being referenced - withKind(kind):: self + __dataSourceMixin({ kind: kind }), - // Name is the name of resource being referenced - withName(name):: self + __dataSourceMixin({ name: name }), - }, - dataSourceType:: hidden.core.v1.typedLocalObjectReference, - // Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources:: { - local __resourcesMixin(resources) = __specMixin({ resources+: resources }), - mixinInstance(resources):: __resourcesMixin(resources), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimits(limits):: self + __resourcesMixin({ limits: limits }), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimitsMixin(limits):: self + __resourcesMixin({ limits+: 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-compute-resources-container/ - withRequests(requests):: self + __resourcesMixin({ requests: requests }), - // 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-compute-resources-container/ - withRequestsMixin(requests):: self + __resourcesMixin({ requests+: requests }), - }, - resourcesType:: hidden.core.v1.resourceRequirements, - // A label query over volumes to consider for binding. - selector:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - withStorageClassName(storageClassName):: self + __specMixin({ storageClassName: storageClassName }), - // volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature. - withVolumeMode(volumeMode):: self + __specMixin({ volumeMode: volumeMode }), - // VolumeName is the binding reference to the PersistentVolume backing this claim. - withVolumeName(volumeName):: self + __specMixin({ volumeName: volumeName }), - }, - specType:: hidden.core.v1.persistentVolumeClaimSpec, - }, - }, - // Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts. - pod:: { - local kind = { kind: 'Pod' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - }, - // PodTemplate describes a template for creating copies of a predefined pod. - podTemplate:: { - local kind = { kind: 'PodTemplate' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Template defines the pods that will be created from this pod template. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - template:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // ReplicationController represents the configuration of a replication controller. - replicationController:: { - local kind = { kind: 'ReplicationController' }, - new():: apiVersion + kind, - mixin:: { - // 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/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({ minReadySeconds: 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 - withReplicas(replicas):: self + __specMixin({ replicas: 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 - withSelector(selector):: self + __specMixin({ selector: selector }), - // 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 - withSelectorMixin(selector):: self + __specMixin({ selector+: 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.core.v1.replicationControllerSpec, - }, - }, - // ResourceQuota sets aggregate quota restrictions enforced per namespace - resourceQuota:: { - local kind = { kind: 'ResourceQuota' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - withHard(hard):: self + __specMixin({ hard: hard }), - // hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - withHardMixin(hard):: self + __specMixin({ hard+: hard }), - // 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:: { - local __scopeSelectorMixin(scopeSelector) = __specMixin({ scopeSelector+: scopeSelector }), - mixinInstance(scopeSelector):: __scopeSelectorMixin(scopeSelector), - // A list of scope selector requirements by scope of the resources. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __scopeSelectorMixin({ matchExpressions: matchExpressions }) else __scopeSelectorMixin({ matchExpressions: [matchExpressions] }), - // A list of scope selector requirements by scope of the resources. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __scopeSelectorMixin({ matchExpressions+: matchExpressions }) else __scopeSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.core.v1.scopedResourceSelectorRequirement, - }, - scopeSelectorType:: hidden.core.v1.scopeSelector, - // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. - withScopes(scopes):: self + if std.type(scopes) == 'array' then __specMixin({ scopes: scopes }) else __specMixin({ scopes: [scopes] }), - // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. - withScopesMixin(scopes):: self + if std.type(scopes) == 'array' then __specMixin({ scopes+: scopes }) else __specMixin({ scopes+: [scopes] }), - }, - specType:: hidden.core.v1.resourceQuotaSpec, - }, - }, - // Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes. - secret:: { - local kind = { kind: 'Secret' }, - new(name='', data='', type='Opaque'):: apiVersion + kind + self.withData(data).withType(type) + self.mixin.metadata.withName(name), - // 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 - withData(data):: self + { data: data }, - // 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 - withDataMixin(data):: self + { data+: data }, - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. - withStringData(stringData):: self + { stringData: stringData }, - // stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API. - withStringDataMixin(stringData):: self + { stringData+: stringData }, - // Used to facilitate programmatic handling of secret data. - withType(type):: self + { type: type }, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // 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. - service:: { - local kind = { kind: 'Service' }, - new(name='', selector='', ports=''):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withPorts(ports).withSelector(selector), - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec defines the behavior of a service. https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - withClusterIp(clusterIp):: self + __specMixin({ clusterIP: clusterIp }), - // 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. - withExternalIps(externalIps):: self + if std.type(externalIps) == 'array' then __specMixin({ externalIPs: externalIps }) else __specMixin({ externalIPs: [externalIps] }), - // 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. - withExternalIpsMixin(externalIps):: self + if std.type(externalIps) == 'array' then __specMixin({ externalIPs+: externalIps }) else __specMixin({ externalIPs+: [externalIps] }), - // externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName. - withExternalName(externalName):: self + __specMixin({ externalName: 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. - withExternalTrafficPolicy(externalTrafficPolicy):: self + __specMixin({ externalTrafficPolicy: externalTrafficPolicy }), - // healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local. - withHealthCheckNodePort(healthCheckNodePort):: self + __specMixin({ healthCheckNodePort: healthCheckNodePort }), - // 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. - withLoadBalancerIp(loadBalancerIp):: self + __specMixin({ loadBalancerIP: 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/configure-cloud-provider-firewall/ - withLoadBalancerSourceRanges(loadBalancerSourceRanges):: self + if std.type(loadBalancerSourceRanges) == 'array' then __specMixin({ loadBalancerSourceRanges: loadBalancerSourceRanges }) else __specMixin({ loadBalancerSourceRanges: [loadBalancerSourceRanges] }), - // 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/configure-cloud-provider-firewall/ - withLoadBalancerSourceRangesMixin(loadBalancerSourceRanges):: self + if std.type(loadBalancerSourceRanges) == 'array' then __specMixin({ loadBalancerSourceRanges+: loadBalancerSourceRanges }) else __specMixin({ loadBalancerSourceRanges+: [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 - withPorts(ports):: self + if std.type(ports) == 'array' then __specMixin({ ports: ports }) else __specMixin({ ports: [ports] }), - // 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 - withPortsMixin(ports):: self + if std.type(ports) == 'array' then __specMixin({ ports+: ports }) else __specMixin({ ports+: [ports] }), - portsType:: hidden.core.v1.servicePort, - // publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery. - withPublishNotReadyAddresses(publishNotReadyAddresses):: self + __specMixin({ publishNotReadyAddresses: 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. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ - withSelector(selector):: self + __specMixin({ selector: selector }), - // 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. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ - withSelectorMixin(selector):: self + __specMixin({ selector+: 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 - withSessionAffinity(sessionAffinity):: self + __specMixin({ sessionAffinity: sessionAffinity }), - // sessionAffinityConfig contains the configurations of session affinity. - sessionAffinityConfig:: { - local __sessionAffinityConfigMixin(sessionAffinityConfig) = __specMixin({ sessionAffinityConfig+: sessionAffinityConfig }), - mixinInstance(sessionAffinityConfig):: __sessionAffinityConfigMixin(sessionAffinityConfig), - // clientIP contains the configurations of Client IP based session affinity. - clientIp:: { - local __clientIpMixin(clientIp) = __sessionAffinityConfigMixin({ clientIp+: clientIp }), - mixinInstance(clientIp):: __clientIpMixin(clientIp), - // 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). - withTimeoutSeconds(timeoutSeconds):: self + __clientIpMixin({ timeoutSeconds: timeoutSeconds }), - }, - clientIPType:: hidden.core.v1.clientIpConfig, - }, - sessionAffinityConfigType:: hidden.core.v1.sessionAffinityConfig, - // type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to the specified externalName. "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. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types - withType(type):: self + __specMixin({ type: type }), - }, - specType:: hidden.core.v1.serviceSpec, - }, - }, - // 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 - serviceAccount:: { - local kind = { kind: 'ServiceAccount' }, - new(name=''):: apiVersion + kind + self.mixin.metadata.withName(name), - // AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + { automountServiceAccountToken: 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then { imagePullSecrets: imagePullSecrets } else { imagePullSecrets: [imagePullSecrets] }, - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then { imagePullSecrets+: imagePullSecrets } else { imagePullSecrets+: [imagePullSecrets] }, - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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 - withSecrets(secrets):: self + if std.type(secrets) == 'array' then { secrets: secrets } else { secrets: [secrets] }, - // 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 - withSecretsMixin(secrets):: self + if std.type(secrets) == 'array' then { secrets+: secrets } else { secrets+: [secrets] }, - secretsType:: hidden.core.v1.objectReference, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - }, - }, - events:: { - v1beta1:: { - local apiVersion = { apiVersion: 'events.k8s.io/v1beta1' }, - // Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system. - event:: { - local kind = { kind: 'Event' }, - new():: apiVersion + kind, - // What action was taken/failed regarding to the regarding object. - withAction(action):: self + { action: action }, - // Deprecated field assuring backward compatibility with core.v1 Event type - withDeprecatedCount(deprecatedCount):: self + { deprecatedCount: deprecatedCount }, - // Deprecated field assuring backward compatibility with core.v1 Event type - withDeprecatedFirstTimestamp(deprecatedFirstTimestamp):: self + { deprecatedFirstTimestamp: deprecatedFirstTimestamp }, - // Deprecated field assuring backward compatibility with core.v1 Event type - withDeprecatedLastTimestamp(deprecatedLastTimestamp):: self + { deprecatedLastTimestamp: deprecatedLastTimestamp }, - // Required. Time when this Event was first observed. - withEventTime(eventTime):: self + { eventTime: eventTime }, - // Optional. 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. - withNote(note):: self + { note: note }, - // Why the action was taken. - withReason(reason):: self + { reason: reason }, - // Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. - withReportingController(reportingController):: self + { reportingController: reportingController }, - // ID of the controller instance, e.g. `kubelet-xyzf`. - withReportingInstance(reportingInstance):: self + { reportingInstance: reportingInstance }, - // Type of this event (Normal, Warning), new types could be added in the future. - withType(type):: self + { type: type }, - mixin:: { - // Deprecated field assuring backward compatibility with core.v1 Event type - deprecatedSource:: { - local __deprecatedSourceMixin(deprecatedSource) = { deprecatedSource+: deprecatedSource }, - mixinInstance(deprecatedSource):: __deprecatedSourceMixin(deprecatedSource), - // Component from which the event is generated. - withComponent(component):: self + __deprecatedSourceMixin({ component: component }), - // Node name on which the event is generated. - withHost(host):: self + __deprecatedSourceMixin({ host: host }), - }, - deprecatedSourceType:: hidden.core.v1.eventSource, - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __regardingMixin(regarding) = { regarding+: regarding }, - mixinInstance(regarding):: __regardingMixin(regarding), - // 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. - withFieldPath(fieldPath):: self + __regardingMixin({ fieldPath: fieldPath }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __regardingMixin({ name: name }), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __regardingMixin({ namespace: namespace }), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __regardingMixin({ resourceVersion: resourceVersion }), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __regardingMixin({ uid: uid }), - }, - regardingType:: hidden.core.v1.objectReference, - // Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object. - related:: { - local __relatedMixin(related) = { related+: related }, - mixinInstance(related):: __relatedMixin(related), - // 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. - withFieldPath(fieldPath):: self + __relatedMixin({ fieldPath: fieldPath }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __relatedMixin({ name: name }), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __relatedMixin({ namespace: namespace }), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __relatedMixin({ resourceVersion: resourceVersion }), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __relatedMixin({ uid: uid }), - }, - relatedType:: hidden.core.v1.objectReference, - // Data about the Event series this event represents or nil if it's a singleton Event. - series:: { - local __seriesMixin(series) = { series+: series }, - mixinInstance(series):: __seriesMixin(series), - // Number of occurrences in this series up to the last heartbeat time - withCount(count):: self + __seriesMixin({ count: count }), - // Time when last Event from the series was seen before last heartbeat. - withLastObservedTime(lastObservedTime):: self + __seriesMixin({ lastObservedTime: lastObservedTime }), - // Information whether this series is ongoing or finished. - withState(state):: self + __seriesMixin({ state: state }), - }, - seriesType:: hidden.events.v1beta1.eventSeries, - }, - }, - }, - }, - extensions:: { - v1beta1:: { - local apiVersion = { apiVersion: 'extensions/v1beta1' }, - // DEPRECATED - This group version of DaemonSet is deprecated by apps/v1beta2/DaemonSet. See the release notes for more information. DaemonSet represents the configuration of a daemon set. - daemonSet:: { - local kind = { kind: 'DaemonSet' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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). - withMinReadySeconds(minReadySeconds):: self + __specMixin({ minReadySeconds: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({ revisionHistoryLimit: revisionHistoryLimit }), - // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation. - withTemplateGeneration(templateGeneration):: self + __specMixin({ templateGeneration: templateGeneration }), - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = __specMixin({ updateStrategy+: updateStrategy }), - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDaemonSet, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. - withType(type):: self + __updateStrategyMixin({ type: type }), - }, - updateStrategyType:: hidden.extensions.v1beta1.daemonSetUpdateStrategy, - }, - specType:: hidden.extensions.v1beta1.daemonSetSpec, - }, - }, - // DEPRECATED - This group version of Deployment is deprecated by apps/v1beta2/Deployment. See the release notes for more information. Deployment enables declarative updates for Pods and ReplicaSets. - deployment:: { - local kind = { kind: 'Deployment' }, - new(name='', replicas=1, containers='', podLabels={ app: 'name' }):: apiVersion + kind + self.mixin.metadata.withName(name) + self.mixin.spec.withReplicas(replicas) + self.mixin.spec.template.metadata.withLabels(podLabels) + self.mixin.spec.template.spec.withContainers(containers), - mixin:: { - // Standard object metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the Deployment. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({ minReadySeconds: minReadySeconds }), - // Indicates that the deployment is paused and will not be processed by the deployment controller. - withPaused(paused):: self + __specMixin({ paused: 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. This is set to the max value of int32 (i.e. 2147483647) by default, which means "no deadline". - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + __specMixin({ progressDeadlineSeconds: progressDeadlineSeconds }), - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + __specMixin({ replicas: replicas }), - // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. This is set to the max value of int32 (i.e. 2147483647) by default, which means "retaining all old RelicaSets". - withRevisionHistoryLimit(revisionHistoryLimit):: self + __specMixin({ revisionHistoryLimit: revisionHistoryLimit }), - // DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = __specMixin({ rollbackTo+: rollbackTo }), - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + __rollbackToMixin({ revision: revision }), - }, - rollbackToType:: hidden.extensions.v1beta1.rollbackConfig, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = __specMixin({ strategy+: strategy }), - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC 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. - withMaxSurge(maxSurge):: self + __rollingUpdateMixin({ maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({ type: type }), - }, - strategyType:: hidden.extensions.v1beta1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.extensions.v1beta1.deploymentSpec, - }, - }, - // DEPRECATED. DeploymentRollback stores the information required to rollback a deployment. - deploymentRollback:: { - local kind = { kind: 'DeploymentRollback' }, - new(name=''):: apiVersion + kind + self.withName(name), - // Required: This must match the Name of a deployment. - withName(name):: self + { name: name }, - // The annotations to be updated to a deployment - withUpdatedAnnotations(updatedAnnotations):: self + { updatedAnnotations: updatedAnnotations }, - // The annotations to be updated to a deployment - withUpdatedAnnotationsMixin(updatedAnnotations):: self + { updatedAnnotations+: updatedAnnotations }, - mixin:: { - // The config of this deployment rollback. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = { rollbackTo+: rollbackTo }, - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + __rollbackToMixin({ revision: revision }), - }, - rollbackToType:: hidden.extensions.v1beta1.rollbackConfig, - }, - }, - // 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. DEPRECATED - This group version of Ingress is deprecated by networking.k8s.io/v1beta1 Ingress. See the release notes for more information. - ingress:: { - local kind = { kind: 'Ingress' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. - backend:: { - local __backendMixin(backend) = __specMixin({ backend+: backend }), - mixinInstance(backend):: __backendMixin(backend), - // Specifies the name of the referenced service. - withServiceName(serviceName):: self + __backendMixin({ serviceName: serviceName }), - // Specifies the port of the referenced service. - withServicePort(servicePort):: self + __backendMixin({ servicePort: servicePort }), - }, - backendType:: hidden.extensions.v1beta1.ingressBackend, - // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. - withRules(rules):: self + if std.type(rules) == 'array' then __specMixin({ rules: rules }) else __specMixin({ rules: [rules] }), - // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. - withRulesMixin(rules):: self + if std.type(rules) == 'array' then __specMixin({ rules+: rules }) else __specMixin({ rules+: [rules] }), - rulesType:: hidden.extensions.v1beta1.ingressRule, - // 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. - withTls(tls):: self + if std.type(tls) == 'array' then __specMixin({ tls: tls }) else __specMixin({ tls: [tls] }), - // 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. - withTlsMixin(tls):: self + if std.type(tls) == 'array' then __specMixin({ tls+: tls }) else __specMixin({ tls+: [tls] }), - tlsType:: hidden.extensions.v1beta1.ingressTls, - }, - specType:: hidden.extensions.v1beta1.ingressSpec, - }, - }, - // DEPRECATED 1.9 - This group version of NetworkPolicy is deprecated by networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a set of Pods - networkPolicy:: { - local kind = { kind: 'NetworkPolicy' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior for this NetworkPolicy. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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 - withEgress(egress):: self + if std.type(egress) == 'array' then __specMixin({ egress: egress }) else __specMixin({ egress: [egress] }), - // 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 - withEgressMixin(egress):: self + if std.type(egress) == 'array' then __specMixin({ egress+: egress }) else __specMixin({ egress+: [egress] }), - egressType:: hidden.extensions.v1beta1.networkPolicyEgressRule, - // 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 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). - withIngress(ingress):: self + if std.type(ingress) == 'array' then __specMixin({ ingress: ingress }) else __specMixin({ ingress: [ingress] }), - // 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 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). - withIngressMixin(ingress):: self + if std.type(ingress) == 'array' then __specMixin({ ingress+: ingress }) else __specMixin({ ingress+: [ingress] }), - ingressType:: hidden.extensions.v1beta1.networkPolicyIngressRule, - // 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:: { - local __podSelectorMixin(podSelector) = __specMixin({ podSelector+: podSelector }), - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __podSelectorMixin({ matchExpressions: matchExpressions }) else __podSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __podSelectorMixin({ matchExpressions+: matchExpressions }) else __podSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __podSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({ matchLabels+: matchLabels }), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - // 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 - withPolicyTypes(policyTypes):: self + if std.type(policyTypes) == 'array' then __specMixin({ policyTypes: policyTypes }) else __specMixin({ policyTypes: [policyTypes] }), - // 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 - withPolicyTypesMixin(policyTypes):: self + if std.type(policyTypes) == 'array' then __specMixin({ policyTypes+: policyTypes }) else __specMixin({ policyTypes+: [policyTypes] }), - }, - specType:: hidden.extensions.v1beta1.networkPolicySpec, - }, - }, - // PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated: use PodSecurityPolicy from policy API Group instead. - podSecurityPolicy:: { - local kind = { kind: 'PodSecurityPolicy' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // spec defines the policy enforced. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true. - withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + __specMixin({ allowPrivilegeEscalation: allowPrivilegeEscalation }), - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value means no CSI drivers can run inline within a pod spec. - withAllowedCsiDrivers(allowedCsiDrivers):: self + if std.type(allowedCsiDrivers) == 'array' then __specMixin({ allowedCSIDrivers: allowedCsiDrivers }) else __specMixin({ allowedCSIDrivers: [allowedCsiDrivers] }), - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value means no CSI drivers can run inline within a pod spec. - withAllowedCsiDriversMixin(allowedCsiDrivers):: self + if std.type(allowedCsiDrivers) == 'array' then __specMixin({ allowedCSIDrivers+: allowedCsiDrivers }) else __specMixin({ allowedCSIDrivers+: [allowedCsiDrivers] }), - allowedCSIDriversType:: hidden.extensions.v1beta1.allowedCsiDriver, - // 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. - withAllowedCapabilities(allowedCapabilities):: self + if std.type(allowedCapabilities) == 'array' then __specMixin({ allowedCapabilities: allowedCapabilities }) else __specMixin({ allowedCapabilities: [allowedCapabilities] }), - // 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. - withAllowedCapabilitiesMixin(allowedCapabilities):: self + if std.type(allowedCapabilities) == 'array' then __specMixin({ allowedCapabilities+: allowedCapabilities }) else __specMixin({ allowedCapabilities+: [allowedCapabilities] }), - // allowedFlexVolumes is a whitelist of allowed 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. - withAllowedFlexVolumes(allowedFlexVolumes):: self + if std.type(allowedFlexVolumes) == 'array' then __specMixin({ allowedFlexVolumes: allowedFlexVolumes }) else __specMixin({ allowedFlexVolumes: [allowedFlexVolumes] }), - // allowedFlexVolumes is a whitelist of allowed 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. - withAllowedFlexVolumesMixin(allowedFlexVolumes):: self + if std.type(allowedFlexVolumes) == 'array' then __specMixin({ allowedFlexVolumes+: allowedFlexVolumes }) else __specMixin({ allowedFlexVolumes+: [allowedFlexVolumes] }), - allowedFlexVolumesType:: hidden.extensions.v1beta1.allowedFlexVolume, - // allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used. - withAllowedHostPaths(allowedHostPaths):: self + if std.type(allowedHostPaths) == 'array' then __specMixin({ allowedHostPaths: allowedHostPaths }) else __specMixin({ allowedHostPaths: [allowedHostPaths] }), - // allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used. - withAllowedHostPathsMixin(allowedHostPaths):: self + if std.type(allowedHostPaths) == 'array' then __specMixin({ allowedHostPaths+: allowedHostPaths }) else __specMixin({ allowedHostPaths+: [allowedHostPaths] }), - allowedHostPathsType:: hidden.extensions.v1beta1.allowedHostPath, - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. - withAllowedProcMountTypes(allowedProcMountTypes):: self + if std.type(allowedProcMountTypes) == 'array' then __specMixin({ allowedProcMountTypes: allowedProcMountTypes }) else __specMixin({ allowedProcMountTypes: [allowedProcMountTypes] }), - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. - withAllowedProcMountTypesMixin(allowedProcMountTypes):: self + if std.type(allowedProcMountTypes) == 'array' then __specMixin({ allowedProcMountTypes+: allowedProcMountTypes }) else __specMixin({ allowedProcMountTypes+: [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 whitelist 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. - withAllowedUnsafeSysctls(allowedUnsafeSysctls):: self + if std.type(allowedUnsafeSysctls) == 'array' then __specMixin({ allowedUnsafeSysctls: allowedUnsafeSysctls }) else __specMixin({ allowedUnsafeSysctls: [allowedUnsafeSysctls] }), - // 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 whitelist 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. - withAllowedUnsafeSysctlsMixin(allowedUnsafeSysctls):: self + if std.type(allowedUnsafeSysctls) == 'array' then __specMixin({ allowedUnsafeSysctls+: allowedUnsafeSysctls }) else __specMixin({ allowedUnsafeSysctls+: [allowedUnsafeSysctls] }), - // 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. - withDefaultAddCapabilities(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == 'array' then __specMixin({ defaultAddCapabilities: defaultAddCapabilities }) else __specMixin({ defaultAddCapabilities: [defaultAddCapabilities] }), - // 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. - withDefaultAddCapabilitiesMixin(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == 'array' then __specMixin({ defaultAddCapabilities+: defaultAddCapabilities }) else __specMixin({ defaultAddCapabilities+: [defaultAddCapabilities] }), - // defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process. - withDefaultAllowPrivilegeEscalation(defaultAllowPrivilegeEscalation):: self + __specMixin({ defaultAllowPrivilegeEscalation: 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. - withForbiddenSysctls(forbiddenSysctls):: self + if std.type(forbiddenSysctls) == 'array' then __specMixin({ forbiddenSysctls: forbiddenSysctls }) else __specMixin({ forbiddenSysctls: [forbiddenSysctls] }), - // 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. - withForbiddenSysctlsMixin(forbiddenSysctls):: self + if std.type(forbiddenSysctls) == 'array' then __specMixin({ forbiddenSysctls+: forbiddenSysctls }) else __specMixin({ forbiddenSysctls+: [forbiddenSysctls] }), - // fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. - fsGroup:: { - local __fsGroupMixin(fsGroup) = __specMixin({ fsGroup+: fsGroup }), - mixinInstance(fsGroup):: __fsGroupMixin(fsGroup), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __fsGroupMixin({ ranges: ranges }) else __fsGroupMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __fsGroupMixin({ ranges+: ranges }) else __fsGroupMixin({ ranges+: [ranges] }), - rangesType:: hidden.extensions.v1beta1.idRange, - // rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - withRule(rule):: self + __fsGroupMixin({ rule: rule }), - }, - fsGroupType:: hidden.extensions.v1beta1.fsGroupStrategyOptions, - // hostIPC determines if the policy allows the use of HostIPC in the pod spec. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // hostPID determines if the policy allows the use of HostPID in the pod spec. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // hostPorts determines which host port ranges are allowed to be exposed. - withHostPorts(hostPorts):: self + if std.type(hostPorts) == 'array' then __specMixin({ hostPorts: hostPorts }) else __specMixin({ hostPorts: [hostPorts] }), - // hostPorts determines which host port ranges are allowed to be exposed. - withHostPortsMixin(hostPorts):: self + if std.type(hostPorts) == 'array' then __specMixin({ hostPorts+: hostPorts }) else __specMixin({ hostPorts+: [hostPorts] }), - hostPortsType:: hidden.extensions.v1beta1.hostPortRange, - // privileged determines if a pod can request to be run as privileged. - withPrivileged(privileged):: self + __specMixin({ privileged: 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. - withReadOnlyRootFilesystem(readOnlyRootFilesystem):: self + __specMixin({ readOnlyRootFilesystem: readOnlyRootFilesystem }), - // requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - withRequiredDropCapabilities(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == 'array' then __specMixin({ requiredDropCapabilities: requiredDropCapabilities }) else __specMixin({ requiredDropCapabilities: [requiredDropCapabilities] }), - // requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - withRequiredDropCapabilitiesMixin(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == 'array' then __specMixin({ requiredDropCapabilities+: requiredDropCapabilities }) else __specMixin({ requiredDropCapabilities+: [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:: { - local __runAsGroupMixin(runAsGroup) = __specMixin({ runAsGroup+: runAsGroup }), - mixinInstance(runAsGroup):: __runAsGroupMixin(runAsGroup), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __runAsGroupMixin({ ranges: ranges }) else __runAsGroupMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __runAsGroupMixin({ ranges+: ranges }) else __runAsGroupMixin({ ranges+: [ranges] }), - rangesType:: hidden.extensions.v1beta1.idRange, - // rule is the strategy that will dictate the allowable RunAsGroup values that may be set. - withRule(rule):: self + __runAsGroupMixin({ rule: rule }), - }, - runAsGroupType:: hidden.extensions.v1beta1.runAsGroupStrategyOptions, - // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. - runAsUser:: { - local __runAsUserMixin(runAsUser) = __specMixin({ runAsUser+: runAsUser }), - mixinInstance(runAsUser):: __runAsUserMixin(runAsUser), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __runAsUserMixin({ ranges: ranges }) else __runAsUserMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __runAsUserMixin({ ranges+: ranges }) else __runAsUserMixin({ ranges+: [ranges] }), - rangesType:: hidden.extensions.v1beta1.idRange, - // rule is the strategy that will dictate the allowable RunAsUser values that may be set. - withRule(rule):: self + __runAsUserMixin({ rule: rule }), - }, - runAsUserType:: hidden.extensions.v1beta1.runAsUserStrategyOptions, - // seLinux is the strategy that will dictate the allowable labels that may be set. - seLinux:: { - local __seLinuxMixin(seLinux) = __specMixin({ seLinux+: seLinux }), - mixinInstance(seLinux):: __seLinuxMixin(seLinux), - // rule is the strategy that will dictate the allowable labels that may be set. - withRule(rule):: self + __seLinuxMixin({ rule: rule }), - // seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - seLinuxOptions:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __seLinuxMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - seLinuxType:: hidden.extensions.v1beta1.seLinuxStrategyOptions, - // supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. - supplementalGroups:: { - local __supplementalGroupsMixin(supplementalGroups) = __specMixin({ supplementalGroups+: supplementalGroups }), - mixinInstance(supplementalGroups):: __supplementalGroupsMixin(supplementalGroups), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __supplementalGroupsMixin({ ranges: ranges }) else __supplementalGroupsMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __supplementalGroupsMixin({ ranges+: ranges }) else __supplementalGroupsMixin({ ranges+: [ranges] }), - rangesType:: hidden.extensions.v1beta1.idRange, - // rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - withRule(rule):: self + __supplementalGroupsMixin({ rule: rule }), - }, - supplementalGroupsType:: hidden.extensions.v1beta1.supplementalGroupsStrategyOptions, - // volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - }, - specType:: hidden.extensions.v1beta1.podSecurityPolicySpec, - }, - }, - // DEPRECATED - This group version of ReplicaSet is deprecated by apps/v1beta2/ReplicaSet. See the release notes for more information. ReplicaSet ensures that a specified number of pod replicas are running at any given time. - replicaSet:: { - local kind = { kind: 'ReplicaSet' }, - new():: apiVersion + kind, - mixin:: { - // 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:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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) - withMinReadySeconds(minReadySeconds):: self + __specMixin({ minReadySeconds: 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 - withReplicas(replicas):: self + __specMixin({ replicas: replicas }), - // Selector is a label query over pods that should match the replica count. If the 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 replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - specType:: hidden.extensions.v1beta1.replicaSetSpec, - }, - }, - // represents a scaling request for a resource. - scale:: { - local kind = { kind: 'Scale' }, - new(replicas=1):: apiVersion + kind + self.mixin.spec.withReplicas(replicas), - mixin:: { - // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // defines the behavior of the scale. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // desired number of instances for the scaled object. - withReplicas(replicas):: self + __specMixin({ replicas: replicas }), - }, - specType:: hidden.extensions.v1beta1.scaleSpec, - }, - }, - }, - }, - meta:: { - v1:: { - local apiVersion = { apiVersion: 'storage.k8s.io/v1' }, - // Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. - volumeAttachment:: { - local kind = { kind: 'VolumeAttachment' }, - new():: apiVersion + kind, - mixin:: {}, - }, - }, - }, - networking:: { - v1:: { - local apiVersion = { apiVersion: 'networking.k8s.io/v1' }, - // NetworkPolicy describes what network traffic is allowed for a set of Pods - networkPolicy:: { - local kind = { kind: 'NetworkPolicy' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior for this NetworkPolicy. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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 - withEgress(egress):: self + if std.type(egress) == 'array' then __specMixin({ egress: egress }) else __specMixin({ egress: [egress] }), - // 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 - withEgressMixin(egress):: self + if std.type(egress) == 'array' then __specMixin({ egress+: egress }) else __specMixin({ egress+: [egress] }), - egressType:: hidden.networking.v1.networkPolicyEgressRule, - // 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) - withIngress(ingress):: self + if std.type(ingress) == 'array' then __specMixin({ ingress: ingress }) else __specMixin({ ingress: [ingress] }), - // 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) - withIngressMixin(ingress):: self + if std.type(ingress) == 'array' then __specMixin({ ingress+: ingress }) else __specMixin({ ingress+: [ingress] }), - ingressType:: hidden.networking.v1.networkPolicyIngressRule, - // 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:: { - local __podSelectorMixin(podSelector) = __specMixin({ podSelector+: podSelector }), - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __podSelectorMixin({ matchExpressions: matchExpressions }) else __podSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __podSelectorMixin({ matchExpressions+: matchExpressions }) else __podSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __podSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({ matchLabels+: matchLabels }), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - // 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 - withPolicyTypes(policyTypes):: self + if std.type(policyTypes) == 'array' then __specMixin({ policyTypes: policyTypes }) else __specMixin({ policyTypes: [policyTypes] }), - // 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 - withPolicyTypesMixin(policyTypes):: self + if std.type(policyTypes) == 'array' then __specMixin({ policyTypes+: policyTypes }) else __specMixin({ policyTypes+: [policyTypes] }), - }, - specType:: hidden.networking.v1.networkPolicySpec, - }, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'networking.k8s.io/v1beta1' }, - // 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. - ingress:: { - local kind = { kind: 'Ingress' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. - backend:: { - local __backendMixin(backend) = __specMixin({ backend+: backend }), - mixinInstance(backend):: __backendMixin(backend), - // Specifies the name of the referenced service. - withServiceName(serviceName):: self + __backendMixin({ serviceName: serviceName }), - // Specifies the port of the referenced service. - withServicePort(servicePort):: self + __backendMixin({ servicePort: servicePort }), - }, - backendType:: hidden.networking.v1beta1.ingressBackend, - // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. - withRules(rules):: self + if std.type(rules) == 'array' then __specMixin({ rules: rules }) else __specMixin({ rules: [rules] }), - // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. - withRulesMixin(rules):: self + if std.type(rules) == 'array' then __specMixin({ rules+: rules }) else __specMixin({ rules+: [rules] }), - rulesType:: hidden.networking.v1beta1.ingressRule, - // 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. - withTls(tls):: self + if std.type(tls) == 'array' then __specMixin({ tls: tls }) else __specMixin({ tls: [tls] }), - // 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. - withTlsMixin(tls):: self + if std.type(tls) == 'array' then __specMixin({ tls+: tls }) else __specMixin({ tls+: [tls] }), - tlsType:: hidden.networking.v1beta1.ingressTls, - }, - specType:: hidden.networking.v1beta1.ingressSpec, - }, - }, - }, - }, - node:: { - v1beta1:: { - local apiVersion = { apiVersion: 'node.k8s.io/v1beta1' }, - // 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/runtime-class.md - runtimeClass:: { - local kind = { kind: 'RuntimeClass' }, - new():: apiVersion + kind, - // 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 conform to the DNS Label (RFC 1123) requirements, and is immutable. - withHandler(handler):: self + { handler: handler }, - mixin:: { - // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - }, - }, - policy:: { - v1beta1:: { - local apiVersion = { apiVersion: 'policy/v1beta1' }, - // 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. - eviction:: { - local kind = { kind: 'Eviction' }, - new():: apiVersion + kind, - mixin:: { - // DeleteOptions may be provided - deleteOptions:: { - local __deleteOptionsMixin(deleteOptions) = { deleteOptions+: deleteOptions }, - mixinInstance(deleteOptions):: __deleteOptionsMixin(deleteOptions), - // 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 - withDryRun(dryRun):: self + if std.type(dryRun) == 'array' then __deleteOptionsMixin({ dryRun: dryRun }) else __deleteOptionsMixin({ dryRun: [dryRun] }), - // 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 - withDryRunMixin(dryRun):: self + if std.type(dryRun) == 'array' then __deleteOptionsMixin({ dryRun+: dryRun }) else __deleteOptionsMixin({ dryRun+: [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. - withGracePeriodSeconds(gracePeriodSeconds):: self + __deleteOptionsMixin({ gracePeriodSeconds: gracePeriodSeconds }), - // 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. - withOrphanDependents(orphanDependents):: self + __deleteOptionsMixin({ orphanDependents: orphanDependents }), - // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. - preconditions:: { - local __preconditionsMixin(preconditions) = __deleteOptionsMixin({ preconditions+: preconditions }), - mixinInstance(preconditions):: __preconditionsMixin(preconditions), - // Specifies the target ResourceVersion - withResourceVersion(resourceVersion):: self + __preconditionsMixin({ resourceVersion: resourceVersion }), - // Specifies the target UID. - withUid(uid):: self + __preconditionsMixin({ uid: uid }), - }, - preconditionsType:: hidden.meta.v1.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. - withPropagationPolicy(propagationPolicy):: self + __deleteOptionsMixin({ propagationPolicy: propagationPolicy }), - }, - deleteOptionsType:: hidden.meta.v1.deleteOptions, - // ObjectMeta describes the pod that is being evicted. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods - podDisruptionBudget:: { - local kind = { kind: 'PodDisruptionBudget' }, - new():: apiVersion + kind, - mixin:: { - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the PodDisruptionBudget. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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". - withMaxUnavailable(maxUnavailable):: self + __specMixin({ maxUnavailable: 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%". - withMinAvailable(minAvailable):: self + __specMixin({ minAvailable: minAvailable }), - // Label query over pods whose evictions are managed by the disruption budget. - selector:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - specType:: hidden.policy.v1beta1.podDisruptionBudgetSpec, - }, - }, - // PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. - podSecurityPolicy:: { - local kind = { kind: 'PodSecurityPolicy' }, - new():: apiVersion + kind, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // spec defines the policy enforced. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true. - withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + __specMixin({ allowPrivilegeEscalation: allowPrivilegeEscalation }), - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value means no CSI drivers can run inline within a pod spec. - withAllowedCsiDrivers(allowedCsiDrivers):: self + if std.type(allowedCsiDrivers) == 'array' then __specMixin({ allowedCSIDrivers: allowedCsiDrivers }) else __specMixin({ allowedCSIDrivers: [allowedCsiDrivers] }), - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value means no CSI drivers can run inline within a pod spec. - withAllowedCsiDriversMixin(allowedCsiDrivers):: self + if std.type(allowedCsiDrivers) == 'array' then __specMixin({ allowedCSIDrivers+: allowedCsiDrivers }) else __specMixin({ allowedCSIDrivers+: [allowedCsiDrivers] }), - allowedCSIDriversType:: hidden.policy.v1beta1.allowedCsiDriver, - // 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. - withAllowedCapabilities(allowedCapabilities):: self + if std.type(allowedCapabilities) == 'array' then __specMixin({ allowedCapabilities: allowedCapabilities }) else __specMixin({ allowedCapabilities: [allowedCapabilities] }), - // 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. - withAllowedCapabilitiesMixin(allowedCapabilities):: self + if std.type(allowedCapabilities) == 'array' then __specMixin({ allowedCapabilities+: allowedCapabilities }) else __specMixin({ allowedCapabilities+: [allowedCapabilities] }), - // allowedFlexVolumes is a whitelist of allowed 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. - withAllowedFlexVolumes(allowedFlexVolumes):: self + if std.type(allowedFlexVolumes) == 'array' then __specMixin({ allowedFlexVolumes: allowedFlexVolumes }) else __specMixin({ allowedFlexVolumes: [allowedFlexVolumes] }), - // allowedFlexVolumes is a whitelist of allowed 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. - withAllowedFlexVolumesMixin(allowedFlexVolumes):: self + if std.type(allowedFlexVolumes) == 'array' then __specMixin({ allowedFlexVolumes+: allowedFlexVolumes }) else __specMixin({ allowedFlexVolumes+: [allowedFlexVolumes] }), - allowedFlexVolumesType:: hidden.policy.v1beta1.allowedFlexVolume, - // allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used. - withAllowedHostPaths(allowedHostPaths):: self + if std.type(allowedHostPaths) == 'array' then __specMixin({ allowedHostPaths: allowedHostPaths }) else __specMixin({ allowedHostPaths: [allowedHostPaths] }), - // allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used. - withAllowedHostPathsMixin(allowedHostPaths):: self + if std.type(allowedHostPaths) == 'array' then __specMixin({ allowedHostPaths+: allowedHostPaths }) else __specMixin({ allowedHostPaths+: [allowedHostPaths] }), - allowedHostPathsType:: hidden.policy.v1beta1.allowedHostPath, - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. - withAllowedProcMountTypes(allowedProcMountTypes):: self + if std.type(allowedProcMountTypes) == 'array' then __specMixin({ allowedProcMountTypes: allowedProcMountTypes }) else __specMixin({ allowedProcMountTypes: [allowedProcMountTypes] }), - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. - withAllowedProcMountTypesMixin(allowedProcMountTypes):: self + if std.type(allowedProcMountTypes) == 'array' then __specMixin({ allowedProcMountTypes+: allowedProcMountTypes }) else __specMixin({ allowedProcMountTypes+: [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 whitelist 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. - withAllowedUnsafeSysctls(allowedUnsafeSysctls):: self + if std.type(allowedUnsafeSysctls) == 'array' then __specMixin({ allowedUnsafeSysctls: allowedUnsafeSysctls }) else __specMixin({ allowedUnsafeSysctls: [allowedUnsafeSysctls] }), - // 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 whitelist 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. - withAllowedUnsafeSysctlsMixin(allowedUnsafeSysctls):: self + if std.type(allowedUnsafeSysctls) == 'array' then __specMixin({ allowedUnsafeSysctls+: allowedUnsafeSysctls }) else __specMixin({ allowedUnsafeSysctls+: [allowedUnsafeSysctls] }), - // 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. - withDefaultAddCapabilities(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == 'array' then __specMixin({ defaultAddCapabilities: defaultAddCapabilities }) else __specMixin({ defaultAddCapabilities: [defaultAddCapabilities] }), - // 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. - withDefaultAddCapabilitiesMixin(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == 'array' then __specMixin({ defaultAddCapabilities+: defaultAddCapabilities }) else __specMixin({ defaultAddCapabilities+: [defaultAddCapabilities] }), - // defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process. - withDefaultAllowPrivilegeEscalation(defaultAllowPrivilegeEscalation):: self + __specMixin({ defaultAllowPrivilegeEscalation: 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. - withForbiddenSysctls(forbiddenSysctls):: self + if std.type(forbiddenSysctls) == 'array' then __specMixin({ forbiddenSysctls: forbiddenSysctls }) else __specMixin({ forbiddenSysctls: [forbiddenSysctls] }), - // 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. - withForbiddenSysctlsMixin(forbiddenSysctls):: self + if std.type(forbiddenSysctls) == 'array' then __specMixin({ forbiddenSysctls+: forbiddenSysctls }) else __specMixin({ forbiddenSysctls+: [forbiddenSysctls] }), - // fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. - fsGroup:: { - local __fsGroupMixin(fsGroup) = __specMixin({ fsGroup+: fsGroup }), - mixinInstance(fsGroup):: __fsGroupMixin(fsGroup), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __fsGroupMixin({ ranges: ranges }) else __fsGroupMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __fsGroupMixin({ ranges+: ranges }) else __fsGroupMixin({ ranges+: [ranges] }), - rangesType:: hidden.policy.v1beta1.idRange, - // rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - withRule(rule):: self + __fsGroupMixin({ rule: rule }), - }, - fsGroupType:: hidden.policy.v1beta1.fsGroupStrategyOptions, - // hostIPC determines if the policy allows the use of HostIPC in the pod spec. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // hostPID determines if the policy allows the use of HostPID in the pod spec. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // hostPorts determines which host port ranges are allowed to be exposed. - withHostPorts(hostPorts):: self + if std.type(hostPorts) == 'array' then __specMixin({ hostPorts: hostPorts }) else __specMixin({ hostPorts: [hostPorts] }), - // hostPorts determines which host port ranges are allowed to be exposed. - withHostPortsMixin(hostPorts):: self + if std.type(hostPorts) == 'array' then __specMixin({ hostPorts+: hostPorts }) else __specMixin({ hostPorts+: [hostPorts] }), - hostPortsType:: hidden.policy.v1beta1.hostPortRange, - // privileged determines if a pod can request to be run as privileged. - withPrivileged(privileged):: self + __specMixin({ privileged: 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. - withReadOnlyRootFilesystem(readOnlyRootFilesystem):: self + __specMixin({ readOnlyRootFilesystem: readOnlyRootFilesystem }), - // requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - withRequiredDropCapabilities(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == 'array' then __specMixin({ requiredDropCapabilities: requiredDropCapabilities }) else __specMixin({ requiredDropCapabilities: [requiredDropCapabilities] }), - // requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - withRequiredDropCapabilitiesMixin(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == 'array' then __specMixin({ requiredDropCapabilities+: requiredDropCapabilities }) else __specMixin({ requiredDropCapabilities+: [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:: { - local __runAsGroupMixin(runAsGroup) = __specMixin({ runAsGroup+: runAsGroup }), - mixinInstance(runAsGroup):: __runAsGroupMixin(runAsGroup), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __runAsGroupMixin({ ranges: ranges }) else __runAsGroupMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __runAsGroupMixin({ ranges+: ranges }) else __runAsGroupMixin({ ranges+: [ranges] }), - rangesType:: hidden.policy.v1beta1.idRange, - // rule is the strategy that will dictate the allowable RunAsGroup values that may be set. - withRule(rule):: self + __runAsGroupMixin({ rule: rule }), - }, - runAsGroupType:: hidden.policy.v1beta1.runAsGroupStrategyOptions, - // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. - runAsUser:: { - local __runAsUserMixin(runAsUser) = __specMixin({ runAsUser+: runAsUser }), - mixinInstance(runAsUser):: __runAsUserMixin(runAsUser), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __runAsUserMixin({ ranges: ranges }) else __runAsUserMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __runAsUserMixin({ ranges+: ranges }) else __runAsUserMixin({ ranges+: [ranges] }), - rangesType:: hidden.policy.v1beta1.idRange, - // rule is the strategy that will dictate the allowable RunAsUser values that may be set. - withRule(rule):: self + __runAsUserMixin({ rule: rule }), - }, - runAsUserType:: hidden.policy.v1beta1.runAsUserStrategyOptions, - // seLinux is the strategy that will dictate the allowable labels that may be set. - seLinux:: { - local __seLinuxMixin(seLinux) = __specMixin({ seLinux+: seLinux }), - mixinInstance(seLinux):: __seLinuxMixin(seLinux), - // rule is the strategy that will dictate the allowable labels that may be set. - withRule(rule):: self + __seLinuxMixin({ rule: rule }), - // seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - seLinuxOptions:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __seLinuxMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - seLinuxType:: hidden.policy.v1beta1.seLinuxStrategyOptions, - // supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. - supplementalGroups:: { - local __supplementalGroupsMixin(supplementalGroups) = __specMixin({ supplementalGroups+: supplementalGroups }), - mixinInstance(supplementalGroups):: __supplementalGroupsMixin(supplementalGroups), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __supplementalGroupsMixin({ ranges: ranges }) else __supplementalGroupsMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __supplementalGroupsMixin({ ranges+: ranges }) else __supplementalGroupsMixin({ ranges+: [ranges] }), - rangesType:: hidden.policy.v1beta1.idRange, - // rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - withRule(rule):: self + __supplementalGroupsMixin({ rule: rule }), - }, - supplementalGroupsType:: hidden.policy.v1beta1.supplementalGroupsStrategyOptions, - // volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - }, - specType:: hidden.policy.v1beta1.podSecurityPolicySpec, - }, - }, - }, - }, - rbac:: { - v1:: { - local apiVersion = { apiVersion: 'rbac.authorization.k8s.io/v1' }, - // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. - clusterRole:: { - local kind = { kind: 'ClusterRole' }, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this ClusterRole - withRules(rules):: self + if std.type(rules) == 'array' then { rules: rules } else { rules: [rules] }, - // Rules holds all the PolicyRules for this ClusterRole - withRulesMixin(rules):: self + if std.type(rules) == 'array' then { rules+: rules } else { rules+: [rules] }, - rulesType:: hidden.rbac.v1.policyRule, - mixin:: { - // 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:: { - local __aggregationRuleMixin(aggregationRule) = { aggregationRule+: aggregationRule }, - mixinInstance(aggregationRule):: __aggregationRuleMixin(aggregationRule), - // 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 - withClusterRoleSelectors(clusterRoleSelectors):: self + if std.type(clusterRoleSelectors) == 'array' then __aggregationRuleMixin({ clusterRoleSelectors: clusterRoleSelectors }) else __aggregationRuleMixin({ clusterRoleSelectors: [clusterRoleSelectors] }), - // 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 - withClusterRoleSelectorsMixin(clusterRoleSelectors):: self + if std.type(clusterRoleSelectors) == 'array' then __aggregationRuleMixin({ clusterRoleSelectors+: clusterRoleSelectors }) else __aggregationRuleMixin({ clusterRoleSelectors+: [clusterRoleSelectors] }), - clusterRoleSelectorsType:: hidden.meta.v1.labelSelector, - }, - aggregationRuleType:: hidden.rbac.v1.aggregationRule, - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. - clusterRoleBinding:: { - local kind = { kind: 'ClusterRoleBinding' }, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - withSubjects(subjects):: self + if std.type(subjects) == 'array' then { subjects: subjects } else { subjects: [subjects] }, - // Subjects holds references to the objects the role applies to. - withSubjectsMixin(subjects):: self + if std.type(subjects) == 'array' then { subjects+: subjects } else { subjects+: [subjects] }, - subjectsType:: hidden.rbac.v1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. - roleRef:: { - local __roleRefMixin(roleRef) = { roleRef+: roleRef }, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + __roleRefMixin({ apiGroup: apiGroup }), - // Kind is the type of resource being referenced - withKind(kind):: self + __roleRefMixin({ kind: kind }), - // Name is the name of resource being referenced - withName(name):: self + __roleRefMixin({ name: name }), - }, - roleRefType:: hidden.rbac.v1.roleRef, - }, - }, - // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. - role:: { - local kind = { kind: 'Role' }, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this Role - withRules(rules):: self + if std.type(rules) == 'array' then { rules: rules } else { rules: [rules] }, - // Rules holds all the PolicyRules for this Role - withRulesMixin(rules):: self + if std.type(rules) == 'array' then { rules+: rules } else { rules+: [rules] }, - rulesType:: hidden.rbac.v1.policyRule, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // 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. - roleBinding:: { - local kind = { kind: 'RoleBinding' }, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - withSubjects(subjects):: self + if std.type(subjects) == 'array' then { subjects: subjects } else { subjects: [subjects] }, - // Subjects holds references to the objects the role applies to. - withSubjectsMixin(subjects):: self + if std.type(subjects) == 'array' then { subjects+: subjects } else { subjects+: [subjects] }, - subjectsType:: hidden.rbac.v1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __roleRefMixin(roleRef) = { roleRef+: roleRef }, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + __roleRefMixin({ apiGroup: apiGroup }), - // Kind is the type of resource being referenced - withKind(kind):: self + __roleRefMixin({ kind: kind }), - // Name is the name of resource being referenced - withName(name):: self + __roleRefMixin({ name: name }), - }, - roleRefType:: hidden.rbac.v1.roleRef, - }, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'rbac.authorization.k8s.io/v1beta1' }, - // ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. - clusterRole:: { - local kind = { kind: 'ClusterRole' }, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this ClusterRole - withRules(rules):: self + if std.type(rules) == 'array' then { rules: rules } else { rules: [rules] }, - // Rules holds all the PolicyRules for this ClusterRole - withRulesMixin(rules):: self + if std.type(rules) == 'array' then { rules+: rules } else { rules+: [rules] }, - rulesType:: hidden.rbac.v1beta1.policyRule, - mixin:: { - // 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:: { - local __aggregationRuleMixin(aggregationRule) = { aggregationRule+: aggregationRule }, - mixinInstance(aggregationRule):: __aggregationRuleMixin(aggregationRule), - // 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 - withClusterRoleSelectors(clusterRoleSelectors):: self + if std.type(clusterRoleSelectors) == 'array' then __aggregationRuleMixin({ clusterRoleSelectors: clusterRoleSelectors }) else __aggregationRuleMixin({ clusterRoleSelectors: [clusterRoleSelectors] }), - // 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 - withClusterRoleSelectorsMixin(clusterRoleSelectors):: self + if std.type(clusterRoleSelectors) == 'array' then __aggregationRuleMixin({ clusterRoleSelectors+: clusterRoleSelectors }) else __aggregationRuleMixin({ clusterRoleSelectors+: [clusterRoleSelectors] }), - clusterRoleSelectorsType:: hidden.meta.v1.labelSelector, - }, - aggregationRuleType:: hidden.rbac.v1beta1.aggregationRule, - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. - clusterRoleBinding:: { - local kind = { kind: 'ClusterRoleBinding' }, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - withSubjects(subjects):: self + if std.type(subjects) == 'array' then { subjects: subjects } else { subjects: [subjects] }, - // Subjects holds references to the objects the role applies to. - withSubjectsMixin(subjects):: self + if std.type(subjects) == 'array' then { subjects+: subjects } else { subjects+: [subjects] }, - subjectsType:: hidden.rbac.v1beta1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. - roleRef:: { - local __roleRefMixin(roleRef) = { roleRef+: roleRef }, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + __roleRefMixin({ apiGroup: apiGroup }), - // Kind is the type of resource being referenced - withKind(kind):: self + __roleRefMixin({ kind: kind }), - // Name is the name of resource being referenced - withName(name):: self + __roleRefMixin({ name: name }), - }, - roleRefType:: hidden.rbac.v1beta1.roleRef, - }, - }, - // Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. - role:: { - local kind = { kind: 'Role' }, - new():: apiVersion + kind, - // Rules holds all the PolicyRules for this Role - withRules(rules):: self + if std.type(rules) == 'array' then { rules: rules } else { rules: [rules] }, - // Rules holds all the PolicyRules for this Role - withRulesMixin(rules):: self + if std.type(rules) == 'array' then { rules+: rules } else { rules+: [rules] }, - rulesType:: hidden.rbac.v1beta1.policyRule, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // 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. - roleBinding:: { - local kind = { kind: 'RoleBinding' }, - new():: apiVersion + kind, - // Subjects holds references to the objects the role applies to. - withSubjects(subjects):: self + if std.type(subjects) == 'array' then { subjects: subjects } else { subjects: [subjects] }, - // Subjects holds references to the objects the role applies to. - withSubjectsMixin(subjects):: self + if std.type(subjects) == 'array' then { subjects+: subjects } else { subjects+: [subjects] }, - subjectsType:: hidden.rbac.v1beta1.subject, - mixin:: { - // Standard object's metadata. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // 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:: { - local __roleRefMixin(roleRef) = { roleRef+: roleRef }, - mixinInstance(roleRef):: __roleRefMixin(roleRef), - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + __roleRefMixin({ apiGroup: apiGroup }), - // Kind is the type of resource being referenced - withKind(kind):: self + __roleRefMixin({ kind: kind }), - // Name is the name of resource being referenced - withName(name):: self + __roleRefMixin({ name: name }), - }, - roleRefType:: hidden.rbac.v1beta1.roleRef, - }, - }, - }, - }, - scheduling:: { - v1:: { - local apiVersion = { apiVersion: 'scheduling.k8s.io/v1' }, - // PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer. - priorityClass:: { - local kind = { kind: 'PriorityClass' }, - new():: apiVersion + kind, - // description is an arbitrary string that usually provides guidelines on when this priority class should be used. - withDescription(description):: self + { description: 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. - withGlobalDefault(globalDefault):: self + { globalDefault: globalDefault }, - // 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. - withValue(value):: self + { value: value }, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'scheduling.k8s.io/v1beta1' }, - // 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. - priorityClass:: { - local kind = { kind: 'PriorityClass' }, - new():: apiVersion + kind, - // description is an arbitrary string that usually provides guidelines on when this priority class should be used. - withDescription(description):: self + { description: 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. - withGlobalDefault(globalDefault):: self + { globalDefault: globalDefault }, - // 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. - withValue(value):: self + { value: value }, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - }, - }, - storage:: { - v1:: { - local apiVersion = { apiVersion: 'storage.k8s.io/v1' }, - // 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. - storageClass:: { - local kind = { kind: 'StorageClass' }, - new():: apiVersion + kind, - // AllowVolumeExpansion shows whether the storage class allow volume expand - withAllowVolumeExpansion(allowVolumeExpansion):: self + { allowVolumeExpansion: allowVolumeExpansion }, - // 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. - withAllowedTopologies(allowedTopologies):: self + if std.type(allowedTopologies) == 'array' then { allowedTopologies: allowedTopologies } else { allowedTopologies: [allowedTopologies] }, - // 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. - withAllowedTopologiesMixin(allowedTopologies):: self + if std.type(allowedTopologies) == 'array' then { allowedTopologies+: allowedTopologies } else { allowedTopologies+: [allowedTopologies] }, - allowedTopologiesType:: hidden.core.v1.topologySelectorTerm, - // 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. - withMountOptions(mountOptions):: self + if std.type(mountOptions) == 'array' then { mountOptions: mountOptions } else { mountOptions: [mountOptions] }, - // 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. - withMountOptionsMixin(mountOptions):: self + if std.type(mountOptions) == 'array' then { mountOptions+: mountOptions } else { mountOptions+: [mountOptions] }, - // Parameters holds the parameters for the provisioner that should create volumes of this storage class. - withParameters(parameters):: self + { parameters: parameters }, - // Parameters holds the parameters for the provisioner that should create volumes of this storage class. - withParametersMixin(parameters):: self + { parameters+: parameters }, - // Provisioner indicates the type of the provisioner. - withProvisioner(provisioner):: self + { provisioner: provisioner }, - // Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete. - withReclaimPolicy(reclaimPolicy):: self + { reclaimPolicy: 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. - withVolumeBindingMode(volumeBindingMode):: self + { volumeBindingMode: volumeBindingMode }, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. - // - // VolumeAttachment objects are non-namespaced. - volumeAttachment:: { - local kind = { kind: 'VolumeAttachment' }, - new():: apiVersion + kind, - mixin:: { - // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName(). - withAttacher(attacher):: self + __specMixin({ attacher: attacher }), - // The node that the volume should be attached to. - withNodeName(nodeName):: self + __specMixin({ nodeName: nodeName }), - // Source represents the volume that should be attached. - source:: { - local __sourceMixin(source) = __specMixin({ source+: source }), - mixinInstance(source):: __sourceMixin(source), - // Name of the persistent volume to attach. - withPersistentVolumeName(persistentVolumeName):: self + __sourceMixin({ persistentVolumeName: persistentVolumeName }), - }, - sourceType:: hidden.storage.v1.volumeAttachmentSource, - }, - specType:: hidden.storage.v1.volumeAttachmentSpec, - }, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'storage.k8s.io/v1beta1' }, - // CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. 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. - csiDriver:: { - local kind = { kind: 'CSIDriver' }, - new():: apiVersion + kind, - mixin:: { - // 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/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the CSI Driver. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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. - withAttachRequired(attachRequired):: self + __specMixin({ attachRequired: attachRequired }), - // 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) - withPodInfoOnMount(podInfoOnMount):: self + __specMixin({ podInfoOnMount: podInfoOnMount }), - }, - specType:: hidden.storage.v1beta1.csiDriverSpec, - }, - }, - // 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. - csiNode:: { - local kind = { kind: 'CSINode' }, - new():: apiVersion + kind, - mixin:: { - // metadata.name must be the Kubernetes node name. - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // spec is the specification of CSINode - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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. - withDrivers(drivers):: self + if std.type(drivers) == 'array' then __specMixin({ drivers: drivers }) else __specMixin({ drivers: [drivers] }), - // 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. - withDriversMixin(drivers):: self + if std.type(drivers) == 'array' then __specMixin({ drivers+: drivers }) else __specMixin({ drivers+: [drivers] }), - driversType:: hidden.storage.v1beta1.csiNodeDriver, - }, - specType:: hidden.storage.v1beta1.csiNodeSpec, - }, - }, - // 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. - storageClass:: { - local kind = { kind: 'StorageClass' }, - new():: apiVersion + kind, - // AllowVolumeExpansion shows whether the storage class allow volume expand - withAllowVolumeExpansion(allowVolumeExpansion):: self + { allowVolumeExpansion: allowVolumeExpansion }, - // 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. - withAllowedTopologies(allowedTopologies):: self + if std.type(allowedTopologies) == 'array' then { allowedTopologies: allowedTopologies } else { allowedTopologies: [allowedTopologies] }, - // 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. - withAllowedTopologiesMixin(allowedTopologies):: self + if std.type(allowedTopologies) == 'array' then { allowedTopologies+: allowedTopologies } else { allowedTopologies+: [allowedTopologies] }, - allowedTopologiesType:: hidden.core.v1.topologySelectorTerm, - // 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. - withMountOptions(mountOptions):: self + if std.type(mountOptions) == 'array' then { mountOptions: mountOptions } else { mountOptions: [mountOptions] }, - // 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. - withMountOptionsMixin(mountOptions):: self + if std.type(mountOptions) == 'array' then { mountOptions+: mountOptions } else { mountOptions+: [mountOptions] }, - // Parameters holds the parameters for the provisioner that should create volumes of this storage class. - withParameters(parameters):: self + { parameters: parameters }, - // Parameters holds the parameters for the provisioner that should create volumes of this storage class. - withParametersMixin(parameters):: self + { parameters+: parameters }, - // Provisioner indicates the type of the provisioner. - withProvisioner(provisioner):: self + { provisioner: provisioner }, - // Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete. - withReclaimPolicy(reclaimPolicy):: self + { reclaimPolicy: 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. - withVolumeBindingMode(volumeBindingMode):: self + { volumeBindingMode: volumeBindingMode }, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. - // - // VolumeAttachment objects are non-namespaced. - volumeAttachment:: { - local kind = { kind: 'VolumeAttachment' }, - new():: apiVersion + kind, - mixin:: { - // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system. - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName(). - withAttacher(attacher):: self + __specMixin({ attacher: attacher }), - // The node that the volume should be attached to. - withNodeName(nodeName):: self + __specMixin({ nodeName: nodeName }), - // Source represents the volume that should be attached. - source:: { - local __sourceMixin(source) = __specMixin({ source+: source }), - mixinInstance(source):: __sourceMixin(source), - // Name of the persistent volume to attach. - withPersistentVolumeName(persistentVolumeName):: self + __sourceMixin({ persistentVolumeName: persistentVolumeName }), - }, - sourceType:: hidden.storage.v1beta1.volumeAttachmentSource, - }, - specType:: hidden.storage.v1beta1.volumeAttachmentSpec, - }, - }, - }, - }, - local hidden = { - admissionregistration:: { - v1beta1:: { - local apiVersion = { apiVersion: 'admissionregistration/v1beta1' }, - // MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. - mutatingWebhookConfigurationList:: { - new():: {}, - // List of MutatingWebhookConfiguration. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of MutatingWebhookConfiguration. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.admissionregistration.v1beta1.mutatingWebhookConfiguration, - mixin:: {}, - }, - // RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid. - ruleWithOperations:: { - new():: {}, - // APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. - withApiGroups(apiGroups):: self + if std.type(apiGroups) == 'array' then { apiGroups: apiGroups } else { apiGroups: [apiGroups] }, - // APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. - withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == 'array' then { apiGroups+: apiGroups } else { apiGroups+: [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. - withApiVersions(apiVersions):: self + if std.type(apiVersions) == 'array' then { apiVersions: apiVersions } else { apiVersions: [apiVersions] }, - // APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. - withApiVersionsMixin(apiVersions):: self + if std.type(apiVersions) == 'array' then { apiVersions+: apiVersions } else { apiVersions+: [apiVersions] }, - // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required. - withOperations(operations):: self + if std.type(operations) == 'array' then { operations: operations } else { operations: [operations] }, - // Operations is the operations the admission hook cares about - CREATE, UPDATE, or * for all operations. If '*' is present, the length of the slice must be one. Required. - withOperationsMixin(operations):: self + if std.type(operations) == 'array' then { operations+: operations } else { operations+: [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. - withResources(resources):: self + if std.type(resources) == 'array' then { resources: resources } else { resources: [resources] }, - // 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. - withResourcesMixin(resources):: self + if std.type(resources) == 'array' then { resources+: resources } else { resources+: [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 "*". - withScope(scope):: self + { scope: scope }, - mixin:: {}, - }, - // ServiceReference holds a reference to Service.legacy.k8s.io - serviceReference:: { - new():: {}, - // `name` is the name of the service. Required - withName(name):: self + { name: name }, - // `namespace` is the namespace of the service. Required - withNamespace(namespace):: self + { namespace: namespace }, - // `path` is an optional URL path which will be sent in any request to this service. - withPath(path):: self + { path: path }, - mixin:: {}, - }, - // ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. - validatingWebhookConfigurationList:: { - new():: {}, - // List of ValidatingWebhookConfiguration. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of ValidatingWebhookConfiguration. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.admissionregistration.v1beta1.validatingWebhookConfiguration, - mixin:: {}, - }, - // Webhook describes an admission webhook and the resources and operations it applies to. - webhook:: { - new():: {}, - // 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. Default to `['v1beta1']`. - withAdmissionReviewVersions(admissionReviewVersions):: self + if std.type(admissionReviewVersions) == 'array' then { admissionReviewVersions: admissionReviewVersions } else { admissionReviewVersions: [admissionReviewVersions] }, - // 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. Default to `['v1beta1']`. - withAdmissionReviewVersionsMixin(admissionReviewVersions):: self + if std.type(admissionReviewVersions) == 'array' then { admissionReviewVersions+: admissionReviewVersions } else { admissionReviewVersions+: [admissionReviewVersions] }, - // FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore. - withFailurePolicy(failurePolicy):: self + { failurePolicy: failurePolicy }, - // 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. - withName(name):: self + { name: name }, - // 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. - withRules(rules):: self + if std.type(rules) == 'array' then { rules: rules } else { rules: [rules] }, - // 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. - withRulesMixin(rules):: self + if std.type(rules) == 'array' then { rules+: rules } else { rules+: [rules] }, - rulesType:: hidden.admissionregistration.v1beta1.ruleWithOperations, - // SideEffects states whether this webhookk has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission change 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. Defaults to Unknown. - withSideEffects(sideEffects):: self + { sideEffects: sideEffects }, - // 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 30 seconds. - withTimeoutSeconds(timeoutSeconds):: self + { timeoutSeconds: timeoutSeconds }, - mixin:: { - // ClientConfig defines how to communicate with the hook. Required - clientConfig:: { - local __clientConfigMixin(clientConfig) = { clientConfig+: clientConfig }, - mixinInstance(clientConfig):: __clientConfigMixin(clientConfig), - // `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. - withCaBundle(caBundle):: self + __clientConfigMixin({ caBundle: 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`. - // - // Port 443 will be used if it is open, otherwise it is an error. - service:: { - local __serviceMixin(service) = __clientConfigMixin({ service+: service }), - mixinInstance(service):: __serviceMixin(service), - // `name` is the name of the service. Required - withName(name):: self + __serviceMixin({ name: name }), - // `namespace` is the namespace of the service. Required - withNamespace(namespace):: self + __serviceMixin({ namespace: namespace }), - // `path` is an optional URL path which will be sent in any request to this service. - withPath(path):: self + __serviceMixin({ path: path }), - }, - serviceType:: hidden.admissionregistration.v1beta1.serviceReference, - // `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. - withUrl(url):: self + __clientConfigMixin({ url: url }), - }, - clientConfigType:: hidden.admissionregistration.v1beta1.webhookClientConfig, - // 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:: { - local __namespaceSelectorMixin(namespaceSelector) = { namespaceSelector+: namespaceSelector }, - mixinInstance(namespaceSelector):: __namespaceSelectorMixin(namespaceSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __namespaceSelectorMixin({ matchExpressions: matchExpressions }) else __namespaceSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __namespaceSelectorMixin({ matchExpressions+: matchExpressions }) else __namespaceSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __namespaceSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __namespaceSelectorMixin({ matchLabels+: matchLabels }), - }, - namespaceSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // WebhookClientConfig contains the information to make a TLS connection with the webhook - webhookClientConfig:: { - new():: {}, - // `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. - withCaBundle(caBundle):: self + { caBundle: caBundle }, - // `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. - withUrl(url):: self + { url: url }, - mixin:: { - // `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`. - // - // Port 443 will be used if it is open, otherwise it is an error. - service:: { - local __serviceMixin(service) = { service+: service }, - mixinInstance(service):: __serviceMixin(service), - // `name` is the name of the service. Required - withName(name):: self + __serviceMixin({ name: name }), - // `namespace` is the namespace of the service. Required - withNamespace(namespace):: self + __serviceMixin({ namespace: namespace }), - // `path` is an optional URL path which will be sent in any request to this service. - withPath(path):: self + __serviceMixin({ path: path }), - }, - serviceType:: hidden.admissionregistration.v1beta1.serviceReference, - }, - }, - }, - }, - apiextensions:: { - v1beta1:: { - local apiVersion = { apiVersion: 'apiextensions/v1beta1' }, - // CustomResourceColumnDefinition specifies a column for server side printing. - customResourceColumnDefinition:: { - new():: {}, - // JSONPath is a simple JSON path, i.e. with array notation. - withJsonPath(jsonPath):: self + { JSONPath: jsonPath }, - // description is a human readable description of this column. - withDescription(description):: self + { description: 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 more. - withFormat(format):: self + { format: format }, - // name is a human readable name for the column. - withName(name):: self + { name: name }, - // 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 higher priority. - withPriority(priority):: self + { priority: priority }, - // 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 more. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // CustomResourceConversion describes how to convert different versions of a CR. - customResourceConversion:: { - new():: {}, - // ConversionReviewVersions is an ordered list of preferred `ConversionReview` 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, conversion 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. Default to `['v1beta1']`. - withConversionReviewVersions(conversionReviewVersions):: self + if std.type(conversionReviewVersions) == 'array' then { conversionReviewVersions: conversionReviewVersions } else { conversionReviewVersions: [conversionReviewVersions] }, - // ConversionReviewVersions is an ordered list of preferred `ConversionReview` 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, conversion 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. Default to `['v1beta1']`. - withConversionReviewVersionsMixin(conversionReviewVersions):: self + if std.type(conversionReviewVersions) == 'array' then { conversionReviewVersions+: conversionReviewVersions } else { conversionReviewVersions+: [conversionReviewVersions] }, - // `strategy` specifies the conversion strategy. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the CR. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information is needed for this option. - withStrategy(strategy):: self + { strategy: strategy }, - mixin:: { - // `webhookClientConfig` is the instructions for how to call the webhook if strategy is `Webhook`. This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. - webhookClientConfig:: { - local __webhookClientConfigMixin(webhookClientConfig) = { webhookClientConfig+: webhookClientConfig }, - mixinInstance(webhookClientConfig):: __webhookClientConfigMixin(webhookClientConfig), - // `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. - withCaBundle(caBundle):: self + __webhookClientConfigMixin({ caBundle: 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`. - // - // Port 443 will be used if it is open, otherwise it is an error. - service:: { - local __serviceMixin(service) = __webhookClientConfigMixin({ service+: service }), - mixinInstance(service):: __serviceMixin(service), - // `name` is the name of the service. Required - withName(name):: self + __serviceMixin({ name: name }), - // `namespace` is the namespace of the service. Required - withNamespace(namespace):: self + __serviceMixin({ namespace: namespace }), - // `path` is an optional URL path which will be sent in any request to this service. - withPath(path):: self + __serviceMixin({ path: path }), - }, - serviceType:: hidden.apiextensions.v1beta1.serviceReference, - // `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. - withUrl(url):: self + __webhookClientConfigMixin({ url: url }), - }, - webhookClientConfigType:: hidden.apiextensions.v1beta1.webhookClientConfig, - }, - }, - // CustomResourceDefinitionCondition contains details for the current condition of this pod. - customResourceDefinitionCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // Human-readable message indicating details about last transition. - withMessage(message):: self + { message: message }, - // Unique, one-word, CamelCase reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status is the status of the condition. Can be True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type is the type of the condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // CustomResourceDefinitionList is a list of CustomResourceDefinition objects. - customResourceDefinitionList:: { - new():: {}, - // Items individual CustomResourceDefinitions - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items individual CustomResourceDefinitions - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apiextensions.v1beta1.customResourceDefinition, - mixin:: {}, - }, - // CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition - customResourceDefinitionNames:: { - new():: {}, - // Categories is a list of grouped resources custom resources belong to (e.g. 'all') - withCategories(categories):: self + if std.type(categories) == 'array' then { categories: categories } else { categories: [categories] }, - // Categories is a list of grouped resources custom resources belong to (e.g. 'all') - withCategoriesMixin(categories):: self + if std.type(categories) == 'array' then { categories+: categories } else { categories+: [categories] }, - // Kind is the serialized kind of the resource. It is normally CamelCase and singular. - withKind(kind):: self + { kind: kind }, - // ListKind is the serialized kind of the list for this resource. Defaults to List. - withListKind(listKind):: self + { listKind: listKind }, - // Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase. - withPlural(plural):: self + { plural: plural }, - // ShortNames are short names for the resource. It must be all lowercase. - withShortNames(shortNames):: self + if std.type(shortNames) == 'array' then { shortNames: shortNames } else { shortNames: [shortNames] }, - // ShortNames are short names for the resource. It must be all lowercase. - withShortNamesMixin(shortNames):: self + if std.type(shortNames) == 'array' then { shortNames+: shortNames } else { shortNames+: [shortNames] }, - // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased - withSingular(singular):: self + { singular: singular }, - mixin:: {}, - }, - // CustomResourceDefinitionSpec describes how a user wants their resource to appear - customResourceDefinitionSpec:: { - new():: {}, - // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. Optional, the global columns for all versions. Top-level and per-version columns are mutually exclusive. - withAdditionalPrinterColumns(additionalPrinterColumns):: self + if std.type(additionalPrinterColumns) == 'array' then { additionalPrinterColumns: additionalPrinterColumns } else { additionalPrinterColumns: [additionalPrinterColumns] }, - // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. Optional, the global columns for all versions. Top-level and per-version columns are mutually exclusive. - withAdditionalPrinterColumnsMixin(additionalPrinterColumns):: self + if std.type(additionalPrinterColumns) == 'array' then { additionalPrinterColumns+: additionalPrinterColumns } else { additionalPrinterColumns+: [additionalPrinterColumns] }, - additionalPrinterColumnsType:: hidden.apiextensions.v1beta1.customResourceColumnDefinition, - // Group is the group this resource belongs in - withGroup(group):: self + { group: group }, - // Scope indicates whether this resource is cluster or namespace scoped. Default is namespaced - withScope(scope):: self + { scope: scope }, - // Version is the version this resource belongs in Should be always first item in Versions field if provided. Optional, but at least one of Version or Versions must be set. Deprecated: Please use `Versions`. - withVersion(version):: self + { version: version }, - // Versions is the list of all supported versions for this resource. If Version field is provided, this field is optional. Validation: All versions must use the same validation schema for now. i.e., top level Validation field is applied to all of these versions. Order: The version name will be used to compute the order. 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. - withVersions(versions):: self + if std.type(versions) == 'array' then { versions: versions } else { versions: [versions] }, - // Versions is the list of all supported versions for this resource. If Version field is provided, this field is optional. Validation: All versions must use the same validation schema for now. i.e., top level Validation field is applied to all of these versions. Order: The version name will be used to compute the order. 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. - withVersionsMixin(versions):: self + if std.type(versions) == 'array' then { versions+: versions } else { versions+: [versions] }, - versionsType:: hidden.apiextensions.v1beta1.customResourceDefinitionVersion, - mixin:: { - // `conversion` defines conversion settings for the CRD. - conversion:: { - local __conversionMixin(conversion) = { conversion+: conversion }, - mixinInstance(conversion):: __conversionMixin(conversion), - // ConversionReviewVersions is an ordered list of preferred `ConversionReview` 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, conversion 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. Default to `['v1beta1']`. - withConversionReviewVersions(conversionReviewVersions):: self + if std.type(conversionReviewVersions) == 'array' then __conversionMixin({ conversionReviewVersions: conversionReviewVersions }) else __conversionMixin({ conversionReviewVersions: [conversionReviewVersions] }), - // ConversionReviewVersions is an ordered list of preferred `ConversionReview` 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, conversion 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. Default to `['v1beta1']`. - withConversionReviewVersionsMixin(conversionReviewVersions):: self + if std.type(conversionReviewVersions) == 'array' then __conversionMixin({ conversionReviewVersions+: conversionReviewVersions }) else __conversionMixin({ conversionReviewVersions+: [conversionReviewVersions] }), - // `strategy` specifies the conversion strategy. Allowed values are: - `None`: The converter only change the apiVersion and would not touch any other field in the CR. - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information is needed for this option. - withStrategy(strategy):: self + __conversionMixin({ strategy: strategy }), - // `webhookClientConfig` is the instructions for how to call the webhook if strategy is `Webhook`. This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. - webhookClientConfig:: { - local __webhookClientConfigMixin(webhookClientConfig) = __conversionMixin({ webhookClientConfig+: webhookClientConfig }), - mixinInstance(webhookClientConfig):: __webhookClientConfigMixin(webhookClientConfig), - // `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. - withCaBundle(caBundle):: self + __webhookClientConfigMixin({ caBundle: 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`. - // - // Port 443 will be used if it is open, otherwise it is an error. - service:: { - local __serviceMixin(service) = __webhookClientConfigMixin({ service+: service }), - mixinInstance(service):: __serviceMixin(service), - // `name` is the name of the service. Required - withName(name):: self + __serviceMixin({ name: name }), - // `namespace` is the namespace of the service. Required - withNamespace(namespace):: self + __serviceMixin({ namespace: namespace }), - // `path` is an optional URL path which will be sent in any request to this service. - withPath(path):: self + __serviceMixin({ path: path }), - }, - serviceType:: hidden.apiextensions.v1beta1.serviceReference, - // `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. - withUrl(url):: self + __webhookClientConfigMixin({ url: url }), - }, - webhookClientConfigType:: hidden.apiextensions.v1beta1.webhookClientConfig, - }, - conversionType:: hidden.apiextensions.v1beta1.customResourceConversion, - // Names are the names used to describe this custom resource - names:: { - local __namesMixin(names) = { names+: names }, - mixinInstance(names):: __namesMixin(names), - // Categories is a list of grouped resources custom resources belong to (e.g. 'all') - withCategories(categories):: self + if std.type(categories) == 'array' then __namesMixin({ categories: categories }) else __namesMixin({ categories: [categories] }), - // Categories is a list of grouped resources custom resources belong to (e.g. 'all') - withCategoriesMixin(categories):: self + if std.type(categories) == 'array' then __namesMixin({ categories+: categories }) else __namesMixin({ categories+: [categories] }), - // Kind is the serialized kind of the resource. It is normally CamelCase and singular. - withKind(kind):: self + __namesMixin({ kind: kind }), - // ListKind is the serialized kind of the list for this resource. Defaults to List. - withListKind(listKind):: self + __namesMixin({ listKind: listKind }), - // Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase. - withPlural(plural):: self + __namesMixin({ plural: plural }), - // ShortNames are short names for the resource. It must be all lowercase. - withShortNames(shortNames):: self + if std.type(shortNames) == 'array' then __namesMixin({ shortNames: shortNames }) else __namesMixin({ shortNames: [shortNames] }), - // ShortNames are short names for the resource. It must be all lowercase. - withShortNamesMixin(shortNames):: self + if std.type(shortNames) == 'array' then __namesMixin({ shortNames+: shortNames }) else __namesMixin({ shortNames+: [shortNames] }), - // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased - withSingular(singular):: self + __namesMixin({ singular: singular }), - }, - namesType:: hidden.apiextensions.v1beta1.customResourceDefinitionNames, - // Subresources describes the subresources for CustomResource Optional, the global subresources for all versions. Top-level and per-version subresources are mutually exclusive. - subresources:: { - local __subresourcesMixin(subresources) = { subresources+: subresources }, - mixinInstance(subresources):: __subresourcesMixin(subresources), - // Scale denotes the scale subresource for CustomResources - scale:: { - local __scaleMixin(scale) = __subresourcesMixin({ scale+: scale }), - mixinInstance(scale):: __scaleMixin(scale), - // LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status. Must be set to work with HPA. If there is no value under the given path in the CustomResource, the status label selector value in the /scale subresource will default to the empty string. - withLabelSelectorPath(labelSelectorPath):: self + __scaleMixin({ labelSelectorPath: labelSelectorPath }), - // SpecReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the /scale subresource will return an error on GET. - withSpecReplicasPath(specReplicasPath):: self + __scaleMixin({ specReplicasPath: specReplicasPath }), - // StatusReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the status replica value in the /scale subresource will default to 0. - withStatusReplicasPath(statusReplicasPath):: self + __scaleMixin({ statusReplicasPath: statusReplicasPath }), - }, - scaleType:: hidden.apiextensions.v1beta1.customResourceSubresourceScale, - }, - subresourcesType:: hidden.apiextensions.v1beta1.customResourceSubresources, - // Validation describes the validation methods for CustomResources Optional, the global validation schema for all versions. Top-level and per-version schemas are mutually exclusive. - validation:: { - local __validationMixin(validation) = { validation+: validation }, - mixinInstance(validation):: __validationMixin(validation), - // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. - withOpenApiV3Schema(openApiV3Schema):: self + __validationMixin({ openAPIV3Schema: openApiV3Schema }), - // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. - withOpenApiV3SchemaMixin(openApiV3Schema):: self + __validationMixin({ openAPIV3Schema+: openApiV3Schema }), - openAPIV3SchemaType:: hidden.apiextensions.v1beta1.jsonSchemaProps, - }, - validationType:: hidden.apiextensions.v1beta1.customResourceValidation, - }, - }, - // CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition - customResourceDefinitionStatus:: { - new():: {}, - // Conditions indicate state for particular aspects of a CustomResourceDefinition - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Conditions indicate state for particular aspects of a CustomResourceDefinition - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apiextensions.v1beta1.customResourceDefinitionCondition, - // StoredVersions are all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so the migration controller can first finish a migration to another version (i.e. that no old objects are left in the storage), and then remove the rest of the versions from this list. None of the versions in this list can be removed from the spec.Versions field. - withStoredVersions(storedVersions):: self + if std.type(storedVersions) == 'array' then { storedVersions: storedVersions } else { storedVersions: [storedVersions] }, - // StoredVersions are all versions of CustomResources that were ever persisted. Tracking these versions allows a migration path for stored versions in etcd. The field is mutable so the migration controller can first finish a migration to another version (i.e. that no old objects are left in the storage), and then remove the rest of the versions from this list. None of the versions in this list can be removed from the spec.Versions field. - withStoredVersionsMixin(storedVersions):: self + if std.type(storedVersions) == 'array' then { storedVersions+: storedVersions } else { storedVersions+: [storedVersions] }, - mixin:: { - // AcceptedNames are the names that are actually being used to serve discovery They may be different than the names in spec. - acceptedNames:: { - local __acceptedNamesMixin(acceptedNames) = { acceptedNames+: acceptedNames }, - mixinInstance(acceptedNames):: __acceptedNamesMixin(acceptedNames), - // Categories is a list of grouped resources custom resources belong to (e.g. 'all') - withCategories(categories):: self + if std.type(categories) == 'array' then __acceptedNamesMixin({ categories: categories }) else __acceptedNamesMixin({ categories: [categories] }), - // Categories is a list of grouped resources custom resources belong to (e.g. 'all') - withCategoriesMixin(categories):: self + if std.type(categories) == 'array' then __acceptedNamesMixin({ categories+: categories }) else __acceptedNamesMixin({ categories+: [categories] }), - // Kind is the serialized kind of the resource. It is normally CamelCase and singular. - withKind(kind):: self + __acceptedNamesMixin({ kind: kind }), - // ListKind is the serialized kind of the list for this resource. Defaults to List. - withListKind(listKind):: self + __acceptedNamesMixin({ listKind: listKind }), - // Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase. - withPlural(plural):: self + __acceptedNamesMixin({ plural: plural }), - // ShortNames are short names for the resource. It must be all lowercase. - withShortNames(shortNames):: self + if std.type(shortNames) == 'array' then __acceptedNamesMixin({ shortNames: shortNames }) else __acceptedNamesMixin({ shortNames: [shortNames] }), - // ShortNames are short names for the resource. It must be all lowercase. - withShortNamesMixin(shortNames):: self + if std.type(shortNames) == 'array' then __acceptedNamesMixin({ shortNames+: shortNames }) else __acceptedNamesMixin({ shortNames+: [shortNames] }), - // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased - withSingular(singular):: self + __acceptedNamesMixin({ singular: singular }), - }, - acceptedNamesType:: hidden.apiextensions.v1beta1.customResourceDefinitionNames, - }, - }, - // CustomResourceDefinitionVersion describes a version for CRD. - customResourceDefinitionVersion:: { - new():: {}, - // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead) This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. NOTE: CRDs created prior to 1.13 populated the top-level additionalPrinterColumns field by default. To apply an update that changes to per-version additionalPrinterColumns, the top-level additionalPrinterColumns field must be explicitly set to null - withAdditionalPrinterColumns(additionalPrinterColumns):: self + if std.type(additionalPrinterColumns) == 'array' then { additionalPrinterColumns: additionalPrinterColumns } else { additionalPrinterColumns: [additionalPrinterColumns] }, - // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead) This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. NOTE: CRDs created prior to 1.13 populated the top-level additionalPrinterColumns field by default. To apply an update that changes to per-version additionalPrinterColumns, the top-level additionalPrinterColumns field must be explicitly set to null - withAdditionalPrinterColumnsMixin(additionalPrinterColumns):: self + if std.type(additionalPrinterColumns) == 'array' then { additionalPrinterColumns+: additionalPrinterColumns } else { additionalPrinterColumns+: [additionalPrinterColumns] }, - additionalPrinterColumnsType:: hidden.apiextensions.v1beta1.customResourceColumnDefinition, - // Name is the version name, e.g. “v1”, “v2beta1”, etc. - withName(name):: self + { name: name }, - // Served is a flag enabling/disabling this version from being served via REST APIs - withServed(served):: self + { served: served }, - // Storage flags the version as storage version. There must be exactly one flagged as storage version. - withStorage(storage):: self + { storage: storage }, - mixin:: { - // Schema describes the schema for CustomResource used in validation, pruning, and defaulting. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead) This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. - schema:: { - local __schemaMixin(schema) = { schema+: schema }, - mixinInstance(schema):: __schemaMixin(schema), - // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. - withOpenApiV3Schema(openApiV3Schema):: self + __schemaMixin({ openAPIV3Schema: openApiV3Schema }), - // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. - withOpenApiV3SchemaMixin(openApiV3Schema):: self + __schemaMixin({ openAPIV3Schema+: openApiV3Schema }), - openAPIV3SchemaType:: hidden.apiextensions.v1beta1.jsonSchemaProps, - }, - schemaType:: hidden.apiextensions.v1beta1.customResourceValidation, - // Subresources describes the subresources for CustomResource Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead) This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. - subresources:: { - local __subresourcesMixin(subresources) = { subresources+: subresources }, - mixinInstance(subresources):: __subresourcesMixin(subresources), - // Scale denotes the scale subresource for CustomResources - scale:: { - local __scaleMixin(scale) = __subresourcesMixin({ scale+: scale }), - mixinInstance(scale):: __scaleMixin(scale), - // LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status. Must be set to work with HPA. If there is no value under the given path in the CustomResource, the status label selector value in the /scale subresource will default to the empty string. - withLabelSelectorPath(labelSelectorPath):: self + __scaleMixin({ labelSelectorPath: labelSelectorPath }), - // SpecReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the /scale subresource will return an error on GET. - withSpecReplicasPath(specReplicasPath):: self + __scaleMixin({ specReplicasPath: specReplicasPath }), - // StatusReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the status replica value in the /scale subresource will default to 0. - withStatusReplicasPath(statusReplicasPath):: self + __scaleMixin({ statusReplicasPath: statusReplicasPath }), - }, - scaleType:: hidden.apiextensions.v1beta1.customResourceSubresourceScale, - }, - subresourcesType:: hidden.apiextensions.v1beta1.customResourceSubresources, - }, - }, - // CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. - customResourceSubresourceScale:: { - new():: {}, - // LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status. Must be set to work with HPA. If there is no value under the given path in the CustomResource, the status label selector value in the /scale subresource will default to the empty string. - withLabelSelectorPath(labelSelectorPath):: self + { labelSelectorPath: labelSelectorPath }, - // SpecReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the /scale subresource will return an error on GET. - withSpecReplicasPath(specReplicasPath):: self + { specReplicasPath: specReplicasPath }, - // StatusReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the status replica value in the /scale subresource will default to 0. - withStatusReplicasPath(statusReplicasPath):: self + { statusReplicasPath: statusReplicasPath }, - mixin:: {}, - }, - // CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza - customResourceSubresourceStatus:: { - new():: {}, - mixin:: {}, - }, - // CustomResourceSubresources defines the status and scale subresources for CustomResources. - customResourceSubresources:: { - new():: {}, - mixin:: { - // Scale denotes the scale subresource for CustomResources - scale:: { - local __scaleMixin(scale) = { scale+: scale }, - mixinInstance(scale):: __scaleMixin(scale), - // LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status. Must be set to work with HPA. If there is no value under the given path in the CustomResource, the status label selector value in the /scale subresource will default to the empty string. - withLabelSelectorPath(labelSelectorPath):: self + __scaleMixin({ labelSelectorPath: labelSelectorPath }), - // SpecReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the /scale subresource will return an error on GET. - withSpecReplicasPath(specReplicasPath):: self + __scaleMixin({ specReplicasPath: specReplicasPath }), - // StatusReplicasPath defines the JSON path inside of a CustomResource 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 CustomResource, the status replica value in the /scale subresource will default to 0. - withStatusReplicasPath(statusReplicasPath):: self + __scaleMixin({ statusReplicasPath: statusReplicasPath }), - }, - scaleType:: hidden.apiextensions.v1beta1.customResourceSubresourceScale, - }, - }, - // CustomResourceValidation is a list of validation methods for CustomResources. - customResourceValidation:: { - new():: {}, - // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. - withOpenApiV3Schema(openApiV3Schema):: self + { openAPIV3Schema: openApiV3Schema }, - // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. - withOpenApiV3SchemaMixin(openApiV3Schema):: self + { openAPIV3Schema+: openApiV3Schema }, - openAPIV3SchemaType:: hidden.apiextensions.v1beta1.jsonSchemaProps, - mixin:: {}, - }, - // ExternalDocumentation allows referencing an external resource for extended documentation. - externalDocumentation:: { - new():: {}, - withDescription(description):: self + { description: description }, - withUrl(url):: self + { url: url }, - mixin:: {}, - }, - // JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. - json:: { - new():: {}, - mixin:: {}, - }, - // JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). - jsonSchemaProps:: { - new():: {}, - withDollarRef(dollarRef):: self + { "$ref": dollarRef }, - withDollarSchema(dollarSchema):: self + { "$schema": dollarSchema }, - withAllOf(allOf):: self + if std.type(allOf) == 'array' then { allOf: allOf } else { allOf: [allOf] }, - withAllOfMixin(allOf):: self + if std.type(allOf) == 'array' then { allOf+: allOf } else { allOf+: [allOf] }, - allOfType:: hidden.apiextensions.v1beta1.jsonSchemaProps, - withAnyOf(anyOf):: self + if std.type(anyOf) == 'array' then { anyOf: anyOf } else { anyOf: [anyOf] }, - withAnyOfMixin(anyOf):: self + if std.type(anyOf) == 'array' then { anyOf+: anyOf } else { anyOf+: [anyOf] }, - anyOfType:: hidden.apiextensions.v1beta1.jsonSchemaProps, - withDefinitions(definitions):: self + { definitions: definitions }, - withDefinitionsMixin(definitions):: self + { definitions+: definitions }, - withDependencies(dependencies):: self + { dependencies: dependencies }, - withDependenciesMixin(dependencies):: self + { dependencies+: dependencies }, - withDescription(description):: self + { description: description }, - withEnum(enum):: self + if std.type(enum) == 'array' then { enum: enum } else { enum: [enum] }, - withEnumMixin(enum):: self + if std.type(enum) == 'array' then { enum+: enum } else { enum+: [enum] }, - enumType:: hidden.apiextensions.v1beta1.json, - withExclusiveMaximum(exclusiveMaximum):: self + { exclusiveMaximum: exclusiveMaximum }, - withExclusiveMinimum(exclusiveMinimum):: self + { exclusiveMinimum: exclusiveMinimum }, - withFormat(format):: self + { format: format }, - withId(id):: self + { id: id }, - withMaxItems(maxItems):: self + { maxItems: maxItems }, - withMaxLength(maxLength):: self + { maxLength: maxLength }, - withMaxProperties(maxProperties):: self + { maxProperties: maxProperties }, - withMaximum(maximum):: self + { maximum: maximum }, - withMinItems(minItems):: self + { minItems: minItems }, - withMinLength(minLength):: self + { minLength: minLength }, - withMinProperties(minProperties):: self + { minProperties: minProperties }, - withMinimum(minimum):: self + { minimum: minimum }, - withMultipleOf(multipleOf):: self + { multipleOf: multipleOf }, - withNot(not):: self + { not: not }, - withNotMixin(not):: self + { not+: not }, - notType:: hidden.apiextensions.v1beta1.jsonSchemaProps, - withNullable(nullable):: self + { nullable: nullable }, - withOneOf(oneOf):: self + if std.type(oneOf) == 'array' then { oneOf: oneOf } else { oneOf: [oneOf] }, - withOneOfMixin(oneOf):: self + if std.type(oneOf) == 'array' then { oneOf+: oneOf } else { oneOf+: [oneOf] }, - oneOfType:: hidden.apiextensions.v1beta1.jsonSchemaProps, - withPattern(pattern):: self + { pattern: pattern }, - withPatternProperties(patternProperties):: self + { patternProperties: patternProperties }, - withPatternPropertiesMixin(patternProperties):: self + { patternProperties+: patternProperties }, - withProperties(properties):: self + { properties: properties }, - withPropertiesMixin(properties):: self + { properties+: properties }, - withRequired(required):: self + if std.type(required) == 'array' then { required: required } else { required: [required] }, - withRequiredMixin(required):: self + if std.type(required) == 'array' then { required+: required } else { required+: [required] }, - withTitle(title):: self + { title: title }, - withType(type):: self + { type: type }, - withUniqueItems(uniqueItems):: self + { uniqueItems: uniqueItems }, - mixin:: { - additionalItems:: { - local __additionalItemsMixin(additionalItems) = { additionalItems+: additionalItems }, - mixinInstance(additionalItems):: __additionalItemsMixin(additionalItems), - }, - additionalItemsType:: hidden.apiextensions.v1beta1.jsonSchemaPropsOrBool, - additionalProperties:: { - local __additionalPropertiesMixin(additionalProperties) = { additionalProperties+: additionalProperties }, - mixinInstance(additionalProperties):: __additionalPropertiesMixin(additionalProperties), - }, - additionalPropertiesType:: hidden.apiextensions.v1beta1.jsonSchemaPropsOrBool, - default:: { - local __defaultMixin(default) = { default+: default }, - mixinInstance(default):: __defaultMixin(default), - }, - defaultType:: hidden.apiextensions.v1beta1.json, - example:: { - local __exampleMixin(example) = { example+: example }, - mixinInstance(example):: __exampleMixin(example), - }, - exampleType:: hidden.apiextensions.v1beta1.json, - externalDocs:: { - local __externalDocsMixin(externalDocs) = { externalDocs+: externalDocs }, - mixinInstance(externalDocs):: __externalDocsMixin(externalDocs), - withDescription(description):: self + __externalDocsMixin({ description: description }), - withUrl(url):: self + __externalDocsMixin({ url: url }), - }, - externalDocsType:: hidden.apiextensions.v1beta1.externalDocumentation, - items:: { - local __itemsMixin(items) = { items+: items }, - mixinInstance(items):: __itemsMixin(items), - }, - itemsType:: hidden.apiextensions.v1beta1.jsonSchemaPropsOrArray, - }, - }, - // JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes. - jsonSchemaPropsOrArray:: { - new():: {}, - mixin:: {}, - }, - // JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property. - jsonSchemaPropsOrBool:: { - new():: {}, - mixin:: {}, - }, - // JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. - jsonSchemaPropsOrStringArray:: { - new():: {}, - mixin:: {}, - }, - // ServiceReference holds a reference to Service.legacy.k8s.io - serviceReference:: { - new():: {}, - // `name` is the name of the service. Required - withName(name):: self + { name: name }, - // `namespace` is the namespace of the service. Required - withNamespace(namespace):: self + { namespace: namespace }, - // `path` is an optional URL path which will be sent in any request to this service. - withPath(path):: self + { path: path }, - mixin:: {}, - }, - // WebhookClientConfig contains the information to make a TLS connection with the webhook. It has the same field as admissionregistration.v1beta1.WebhookClientConfig. - webhookClientConfig:: { - new():: {}, - // `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. - withCaBundle(caBundle):: self + { caBundle: caBundle }, - // `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. - withUrl(url):: self + { url: url }, - mixin:: { - // `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`. - // - // Port 443 will be used if it is open, otherwise it is an error. - service:: { - local __serviceMixin(service) = { service+: service }, - mixinInstance(service):: __serviceMixin(service), - // `name` is the name of the service. Required - withName(name):: self + __serviceMixin({ name: name }), - // `namespace` is the namespace of the service. Required - withNamespace(namespace):: self + __serviceMixin({ namespace: namespace }), - // `path` is an optional URL path which will be sent in any request to this service. - withPath(path):: self + __serviceMixin({ path: path }), - }, - serviceType:: hidden.apiextensions.v1beta1.serviceReference, - }, - }, - }, - }, - apiregistration:: { - v1:: { - local apiVersion = { apiVersion: 'apiregistration/v1' }, - // APIServiceCondition describes the state of an APIService at a particular point - apiServiceCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // Human-readable message indicating details about last transition. - withMessage(message):: self + { message: message }, - // Unique, one-word, CamelCase reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status is the status of the condition. Can be True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type is the type of the condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // APIServiceList is a list of APIService objects. - apiServiceList:: { - new():: {}, - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apiregistration.v1.apiService, - mixin:: {}, - }, - // APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification. - apiServiceSpec:: { - new():: {}, - // 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. - withCaBundle(caBundle):: self + { caBundle: caBundle }, - // Group is the API group name this server hosts - withGroup(group):: self + { group: group }, - // 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 - withGroupPriorityMinimum(groupPriorityMinimum):: self + { groupPriorityMinimum: groupPriorityMinimum }, - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. - withInsecureSkipTlsVerify(insecureSkipTlsVerify):: self + { insecureSkipTLSVerify: insecureSkipTlsVerify }, - // Version is the API version this server hosts. For example, "v1" - withVersion(version):: self + { version: version }, - // 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. - withVersionPriority(versionPriority):: self + { versionPriority: versionPriority }, - mixin:: { - // 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:: { - local __serviceMixin(service) = { service+: service }, - mixinInstance(service):: __serviceMixin(service), - // Name is the name of the service - withName(name):: self + __serviceMixin({ name: name }), - // Namespace is the namespace of the service - withNamespace(namespace):: self + __serviceMixin({ namespace: namespace }), - }, - serviceType:: hidden.apiregistration.v1.serviceReference, - }, - }, - // APIServiceStatus contains derived information about an API server - apiServiceStatus:: { - new():: {}, - // Current service state of apiService. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Current service state of apiService. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apiregistration.v1.apiServiceCondition, - mixin:: {}, - }, - // ServiceReference holds a reference to Service.legacy.k8s.io - serviceReference:: { - new():: {}, - // Name is the name of the service - withName(name):: self + { name: name }, - // Namespace is the namespace of the service - withNamespace(namespace):: self + { namespace: namespace }, - mixin:: {}, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'apiregistration/v1beta1' }, - // APIServiceCondition describes the state of an APIService at a particular point - apiServiceCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // Human-readable message indicating details about last transition. - withMessage(message):: self + { message: message }, - // Unique, one-word, CamelCase reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status is the status of the condition. Can be True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type is the type of the condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // APIServiceList is a list of APIService objects. - apiServiceList:: { - new():: {}, - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apiregistration.v1beta1.apiService, - mixin:: {}, - }, - // APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification. - apiServiceSpec:: { - new():: {}, - // 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. - withCaBundle(caBundle):: self + { caBundle: caBundle }, - // Group is the API group name this server hosts - withGroup(group):: self + { group: group }, - // 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 - withGroupPriorityMinimum(groupPriorityMinimum):: self + { groupPriorityMinimum: groupPriorityMinimum }, - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. - withInsecureSkipTlsVerify(insecureSkipTlsVerify):: self + { insecureSkipTLSVerify: insecureSkipTlsVerify }, - // Version is the API version this server hosts. For example, "v1" - withVersion(version):: self + { version: version }, - // 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. - withVersionPriority(versionPriority):: self + { versionPriority: versionPriority }, - mixin:: { - // 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:: { - local __serviceMixin(service) = { service+: service }, - mixinInstance(service):: __serviceMixin(service), - // Name is the name of the service - withName(name):: self + __serviceMixin({ name: name }), - // Namespace is the namespace of the service - withNamespace(namespace):: self + __serviceMixin({ namespace: namespace }), - }, - serviceType:: hidden.apiregistration.v1beta1.serviceReference, - }, - }, - // APIServiceStatus contains derived information about an API server - apiServiceStatus:: { - new():: {}, - // Current service state of apiService. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Current service state of apiService. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apiregistration.v1beta1.apiServiceCondition, - mixin:: {}, - }, - // ServiceReference holds a reference to Service.legacy.k8s.io - serviceReference:: { - new():: {}, - // Name is the name of the service - withName(name):: self + { name: name }, - // Namespace is the namespace of the service - withNamespace(namespace):: self + { namespace: namespace }, - mixin:: {}, - }, - }, - }, - apps:: { - v1:: { - local apiVersion = { apiVersion: 'apps/v1' }, - // ControllerRevisionList is a resource containing a list of ControllerRevision objects. - controllerRevisionList:: { - new():: {}, - // Items is the list of ControllerRevisions - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of ControllerRevisions - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1.controllerRevision, - mixin:: {}, - }, - // DaemonSetCondition describes the state of a DaemonSet at a certain point. - daemonSetCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of DaemonSet condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // DaemonSetList is a collection of daemon sets. - daemonSetList:: { - new():: {}, - // A list of daemon sets. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // A list of daemon sets. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1.daemonSet, - mixin:: {}, - }, - // DaemonSetSpec is the specification of a daemon set. - daemonSetSpec:: { - new():: {}, - // 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). - withMinReadySeconds(minReadySeconds):: self + { minReadySeconds: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + { revisionHistoryLimit: revisionHistoryLimit }, - mixin:: { - // 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = { updateStrategy+: updateStrategy }, - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1.rollingUpdateDaemonSet, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. - withType(type):: self + __updateStrategyMixin({ type: type }), - }, - updateStrategyType:: hidden.apps.v1.daemonSetUpdateStrategy, - }, - }, - // DaemonSetStatus represents the current status of a daemon set. - daemonSetStatus:: { - new():: {}, - // Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. - withCollisionCount(collisionCount):: self + { collisionCount: collisionCount }, - // Represents the latest available observations of a DaemonSet's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a DaemonSet's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apps.v1.daemonSetCondition, - // The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withCurrentNumberScheduled(currentNumberScheduled):: self + { currentNumberScheduled: currentNumberScheduled }, - // The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withDesiredNumberScheduled(desiredNumberScheduled):: self + { desiredNumberScheduled: desiredNumberScheduled }, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds) - withNumberAvailable(numberAvailable):: self + { numberAvailable: numberAvailable }, - // The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withNumberMisscheduled(numberMisscheduled):: self + { numberMisscheduled: numberMisscheduled }, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. - withNumberReady(numberReady):: self + { numberReady: numberReady }, - // The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds) - withNumberUnavailable(numberUnavailable):: self + { numberUnavailable: numberUnavailable }, - // The most recent generation observed by the daemon set controller. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // The total number of nodes that are running updated daemon pod - withUpdatedNumberScheduled(updatedNumberScheduled):: self + { updatedNumberScheduled: updatedNumberScheduled }, - mixin:: {}, - }, - // DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. - daemonSetUpdateStrategy:: { - new():: {}, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. - withType(type):: self + { type: type }, - mixin:: { - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = { rollingUpdate+: rollingUpdate }, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1.rollingUpdateDaemonSet, - }, - }, - // DeploymentCondition describes the state of a deployment at a certain point. - deploymentCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // The last time this condition was updated. - withLastUpdateTime(lastUpdateTime):: self + { lastUpdateTime: lastUpdateTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of deployment condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // DeploymentList is a list of Deployments. - deploymentList:: { - new(items=''):: self.withItems(items), - // Items is the list of Deployments. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of Deployments. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1.deployment, - mixin:: {}, - }, - // DeploymentSpec is the specification of the desired behavior of the Deployment. - deploymentSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + { minReadySeconds: minReadySeconds }, - // Indicates that the deployment is paused. - withPaused(paused):: self + { paused: 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. - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + { progressDeadlineSeconds: progressDeadlineSeconds }, - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + { replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + { revisionHistoryLimit: revisionHistoryLimit }, - mixin:: { - // 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = { strategy+: strategy }, - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. - withMaxSurge(maxSurge):: self + __rollingUpdateMixin({ maxSurge: 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({ type: type }), - }, - strategyType:: hidden.apps.v1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // DeploymentStatus is the most recently observed status of the Deployment. - deploymentStatus:: { - new():: {}, - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - withAvailableReplicas(availableReplicas):: self + { availableReplicas: availableReplicas }, - // Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. - withCollisionCount(collisionCount):: self + { collisionCount: collisionCount }, - // Represents the latest available observations of a deployment's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a deployment's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apps.v1.deploymentCondition, - // The generation observed by the deployment controller. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // Total number of ready pods targeted by this deployment. - withReadyReplicas(readyReplicas):: self + { readyReplicas: readyReplicas }, - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - withReplicas(replicas):: self + { replicas: replicas }, - // Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. - withUnavailableReplicas(unavailableReplicas):: self + { unavailableReplicas: unavailableReplicas }, - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - withUpdatedReplicas(updatedReplicas):: self + { updatedReplicas: updatedReplicas }, - mixin:: {}, - }, - // DeploymentStrategy describes how to replace existing pods with new ones. - deploymentStrategy:: { - new():: {}, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + { type: type }, - mixin:: { - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = { rollingUpdate+: rollingUpdate }, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. - withMaxSurge(maxSurge):: self + __rollingUpdateMixin({ maxSurge: 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1.rollingUpdateDeployment, - }, - }, - // ReplicaSetCondition describes the state of a replica set at a certain point. - replicaSetCondition:: { - new():: {}, - // The last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of replica set condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // ReplicaSetList is a collection of ReplicaSets. - replicaSetList:: { - new():: {}, - // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1.replicaSet, - mixin:: {}, - }, - // ReplicaSetSpec is the specification of a ReplicaSet. - replicaSetSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + { minReadySeconds: 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 - withReplicas(replicas):: self + { replicas: replicas }, - mixin:: { - // 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // ReplicaSetStatus represents the current status of a ReplicaSet. - replicaSetStatus:: { - new():: {}, - // The number of available replicas (ready for at least minReadySeconds) for this replica set. - withAvailableReplicas(availableReplicas):: self + { availableReplicas: availableReplicas }, - // Represents the latest available observations of a replica set's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a replica set's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apps.v1.replicaSetCondition, - // The number of pods that have labels matching the labels of the pod template of the replicaset. - withFullyLabeledReplicas(fullyLabeledReplicas):: self + { fullyLabeledReplicas: fullyLabeledReplicas }, - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // The number of ready replicas for this replica set. - withReadyReplicas(readyReplicas):: self + { readyReplicas: readyReplicas }, - // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller - withReplicas(replicas):: self + { replicas: replicas }, - mixin:: {}, - }, - // Spec to control the desired behavior of daemon set rolling update. - rollingUpdateDaemonSet:: { - new():: {}, - // 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. 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. - withMaxUnavailable(maxUnavailable):: self + { maxUnavailable: maxUnavailable }, - mixin:: {}, - }, - // Spec to control the desired behavior of rolling update. - rollingUpdateDeployment:: { - new():: {}, - // 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. - withMaxSurge(maxSurge):: self + { maxSurge: 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. - withMaxUnavailable(maxUnavailable):: self + { maxUnavailable: maxUnavailable }, - mixin:: {}, - }, - // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. - rollingUpdateStatefulSetStrategy:: { - new():: {}, - // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. - withPartition(partition):: self + { partition: partition }, - mixin:: {}, - }, - // StatefulSetCondition describes the state of a statefulset at a certain point. - statefulSetCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of statefulset condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // StatefulSetList is a collection of StatefulSets. - statefulSetList:: { - new(items=''):: self.withItems(items), - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1.statefulSet, - mixin:: {}, - }, - // A StatefulSetSpec is the specification of a StatefulSet. - statefulSetSpec:: { - new():: {}, - // 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. - withPodManagementPolicy(podManagementPolicy):: self + { podManagementPolicy: 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. - withReplicas(replicas):: self + { replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + { revisionHistoryLimit: revisionHistoryLimit }, - // 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. - withServiceName(serviceName):: self + { serviceName: serviceName }, - // 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. - withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == 'array' then { volumeClaimTemplates: volumeClaimTemplates } else { volumeClaimTemplates: [volumeClaimTemplates] }, - // 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. - withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == 'array' then { volumeClaimTemplates+: volumeClaimTemplates } else { volumeClaimTemplates+: [volumeClaimTemplates] }, - volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, - mixin:: { - // 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = { updateStrategy+: updateStrategy }, - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. - withPartition(partition):: self + __rollingUpdateMixin({ partition: partition }), - }, - rollingUpdateType:: hidden.apps.v1.rollingUpdateStatefulSetStrategy, - // Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. - withType(type):: self + __updateStrategyMixin({ type: type }), - }, - updateStrategyType:: hidden.apps.v1.statefulSetUpdateStrategy, - }, - }, - // StatefulSetStatus represents the current state of a StatefulSet. - statefulSetStatus:: { - new():: {}, - // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. - withCollisionCount(collisionCount):: self + { collisionCount: collisionCount }, - // Represents the latest available observations of a statefulset's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a statefulset's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apps.v1.statefulSetCondition, - // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision. - withCurrentReplicas(currentReplicas):: self + { currentReplicas: currentReplicas }, - // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). - withCurrentRevision(currentRevision):: self + { currentRevision: currentRevision }, - // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. - withReadyReplicas(readyReplicas):: self + { readyReplicas: readyReplicas }, - // replicas is the number of Pods created by the StatefulSet controller. - withReplicas(replicas):: self + { replicas: replicas }, - // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) - withUpdateRevision(updateRevision):: self + { updateRevision: updateRevision }, - // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision. - withUpdatedReplicas(updatedReplicas):: self + { updatedReplicas: updatedReplicas }, - mixin:: {}, - }, - // 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. - statefulSetUpdateStrategy:: { - new():: {}, - // Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. - withType(type):: self + { type: type }, - mixin:: { - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = { rollingUpdate+: rollingUpdate }, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. - withPartition(partition):: self + __rollingUpdateMixin({ partition: partition }), - }, - rollingUpdateType:: hidden.apps.v1.rollingUpdateStatefulSetStrategy, - }, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'apps/v1beta1' }, - // ControllerRevisionList is a resource containing a list of ControllerRevision objects. - controllerRevisionList:: { - new():: {}, - // Items is the list of ControllerRevisions - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of ControllerRevisions - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1beta1.controllerRevision, - mixin:: {}, - }, - // DeploymentCondition describes the state of a deployment at a certain point. - deploymentCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // The last time this condition was updated. - withLastUpdateTime(lastUpdateTime):: self + { lastUpdateTime: lastUpdateTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of deployment condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // DeploymentList is a list of Deployments. - deploymentList:: { - new(items=''):: self.withItems(items), - // Items is the list of Deployments. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of Deployments. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1beta1.deployment, - mixin:: {}, - }, - // DeploymentSpec is the specification of the desired behavior of the Deployment. - deploymentSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + { minReadySeconds: minReadySeconds }, - // Indicates that the deployment is paused. - withPaused(paused):: self + { paused: 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. - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + { progressDeadlineSeconds: progressDeadlineSeconds }, - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + { replicas: 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 2. - withRevisionHistoryLimit(revisionHistoryLimit):: self + { revisionHistoryLimit: revisionHistoryLimit }, - mixin:: { - // DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = { rollbackTo+: rollbackTo }, - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + __rollbackToMixin({ revision: revision }), - }, - rollbackToType:: hidden.apps.v1beta1.rollbackConfig, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = { strategy+: strategy }, - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. - withMaxSurge(maxSurge):: self + __rollingUpdateMixin({ maxSurge: 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({ type: type }), - }, - strategyType:: hidden.apps.v1beta1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // DeploymentStatus is the most recently observed status of the Deployment. - deploymentStatus:: { - new():: {}, - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - withAvailableReplicas(availableReplicas):: self + { availableReplicas: availableReplicas }, - // Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. - withCollisionCount(collisionCount):: self + { collisionCount: collisionCount }, - // Represents the latest available observations of a deployment's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a deployment's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apps.v1beta1.deploymentCondition, - // The generation observed by the deployment controller. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // Total number of ready pods targeted by this deployment. - withReadyReplicas(readyReplicas):: self + { readyReplicas: readyReplicas }, - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - withReplicas(replicas):: self + { replicas: replicas }, - // Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. - withUnavailableReplicas(unavailableReplicas):: self + { unavailableReplicas: unavailableReplicas }, - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - withUpdatedReplicas(updatedReplicas):: self + { updatedReplicas: updatedReplicas }, - mixin:: {}, - }, - // DeploymentStrategy describes how to replace existing pods with new ones. - deploymentStrategy:: { - new():: {}, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + { type: type }, - mixin:: { - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = { rollingUpdate+: rollingUpdate }, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. - withMaxSurge(maxSurge):: self + __rollingUpdateMixin({ maxSurge: 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateDeployment, - }, - }, - // DEPRECATED. - rollbackConfig:: { - new():: {}, - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + { revision: revision }, - mixin:: {}, - }, - // Spec to control the desired behavior of rolling update. - rollingUpdateDeployment:: { - new():: {}, - // 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. - withMaxSurge(maxSurge):: self + { maxSurge: 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. - withMaxUnavailable(maxUnavailable):: self + { maxUnavailable: maxUnavailable }, - mixin:: {}, - }, - // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. - rollingUpdateStatefulSetStrategy:: { - new():: {}, - // Partition indicates the ordinal at which the StatefulSet should be partitioned. - withPartition(partition):: self + { partition: partition }, - mixin:: {}, - }, - // ScaleSpec describes the attributes of a scale subresource - scaleSpec:: { - new():: {}, - // desired number of instances for the scaled object. - withReplicas(replicas):: self + { replicas: replicas }, - mixin:: {}, - }, - // ScaleStatus represents the current status of a scale subresource. - scaleStatus:: { - new():: {}, - // actual number of observed instances of the scaled object. - withReplicas(replicas):: self + { replicas: replicas }, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelector(selector):: self + { selector: selector }, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelectorMixin(selector):: self + { selector+: selector }, - // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - withTargetSelector(targetSelector):: self + { targetSelector: targetSelector }, - mixin:: {}, - }, - // StatefulSetCondition describes the state of a statefulset at a certain point. - statefulSetCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of statefulset condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // StatefulSetList is a collection of StatefulSets. - statefulSetList:: { - new(items=''):: self.withItems(items), - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1beta1.statefulSet, - mixin:: {}, - }, - // A StatefulSetSpec is the specification of a StatefulSet. - statefulSetSpec:: { - new():: {}, - // 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. - withPodManagementPolicy(podManagementPolicy):: self + { podManagementPolicy: 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. - withReplicas(replicas):: self + { replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + { revisionHistoryLimit: revisionHistoryLimit }, - // 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. - withServiceName(serviceName):: self + { serviceName: serviceName }, - // 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. - withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == 'array' then { volumeClaimTemplates: volumeClaimTemplates } else { volumeClaimTemplates: [volumeClaimTemplates] }, - // 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. - withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == 'array' then { volumeClaimTemplates+: volumeClaimTemplates } else { volumeClaimTemplates+: [volumeClaimTemplates] }, - volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, - mixin:: { - // selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = { updateStrategy+: updateStrategy }, - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. - withPartition(partition):: self + __rollingUpdateMixin({ partition: partition }), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateStatefulSetStrategy, - // Type indicates the type of the StatefulSetUpdateStrategy. - withType(type):: self + __updateStrategyMixin({ type: type }), - }, - updateStrategyType:: hidden.apps.v1beta1.statefulSetUpdateStrategy, - }, - }, - // StatefulSetStatus represents the current state of a StatefulSet. - statefulSetStatus:: { - new():: {}, - // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. - withCollisionCount(collisionCount):: self + { collisionCount: collisionCount }, - // Represents the latest available observations of a statefulset's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a statefulset's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apps.v1beta1.statefulSetCondition, - // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision. - withCurrentReplicas(currentReplicas):: self + { currentReplicas: currentReplicas }, - // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). - withCurrentRevision(currentRevision):: self + { currentRevision: currentRevision }, - // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. - withReadyReplicas(readyReplicas):: self + { readyReplicas: readyReplicas }, - // replicas is the number of Pods created by the StatefulSet controller. - withReplicas(replicas):: self + { replicas: replicas }, - // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) - withUpdateRevision(updateRevision):: self + { updateRevision: updateRevision }, - // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision. - withUpdatedReplicas(updatedReplicas):: self + { updatedReplicas: updatedReplicas }, - mixin:: {}, - }, - // 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. - statefulSetUpdateStrategy:: { - new():: {}, - // Type indicates the type of the StatefulSetUpdateStrategy. - withType(type):: self + { type: type }, - mixin:: { - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = { rollingUpdate+: rollingUpdate }, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. - withPartition(partition):: self + __rollingUpdateMixin({ partition: partition }), - }, - rollingUpdateType:: hidden.apps.v1beta1.rollingUpdateStatefulSetStrategy, - }, - }, - }, - v1beta2:: { - local apiVersion = { apiVersion: 'apps/v1beta2' }, - // ControllerRevisionList is a resource containing a list of ControllerRevision objects. - controllerRevisionList:: { - new():: {}, - // Items is the list of ControllerRevisions - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of ControllerRevisions - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1beta2.controllerRevision, - mixin:: {}, - }, - // DaemonSetCondition describes the state of a DaemonSet at a certain point. - daemonSetCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of DaemonSet condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // DaemonSetList is a collection of daemon sets. - daemonSetList:: { - new():: {}, - // A list of daemon sets. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // A list of daemon sets. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1beta2.daemonSet, - mixin:: {}, - }, - // DaemonSetSpec is the specification of a daemon set. - daemonSetSpec:: { - new():: {}, - // 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). - withMinReadySeconds(minReadySeconds):: self + { minReadySeconds: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + { revisionHistoryLimit: revisionHistoryLimit }, - mixin:: { - // 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = { updateStrategy+: updateStrategy }, - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDaemonSet, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. - withType(type):: self + __updateStrategyMixin({ type: type }), - }, - updateStrategyType:: hidden.apps.v1beta2.daemonSetUpdateStrategy, - }, - }, - // DaemonSetStatus represents the current status of a daemon set. - daemonSetStatus:: { - new():: {}, - // Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. - withCollisionCount(collisionCount):: self + { collisionCount: collisionCount }, - // Represents the latest available observations of a DaemonSet's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a DaemonSet's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apps.v1beta2.daemonSetCondition, - // The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withCurrentNumberScheduled(currentNumberScheduled):: self + { currentNumberScheduled: currentNumberScheduled }, - // The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withDesiredNumberScheduled(desiredNumberScheduled):: self + { desiredNumberScheduled: desiredNumberScheduled }, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds) - withNumberAvailable(numberAvailable):: self + { numberAvailable: numberAvailable }, - // The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withNumberMisscheduled(numberMisscheduled):: self + { numberMisscheduled: numberMisscheduled }, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. - withNumberReady(numberReady):: self + { numberReady: numberReady }, - // The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds) - withNumberUnavailable(numberUnavailable):: self + { numberUnavailable: numberUnavailable }, - // The most recent generation observed by the daemon set controller. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // The total number of nodes that are running updated daemon pod - withUpdatedNumberScheduled(updatedNumberScheduled):: self + { updatedNumberScheduled: updatedNumberScheduled }, - mixin:: {}, - }, - // DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet. - daemonSetUpdateStrategy:: { - new():: {}, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is RollingUpdate. - withType(type):: self + { type: type }, - mixin:: { - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = { rollingUpdate+: rollingUpdate }, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDaemonSet, - }, - }, - // DeploymentCondition describes the state of a deployment at a certain point. - deploymentCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // The last time this condition was updated. - withLastUpdateTime(lastUpdateTime):: self + { lastUpdateTime: lastUpdateTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of deployment condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // DeploymentList is a list of Deployments. - deploymentList:: { - new(items=''):: self.withItems(items), - // Items is the list of Deployments. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of Deployments. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1beta2.deployment, - mixin:: {}, - }, - // DeploymentSpec is the specification of the desired behavior of the Deployment. - deploymentSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + { minReadySeconds: minReadySeconds }, - // Indicates that the deployment is paused. - withPaused(paused):: self + { paused: 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. - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + { progressDeadlineSeconds: progressDeadlineSeconds }, - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + { replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + { revisionHistoryLimit: revisionHistoryLimit }, - mixin:: { - // 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = { strategy+: strategy }, - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. - withMaxSurge(maxSurge):: self + __rollingUpdateMixin({ maxSurge: 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({ type: type }), - }, - strategyType:: hidden.apps.v1beta2.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // DeploymentStatus is the most recently observed status of the Deployment. - deploymentStatus:: { - new():: {}, - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - withAvailableReplicas(availableReplicas):: self + { availableReplicas: availableReplicas }, - // Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. - withCollisionCount(collisionCount):: self + { collisionCount: collisionCount }, - // Represents the latest available observations of a deployment's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a deployment's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apps.v1beta2.deploymentCondition, - // The generation observed by the deployment controller. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // Total number of ready pods targeted by this deployment. - withReadyReplicas(readyReplicas):: self + { readyReplicas: readyReplicas }, - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - withReplicas(replicas):: self + { replicas: replicas }, - // Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. - withUnavailableReplicas(unavailableReplicas):: self + { unavailableReplicas: unavailableReplicas }, - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - withUpdatedReplicas(updatedReplicas):: self + { updatedReplicas: updatedReplicas }, - mixin:: {}, - }, - // DeploymentStrategy describes how to replace existing pods with new ones. - deploymentStrategy:: { - new():: {}, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + { type: type }, - mixin:: { - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = { rollingUpdate+: rollingUpdate }, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. - withMaxSurge(maxSurge):: self + __rollingUpdateMixin({ maxSurge: 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateDeployment, - }, - }, - // ReplicaSetCondition describes the state of a replica set at a certain point. - replicaSetCondition:: { - new():: {}, - // The last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of replica set condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // ReplicaSetList is a collection of ReplicaSets. - replicaSetList:: { - new():: {}, - // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1beta2.replicaSet, - mixin:: {}, - }, - // ReplicaSetSpec is the specification of a ReplicaSet. - replicaSetSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + { minReadySeconds: 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 - withReplicas(replicas):: self + { replicas: replicas }, - mixin:: { - // 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // ReplicaSetStatus represents the current status of a ReplicaSet. - replicaSetStatus:: { - new():: {}, - // The number of available replicas (ready for at least minReadySeconds) for this replica set. - withAvailableReplicas(availableReplicas):: self + { availableReplicas: availableReplicas }, - // Represents the latest available observations of a replica set's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a replica set's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apps.v1beta2.replicaSetCondition, - // The number of pods that have labels matching the labels of the pod template of the replicaset. - withFullyLabeledReplicas(fullyLabeledReplicas):: self + { fullyLabeledReplicas: fullyLabeledReplicas }, - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // The number of ready replicas for this replica set. - withReadyReplicas(readyReplicas):: self + { readyReplicas: readyReplicas }, - // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller - withReplicas(replicas):: self + { replicas: replicas }, - mixin:: {}, - }, - // Spec to control the desired behavior of daemon set rolling update. - rollingUpdateDaemonSet:: { - new():: {}, - // 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. 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. - withMaxUnavailable(maxUnavailable):: self + { maxUnavailable: maxUnavailable }, - mixin:: {}, - }, - // Spec to control the desired behavior of rolling update. - rollingUpdateDeployment:: { - new():: {}, - // 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. - withMaxSurge(maxSurge):: self + { maxSurge: 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. - withMaxUnavailable(maxUnavailable):: self + { maxUnavailable: maxUnavailable }, - mixin:: {}, - }, - // RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType. - rollingUpdateStatefulSetStrategy:: { - new():: {}, - // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. - withPartition(partition):: self + { partition: partition }, - mixin:: {}, - }, - // ScaleSpec describes the attributes of a scale subresource - scaleSpec:: { - new():: {}, - // desired number of instances for the scaled object. - withReplicas(replicas):: self + { replicas: replicas }, - mixin:: {}, - }, - // ScaleStatus represents the current status of a scale subresource. - scaleStatus:: { - new():: {}, - // actual number of observed instances of the scaled object. - withReplicas(replicas):: self + { replicas: replicas }, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelector(selector):: self + { selector: selector }, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelectorMixin(selector):: self + { selector+: selector }, - // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - withTargetSelector(targetSelector):: self + { targetSelector: targetSelector }, - mixin:: {}, - }, - // StatefulSetCondition describes the state of a statefulset at a certain point. - statefulSetCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of statefulset condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // StatefulSetList is a collection of StatefulSets. - statefulSetList:: { - new(items=''):: self.withItems(items), - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.apps.v1beta2.statefulSet, - mixin:: {}, - }, - // A StatefulSetSpec is the specification of a StatefulSet. - statefulSetSpec:: { - new():: {}, - // 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. - withPodManagementPolicy(podManagementPolicy):: self + { podManagementPolicy: 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. - withReplicas(replicas):: self + { replicas: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + { revisionHistoryLimit: revisionHistoryLimit }, - // 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. - withServiceName(serviceName):: self + { serviceName: serviceName }, - // 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. - withVolumeClaimTemplates(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == 'array' then { volumeClaimTemplates: volumeClaimTemplates } else { volumeClaimTemplates: [volumeClaimTemplates] }, - // 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. - withVolumeClaimTemplatesMixin(volumeClaimTemplates):: self + if std.type(volumeClaimTemplates) == 'array' then { volumeClaimTemplates+: volumeClaimTemplates } else { volumeClaimTemplates+: [volumeClaimTemplates] }, - volumeClaimTemplatesType:: hidden.core.v1.persistentVolumeClaim, - mixin:: { - // 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = { updateStrategy+: updateStrategy }, - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. - withPartition(partition):: self + __rollingUpdateMixin({ partition: partition }), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateStatefulSetStrategy, - // Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. - withType(type):: self + __updateStrategyMixin({ type: type }), - }, - updateStrategyType:: hidden.apps.v1beta2.statefulSetUpdateStrategy, - }, - }, - // StatefulSetStatus represents the current state of a StatefulSet. - statefulSetStatus:: { - new():: {}, - // collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. - withCollisionCount(collisionCount):: self + { collisionCount: collisionCount }, - // Represents the latest available observations of a statefulset's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a statefulset's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.apps.v1beta2.statefulSetCondition, - // currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision. - withCurrentReplicas(currentReplicas):: self + { currentReplicas: currentReplicas }, - // currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas). - withCurrentRevision(currentRevision):: self + { currentRevision: currentRevision }, - // observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // readyReplicas is the number of Pods created by the StatefulSet controller that have a Ready Condition. - withReadyReplicas(readyReplicas):: self + { readyReplicas: readyReplicas }, - // replicas is the number of Pods created by the StatefulSet controller. - withReplicas(replicas):: self + { replicas: replicas }, - // updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas) - withUpdateRevision(updateRevision):: self + { updateRevision: updateRevision }, - // updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision. - withUpdatedReplicas(updatedReplicas):: self + { updatedReplicas: updatedReplicas }, - mixin:: {}, - }, - // 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. - statefulSetUpdateStrategy:: { - new():: {}, - // Type indicates the type of the StatefulSetUpdateStrategy. Default is RollingUpdate. - withType(type):: self + { type: type }, - mixin:: { - // RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = { rollingUpdate+: rollingUpdate }, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // Partition indicates the ordinal at which the StatefulSet should be partitioned. Default value is 0. - withPartition(partition):: self + __rollingUpdateMixin({ partition: partition }), - }, - rollingUpdateType:: hidden.apps.v1beta2.rollingUpdateStatefulSetStrategy, - }, - }, - }, - }, - authentication:: { - v1:: { - local apiVersion = { apiVersion: 'authentication/v1' }, - // TokenReviewSpec is a description of the token authentication request. - tokenReviewSpec:: { - new():: {}, - // 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. - withAudiences(audiences):: self + if std.type(audiences) == 'array' then { audiences: audiences } else { audiences: [audiences] }, - // 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. - withAudiencesMixin(audiences):: self + if std.type(audiences) == 'array' then { audiences+: audiences } else { audiences+: [audiences] }, - // Token is the opaque bearer token. - withToken(token):: self + { token: token }, - mixin:: {}, - }, - // TokenReviewStatus is the result of the token authentication request. - tokenReviewStatus:: { - new():: {}, - // Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is "true", the token is valid against the audience of the Kubernetes API server. - withAudiences(audiences):: self + if std.type(audiences) == 'array' then { audiences: audiences } else { audiences: [audiences] }, - // Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is "true", the token is valid against the audience of the Kubernetes API server. - withAudiencesMixin(audiences):: self + if std.type(audiences) == 'array' then { audiences+: audiences } else { audiences+: [audiences] }, - // Authenticated indicates that the token was associated with a known user. - withAuthenticated(authenticated):: self + { authenticated: authenticated }, - // Error indicates that the token couldn't be checked - withErrorParam(errorParam):: self + { "error": errorParam }, - mixin:: { - // User is the UserInfo associated with the provided token. - user:: { - local __userMixin(user) = { user+: user }, - mixinInstance(user):: __userMixin(user), - // Any additional information provided by the authenticator. - withExtra(extra):: self + __userMixin({ extra: extra }), - // Any additional information provided by the authenticator. - withExtraMixin(extra):: self + __userMixin({ extra+: extra }), - // The names of groups this user is a part of. - withGroups(groups):: self + if std.type(groups) == 'array' then __userMixin({ groups: groups }) else __userMixin({ groups: [groups] }), - // The names of groups this user is a part of. - withGroupsMixin(groups):: self + if std.type(groups) == 'array' then __userMixin({ groups+: groups }) else __userMixin({ groups+: [groups] }), - // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. - withUid(uid):: self + __userMixin({ uid: uid }), - // The name that uniquely identifies this user among all active users. - withUsername(username):: self + __userMixin({ username: username }), - }, - userType:: hidden.authentication.v1.userInfo, - }, - }, - // UserInfo holds the information about the user needed to implement the user.Info interface. - userInfo:: { - new():: {}, - // Any additional information provided by the authenticator. - withExtra(extra):: self + { extra: extra }, - // Any additional information provided by the authenticator. - withExtraMixin(extra):: self + { extra+: extra }, - // The names of groups this user is a part of. - withGroups(groups):: self + if std.type(groups) == 'array' then { groups: groups } else { groups: [groups] }, - // The names of groups this user is a part of. - withGroupsMixin(groups):: self + if std.type(groups) == 'array' then { groups+: groups } else { groups+: [groups] }, - // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. - withUid(uid):: self + { uid: uid }, - // The name that uniquely identifies this user among all active users. - withUsername(username):: self + { username: username }, - mixin:: {}, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'authentication/v1beta1' }, - // TokenReviewSpec is a description of the token authentication request. - tokenReviewSpec:: { - new():: {}, - // 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. - withAudiences(audiences):: self + if std.type(audiences) == 'array' then { audiences: audiences } else { audiences: [audiences] }, - // 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. - withAudiencesMixin(audiences):: self + if std.type(audiences) == 'array' then { audiences+: audiences } else { audiences+: [audiences] }, - // Token is the opaque bearer token. - withToken(token):: self + { token: token }, - mixin:: {}, - }, - // TokenReviewStatus is the result of the token authentication request. - tokenReviewStatus:: { - new():: {}, - // Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is "true", the token is valid against the audience of the Kubernetes API server. - withAudiences(audiences):: self + if std.type(audiences) == 'array' then { audiences: audiences } else { audiences: [audiences] }, - // Audiences are audience identifiers chosen by the authenticator that are compatible with both the TokenReview and token. An identifier is any identifier in the intersection of the TokenReviewSpec audiences and the token's audiences. A client of the TokenReview API that sets the spec.audiences field should validate that a compatible audience identifier is returned in the status.audiences field to ensure that the TokenReview server is audience aware. If a TokenReview returns an empty status.audience field where status.authenticated is "true", the token is valid against the audience of the Kubernetes API server. - withAudiencesMixin(audiences):: self + if std.type(audiences) == 'array' then { audiences+: audiences } else { audiences+: [audiences] }, - // Authenticated indicates that the token was associated with a known user. - withAuthenticated(authenticated):: self + { authenticated: authenticated }, - // Error indicates that the token couldn't be checked - withErrorParam(errorParam):: self + { "error": errorParam }, - mixin:: { - // User is the UserInfo associated with the provided token. - user:: { - local __userMixin(user) = { user+: user }, - mixinInstance(user):: __userMixin(user), - // Any additional information provided by the authenticator. - withExtra(extra):: self + __userMixin({ extra: extra }), - // Any additional information provided by the authenticator. - withExtraMixin(extra):: self + __userMixin({ extra+: extra }), - // The names of groups this user is a part of. - withGroups(groups):: self + if std.type(groups) == 'array' then __userMixin({ groups: groups }) else __userMixin({ groups: [groups] }), - // The names of groups this user is a part of. - withGroupsMixin(groups):: self + if std.type(groups) == 'array' then __userMixin({ groups+: groups }) else __userMixin({ groups+: [groups] }), - // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. - withUid(uid):: self + __userMixin({ uid: uid }), - // The name that uniquely identifies this user among all active users. - withUsername(username):: self + __userMixin({ username: username }), - }, - userType:: hidden.authentication.v1beta1.userInfo, - }, - }, - // UserInfo holds the information about the user needed to implement the user.Info interface. - userInfo:: { - new():: {}, - // Any additional information provided by the authenticator. - withExtra(extra):: self + { extra: extra }, - // Any additional information provided by the authenticator. - withExtraMixin(extra):: self + { extra+: extra }, - // The names of groups this user is a part of. - withGroups(groups):: self + if std.type(groups) == 'array' then { groups: groups } else { groups: [groups] }, - // The names of groups this user is a part of. - withGroupsMixin(groups):: self + if std.type(groups) == 'array' then { groups+: groups } else { groups+: [groups] }, - // A unique value that identifies this user across time. If this user is deleted and another user by the same name is added, they will have different UIDs. - withUid(uid):: self + { uid: uid }, - // The name that uniquely identifies this user among all active users. - withUsername(username):: self + { username: username }, - mixin:: {}, - }, - }, - }, - authorization:: { - v1:: { - local apiVersion = { apiVersion: 'authorization/v1' }, - // NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface - nonResourceAttributes:: { - new():: {}, - // Path is the URL path of the request - withPath(path):: self + { path: path }, - // Verb is the standard HTTP verb - withVerb(verb):: self + { verb: verb }, - mixin:: {}, - }, - // NonResourceRule holds information that describes a rule for the non-resource - nonResourceRule:: { - new():: {}, - // 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. "*" means all. - withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == 'array' then { nonResourceURLs: nonResourceUrls } else { nonResourceURLs: [nonResourceUrls] }, - // 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. "*" means all. - withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == 'array' then { nonResourceURLs+: nonResourceUrls } else { nonResourceURLs+: [nonResourceUrls] }, - // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. - withVerbs(verbs):: self + if std.type(verbs) == 'array' then { verbs: verbs } else { verbs: [verbs] }, - // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. - withVerbsMixin(verbs):: self + if std.type(verbs) == 'array' then { verbs+: verbs } else { verbs+: [verbs] }, - mixin:: {}, - }, - // ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface - resourceAttributes:: { - new():: {}, - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + { group: group }, - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + { name: 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 - withNamespace(namespace):: self + { namespace: namespace }, - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + { resource: resource }, - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + { subresource: subresource }, - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + { verb: verb }, - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + { version: version }, - mixin:: {}, - }, - // ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - resourceRule:: { - new():: {}, - // 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. "*" means all. - withApiGroups(apiGroups):: self + if std.type(apiGroups) == 'array' then { apiGroups: apiGroups } else { apiGroups: [apiGroups] }, - // 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. "*" means all. - withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == 'array' then { apiGroups+: apiGroups } else { apiGroups+: [apiGroups] }, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. - withResourceNames(resourceNames):: self + if std.type(resourceNames) == 'array' then { resourceNames: resourceNames } else { resourceNames: [resourceNames] }, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. - withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == 'array' then { resourceNames+: resourceNames } else { resourceNames+: [resourceNames] }, - // Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups. - // "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups. - withResources(resources):: self + if std.type(resources) == 'array' then { resources: resources } else { resources: [resources] }, - // Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups. - // "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups. - withResourcesMixin(resources):: self + if std.type(resources) == 'array' then { resources+: resources } else { resources+: [resources] }, - // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerbs(verbs):: self + if std.type(verbs) == 'array' then { verbs: verbs } else { verbs: [verbs] }, - // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerbsMixin(verbs):: self + if std.type(verbs) == 'array' then { verbs+: verbs } else { verbs+: [verbs] }, - mixin:: {}, - }, - // SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set - selfSubjectAccessReviewSpec:: { - new():: {}, - mixin:: { - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = { nonResourceAttributes+: nonResourceAttributes }, - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({ path: path }), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({ verb: verb }), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = { resourceAttributes+: resourceAttributes }, - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({ group: group }), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({ name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({ namespace: namespace }), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({ resource: resource }), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({ subresource: subresource }), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({ verb: verb }), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({ version: version }), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - }, - }, - selfSubjectRulesReviewSpec:: { - new():: {}, - // Namespace to evaluate rules for. Required. - withNamespace(namespace):: self + { namespace: namespace }, - mixin:: {}, - }, - // SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set - subjectAccessReviewSpec:: { - new():: {}, - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtra(extra):: self + { extra: extra }, - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtraMixin(extra):: self + { extra+: extra }, - // Groups is the groups you're testing for. - withGroups(groups):: self + if std.type(groups) == 'array' then { groups: groups } else { groups: [groups] }, - // Groups is the groups you're testing for. - withGroupsMixin(groups):: self + if std.type(groups) == 'array' then { groups+: groups } else { groups+: [groups] }, - // UID information about the requesting user. - withUid(uid):: self + { uid: 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 - withUser(user):: self + { user: user }, - mixin:: { - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = { nonResourceAttributes+: nonResourceAttributes }, - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({ path: path }), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({ verb: verb }), - }, - nonResourceAttributesType:: hidden.authorization.v1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = { resourceAttributes+: resourceAttributes }, - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({ group: group }), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({ name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({ namespace: namespace }), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({ resource: resource }), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({ subresource: subresource }), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({ verb: verb }), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({ version: version }), - }, - resourceAttributesType:: hidden.authorization.v1.resourceAttributes, - }, - }, - // SubjectAccessReviewStatus - subjectAccessReviewStatus:: { - new():: {}, - // Allowed is required. True if the action would be allowed, false otherwise. - withAllowed(allowed):: self + { allowed: allowed }, - // Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true. - withDenied(denied):: self + { denied: denied }, - // EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. - withEvaluationError(evaluationError):: self + { evaluationError: evaluationError }, - // Reason is optional. It indicates why a request was allowed or denied. - withReason(reason):: self + { reason: reason }, - mixin:: {}, - }, - // SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete. - subjectRulesReviewStatus:: { - new():: {}, - // EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete. - withEvaluationError(evaluationError):: self + { evaluationError: evaluationError }, - // Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation. - withIncomplete(incomplete):: self + { incomplete: incomplete }, - // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withNonResourceRules(nonResourceRules):: self + if std.type(nonResourceRules) == 'array' then { nonResourceRules: nonResourceRules } else { nonResourceRules: [nonResourceRules] }, - // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withNonResourceRulesMixin(nonResourceRules):: self + if std.type(nonResourceRules) == 'array' then { nonResourceRules+: nonResourceRules } else { nonResourceRules+: [nonResourceRules] }, - nonResourceRulesType:: hidden.authorization.v1.nonResourceRule, - // ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withResourceRules(resourceRules):: self + if std.type(resourceRules) == 'array' then { resourceRules: resourceRules } else { resourceRules: [resourceRules] }, - // ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withResourceRulesMixin(resourceRules):: self + if std.type(resourceRules) == 'array' then { resourceRules+: resourceRules } else { resourceRules+: [resourceRules] }, - resourceRulesType:: hidden.authorization.v1.resourceRule, - mixin:: {}, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'authorization/v1beta1' }, - // NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface - nonResourceAttributes:: { - new():: {}, - // Path is the URL path of the request - withPath(path):: self + { path: path }, - // Verb is the standard HTTP verb - withVerb(verb):: self + { verb: verb }, - mixin:: {}, - }, - // NonResourceRule holds information that describes a rule for the non-resource - nonResourceRule:: { - new():: {}, - // 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. "*" means all. - withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == 'array' then { nonResourceURLs: nonResourceUrls } else { nonResourceURLs: [nonResourceUrls] }, - // 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. "*" means all. - withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == 'array' then { nonResourceURLs+: nonResourceUrls } else { nonResourceURLs+: [nonResourceUrls] }, - // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. - withVerbs(verbs):: self + if std.type(verbs) == 'array' then { verbs: verbs } else { verbs: [verbs] }, - // Verb is a list of kubernetes non-resource API verbs, like: get, post, put, delete, patch, head, options. "*" means all. - withVerbsMixin(verbs):: self + if std.type(verbs) == 'array' then { verbs+: verbs } else { verbs+: [verbs] }, - mixin:: {}, - }, - // ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface - resourceAttributes:: { - new():: {}, - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + { group: group }, - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + { name: 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 - withNamespace(namespace):: self + { namespace: namespace }, - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + { resource: resource }, - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + { subresource: subresource }, - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + { verb: verb }, - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + { version: version }, - mixin:: {}, - }, - // ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - resourceRule:: { - new():: {}, - // 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. "*" means all. - withApiGroups(apiGroups):: self + if std.type(apiGroups) == 'array' then { apiGroups: apiGroups } else { apiGroups: [apiGroups] }, - // 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. "*" means all. - withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == 'array' then { apiGroups+: apiGroups } else { apiGroups+: [apiGroups] }, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. - withResourceNames(resourceNames):: self + if std.type(resourceNames) == 'array' then { resourceNames: resourceNames } else { resourceNames: [resourceNames] }, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. "*" means all. - withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == 'array' then { resourceNames+: resourceNames } else { resourceNames+: [resourceNames] }, - // Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups. - // "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups. - withResources(resources):: self + if std.type(resources) == 'array' then { resources: resources } else { resources: [resources] }, - // Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups. - // "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups. - withResourcesMixin(resources):: self + if std.type(resources) == 'array' then { resources+: resources } else { resources+: [resources] }, - // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerbs(verbs):: self + if std.type(verbs) == 'array' then { verbs: verbs } else { verbs: [verbs] }, - // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerbsMixin(verbs):: self + if std.type(verbs) == 'array' then { verbs+: verbs } else { verbs+: [verbs] }, - mixin:: {}, - }, - // SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set - selfSubjectAccessReviewSpec:: { - new():: {}, - mixin:: { - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = { nonResourceAttributes+: nonResourceAttributes }, - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({ path: path }), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({ verb: verb }), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = { resourceAttributes+: resourceAttributes }, - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({ group: group }), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({ name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({ namespace: namespace }), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({ resource: resource }), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({ subresource: subresource }), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({ verb: verb }), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({ version: version }), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - }, - }, - selfSubjectRulesReviewSpec:: { - new():: {}, - // Namespace to evaluate rules for. Required. - withNamespace(namespace):: self + { namespace: namespace }, - mixin:: {}, - }, - // SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set - subjectAccessReviewSpec:: { - new():: {}, - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtra(extra):: self + { extra: extra }, - // Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. - withExtraMixin(extra):: self + { extra+: extra }, - // Groups is the groups you're testing for. - withGroup(group):: self + if std.type(group) == 'array' then { group: group } else { group: [group] }, - // Groups is the groups you're testing for. - withGroupMixin(group):: self + if std.type(group) == 'array' then { group+: group } else { group+: [group] }, - // UID information about the requesting user. - withUid(uid):: self + { uid: uid }, - // User is the user you're testing for. If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups - withUser(user):: self + { user: user }, - mixin:: { - // NonResourceAttributes describes information for a non-resource access request - nonResourceAttributes:: { - local __nonResourceAttributesMixin(nonResourceAttributes) = { nonResourceAttributes+: nonResourceAttributes }, - mixinInstance(nonResourceAttributes):: __nonResourceAttributesMixin(nonResourceAttributes), - // Path is the URL path of the request - withPath(path):: self + __nonResourceAttributesMixin({ path: path }), - // Verb is the standard HTTP verb - withVerb(verb):: self + __nonResourceAttributesMixin({ verb: verb }), - }, - nonResourceAttributesType:: hidden.authorization.v1beta1.nonResourceAttributes, - // ResourceAuthorizationAttributes describes information for a resource access request - resourceAttributes:: { - local __resourceAttributesMixin(resourceAttributes) = { resourceAttributes+: resourceAttributes }, - mixinInstance(resourceAttributes):: __resourceAttributesMixin(resourceAttributes), - // Group is the API Group of the Resource. "*" means all. - withGroup(group):: self + __resourceAttributesMixin({ group: group }), - // Name is the name of the resource being requested for a "get" or deleted for a "delete". "" (empty) means all. - withName(name):: self + __resourceAttributesMixin({ name: 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 - withNamespace(namespace):: self + __resourceAttributesMixin({ namespace: namespace }), - // Resource is one of the existing resource types. "*" means all. - withResource(resource):: self + __resourceAttributesMixin({ resource: resource }), - // Subresource is one of the existing resource types. "" means none. - withSubresource(subresource):: self + __resourceAttributesMixin({ subresource: subresource }), - // Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all. - withVerb(verb):: self + __resourceAttributesMixin({ verb: verb }), - // Version is the API Version of the Resource. "*" means all. - withVersion(version):: self + __resourceAttributesMixin({ version: version }), - }, - resourceAttributesType:: hidden.authorization.v1beta1.resourceAttributes, - }, - }, - // SubjectAccessReviewStatus - subjectAccessReviewStatus:: { - new():: {}, - // Allowed is required. True if the action would be allowed, false otherwise. - withAllowed(allowed):: self + { allowed: allowed }, - // Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true. - withDenied(denied):: self + { denied: denied }, - // EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. - withEvaluationError(evaluationError):: self + { evaluationError: evaluationError }, - // Reason is optional. It indicates why a request was allowed or denied. - withReason(reason):: self + { reason: reason }, - mixin:: {}, - }, - // SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it's safe to assume the subject has that permission, even if that list is incomplete. - subjectRulesReviewStatus:: { - new():: {}, - // EvaluationError can appear in combination with Rules. It indicates an error occurred during rule evaluation, such as an authorizer that doesn't support rule evaluation, and that ResourceRules and/or NonResourceRules may be incomplete. - withEvaluationError(evaluationError):: self + { evaluationError: evaluationError }, - // Incomplete is true when the rules returned by this call are incomplete. This is most commonly encountered when an authorizer, such as an external authorizer, doesn't support rules evaluation. - withIncomplete(incomplete):: self + { incomplete: incomplete }, - // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withNonResourceRules(nonResourceRules):: self + if std.type(nonResourceRules) == 'array' then { nonResourceRules: nonResourceRules } else { nonResourceRules: [nonResourceRules] }, - // NonResourceRules is the list of actions the subject is allowed to perform on non-resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withNonResourceRulesMixin(nonResourceRules):: self + if std.type(nonResourceRules) == 'array' then { nonResourceRules+: nonResourceRules } else { nonResourceRules+: [nonResourceRules] }, - nonResourceRulesType:: hidden.authorization.v1beta1.nonResourceRule, - // ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withResourceRules(resourceRules):: self + if std.type(resourceRules) == 'array' then { resourceRules: resourceRules } else { resourceRules: [resourceRules] }, - // ResourceRules is the list of actions the subject is allowed to perform on resources. The list ordering isn't significant, may contain duplicates, and possibly be incomplete. - withResourceRulesMixin(resourceRules):: self + if std.type(resourceRules) == 'array' then { resourceRules+: resourceRules } else { resourceRules+: [resourceRules] }, - resourceRulesType:: hidden.authorization.v1beta1.resourceRule, - mixin:: {}, - }, - }, - }, - autoscaling:: { - v1:: { - local apiVersion = { apiVersion: 'autoscaling/v1' }, - // CrossVersionObjectReference contains enough information to let you identify the referred resource. - crossVersionObjectReference:: { - new():: {}, - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + { kind: kind }, - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + { name: name }, - mixin:: {}, - }, - // list of horizontal pod autoscaler objects. - horizontalPodAutoscalerList:: { - new(items=''):: self.withItems(items), - // list of horizontal pod autoscaler objects. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // list of horizontal pod autoscaler objects. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.autoscaling.v1.horizontalPodAutoscaler, - mixin:: {}, - }, - // specification of a horizontal pod autoscaler. - horizontalPodAutoscalerSpec:: { - new():: {}, - // upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas. - withMaxReplicas(maxReplicas):: self + { maxReplicas: maxReplicas }, - // lower limit for the number of pods that can be set by the autoscaler, default 1. - withMinReplicas(minReplicas):: self + { minReplicas: 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. - withTargetCpuUtilizationPercentage(targetCpuUtilizationPercentage):: self + { targetCPUUtilizationPercentage: targetCpuUtilizationPercentage }, - mixin:: { - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = { scaleTargetRef+: scaleTargetRef }, - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __scaleTargetRefMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __scaleTargetRefMixin({ name: name }), - }, - scaleTargetRefType:: hidden.autoscaling.v1.crossVersionObjectReference, - }, - }, - // current status of a horizontal pod autoscaler - horizontalPodAutoscalerStatus:: { - new():: {}, - // current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU. - withCurrentCpuUtilizationPercentage(currentCpuUtilizationPercentage):: self + { currentCPUUtilizationPercentage: currentCpuUtilizationPercentage }, - // current number of replicas of pods managed by this autoscaler. - withCurrentReplicas(currentReplicas):: self + { currentReplicas: currentReplicas }, - // desired number of replicas of pods managed by this autoscaler. - withDesiredReplicas(desiredReplicas):: self + { desiredReplicas: desiredReplicas }, - // last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed. - withLastScaleTime(lastScaleTime):: self + { lastScaleTime: lastScaleTime }, - // most recent generation observed by this autoscaler. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - mixin:: {}, - }, - // ScaleSpec describes the attributes of a scale subresource. - scaleSpec:: { - new():: {}, - // desired number of instances for the scaled object. - withReplicas(replicas):: self + { replicas: replicas }, - mixin:: {}, - }, - // ScaleStatus represents the current status of a scale subresource. - scaleStatus:: { - new():: {}, - // actual number of observed instances of the scaled object. - withReplicas(replicas):: self + { replicas: replicas }, - // label query over pods that should match the replicas count. This is same as the label selector but in the string format to avoid introspection by clients. The string will be in the same format as the query-param syntax. More info about label selectors: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelector(selector):: self + { selector: selector }, - mixin:: {}, - }, - }, - v2beta1:: { - local apiVersion = { apiVersion: 'autoscaling/v2beta1' }, - // CrossVersionObjectReference contains enough information to let you identify the referred resource. - crossVersionObjectReference:: { - new():: {}, - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + { kind: kind }, - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + { name: name }, - mixin:: {}, - }, - // 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. - externalMetricSource:: { - new():: {}, - // metricName is the name of the metric in question. - withMetricName(metricName):: self + { metricName: metricName }, - mixin:: { - // metricSelector is used to identify a specific time series within a given metric. - metricSelector:: { - local __metricSelectorMixin(metricSelector) = { metricSelector+: metricSelector }, - mixinInstance(metricSelector):: __metricSelectorMixin(metricSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __metricSelectorMixin({ matchExpressions: matchExpressions }) else __metricSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __metricSelectorMixin({ matchExpressions+: matchExpressions }) else __metricSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __metricSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __metricSelectorMixin({ matchLabels+: matchLabels }), - }, - metricSelectorType:: hidden.meta.v1.labelSelector, - // targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue. - targetAverageValue:: { - local __targetAverageValueMixin(targetAverageValue) = { targetAverageValue+: targetAverageValue }, - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - // targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue. - targetValue:: { - local __targetValueMixin(targetValue) = { targetValue+: targetValue }, - mixinInstance(targetValue):: __targetValueMixin(targetValue), - }, - targetValueType:: hidden.core.resource.quantity, - }, - }, - // ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object. - externalMetricStatus:: { - new():: {}, - // metricName is the name of a metric used for autoscaling in metric system. - withMetricName(metricName):: self + { metricName: metricName }, - mixin:: { - // currentAverageValue is the current value of metric averaged over autoscaled pods. - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = { currentAverageValue+: currentAverageValue }, - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - // currentValue is the current value of the metric (as a quantity) - currentValue:: { - local __currentValueMixin(currentValue) = { currentValue+: currentValue }, - mixinInstance(currentValue):: __currentValueMixin(currentValue), - }, - currentValueType:: hidden.core.resource.quantity, - // metricSelector is used to identify a specific time series within a given metric. - metricSelector:: { - local __metricSelectorMixin(metricSelector) = { metricSelector+: metricSelector }, - mixinInstance(metricSelector):: __metricSelectorMixin(metricSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __metricSelectorMixin({ matchExpressions: matchExpressions }) else __metricSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __metricSelectorMixin({ matchExpressions+: matchExpressions }) else __metricSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __metricSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __metricSelectorMixin({ matchLabels+: matchLabels }), - }, - metricSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. - horizontalPodAutoscalerCondition:: { - new():: {}, - // lastTransitionTime is the last time the condition transitioned from one status to another - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // message is a human-readable explanation containing details about the transition - withMessage(message):: self + { message: message }, - // reason is the reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // status is the status of the condition (True, False, Unknown) - withStatus(status):: self + { status: status }, - // type describes the current condition - withType(type):: self + { type: type }, - mixin:: {}, - }, - // HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. - horizontalPodAutoscalerList:: { - new(items=''):: self.withItems(items), - // items is the list of horizontal pod autoscaler objects. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // items is the list of horizontal pod autoscaler objects. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.autoscaling.v2beta1.horizontalPodAutoscaler, - mixin:: {}, - }, - // HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. - horizontalPodAutoscalerSpec:: { - new():: {}, - // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas. - withMaxReplicas(maxReplicas):: self + { maxReplicas: maxReplicas }, - // 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. - withMetrics(metrics):: self + if std.type(metrics) == 'array' then { metrics: metrics } else { metrics: [metrics] }, - // 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. - withMetricsMixin(metrics):: self + if std.type(metrics) == 'array' then { metrics+: metrics } else { metrics+: [metrics] }, - metricsType:: hidden.autoscaling.v2beta1.metricSpec, - // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. - withMinReplicas(minReplicas):: self + { minReplicas: minReplicas }, - mixin:: { - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = { scaleTargetRef+: scaleTargetRef }, - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __scaleTargetRefMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __scaleTargetRefMixin({ name: name }), - }, - scaleTargetRefType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, - }, - }, - // HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. - horizontalPodAutoscalerStatus:: { - new():: {}, - // conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.autoscaling.v2beta1.horizontalPodAutoscalerCondition, - // currentMetrics is the last read state of the metrics used by this autoscaler. - withCurrentMetrics(currentMetrics):: self + if std.type(currentMetrics) == 'array' then { currentMetrics: currentMetrics } else { currentMetrics: [currentMetrics] }, - // currentMetrics is the last read state of the metrics used by this autoscaler. - withCurrentMetricsMixin(currentMetrics):: self + if std.type(currentMetrics) == 'array' then { currentMetrics+: currentMetrics } else { currentMetrics+: [currentMetrics] }, - currentMetricsType:: hidden.autoscaling.v2beta1.metricStatus, - // currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler. - withCurrentReplicas(currentReplicas):: self + { currentReplicas: currentReplicas }, - // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler. - withDesiredReplicas(desiredReplicas):: self + { desiredReplicas: desiredReplicas }, - // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed. - withLastScaleTime(lastScaleTime):: self + { lastScaleTime: lastScaleTime }, - // observedGeneration is the most recent generation observed by this autoscaler. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - mixin:: {}, - }, - // MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). - metricSpec:: { - new():: {}, - // type is the type of metric source. It should be one of "Object", "Pods" or "Resource", each mapping to a matching field in the object. - withType(type):: self + { type: type }, - mixin:: { - // 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:: { - local __externalMixin(external) = { external+: external }, - mixinInstance(external):: __externalMixin(external), - // metricName is the name of the metric in question. - withMetricName(metricName):: self + __externalMixin({ metricName: metricName }), - // metricSelector is used to identify a specific time series within a given metric. - metricSelector:: { - local __metricSelectorMixin(metricSelector) = __externalMixin({ metricSelector+: metricSelector }), - mixinInstance(metricSelector):: __metricSelectorMixin(metricSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __metricSelectorMixin({ matchExpressions: matchExpressions }) else __metricSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __metricSelectorMixin({ matchExpressions+: matchExpressions }) else __metricSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __metricSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __metricSelectorMixin({ matchLabels+: matchLabels }), - }, - metricSelectorType:: hidden.meta.v1.labelSelector, - // targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue. - targetAverageValue:: { - local __targetAverageValueMixin(targetAverageValue) = __externalMixin({ targetAverageValue+: targetAverageValue }), - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - // targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue. - targetValue:: { - local __targetValueMixin(targetValue) = __externalMixin({ targetValue+: targetValue }), - mixinInstance(targetValue):: __targetValueMixin(targetValue), - }, - targetValueType:: hidden.core.resource.quantity, - }, - externalType:: hidden.autoscaling.v2beta1.externalMetricSource, - // object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). - object:: { - local __objectMixin(object) = { object+: object }, - mixinInstance(object):: __objectMixin(object), - // averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __objectMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // metricName is the name of the metric in question. - withMetricName(metricName):: self + __objectMixin({ metricName: metricName }), - // 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:: { - local __selectorMixin(selector) = __objectMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // target is the described Kubernetes object. - target:: { - local __targetMixin(target) = __objectMixin({ target+: target }), - mixinInstance(target):: __targetMixin(target), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __targetMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __targetMixin({ name: name }), - }, - targetType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, - // targetValue is the target value of the metric (as a quantity). - targetValue:: { - local __targetValueMixin(targetValue) = __objectMixin({ targetValue+: targetValue }), - mixinInstance(targetValue):: __targetValueMixin(targetValue), - }, - targetValueType:: hidden.core.resource.quantity, - }, - objectType:: hidden.autoscaling.v2beta1.objectMetricSource, - // 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:: { - local __podsMixin(pods) = { pods+: pods }, - mixinInstance(pods):: __podsMixin(pods), - // metricName is the name of the metric in question - withMetricName(metricName):: self + __podsMixin({ metricName: metricName }), - // 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:: { - local __selectorMixin(selector) = __podsMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity) - targetAverageValue:: { - local __targetAverageValueMixin(targetAverageValue) = __podsMixin({ targetAverageValue+: targetAverageValue }), - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - }, - podsType:: hidden.autoscaling.v2beta1.podsMetricSource, - // 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:: { - local __resourceMixin(resource) = { resource+: resource }, - mixinInstance(resource):: __resourceMixin(resource), - // name is the name of the resource in question. - withName(name):: self + __resourceMixin({ name: 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. - withTargetAverageUtilization(targetAverageUtilization):: self + __resourceMixin({ targetAverageUtilization: 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:: { - local __targetAverageValueMixin(targetAverageValue) = __resourceMixin({ targetAverageValue+: targetAverageValue }), - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - }, - resourceType:: hidden.autoscaling.v2beta1.resourceMetricSource, - }, - }, - // MetricStatus describes the last-read state of a single metric. - metricStatus:: { - new():: {}, - // type is the type of metric source. It will be one of "Object", "Pods" or "Resource", each corresponds to a matching field in the object. - withType(type):: self + { type: type }, - mixin:: { - // 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:: { - local __externalMixin(external) = { external+: external }, - mixinInstance(external):: __externalMixin(external), - // currentAverageValue is the current value of metric averaged over autoscaled pods. - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = __externalMixin({ currentAverageValue+: currentAverageValue }), - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - // currentValue is the current value of the metric (as a quantity) - currentValue:: { - local __currentValueMixin(currentValue) = __externalMixin({ currentValue+: currentValue }), - mixinInstance(currentValue):: __currentValueMixin(currentValue), - }, - currentValueType:: hidden.core.resource.quantity, - // metricName is the name of a metric used for autoscaling in metric system. - withMetricName(metricName):: self + __externalMixin({ metricName: metricName }), - // metricSelector is used to identify a specific time series within a given metric. - metricSelector:: { - local __metricSelectorMixin(metricSelector) = __externalMixin({ metricSelector+: metricSelector }), - mixinInstance(metricSelector):: __metricSelectorMixin(metricSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __metricSelectorMixin({ matchExpressions: matchExpressions }) else __metricSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __metricSelectorMixin({ matchExpressions+: matchExpressions }) else __metricSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __metricSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __metricSelectorMixin({ matchLabels+: matchLabels }), - }, - metricSelectorType:: hidden.meta.v1.labelSelector, - }, - externalType:: hidden.autoscaling.v2beta1.externalMetricStatus, - // object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). - object:: { - local __objectMixin(object) = { object+: object }, - mixinInstance(object):: __objectMixin(object), - // averageValue is the current value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __objectMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // currentValue is the current value of the metric (as a quantity). - currentValue:: { - local __currentValueMixin(currentValue) = __objectMixin({ currentValue+: currentValue }), - mixinInstance(currentValue):: __currentValueMixin(currentValue), - }, - currentValueType:: hidden.core.resource.quantity, - // metricName is the name of the metric in question. - withMetricName(metricName):: self + __objectMixin({ metricName: metricName }), - // selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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:: { - local __selectorMixin(selector) = __objectMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // target is the described Kubernetes object. - target:: { - local __targetMixin(target) = __objectMixin({ target+: target }), - mixinInstance(target):: __targetMixin(target), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __targetMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __targetMixin({ name: name }), - }, - targetType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, - }, - objectType:: hidden.autoscaling.v2beta1.objectMetricStatus, - // 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:: { - local __podsMixin(pods) = { pods+: pods }, - mixinInstance(pods):: __podsMixin(pods), - // currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity) - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = __podsMixin({ currentAverageValue+: currentAverageValue }), - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - // metricName is the name of the metric in question - withMetricName(metricName):: self + __podsMixin({ metricName: metricName }), - // selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, 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:: { - local __selectorMixin(selector) = __podsMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - podsType:: hidden.autoscaling.v2beta1.podsMetricStatus, - // 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:: { - local __resourceMixin(resource) = { resource+: resource }, - mixinInstance(resource):: __resourceMixin(resource), - // currentAverageUtilization is the current 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. It will only be present if `targetAverageValue` was set in the corresponding metric specification. - withCurrentAverageUtilization(currentAverageUtilization):: self + __resourceMixin({ currentAverageUtilization: currentAverageUtilization }), - // currentAverageValue is the current 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. It will always be set, regardless of the corresponding metric specification. - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = __resourceMixin({ currentAverageValue+: currentAverageValue }), - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - // name is the name of the resource in question. - withName(name):: self + __resourceMixin({ name: name }), - }, - resourceType:: hidden.autoscaling.v2beta1.resourceMetricStatus, - }, - }, - // ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). - objectMetricSource:: { - new():: {}, - // metricName is the name of the metric in question. - withMetricName(metricName):: self + { metricName: metricName }, - mixin:: { - // averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = { averageValue+: averageValue }, - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // target is the described Kubernetes object. - target:: { - local __targetMixin(target) = { target+: target }, - mixinInstance(target):: __targetMixin(target), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __targetMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __targetMixin({ name: name }), - }, - targetType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, - // targetValue is the target value of the metric (as a quantity). - targetValue:: { - local __targetValueMixin(targetValue) = { targetValue+: targetValue }, - mixinInstance(targetValue):: __targetValueMixin(targetValue), - }, - targetValueType:: hidden.core.resource.quantity, - }, - }, - // ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). - objectMetricStatus:: { - new():: {}, - // metricName is the name of the metric in question. - withMetricName(metricName):: self + { metricName: metricName }, - mixin:: { - // averageValue is the current value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = { averageValue+: averageValue }, - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // currentValue is the current value of the metric (as a quantity). - currentValue:: { - local __currentValueMixin(currentValue) = { currentValue+: currentValue }, - mixinInstance(currentValue):: __currentValueMixin(currentValue), - }, - currentValueType:: hidden.core.resource.quantity, - // selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // target is the described Kubernetes object. - target:: { - local __targetMixin(target) = { target+: target }, - mixinInstance(target):: __targetMixin(target), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __targetMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __targetMixin({ name: name }), - }, - targetType:: hidden.autoscaling.v2beta1.crossVersionObjectReference, - }, - }, - // 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. - podsMetricSource:: { - new():: {}, - // metricName is the name of the metric in question - withMetricName(metricName):: self + { metricName: metricName }, - mixin:: { - // 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity) - targetAverageValue:: { - local __targetAverageValueMixin(targetAverageValue) = { targetAverageValue+: targetAverageValue }, - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - }, - }, - // PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second). - podsMetricStatus:: { - new():: {}, - // metricName is the name of the metric in question - withMetricName(metricName):: self + { metricName: metricName }, - mixin:: { - // currentAverageValue is the current value of the average of the metric across all relevant pods (as a quantity) - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = { currentAverageValue+: currentAverageValue }, - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - // selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the PodsMetricSource, 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - }, - // 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. - resourceMetricSource:: { - new():: {}, - // name is the name of the resource in question. - withName(name):: self + { name: 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. - withTargetAverageUtilization(targetAverageUtilization):: self + { targetAverageUtilization: targetAverageUtilization }, - mixin:: { - // 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:: { - local __targetAverageValueMixin(targetAverageValue) = { targetAverageValue+: targetAverageValue }, - mixinInstance(targetAverageValue):: __targetAverageValueMixin(targetAverageValue), - }, - targetAverageValueType:: hidden.core.resource.quantity, - }, - }, - // ResourceMetricStatus indicates the current value of 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). 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. - resourceMetricStatus:: { - new():: {}, - // currentAverageUtilization is the current 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. It will only be present if `targetAverageValue` was set in the corresponding metric specification. - withCurrentAverageUtilization(currentAverageUtilization):: self + { currentAverageUtilization: currentAverageUtilization }, - // name is the name of the resource in question. - withName(name):: self + { name: name }, - mixin:: { - // currentAverageValue is the current 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. It will always be set, regardless of the corresponding metric specification. - currentAverageValue:: { - local __currentAverageValueMixin(currentAverageValue) = { currentAverageValue+: currentAverageValue }, - mixinInstance(currentAverageValue):: __currentAverageValueMixin(currentAverageValue), - }, - currentAverageValueType:: hidden.core.resource.quantity, - }, - }, - }, - v2beta2:: { - local apiVersion = { apiVersion: 'autoscaling/v2beta2' }, - // CrossVersionObjectReference contains enough information to let you identify the referred resource. - crossVersionObjectReference:: { - new():: {}, - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + { kind: kind }, - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + { name: name }, - mixin:: {}, - }, - // 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). - externalMetricSource:: { - new():: {}, - mixin:: { - // metric identifies the target metric by name and selector - metric:: { - local __metricMixin(metric) = { metric+: metric }, - mixinInstance(metric):: __metricMixin(metric), - // name is the name of the given metric - withName(name):: self + __metricMixin({ name: 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:: { - local __selectorMixin(selector) = __metricMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - metricType:: hidden.autoscaling.v2beta2.metricIdentifier, - // target specifies the target value for the given metric - target:: { - local __targetMixin(target) = { target+: target }, - mixinInstance(target):: __targetMixin(target), - // 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 - withAverageUtilization(averageUtilization):: self + __targetMixin({ averageUtilization: averageUtilization }), - // averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __targetMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // type represents whether the metric type is Utilization, Value, or AverageValue - withType(type):: self + __targetMixin({ type: type }), - // value is the target value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __targetMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - targetType:: hidden.autoscaling.v2beta2.metricTarget, - }, - }, - // ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object. - externalMetricStatus:: { - new():: {}, - mixin:: { - // current contains the current value for the given metric - current:: { - local __currentMixin(current) = { current+: current }, - mixinInstance(current):: __currentMixin(current), - // currentAverageUtilization is the current 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. - withAverageUtilization(averageUtilization):: self + __currentMixin({ averageUtilization: averageUtilization }), - // averageValue is the current value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __currentMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // value is the current value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __currentMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - currentType:: hidden.autoscaling.v2beta2.metricValueStatus, - // metric identifies the target metric by name and selector - metric:: { - local __metricMixin(metric) = { metric+: metric }, - mixinInstance(metric):: __metricMixin(metric), - // name is the name of the given metric - withName(name):: self + __metricMixin({ name: 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:: { - local __selectorMixin(selector) = __metricMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - metricType:: hidden.autoscaling.v2beta2.metricIdentifier, - }, - }, - // HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point. - horizontalPodAutoscalerCondition:: { - new():: {}, - // lastTransitionTime is the last time the condition transitioned from one status to another - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // message is a human-readable explanation containing details about the transition - withMessage(message):: self + { message: message }, - // reason is the reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // status is the status of the condition (True, False, Unknown) - withStatus(status):: self + { status: status }, - // type describes the current condition - withType(type):: self + { type: type }, - mixin:: {}, - }, - // HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. - horizontalPodAutoscalerList:: { - new(items=''):: self.withItems(items), - // items is the list of horizontal pod autoscaler objects. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // items is the list of horizontal pod autoscaler objects. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.autoscaling.v2beta2.horizontalPodAutoscaler, - mixin:: {}, - }, - // HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler. - horizontalPodAutoscalerSpec:: { - new():: {}, - // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas. - withMaxReplicas(maxReplicas):: self + { maxReplicas: maxReplicas }, - // 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. - withMetrics(metrics):: self + if std.type(metrics) == 'array' then { metrics: metrics } else { metrics: [metrics] }, - // 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. - withMetricsMixin(metrics):: self + if std.type(metrics) == 'array' then { metrics+: metrics } else { metrics+: [metrics] }, - metricsType:: hidden.autoscaling.v2beta2.metricSpec, - // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod. - withMinReplicas(minReplicas):: self + { minReplicas: minReplicas }, - mixin:: { - // 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:: { - local __scaleTargetRefMixin(scaleTargetRef) = { scaleTargetRef+: scaleTargetRef }, - mixinInstance(scaleTargetRef):: __scaleTargetRefMixin(scaleTargetRef), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __scaleTargetRefMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __scaleTargetRefMixin({ name: name }), - }, - scaleTargetRefType:: hidden.autoscaling.v2beta2.crossVersionObjectReference, - }, - }, - // HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler. - horizontalPodAutoscalerStatus:: { - new():: {}, - // conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.autoscaling.v2beta2.horizontalPodAutoscalerCondition, - // currentMetrics is the last read state of the metrics used by this autoscaler. - withCurrentMetrics(currentMetrics):: self + if std.type(currentMetrics) == 'array' then { currentMetrics: currentMetrics } else { currentMetrics: [currentMetrics] }, - // currentMetrics is the last read state of the metrics used by this autoscaler. - withCurrentMetricsMixin(currentMetrics):: self + if std.type(currentMetrics) == 'array' then { currentMetrics+: currentMetrics } else { currentMetrics+: [currentMetrics] }, - currentMetricsType:: hidden.autoscaling.v2beta2.metricStatus, - // currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler. - withCurrentReplicas(currentReplicas):: self + { currentReplicas: currentReplicas }, - // desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler. - withDesiredReplicas(desiredReplicas):: self + { desiredReplicas: desiredReplicas }, - // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed. - withLastScaleTime(lastScaleTime):: self + { lastScaleTime: lastScaleTime }, - // observedGeneration is the most recent generation observed by this autoscaler. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - mixin:: {}, - }, - // MetricIdentifier defines the name and optionally selector for a metric - metricIdentifier:: { - new():: {}, - // name is the name of the given metric - withName(name):: self + { name: name }, - mixin:: { - // 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - }, - // MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once). - metricSpec:: { - new():: {}, - // type is the type of metric source. It should be one of "Object", "Pods" or "Resource", each mapping to a matching field in the object. - withType(type):: self + { type: type }, - mixin:: { - // 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:: { - local __externalMixin(external) = { external+: external }, - mixinInstance(external):: __externalMixin(external), - // metric identifies the target metric by name and selector - metric:: { - local __metricMixin(metric) = __externalMixin({ metric+: metric }), - mixinInstance(metric):: __metricMixin(metric), - // name is the name of the given metric - withName(name):: self + __metricMixin({ name: 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:: { - local __selectorMixin(selector) = __metricMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - metricType:: hidden.autoscaling.v2beta2.metricIdentifier, - // target specifies the target value for the given metric - target:: { - local __targetMixin(target) = __externalMixin({ target+: target }), - mixinInstance(target):: __targetMixin(target), - // 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 - withAverageUtilization(averageUtilization):: self + __targetMixin({ averageUtilization: averageUtilization }), - // averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __targetMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // type represents whether the metric type is Utilization, Value, or AverageValue - withType(type):: self + __targetMixin({ type: type }), - // value is the target value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __targetMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - targetType:: hidden.autoscaling.v2beta2.metricTarget, - }, - externalType:: hidden.autoscaling.v2beta2.externalMetricSource, - // object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). - object:: { - local __objectMixin(object) = { object+: object }, - mixinInstance(object):: __objectMixin(object), - describedObject:: { - local __describedObjectMixin(describedObject) = __objectMixin({ describedObject+: describedObject }), - mixinInstance(describedObject):: __describedObjectMixin(describedObject), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __describedObjectMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __describedObjectMixin({ name: name }), - }, - describedObjectType:: hidden.autoscaling.v2beta2.crossVersionObjectReference, - // metric identifies the target metric by name and selector - metric:: { - local __metricMixin(metric) = __objectMixin({ metric+: metric }), - mixinInstance(metric):: __metricMixin(metric), - // name is the name of the given metric - withName(name):: self + __metricMixin({ name: 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:: { - local __selectorMixin(selector) = __metricMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - metricType:: hidden.autoscaling.v2beta2.metricIdentifier, - // target specifies the target value for the given metric - target:: { - local __targetMixin(target) = __objectMixin({ target+: target }), - mixinInstance(target):: __targetMixin(target), - // 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 - withAverageUtilization(averageUtilization):: self + __targetMixin({ averageUtilization: averageUtilization }), - // averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __targetMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // type represents whether the metric type is Utilization, Value, or AverageValue - withType(type):: self + __targetMixin({ type: type }), - // value is the target value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __targetMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - targetType:: hidden.autoscaling.v2beta2.metricTarget, - }, - objectType:: hidden.autoscaling.v2beta2.objectMetricSource, - // 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:: { - local __podsMixin(pods) = { pods+: pods }, - mixinInstance(pods):: __podsMixin(pods), - // metric identifies the target metric by name and selector - metric:: { - local __metricMixin(metric) = __podsMixin({ metric+: metric }), - mixinInstance(metric):: __metricMixin(metric), - // name is the name of the given metric - withName(name):: self + __metricMixin({ name: 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:: { - local __selectorMixin(selector) = __metricMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - metricType:: hidden.autoscaling.v2beta2.metricIdentifier, - // target specifies the target value for the given metric - target:: { - local __targetMixin(target) = __podsMixin({ target+: target }), - mixinInstance(target):: __targetMixin(target), - // 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 - withAverageUtilization(averageUtilization):: self + __targetMixin({ averageUtilization: averageUtilization }), - // averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __targetMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // type represents whether the metric type is Utilization, Value, or AverageValue - withType(type):: self + __targetMixin({ type: type }), - // value is the target value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __targetMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - targetType:: hidden.autoscaling.v2beta2.metricTarget, - }, - podsType:: hidden.autoscaling.v2beta2.podsMetricSource, - // 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:: { - local __resourceMixin(resource) = { resource+: resource }, - mixinInstance(resource):: __resourceMixin(resource), - // name is the name of the resource in question. - withName(name):: self + __resourceMixin({ name: name }), - // target specifies the target value for the given metric - target:: { - local __targetMixin(target) = __resourceMixin({ target+: target }), - mixinInstance(target):: __targetMixin(target), - // 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 - withAverageUtilization(averageUtilization):: self + __targetMixin({ averageUtilization: averageUtilization }), - // averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __targetMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // type represents whether the metric type is Utilization, Value, or AverageValue - withType(type):: self + __targetMixin({ type: type }), - // value is the target value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __targetMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - targetType:: hidden.autoscaling.v2beta2.metricTarget, - }, - resourceType:: hidden.autoscaling.v2beta2.resourceMetricSource, - }, - }, - // MetricStatus describes the last-read state of a single metric. - metricStatus:: { - new():: {}, - // type is the type of metric source. It will be one of "Object", "Pods" or "Resource", each corresponds to a matching field in the object. - withType(type):: self + { type: type }, - mixin:: { - // 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:: { - local __externalMixin(external) = { external+: external }, - mixinInstance(external):: __externalMixin(external), - // current contains the current value for the given metric - current:: { - local __currentMixin(current) = __externalMixin({ current+: current }), - mixinInstance(current):: __currentMixin(current), - // currentAverageUtilization is the current 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. - withAverageUtilization(averageUtilization):: self + __currentMixin({ averageUtilization: averageUtilization }), - // averageValue is the current value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __currentMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // value is the current value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __currentMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - currentType:: hidden.autoscaling.v2beta2.metricValueStatus, - // metric identifies the target metric by name and selector - metric:: { - local __metricMixin(metric) = __externalMixin({ metric+: metric }), - mixinInstance(metric):: __metricMixin(metric), - // name is the name of the given metric - withName(name):: self + __metricMixin({ name: 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:: { - local __selectorMixin(selector) = __metricMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - metricType:: hidden.autoscaling.v2beta2.metricIdentifier, - }, - externalType:: hidden.autoscaling.v2beta2.externalMetricStatus, - // object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). - object:: { - local __objectMixin(object) = { object+: object }, - mixinInstance(object):: __objectMixin(object), - // current contains the current value for the given metric - current:: { - local __currentMixin(current) = __objectMixin({ current+: current }), - mixinInstance(current):: __currentMixin(current), - // currentAverageUtilization is the current 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. - withAverageUtilization(averageUtilization):: self + __currentMixin({ averageUtilization: averageUtilization }), - // averageValue is the current value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __currentMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // value is the current value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __currentMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - currentType:: hidden.autoscaling.v2beta2.metricValueStatus, - describedObject:: { - local __describedObjectMixin(describedObject) = __objectMixin({ describedObject+: describedObject }), - mixinInstance(describedObject):: __describedObjectMixin(describedObject), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __describedObjectMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __describedObjectMixin({ name: name }), - }, - describedObjectType:: hidden.autoscaling.v2beta2.crossVersionObjectReference, - // metric identifies the target metric by name and selector - metric:: { - local __metricMixin(metric) = __objectMixin({ metric+: metric }), - mixinInstance(metric):: __metricMixin(metric), - // name is the name of the given metric - withName(name):: self + __metricMixin({ name: 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:: { - local __selectorMixin(selector) = __metricMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - metricType:: hidden.autoscaling.v2beta2.metricIdentifier, - }, - objectType:: hidden.autoscaling.v2beta2.objectMetricStatus, - // 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:: { - local __podsMixin(pods) = { pods+: pods }, - mixinInstance(pods):: __podsMixin(pods), - // current contains the current value for the given metric - current:: { - local __currentMixin(current) = __podsMixin({ current+: current }), - mixinInstance(current):: __currentMixin(current), - // currentAverageUtilization is the current 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. - withAverageUtilization(averageUtilization):: self + __currentMixin({ averageUtilization: averageUtilization }), - // averageValue is the current value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __currentMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // value is the current value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __currentMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - currentType:: hidden.autoscaling.v2beta2.metricValueStatus, - // metric identifies the target metric by name and selector - metric:: { - local __metricMixin(metric) = __podsMixin({ metric+: metric }), - mixinInstance(metric):: __metricMixin(metric), - // name is the name of the given metric - withName(name):: self + __metricMixin({ name: 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:: { - local __selectorMixin(selector) = __metricMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - metricType:: hidden.autoscaling.v2beta2.metricIdentifier, - }, - podsType:: hidden.autoscaling.v2beta2.podsMetricStatus, - // 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:: { - local __resourceMixin(resource) = { resource+: resource }, - mixinInstance(resource):: __resourceMixin(resource), - // current contains the current value for the given metric - current:: { - local __currentMixin(current) = __resourceMixin({ current+: current }), - mixinInstance(current):: __currentMixin(current), - // currentAverageUtilization is the current 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. - withAverageUtilization(averageUtilization):: self + __currentMixin({ averageUtilization: averageUtilization }), - // averageValue is the current value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __currentMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // value is the current value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __currentMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - currentType:: hidden.autoscaling.v2beta2.metricValueStatus, - // Name is the name of the resource in question. - withName(name):: self + __resourceMixin({ name: name }), - }, - resourceType:: hidden.autoscaling.v2beta2.resourceMetricStatus, - }, - }, - // MetricTarget defines the target value, average value, or average utilization of a specific metric - metricTarget:: { - new():: {}, - // 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 - withAverageUtilization(averageUtilization):: self + { averageUtilization: averageUtilization }, - // type represents whether the metric type is Utilization, Value, or AverageValue - withType(type):: self + { type: type }, - mixin:: { - // averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = { averageValue+: averageValue }, - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // value is the target value of the metric (as a quantity). - value:: { - local __valueMixin(value) = { value+: value }, - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - }, - // MetricValueStatus holds the current value for a metric - metricValueStatus:: { - new():: {}, - // currentAverageUtilization is the current 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. - withAverageUtilization(averageUtilization):: self + { averageUtilization: averageUtilization }, - mixin:: { - // averageValue is the current value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = { averageValue+: averageValue }, - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // value is the current value of the metric (as a quantity). - value:: { - local __valueMixin(value) = { value+: value }, - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - }, - // ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). - objectMetricSource:: { - new():: {}, - mixin:: { - describedObject:: { - local __describedObjectMixin(describedObject) = { describedObject+: describedObject }, - mixinInstance(describedObject):: __describedObjectMixin(describedObject), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __describedObjectMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __describedObjectMixin({ name: name }), - }, - describedObjectType:: hidden.autoscaling.v2beta2.crossVersionObjectReference, - // metric identifies the target metric by name and selector - metric:: { - local __metricMixin(metric) = { metric+: metric }, - mixinInstance(metric):: __metricMixin(metric), - // name is the name of the given metric - withName(name):: self + __metricMixin({ name: 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:: { - local __selectorMixin(selector) = __metricMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - metricType:: hidden.autoscaling.v2beta2.metricIdentifier, - // target specifies the target value for the given metric - target:: { - local __targetMixin(target) = { target+: target }, - mixinInstance(target):: __targetMixin(target), - // 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 - withAverageUtilization(averageUtilization):: self + __targetMixin({ averageUtilization: averageUtilization }), - // averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __targetMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // type represents whether the metric type is Utilization, Value, or AverageValue - withType(type):: self + __targetMixin({ type: type }), - // value is the target value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __targetMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - targetType:: hidden.autoscaling.v2beta2.metricTarget, - }, - }, - // ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object). - objectMetricStatus:: { - new():: {}, - mixin:: { - // current contains the current value for the given metric - current:: { - local __currentMixin(current) = { current+: current }, - mixinInstance(current):: __currentMixin(current), - // currentAverageUtilization is the current 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. - withAverageUtilization(averageUtilization):: self + __currentMixin({ averageUtilization: averageUtilization }), - // averageValue is the current value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __currentMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // value is the current value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __currentMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - currentType:: hidden.autoscaling.v2beta2.metricValueStatus, - describedObject:: { - local __describedObjectMixin(describedObject) = { describedObject+: describedObject }, - mixinInstance(describedObject):: __describedObjectMixin(describedObject), - // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" - withKind(kind):: self + __describedObjectMixin({ kind: kind }), - // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + __describedObjectMixin({ name: name }), - }, - describedObjectType:: hidden.autoscaling.v2beta2.crossVersionObjectReference, - // metric identifies the target metric by name and selector - metric:: { - local __metricMixin(metric) = { metric+: metric }, - mixinInstance(metric):: __metricMixin(metric), - // name is the name of the given metric - withName(name):: self + __metricMixin({ name: 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:: { - local __selectorMixin(selector) = __metricMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - metricType:: hidden.autoscaling.v2beta2.metricIdentifier, - }, - }, - // 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. - podsMetricSource:: { - new():: {}, - mixin:: { - // metric identifies the target metric by name and selector - metric:: { - local __metricMixin(metric) = { metric+: metric }, - mixinInstance(metric):: __metricMixin(metric), - // name is the name of the given metric - withName(name):: self + __metricMixin({ name: 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:: { - local __selectorMixin(selector) = __metricMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - metricType:: hidden.autoscaling.v2beta2.metricIdentifier, - // target specifies the target value for the given metric - target:: { - local __targetMixin(target) = { target+: target }, - mixinInstance(target):: __targetMixin(target), - // 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 - withAverageUtilization(averageUtilization):: self + __targetMixin({ averageUtilization: averageUtilization }), - // averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __targetMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // type represents whether the metric type is Utilization, Value, or AverageValue - withType(type):: self + __targetMixin({ type: type }), - // value is the target value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __targetMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - targetType:: hidden.autoscaling.v2beta2.metricTarget, - }, - }, - // PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second). - podsMetricStatus:: { - new():: {}, - mixin:: { - // current contains the current value for the given metric - current:: { - local __currentMixin(current) = { current+: current }, - mixinInstance(current):: __currentMixin(current), - // currentAverageUtilization is the current 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. - withAverageUtilization(averageUtilization):: self + __currentMixin({ averageUtilization: averageUtilization }), - // averageValue is the current value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __currentMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // value is the current value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __currentMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - currentType:: hidden.autoscaling.v2beta2.metricValueStatus, - // metric identifies the target metric by name and selector - metric:: { - local __metricMixin(metric) = { metric+: metric }, - mixinInstance(metric):: __metricMixin(metric), - // name is the name of the given metric - withName(name):: self + __metricMixin({ name: 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:: { - local __selectorMixin(selector) = __metricMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - metricType:: hidden.autoscaling.v2beta2.metricIdentifier, - }, - }, - // 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. - resourceMetricSource:: { - new():: {}, - // name is the name of the resource in question. - withName(name):: self + { name: name }, - mixin:: { - // target specifies the target value for the given metric - target:: { - local __targetMixin(target) = { target+: target }, - mixinInstance(target):: __targetMixin(target), - // 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 - withAverageUtilization(averageUtilization):: self + __targetMixin({ averageUtilization: averageUtilization }), - // averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __targetMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // type represents whether the metric type is Utilization, Value, or AverageValue - withType(type):: self + __targetMixin({ type: type }), - // value is the target value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __targetMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - targetType:: hidden.autoscaling.v2beta2.metricTarget, - }, - }, - // ResourceMetricStatus indicates the current value of 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). 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. - resourceMetricStatus:: { - new():: {}, - // Name is the name of the resource in question. - withName(name):: self + { name: name }, - mixin:: { - // current contains the current value for the given metric - current:: { - local __currentMixin(current) = { current+: current }, - mixinInstance(current):: __currentMixin(current), - // currentAverageUtilization is the current 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. - withAverageUtilization(averageUtilization):: self + __currentMixin({ averageUtilization: averageUtilization }), - // averageValue is the current value of the average of the metric across all relevant pods (as a quantity) - averageValue:: { - local __averageValueMixin(averageValue) = __currentMixin({ averageValue+: averageValue }), - mixinInstance(averageValue):: __averageValueMixin(averageValue), - }, - averageValueType:: hidden.core.resource.quantity, - // value is the current value of the metric (as a quantity). - value:: { - local __valueMixin(value) = __currentMixin({ value+: value }), - mixinInstance(value):: __valueMixin(value), - }, - valueType:: hidden.core.resource.quantity, - }, - currentType:: hidden.autoscaling.v2beta2.metricValueStatus, - }, - }, - }, - }, - batch:: { - v1:: { - local apiVersion = { apiVersion: 'batch/v1' }, - // JobCondition describes current state of a job. - jobCondition:: { - new():: {}, - // Last time the condition was checked. - withLastProbeTime(lastProbeTime):: self + { lastProbeTime: lastProbeTime }, - // Last time the condition transit from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // Human readable message indicating details about last transition. - withMessage(message):: self + { message: message }, - // (brief) reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of job condition, Complete or Failed. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // JobList is a collection of jobs. - jobList:: { - new(items=''):: self.withItems(items), - // items is the list of Jobs. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // items is the list of Jobs. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.batch.v1.job, - mixin:: {}, - }, - // JobSpec describes how the job execution will look like. - jobSpec:: { - new():: {}, - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + { activeDeadlineSeconds: activeDeadlineSeconds }, - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + { backoffLimit: backoffLimit }, - // 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/ - withCompletions(completions):: self + { completions: 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 - withManualSelector(manualSelector):: self + { manualSelector: 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/ - withParallelism(parallelism):: self + { parallelism: parallelism }, - // 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. - withTtlSecondsAfterFinished(ttlSecondsAfterFinished):: self + { ttlSecondsAfterFinished: ttlSecondsAfterFinished }, - mixin:: { - // 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:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // JobStatus represents the current state of a Job. - jobStatus:: { - new():: {}, - // The number of actively running pods. - withActive(active):: self + { active: active }, - // Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. - withCompletionTime(completionTime):: self + { completionTime: completionTime }, - // The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // The latest available observations of an object's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.batch.v1.jobCondition, - // The number of pods which reached phase Failed. - withFailed(failed):: self + { failed: failed }, - // Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. - withStartTime(startTime):: self + { startTime: startTime }, - // The number of pods which reached phase Succeeded. - withSucceeded(succeeded):: self + { succeeded: succeeded }, - mixin:: {}, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'batch/v1beta1' }, - // CronJobList is a collection of cron jobs. - cronJobList:: { - new(items=''):: self.withItems(items), - // items is the list of CronJobs. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // items is the list of CronJobs. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.batch.v1beta1.cronJob, - mixin:: {}, - }, - // CronJobSpec describes how the job execution will look like and when it will actually run. - cronJobSpec:: { - new():: {}, - // 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 - withConcurrencyPolicy(concurrencyPolicy):: self + { concurrencyPolicy: concurrencyPolicy }, - // The number of failed finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withFailedJobsHistoryLimit(failedJobsHistoryLimit):: self + { failedJobsHistoryLimit: failedJobsHistoryLimit }, - // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. - withSchedule(schedule):: self + { schedule: schedule }, - // 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. - withStartingDeadlineSeconds(startingDeadlineSeconds):: self + { startingDeadlineSeconds: startingDeadlineSeconds }, - // The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3. - withSuccessfulJobsHistoryLimit(successfulJobsHistoryLimit):: self + { successfulJobsHistoryLimit: successfulJobsHistoryLimit }, - // This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false. - withSuspend(suspend):: self + { suspend: suspend }, - mixin:: { - // Specifies the job that will be created when executing a CronJob. - jobTemplate:: { - local __jobTemplateMixin(jobTemplate) = { jobTemplate+: jobTemplate }, - mixinInstance(jobTemplate):: __jobTemplateMixin(jobTemplate), - // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __jobTemplateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __jobTemplateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + __specMixin({ backoffLimit: backoffLimit }), - // 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/ - withCompletions(completions):: self + __specMixin({ completions: 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 - withManualSelector(manualSelector):: self + __specMixin({ manualSelector: 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/ - withParallelism(parallelism):: self + __specMixin({ parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // 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. - withTtlSecondsAfterFinished(ttlSecondsAfterFinished):: self + __specMixin({ ttlSecondsAfterFinished: ttlSecondsAfterFinished }), - }, - specType:: hidden.batch.v1.jobSpec, - }, - jobTemplateType:: hidden.batch.v1beta1.jobTemplateSpec, - }, - }, - // CronJobStatus represents the current state of a cron job. - cronJobStatus:: { - new():: {}, - // A list of pointers to currently running jobs. - withActive(active):: self + if std.type(active) == 'array' then { active: active } else { active: [active] }, - // A list of pointers to currently running jobs. - withActiveMixin(active):: self + if std.type(active) == 'array' then { active+: active } else { active+: [active] }, - activeType:: hidden.core.v1.objectReference, - // Information when was the last time the job was successfully scheduled. - withLastScheduleTime(lastScheduleTime):: self + { lastScheduleTime: lastScheduleTime }, - mixin:: {}, - }, - // JobTemplateSpec describes the data a Job should have when created from a template - jobTemplateSpec:: { - new():: {}, - mixin:: { - // Standard object's metadata of the jobs created from this template. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // Specifies the number of retries before marking this job failed. Defaults to 6 - withBackoffLimit(backoffLimit):: self + __specMixin({ backoffLimit: backoffLimit }), - // 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/ - withCompletions(completions):: self + __specMixin({ completions: 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 - withManualSelector(manualSelector):: self + __specMixin({ manualSelector: 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/ - withParallelism(parallelism):: self + __specMixin({ parallelism: 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:: { - local __selectorMixin(selector) = __specMixin({ selector+: selector }), - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = __specMixin({ template+: template }), - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // 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. - withTtlSecondsAfterFinished(ttlSecondsAfterFinished):: self + __specMixin({ ttlSecondsAfterFinished: ttlSecondsAfterFinished }), - }, - specType:: hidden.batch.v1.jobSpec, - }, - }, - }, - }, - certificates:: { - v1beta1:: { - local apiVersion = { apiVersion: 'certificates/v1beta1' }, - certificateSigningRequestCondition:: { - new():: {}, - // timestamp for the last update to this condition - withLastUpdateTime(lastUpdateTime):: self + { lastUpdateTime: lastUpdateTime }, - // human readable message with details about the request state - withMessage(message):: self + { message: message }, - // brief reason for the request state - withReason(reason):: self + { reason: reason }, - // request approval state, currently Approved or Denied. - withType(type):: self + { type: type }, - mixin:: {}, - }, - certificateSigningRequestList:: { - new(items=''):: self.withItems(items), - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.certificates.v1beta1.certificateSigningRequest, - mixin:: {}, - }, - // This information is immutable after the request is created. Only the Request and Usages fields can be set on creation, other fields are derived by Kubernetes and cannot be modified by users. - certificateSigningRequestSpec:: { - new():: {}, - // Extra information about the requesting user. See user.Info interface for details. - withExtra(extra):: self + { extra: extra }, - // Extra information about the requesting user. See user.Info interface for details. - withExtraMixin(extra):: self + { extra+: extra }, - // Group information about the requesting user. See user.Info interface for details. - withGroups(groups):: self + if std.type(groups) == 'array' then { groups: groups } else { groups: [groups] }, - // Group information about the requesting user. See user.Info interface for details. - withGroupsMixin(groups):: self + if std.type(groups) == 'array' then { groups+: groups } else { groups+: [groups] }, - // Base64-encoded PKCS#10 CSR data - withRequest(request):: self + { request: request }, - // UID information about the requesting user. See user.Info interface for details. - withUid(uid):: self + { uid: uid }, - // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 - // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - withUsages(usages):: self + if std.type(usages) == 'array' then { usages: usages } else { usages: [usages] }, - // allowedUsages specifies a set of usage contexts the key will be valid for. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 - // https://tools.ietf.org/html/rfc5280#section-4.2.1.12 - withUsagesMixin(usages):: self + if std.type(usages) == 'array' then { usages+: usages } else { usages+: [usages] }, - // Information about the requesting user. See user.Info interface for details. - withUsername(username):: self + { username: username }, - mixin:: {}, - }, - certificateSigningRequestStatus:: { - new():: {}, - // If request was approved, the controller will place the issued certificate here. - withCertificate(certificate):: self + { certificate: certificate }, - // Conditions applied to the request, such as approval or denial. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Conditions applied to the request, such as approval or denial. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.certificates.v1beta1.certificateSigningRequestCondition, - mixin:: {}, - }, - }, - }, - coordination:: { - v1:: { - local apiVersion = { apiVersion: 'coordination/v1' }, - // LeaseList is a list of Lease objects. - leaseList:: { - new():: {}, - // Items is a list of schema objects. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of schema objects. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.coordination.v1.lease, - mixin:: {}, - }, - // LeaseSpec is a specification of a Lease. - leaseSpec:: { - new():: {}, - // acquireTime is a time when the current lease was acquired. - withAcquireTime(acquireTime):: self + { acquireTime: acquireTime }, - // holderIdentity contains the identity of the holder of a current lease. - withHolderIdentity(holderIdentity):: self + { holderIdentity: 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. - withLeaseDurationSeconds(leaseDurationSeconds):: self + { leaseDurationSeconds: leaseDurationSeconds }, - // leaseTransitions is the number of transitions of a lease between holders. - withLeaseTransitions(leaseTransitions):: self + { leaseTransitions: leaseTransitions }, - // renewTime is a time when the current holder of a lease has last updated the lease. - withRenewTime(renewTime):: self + { renewTime: renewTime }, - mixin:: {}, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'coordination/v1beta1' }, - // LeaseList is a list of Lease objects. - leaseList:: { - new():: {}, - // Items is a list of schema objects. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of schema objects. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.coordination.v1beta1.lease, - mixin:: {}, - }, - // LeaseSpec is a specification of a Lease. - leaseSpec:: { - new():: {}, - // acquireTime is a time when the current lease was acquired. - withAcquireTime(acquireTime):: self + { acquireTime: acquireTime }, - // holderIdentity contains the identity of the holder of a current lease. - withHolderIdentity(holderIdentity):: self + { holderIdentity: 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. - withLeaseDurationSeconds(leaseDurationSeconds):: self + { leaseDurationSeconds: leaseDurationSeconds }, - // leaseTransitions is the number of transitions of a lease between holders. - withLeaseTransitions(leaseTransitions):: self + { leaseTransitions: leaseTransitions }, - // renewTime is a time when the current holder of a lease has last updated the lease. - withRenewTime(renewTime):: self + { renewTime: renewTime }, - mixin:: {}, - }, - }, - }, - core:: { - intstr:: { - local apiVersion = { apiVersion: 'intstr' }, - // IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number. - intOrString:: { - new():: {}, - mixin:: {}, - }, - }, - resource:: { - local apiVersion = { apiVersion: 'resource' }, - // Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and Int64() accessors. - // - // The serialization format is: - // - // ::= - // (Note that may be empty, from the "" case in .) - // ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= "+" | "-" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei - // (International System of units; See: http://physics.nist.gov/cuu/Units/binary.html) - // ::= m | "" | k | M | G | T | P | E - // (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.) - // ::= "e" | "E" - // - // No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities. - // - // When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized. - // - // Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that: - // a. No precision is lost - // b. No fractional digits will be emitted - // c. The exponent (or suffix) is as large as possible. - // The sign will be omitted unless the number is negative. - // - // Examples: - // 1.5 will be serialized as "1500m" - // 1.5Gi will be serialized as "1536Mi" - // - // Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise. - // - // Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.) - // - // This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation. - quantity:: { - new():: {}, - mixin:: {}, - }, - }, - v1:: { - local apiVersion = { apiVersion: 'v1' }, - // Affinity is a group of affinity scheduling rules. - affinity:: { - new():: {}, - mixin:: { - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = { nodeAffinity+: nodeAffinity }, - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = { podAffinity+: podAffinity }, - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = { podAntiAffinity+: podAntiAffinity }, - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - }, - // AttachedVolume describes a volume attached to a node - attachedVolume:: { - new():: {}, - // DevicePath represents the device path where the volume should be available - withDevicePath(devicePath):: self + { devicePath: devicePath }, - // Name of the attached volume - withName(name):: self + { name: name }, - mixin:: {}, - }, - // 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. - awsElasticBlockStoreVolumeSource:: { - new():: {}, - // 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 - withFsType(fsType):: self + { fsType: 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). - withPartition(partition):: self + { partition: 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 - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - withVolumeId(volumeId):: self + { volumeID: volumeId }, - mixin:: {}, - }, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDiskVolumeSource:: { - new():: {}, - // Host Caching mode: None, Read Only, Read Write. - withCachingMode(cachingMode):: self + { cachingMode: cachingMode }, - // The Name of the data disk in the blob storage - withDiskName(diskName):: self + { diskName: diskName }, - // The URI the data disk in the blob storage - withDiskUri(diskUri):: self + { diskURI: diskUri }, - // 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. - withFsType(fsType):: self + { fsType: fsType }, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - mixin:: {}, - }, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFilePersistentVolumeSource:: { - new():: {}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // the name of secret that contains Azure Storage Account Name and Key - withSecretName(secretName):: self + { secretName: secretName }, - // the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod - withSecretNamespace(secretNamespace):: self + { secretNamespace: secretNamespace }, - // Share Name - withShareName(shareName):: self + { shareName: shareName }, - mixin:: {}, - }, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFileVolumeSource:: { - new():: {}, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // the name of secret that contains Azure Storage Account Name and Key - withSecretName(secretName):: self + { secretName: secretName }, - // Share Name - withShareName(shareName):: self + { shareName: shareName }, - mixin:: {}, - }, - // Adds and removes POSIX capabilities from running containers. - capabilities:: { - new():: {}, - // Added capabilities - withAdd(add):: self + if std.type(add) == 'array' then { add: add } else { add: [add] }, - // Added capabilities - withAddMixin(add):: self + if std.type(add) == 'array' then { add+: add } else { add+: [add] }, - // Removed capabilities - withDrop(drop):: self + if std.type(drop) == 'array' then { drop: drop } else { drop: [drop] }, - // Removed capabilities - withDropMixin(drop):: self + if std.type(drop) == 'array' then { drop+: drop } else { drop+: [drop] }, - mixin:: {}, - }, - // Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. - cephFsPersistentVolumeSource:: { - new():: {}, - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == 'array' then { monitors: monitors } else { monitors: [monitors] }, - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == 'array' then { monitors+: monitors } else { monitors+: [monitors] }, - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - withPath(path):: self + { path: path }, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withSecretFile(secretFile):: self + { secretFile: secretFile }, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withUser(user):: self + { user: user }, - mixin:: { - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - }, - }, - // Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling. - cephFsVolumeSource:: { - new():: {}, - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == 'array' then { monitors: monitors } else { monitors: [monitors] }, - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == 'array' then { monitors+: monitors } else { monitors+: [monitors] }, - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - withPath(path):: self + { path: path }, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withSecretFile(secretFile):: self + { secretFile: secretFile }, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withUser(user):: self + { user: user }, - mixin:: { - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // 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. - cinderPersistentVolumeSource:: { - new():: {}, - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withFsType(fsType):: self + { fsType: fsType }, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withVolumeId(volumeId):: self + { volumeID: volumeId }, - mixin:: { - // Optional: points to a secret object containing parameters used to connect to OpenStack. - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - }, - }, - // 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. - cinderVolumeSource:: { - new():: {}, - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withFsType(fsType):: self + { fsType: fsType }, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withVolumeId(volumeId):: self + { volumeID: volumeId }, - mixin:: { - // Optional: points to a secret object containing parameters used to connect to OpenStack. - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // ClientIPConfig represents the configurations of Client IP based session affinity. - clientIpConfig:: { - new():: {}, - // 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). - withTimeoutSeconds(timeoutSeconds):: self + { timeoutSeconds: timeoutSeconds }, - mixin:: {}, - }, - // Information about the condition of a component. - componentCondition:: { - new():: {}, - // Condition error code for a component. For example, a health check error code. - withErrorParam(errorParam):: self + { "error": errorParam }, - // Message about the condition for a component. For example, information about a health check. - withMessage(message):: self + { message: message }, - // Status of the condition for a component. Valid values for "Healthy": "True", "False", or "Unknown". - withStatus(status):: self + { status: status }, - // Type of condition for a component. Valid value: "Healthy" - withType(type):: self + { type: type }, - mixin:: {}, - }, - // ComponentStatus (and ComponentStatusList) holds the cluster validation info. - componentStatus:: { - new():: {}, - // List of component conditions observed - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // List of component conditions observed - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.core.v1.componentCondition, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - }, - }, - // Status of all the conditions for the component as a list of ComponentStatus objects. - componentStatusList:: { - new():: {}, - // List of ComponentStatus objects. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of ComponentStatus objects. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.componentStatus, - mixin:: {}, - }, - // 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. - configMapEnvSource:: { - new():: {}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + { name: name }, - // Specify whether the ConfigMap must be defined - withOptional(optional):: self + { optional: optional }, - mixin:: {}, - }, - // Selects a key from a ConfigMap. - configMapKeySelector:: { - new():: {}, - // The key to select. - withKey(key):: self + { key: key }, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + { name: name }, - // Specify whether the ConfigMap or it's key must be defined - withOptional(optional):: self + { optional: optional }, - mixin:: {}, - }, - // ConfigMapList is a resource containing a list of ConfigMap objects. - configMapList:: { - new(items=''):: self.withItems(items), - // Items is the list of ConfigMaps. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of ConfigMaps. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.configMap, - mixin:: {}, - }, - // ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node. - configMapNodeConfigSource:: { - new():: {}, - // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. - withKubeletConfigKey(kubeletConfigKey):: self + { kubeletConfigKey: kubeletConfigKey }, - // Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. - withName(name):: self + { name: name }, - // Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. - withNamespace(namespace):: self + { namespace: namespace }, - // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withResourceVersion(resourceVersion):: self + { resourceVersion: resourceVersion }, - // UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withUid(uid):: self + { uid: uid }, - mixin:: {}, - }, - // 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. - configMapProjection:: { - new():: {}, - // 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 '..'. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + { name: name }, - // Specify whether the ConfigMap or it's keys must be defined - withOptional(optional):: self + { optional: optional }, - mixin:: {}, - }, - // 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. - configMapVolumeSource:: { - new():: {}, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + { defaultMode: 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 '..'. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + { name: name }, - // Specify whether the ConfigMap or it's keys must be defined - withOptional(optional):: self + { optional: optional }, - mixin:: {}, - }, - // A single application container that you want to run within a pod. - container:: { - new(name='', image=''):: self.withImage(image).withName(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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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 - withArgs(args):: self + if std.type(args) == 'array' then { args: args } else { args: [args] }, - // 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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 - withArgsMixin(args):: self + if std.type(args) == 'array' then { args+: args } else { args+: [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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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 - withCommand(command):: self + if std.type(command) == 'array' then { command: command } else { command: [command] }, - // 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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 - withCommandMixin(command):: self + if std.type(command) == 'array' then { command+: command } else { command+: [command] }, - // List of environment variables to set in the container. Cannot be updated. - withEnv(env):: self + if std.type(env) == 'array' then { env: env } else { env: [env] }, - // List of environment variables to set in the container. Cannot be updated. - withEnvMixin(env):: self + if std.type(env) == 'array' then { env+: env } else { env+: [env] }, - envType:: hidden.core.v1.envVar, - // 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. - withEnvFrom(envFrom):: self + if std.type(envFrom) == 'array' then { envFrom: envFrom } else { envFrom: [envFrom] }, - // 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. - withEnvFromMixin(envFrom):: self + if std.type(envFrom) == 'array' then { envFrom+: envFrom } else { envFrom+: [envFrom] }, - envFromType:: hidden.core.v1.envFromSource, - // 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. - withImage(image):: self + { image: 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 - withImagePullPolicy(imagePullPolicy):: self + { imagePullPolicy: imagePullPolicy }, - // Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. - withName(name):: self + { name: name }, - // 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. - withPorts(ports):: self + if std.type(ports) == 'array' then { ports: ports } else { ports: [ports] }, - // 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. - withPortsMixin(ports):: self + if std.type(ports) == 'array' then { ports+: ports } else { ports+: [ports] }, - portsType:: hidden.core.v1.containerPort, - // 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. - withStdin(stdin):: self + { stdin: 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 - withStdinOnce(stdinOnce):: self + { stdinOnce: 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. - withTerminationMessagePath(terminationMessagePath):: self + { terminationMessagePath: 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. - withTerminationMessagePolicy(terminationMessagePolicy):: self + { terminationMessagePolicy: terminationMessagePolicy }, - // Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. - withTty(tty):: self + { tty: tty }, - // volumeDevices is the list of block devices to be used by the container. This is a beta feature. - withVolumeDevices(volumeDevices):: self + if std.type(volumeDevices) == 'array' then { volumeDevices: volumeDevices } else { volumeDevices: [volumeDevices] }, - // volumeDevices is the list of block devices to be used by the container. This is a beta feature. - withVolumeDevicesMixin(volumeDevices):: self + if std.type(volumeDevices) == 'array' then { volumeDevices+: volumeDevices } else { volumeDevices+: [volumeDevices] }, - volumeDevicesType:: hidden.core.v1.volumeDevice, - // Pod volumes to mount into the container's filesystem. Cannot be updated. - withVolumeMounts(volumeMounts):: self + if std.type(volumeMounts) == 'array' then { volumeMounts: volumeMounts } else { volumeMounts: [volumeMounts] }, - // Pod volumes to mount into the container's filesystem. Cannot be updated. - withVolumeMountsMixin(volumeMounts):: self + if std.type(volumeMounts) == 'array' then { volumeMounts+: volumeMounts } else { volumeMounts+: [volumeMounts] }, - volumeMountsType:: hidden.core.v1.volumeMount, - // 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. - withWorkingDir(workingDir):: self + { workingDir: workingDir }, - mixin:: { - // Actions that the management system should take in response to container lifecycle events. Cannot be updated. - lifecycle:: { - local __lifecycleMixin(lifecycle) = { lifecycle+: lifecycle }, - mixinInstance(lifecycle):: __lifecycleMixin(lifecycle), - // 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:: { - local __postStartMixin(postStart) = __lifecycleMixin({ postStart+: postStart }), - mixinInstance(postStart):: __postStartMixin(postStart), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __postStartMixin({ exec+: exec }), - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == 'array' then __execMixin({ command: command }) else __execMixin({ command: [command] }), - // 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. - withCommandMixin(command):: self + if std.type(command) == 'array' then __execMixin({ command+: command }) else __execMixin({ command+: [command] }), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __postStartMixin({ httpGet+: httpGet }), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({ host: host }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders: httpHeaders }) else __httpGetMixin({ httpHeaders: [httpHeaders] }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders+: httpHeaders }) else __httpGetMixin({ httpHeaders+: [httpHeaders] }), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({ path: path }), - // 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. - withPort(port):: self + __httpGetMixin({ port: port }), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({ scheme: scheme }), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __postStartMixin({ tcpSocket+: tcpSocket }), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({ host: host }), - // 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. - withPort(port):: self + __tcpSocketMixin({ port: port }), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - postStartType:: hidden.core.v1.handler, - // PreStop is called immediately before a container is terminated due to an API request or management event such as liveness 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:: { - local __preStopMixin(preStop) = __lifecycleMixin({ preStop+: preStop }), - mixinInstance(preStop):: __preStopMixin(preStop), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __preStopMixin({ exec+: exec }), - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == 'array' then __execMixin({ command: command }) else __execMixin({ command: [command] }), - // 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. - withCommandMixin(command):: self + if std.type(command) == 'array' then __execMixin({ command+: command }) else __execMixin({ command+: [command] }), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __preStopMixin({ httpGet+: httpGet }), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({ host: host }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders: httpHeaders }) else __httpGetMixin({ httpHeaders: [httpHeaders] }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders+: httpHeaders }) else __httpGetMixin({ httpHeaders+: [httpHeaders] }), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({ path: path }), - // 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. - withPort(port):: self + __httpGetMixin({ port: port }), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({ scheme: scheme }), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __preStopMixin({ tcpSocket+: tcpSocket }), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({ host: host }), - // 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. - withPort(port):: self + __tcpSocketMixin({ port: port }), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - preStopType:: hidden.core.v1.handler, - }, - lifecycleType:: hidden.core.v1.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:: { - local __livenessProbeMixin(livenessProbe) = { livenessProbe+: livenessProbe }, - mixinInstance(livenessProbe):: __livenessProbeMixin(livenessProbe), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __livenessProbeMixin({ exec+: exec }), - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == 'array' then __execMixin({ command: command }) else __execMixin({ command: [command] }), - // 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. - withCommandMixin(command):: self + if std.type(command) == 'array' then __execMixin({ command+: command }) else __execMixin({ command+: [command] }), - }, - execType:: hidden.core.v1.execAction, - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - withFailureThreshold(failureThreshold):: self + __livenessProbeMixin({ failureThreshold: failureThreshold }), - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __livenessProbeMixin({ httpGet+: httpGet }), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({ host: host }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders: httpHeaders }) else __httpGetMixin({ httpHeaders: [httpHeaders] }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders+: httpHeaders }) else __httpGetMixin({ httpHeaders+: [httpHeaders] }), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({ path: path }), - // 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. - withPort(port):: self + __httpGetMixin({ port: port }), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({ scheme: scheme }), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // 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 - withInitialDelaySeconds(initialDelaySeconds):: self + __livenessProbeMixin({ initialDelaySeconds: initialDelaySeconds }), - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - withPeriodSeconds(periodSeconds):: self + __livenessProbeMixin({ periodSeconds: periodSeconds }), - // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. - withSuccessThreshold(successThreshold):: self + __livenessProbeMixin({ successThreshold: successThreshold }), - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __livenessProbeMixin({ tcpSocket+: tcpSocket }), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({ host: host }), - // 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. - withPort(port):: self + __tcpSocketMixin({ port: port }), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - // 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 - withTimeoutSeconds(timeoutSeconds):: self + __livenessProbeMixin({ timeoutSeconds: timeoutSeconds }), - }, - livenessProbeType:: hidden.core.v1.probe, - // 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:: { - local __readinessProbeMixin(readinessProbe) = { readinessProbe+: readinessProbe }, - mixinInstance(readinessProbe):: __readinessProbeMixin(readinessProbe), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __readinessProbeMixin({ exec+: exec }), - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == 'array' then __execMixin({ command: command }) else __execMixin({ command: [command] }), - // 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. - withCommandMixin(command):: self + if std.type(command) == 'array' then __execMixin({ command+: command }) else __execMixin({ command+: [command] }), - }, - execType:: hidden.core.v1.execAction, - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - withFailureThreshold(failureThreshold):: self + __readinessProbeMixin({ failureThreshold: failureThreshold }), - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __readinessProbeMixin({ httpGet+: httpGet }), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({ host: host }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders: httpHeaders }) else __httpGetMixin({ httpHeaders: [httpHeaders] }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders+: httpHeaders }) else __httpGetMixin({ httpHeaders+: [httpHeaders] }), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({ path: path }), - // 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. - withPort(port):: self + __httpGetMixin({ port: port }), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({ scheme: scheme }), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // 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 - withInitialDelaySeconds(initialDelaySeconds):: self + __readinessProbeMixin({ initialDelaySeconds: initialDelaySeconds }), - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - withPeriodSeconds(periodSeconds):: self + __readinessProbeMixin({ periodSeconds: periodSeconds }), - // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. - withSuccessThreshold(successThreshold):: self + __readinessProbeMixin({ successThreshold: successThreshold }), - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __readinessProbeMixin({ tcpSocket+: tcpSocket }), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({ host: host }), - // 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. - withPort(port):: self + __tcpSocketMixin({ port: port }), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - // 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 - withTimeoutSeconds(timeoutSeconds):: self + __readinessProbeMixin({ timeoutSeconds: timeoutSeconds }), - }, - readinessProbeType:: hidden.core.v1.probe, - // Compute Resources required by this container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - resources:: { - local __resourcesMixin(resources) = { resources+: resources }, - mixinInstance(resources):: __resourcesMixin(resources), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimits(limits):: self + __resourcesMixin({ limits: limits }), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimitsMixin(limits):: self + __resourcesMixin({ limits+: 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-compute-resources-container/ - withRequests(requests):: self + __resourcesMixin({ requests: requests }), - // 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-compute-resources-container/ - withRequestsMixin(requests):: self + __resourcesMixin({ requests+: requests }), - }, - resourcesType:: hidden.core.v1.resourceRequirements, - // Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - securityContext:: { - local __securityContextMixin(securityContext) = { securityContext+: securityContext }, - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 - withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + __securityContextMixin({ allowPrivilegeEscalation: allowPrivilegeEscalation }), - // The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. - capabilities:: { - local __capabilitiesMixin(capabilities) = __securityContextMixin({ capabilities+: capabilities }), - mixinInstance(capabilities):: __capabilitiesMixin(capabilities), - // Added capabilities - withAdd(add):: self + if std.type(add) == 'array' then __capabilitiesMixin({ add: add }) else __capabilitiesMixin({ add: [add] }), - // Added capabilities - withAddMixin(add):: self + if std.type(add) == 'array' then __capabilitiesMixin({ add+: add }) else __capabilitiesMixin({ add+: [add] }), - // Removed capabilities - withDrop(drop):: self + if std.type(drop) == 'array' then __capabilitiesMixin({ drop: drop }) else __capabilitiesMixin({ drop: [drop] }), - // Removed capabilities - withDropMixin(drop):: self + if std.type(drop) == 'array' then __capabilitiesMixin({ drop+: drop }) else __capabilitiesMixin({ drop+: [drop] }), - }, - capabilitiesType:: hidden.core.v1.capabilities, - // Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. - withPrivileged(privileged):: self + __securityContextMixin({ privileged: 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. - withProcMount(procMount):: self + __securityContextMixin({ procMount: procMount }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - securityContextType:: hidden.core.v1.securityContext, - }, - }, - // Describe a container image - containerImage:: { - new():: {}, - // Names by which this image is known. e.g. ["k8s.gcr.io/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"] - withNames(names):: self + if std.type(names) == 'array' then { names: names } else { names: [names] }, - // Names by which this image is known. e.g. ["k8s.gcr.io/hyperkube:v1.0.7", "dockerhub.io/google_containers/hyperkube:v1.0.7"] - withNamesMixin(names):: self + if std.type(names) == 'array' then { names+: names } else { names+: [names] }, - // The size of the image in bytes. - withSizeBytes(sizeBytes):: self + { sizeBytes: sizeBytes }, - mixin:: {}, - }, - // ContainerPort represents a network port in a single container. - containerPort:: { - new(containerPort=''):: self.withContainerPort(containerPort), - newNamed(containerPort='', name=''):: self.withContainerPort(containerPort).withName(name), - // Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. - withContainerPort(containerPort):: self + { containerPort: containerPort }, - // What host IP to bind the external port to. - withHostIp(hostIp):: self + { hostIP: 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. - withHostPort(hostPort):: self + { hostPort: 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. - withName(name):: self + { name: name }, - // Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". - withProtocol(protocol):: self + { protocol: protocol }, - mixin:: {}, - }, - // ContainerState holds a possible state of container. Only one of its members may be specified. If none of them is specified, the default one is ContainerStateWaiting. - containerState:: { - new():: {}, - mixin:: { - // Details about a running container - running:: { - local __runningMixin(running) = { running+: running }, - mixinInstance(running):: __runningMixin(running), - // Time at which the container was last (re-)started - withStartedAt(startedAt):: self + __runningMixin({ startedAt: startedAt }), - }, - runningType:: hidden.core.v1.containerStateRunning, - // Details about a terminated container - terminated:: { - local __terminatedMixin(terminated) = { terminated+: terminated }, - mixinInstance(terminated):: __terminatedMixin(terminated), - // Container's ID in the format 'docker://' - withContainerId(containerId):: self + __terminatedMixin({ containerID: containerId }), - // Exit status from the last termination of the container - withExitCode(exitCode):: self + __terminatedMixin({ exitCode: exitCode }), - // Time at which the container last terminated - withFinishedAt(finishedAt):: self + __terminatedMixin({ finishedAt: finishedAt }), - // Message regarding the last termination of the container - withMessage(message):: self + __terminatedMixin({ message: message }), - // (brief) reason from the last termination of the container - withReason(reason):: self + __terminatedMixin({ reason: reason }), - // Signal from the last termination of the container - withSignal(signal):: self + __terminatedMixin({ signal: signal }), - // Time at which previous execution of the container started - withStartedAt(startedAt):: self + __terminatedMixin({ startedAt: startedAt }), - }, - terminatedType:: hidden.core.v1.containerStateTerminated, - // Details about a waiting container - waiting:: { - local __waitingMixin(waiting) = { waiting+: waiting }, - mixinInstance(waiting):: __waitingMixin(waiting), - // Message regarding why the container is not yet running. - withMessage(message):: self + __waitingMixin({ message: message }), - // (brief) reason the container is not yet running. - withReason(reason):: self + __waitingMixin({ reason: reason }), - }, - waitingType:: hidden.core.v1.containerStateWaiting, - }, - }, - // ContainerStateRunning is a running state of a container. - containerStateRunning:: { - new():: {}, - // Time at which the container was last (re-)started - withStartedAt(startedAt):: self + { startedAt: startedAt }, - mixin:: {}, - }, - // ContainerStateTerminated is a terminated state of a container. - containerStateTerminated:: { - new():: {}, - // Container's ID in the format 'docker://' - withContainerId(containerId):: self + { containerID: containerId }, - // Exit status from the last termination of the container - withExitCode(exitCode):: self + { exitCode: exitCode }, - // Time at which the container last terminated - withFinishedAt(finishedAt):: self + { finishedAt: finishedAt }, - // Message regarding the last termination of the container - withMessage(message):: self + { message: message }, - // (brief) reason from the last termination of the container - withReason(reason):: self + { reason: reason }, - // Signal from the last termination of the container - withSignal(signal):: self + { signal: signal }, - // Time at which previous execution of the container started - withStartedAt(startedAt):: self + { startedAt: startedAt }, - mixin:: {}, - }, - // ContainerStateWaiting is a waiting state of a container. - containerStateWaiting:: { - new():: {}, - // Message regarding why the container is not yet running. - withMessage(message):: self + { message: message }, - // (brief) reason the container is not yet running. - withReason(reason):: self + { reason: reason }, - mixin:: {}, - }, - // ContainerStatus contains details for the current status of this container. - containerStatus:: { - new():: {}, - // Container's ID in the format 'docker://'. - withContainerId(containerId):: self + { containerID: containerId }, - // The image the container is running. More info: https://kubernetes.io/docs/concepts/containers/images - withImage(image):: self + { image: image }, - // ImageID of the container's image. - withImageId(imageId):: self + { imageID: imageId }, - // This must be a DNS_LABEL. Each container in a pod must have a unique name. Cannot be updated. - withName(name):: self + { name: name }, - // Specifies whether the container has passed its readiness probe. - withReady(ready):: self + { ready: ready }, - // The number of times the container has been restarted, currently based on the number of dead containers that have not yet been removed. Note that this is calculated from dead containers. But those containers are subject to garbage collection. This value will get capped at 5 by GC. - withRestartCount(restartCount):: self + { restartCount: restartCount }, - mixin:: { - // Details about the container's last termination condition. - lastState:: { - local __lastStateMixin(lastState) = { lastState+: lastState }, - mixinInstance(lastState):: __lastStateMixin(lastState), - // Details about a running container - running:: { - local __runningMixin(running) = __lastStateMixin({ running+: running }), - mixinInstance(running):: __runningMixin(running), - // Time at which the container was last (re-)started - withStartedAt(startedAt):: self + __runningMixin({ startedAt: startedAt }), - }, - runningType:: hidden.core.v1.containerStateRunning, - // Details about a terminated container - terminated:: { - local __terminatedMixin(terminated) = __lastStateMixin({ terminated+: terminated }), - mixinInstance(terminated):: __terminatedMixin(terminated), - // Container's ID in the format 'docker://' - withContainerId(containerId):: self + __terminatedMixin({ containerID: containerId }), - // Exit status from the last termination of the container - withExitCode(exitCode):: self + __terminatedMixin({ exitCode: exitCode }), - // Time at which the container last terminated - withFinishedAt(finishedAt):: self + __terminatedMixin({ finishedAt: finishedAt }), - // Message regarding the last termination of the container - withMessage(message):: self + __terminatedMixin({ message: message }), - // (brief) reason from the last termination of the container - withReason(reason):: self + __terminatedMixin({ reason: reason }), - // Signal from the last termination of the container - withSignal(signal):: self + __terminatedMixin({ signal: signal }), - // Time at which previous execution of the container started - withStartedAt(startedAt):: self + __terminatedMixin({ startedAt: startedAt }), - }, - terminatedType:: hidden.core.v1.containerStateTerminated, - // Details about a waiting container - waiting:: { - local __waitingMixin(waiting) = __lastStateMixin({ waiting+: waiting }), - mixinInstance(waiting):: __waitingMixin(waiting), - // Message regarding why the container is not yet running. - withMessage(message):: self + __waitingMixin({ message: message }), - // (brief) reason the container is not yet running. - withReason(reason):: self + __waitingMixin({ reason: reason }), - }, - waitingType:: hidden.core.v1.containerStateWaiting, - }, - lastStateType:: hidden.core.v1.containerState, - // Details about the container's current condition. - state:: { - local __stateMixin(state) = { state+: state }, - mixinInstance(state):: __stateMixin(state), - // Details about a running container - running:: { - local __runningMixin(running) = __stateMixin({ running+: running }), - mixinInstance(running):: __runningMixin(running), - // Time at which the container was last (re-)started - withStartedAt(startedAt):: self + __runningMixin({ startedAt: startedAt }), - }, - runningType:: hidden.core.v1.containerStateRunning, - // Details about a terminated container - terminated:: { - local __terminatedMixin(terminated) = __stateMixin({ terminated+: terminated }), - mixinInstance(terminated):: __terminatedMixin(terminated), - // Container's ID in the format 'docker://' - withContainerId(containerId):: self + __terminatedMixin({ containerID: containerId }), - // Exit status from the last termination of the container - withExitCode(exitCode):: self + __terminatedMixin({ exitCode: exitCode }), - // Time at which the container last terminated - withFinishedAt(finishedAt):: self + __terminatedMixin({ finishedAt: finishedAt }), - // Message regarding the last termination of the container - withMessage(message):: self + __terminatedMixin({ message: message }), - // (brief) reason from the last termination of the container - withReason(reason):: self + __terminatedMixin({ reason: reason }), - // Signal from the last termination of the container - withSignal(signal):: self + __terminatedMixin({ signal: signal }), - // Time at which previous execution of the container started - withStartedAt(startedAt):: self + __terminatedMixin({ startedAt: startedAt }), - }, - terminatedType:: hidden.core.v1.containerStateTerminated, - // Details about a waiting container - waiting:: { - local __waitingMixin(waiting) = __stateMixin({ waiting+: waiting }), - mixinInstance(waiting):: __waitingMixin(waiting), - // Message regarding why the container is not yet running. - withMessage(message):: self + __waitingMixin({ message: message }), - // (brief) reason the container is not yet running. - withReason(reason):: self + __waitingMixin({ reason: reason }), - }, - waitingType:: hidden.core.v1.containerStateWaiting, - }, - stateType:: hidden.core.v1.containerState, - }, - }, - // Represents storage that is managed by an external CSI volume driver (Beta feature) - csiPersistentVolumeSource:: { - new():: {}, - // Driver is the name of the driver to use for this volume. Required. - withDriver(driver):: self + { driver: driver }, - // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". - withFsType(fsType):: self + { fsType: fsType }, - // Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write). - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // Attributes of the volume to publish. - withVolumeAttributes(volumeAttributes):: self + { volumeAttributes: volumeAttributes }, - // Attributes of the volume to publish. - withVolumeAttributesMixin(volumeAttributes):: self + { volumeAttributes+: volumeAttributes }, - // VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required. - withVolumeHandle(volumeHandle):: self + { volumeHandle: volumeHandle }, - mixin:: { - // 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:: { - local __controllerPublishSecretRefMixin(controllerPublishSecretRef) = { controllerPublishSecretRef+: controllerPublishSecretRef }, - mixinInstance(controllerPublishSecretRef):: __controllerPublishSecretRefMixin(controllerPublishSecretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __controllerPublishSecretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __controllerPublishSecretRefMixin({ namespace: namespace }), - }, - controllerPublishSecretRefType:: hidden.core.v1.secretReference, - // 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:: { - local __nodePublishSecretRefMixin(nodePublishSecretRef) = { nodePublishSecretRef+: nodePublishSecretRef }, - mixinInstance(nodePublishSecretRef):: __nodePublishSecretRefMixin(nodePublishSecretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __nodePublishSecretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __nodePublishSecretRefMixin({ namespace: namespace }), - }, - nodePublishSecretRefType:: hidden.core.v1.secretReference, - // 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:: { - local __nodeStageSecretRefMixin(nodeStageSecretRef) = { nodeStageSecretRef+: nodeStageSecretRef }, - mixinInstance(nodeStageSecretRef):: __nodeStageSecretRefMixin(nodeStageSecretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __nodeStageSecretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __nodeStageSecretRefMixin({ namespace: namespace }), - }, - nodeStageSecretRefType:: hidden.core.v1.secretReference, - }, - }, - // Represents a source location of a volume to mount, managed by an external CSI driver - csiVolumeSource:: { - new():: {}, - // 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. - withDriver(driver):: self + { driver: 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. - withFsType(fsType):: self + { fsType: fsType }, - // Specifies a read-only configuration for the volume. Defaults to false (read/write). - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. - withVolumeAttributes(volumeAttributes):: self + { volumeAttributes: volumeAttributes }, - // VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. - withVolumeAttributesMixin(volumeAttributes):: self + { volumeAttributes+: volumeAttributes }, - mixin:: { - // 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:: { - local __nodePublishSecretRefMixin(nodePublishSecretRef) = { nodePublishSecretRef+: nodePublishSecretRef }, - mixinInstance(nodePublishSecretRef):: __nodePublishSecretRefMixin(nodePublishSecretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __nodePublishSecretRefMixin({ name: name }), - }, - nodePublishSecretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // DaemonEndpoint contains information about a single Daemon endpoint. - daemonEndpoint:: { - new():: {}, - // Port number of the given endpoint. - withPort(port):: self + { Port: port }, - mixin:: {}, - }, - // Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode. - downwardApiProjection:: { - new():: {}, - // Items is a list of DownwardAPIVolume file - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of DownwardAPIVolume file - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.downwardApiVolumeFile, - mixin:: {}, - }, - // DownwardAPIVolumeFile represents information to create the file containing the pod field - downwardApiVolumeFile:: { - new():: {}, - // Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. - withMode(mode):: self + { mode: mode }, - // 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 '..' - withPath(path):: self + { path: path }, - mixin:: { - // Required: Selects a field of the pod: only annotations, labels, name and namespace are supported. - fieldRef:: { - local __fieldRefMixin(fieldRef) = { fieldRef+: fieldRef }, - mixinInstance(fieldRef):: __fieldRefMixin(fieldRef), - // Path of the field to select in the specified API version. - withFieldPath(fieldPath):: self + __fieldRefMixin({ fieldPath: fieldPath }), - }, - fieldRefType:: hidden.core.v1.objectFieldSelector, - // Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - resourceFieldRef:: { - local __resourceFieldRefMixin(resourceFieldRef) = { resourceFieldRef+: resourceFieldRef }, - mixinInstance(resourceFieldRef):: __resourceFieldRefMixin(resourceFieldRef), - // Container name: required for volumes, optional for env vars - withContainerName(containerName):: self + __resourceFieldRefMixin({ containerName: containerName }), - // Specifies the output format of the exposed resources, defaults to "1" - divisor:: { - local __divisorMixin(divisor) = __resourceFieldRefMixin({ divisor+: divisor }), - mixinInstance(divisor):: __divisorMixin(divisor), - }, - divisorType:: hidden.core.resource.quantity, - // Required: resource to select - withResource(resource):: self + __resourceFieldRefMixin({ resource: resource }), - }, - resourceFieldRefType:: hidden.core.v1.resourceFieldSelector, - }, - }, - // DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling. - downwardApiVolumeSource:: { - new():: {}, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + { defaultMode: defaultMode }, - // Items is a list of downward API volume file - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of downward API volume file - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.downwardApiVolumeFile, - mixin:: {}, - }, - // Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling. - emptyDirVolumeSource:: { - new():: {}, - // 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 - withMedium(medium):: self + { medium: medium }, - mixin:: { - // 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:: { - local __sizeLimitMixin(sizeLimit) = { sizeLimit+: sizeLimit }, - mixinInstance(sizeLimit):: __sizeLimitMixin(sizeLimit), - }, - sizeLimitType:: hidden.core.resource.quantity, - }, - }, - // EndpointAddress is a tuple that describes single IP address. - endpointAddress:: { - new():: {}, - // The Hostname of this endpoint - withHostname(hostname):: self + { hostname: hostname }, - // 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. - withIp(ip):: self + { ip: ip }, - // Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. - withNodeName(nodeName):: self + { nodeName: nodeName }, - mixin:: { - // Reference to object providing the endpoint. - targetRef:: { - local __targetRefMixin(targetRef) = { targetRef+: targetRef }, - mixinInstance(targetRef):: __targetRefMixin(targetRef), - // 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. - withFieldPath(fieldPath):: self + __targetRefMixin({ fieldPath: fieldPath }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __targetRefMixin({ name: name }), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __targetRefMixin({ namespace: namespace }), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __targetRefMixin({ resourceVersion: resourceVersion }), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __targetRefMixin({ uid: uid }), - }, - targetRefType:: hidden.core.v1.objectReference, - }, - }, - // EndpointPort is a tuple that describes a single port. - endpointPort:: { - new():: {}, - // The name of this port (corresponds to ServicePort.Name). Must be a DNS_LABEL. Optional only if one port is defined. - withName(name):: self + { name: name }, - // The port number of the endpoint. - withPort(port):: self + { port: port }, - // The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. - withProtocol(protocol):: self + { protocol: protocol }, - mixin:: {}, - }, - // 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 ] - endpointSubset:: { - new():: {}, - // 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. - withAddresses(addresses):: self + if std.type(addresses) == 'array' then { addresses: addresses } else { addresses: [addresses] }, - // 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. - withAddressesMixin(addresses):: self + if std.type(addresses) == 'array' then { addresses+: addresses } else { addresses+: [addresses] }, - addressesType:: hidden.core.v1.endpointAddress, - // 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. - withNotReadyAddresses(notReadyAddresses):: self + if std.type(notReadyAddresses) == 'array' then { notReadyAddresses: notReadyAddresses } else { notReadyAddresses: [notReadyAddresses] }, - // 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. - withNotReadyAddressesMixin(notReadyAddresses):: self + if std.type(notReadyAddresses) == 'array' then { notReadyAddresses+: notReadyAddresses } else { notReadyAddresses+: [notReadyAddresses] }, - notReadyAddressesType:: hidden.core.v1.endpointAddress, - // Port numbers available on the related IP addresses. - withPorts(ports):: self + if std.type(ports) == 'array' then { ports: ports } else { ports: [ports] }, - // Port numbers available on the related IP addresses. - withPortsMixin(ports):: self + if std.type(ports) == 'array' then { ports+: ports } else { ports+: [ports] }, - portsType:: hidden.core.v1.endpointPort, - mixin:: {}, - }, - // EndpointsList is a list of endpoints. - endpointsList:: { - new(items=''):: self.withItems(items), - // List of endpoints. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of endpoints. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.endpoints, - mixin:: {}, - }, - // EnvFromSource represents the source of a set of ConfigMaps - envFromSource:: { - new():: {}, - // An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. - withPrefix(prefix):: self + { prefix: prefix }, - mixin:: { - // The ConfigMap to select from - configMapRef:: { - local __configMapRefMixin(configMapRef) = { configMapRef+: configMapRef }, - mixinInstance(configMapRef):: __configMapRefMixin(configMapRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapRefMixin({ name: name }), - // Specify whether the ConfigMap must be defined - withOptional(optional):: self + __configMapRefMixin({ optional: optional }), - }, - configMapRefType:: hidden.core.v1.configMapEnvSource, - // The Secret to select from - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - // Specify whether the Secret must be defined - withOptional(optional):: self + __secretRefMixin({ optional: optional }), - }, - secretRefType:: hidden.core.v1.secretEnvSource, - }, - }, - // EnvVar represents an environment variable present in a Container. - envVar:: { - new(name='', value=''):: self.withName(name).withValue(value), - fromSecretRef(name='', secretRefName='', secretRefKey=''):: self.withName(name) + self.mixin.valueFrom.secretKeyRef.withKey(secretRefKey).withName(secretRefName), - fromFieldPath(name='', fieldPath=''):: self.withName(name) + self.mixin.valueFrom.fieldRef.withFieldPath(fieldPath), - // Name of the environment variable. Must be a C_IDENTIFIER. - withName(name):: self + { name: name }, - // Variable references $(VAR_NAME) are expanded using the previous 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "". - withValue(value):: self + { value: value }, - mixin:: { - // Source for the environment variable's value. Cannot be used if value is not empty. - valueFrom:: { - local __valueFromMixin(valueFrom) = { valueFrom+: valueFrom }, - mixinInstance(valueFrom):: __valueFromMixin(valueFrom), - // Selects a key of a ConfigMap. - configMapKeyRef:: { - local __configMapKeyRefMixin(configMapKeyRef) = __valueFromMixin({ configMapKeyRef+: configMapKeyRef }), - mixinInstance(configMapKeyRef):: __configMapKeyRefMixin(configMapKeyRef), - // The key to select. - withKey(key):: self + __configMapKeyRefMixin({ key: key }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapKeyRefMixin({ name: name }), - // Specify whether the ConfigMap or it's key must be defined - withOptional(optional):: self + __configMapKeyRefMixin({ optional: optional }), - }, - configMapKeyRefType:: hidden.core.v1.configMapKeySelector, - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP. - fieldRef:: { - local __fieldRefMixin(fieldRef) = __valueFromMixin({ fieldRef+: fieldRef }), - mixinInstance(fieldRef):: __fieldRefMixin(fieldRef), - // Path of the field to select in the specified API version. - withFieldPath(fieldPath):: self + __fieldRefMixin({ fieldPath: fieldPath }), - }, - fieldRefType:: hidden.core.v1.objectFieldSelector, - // 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:: { - local __resourceFieldRefMixin(resourceFieldRef) = __valueFromMixin({ resourceFieldRef+: resourceFieldRef }), - mixinInstance(resourceFieldRef):: __resourceFieldRefMixin(resourceFieldRef), - // Container name: required for volumes, optional for env vars - withContainerName(containerName):: self + __resourceFieldRefMixin({ containerName: containerName }), - // Specifies the output format of the exposed resources, defaults to "1" - divisor:: { - local __divisorMixin(divisor) = __resourceFieldRefMixin({ divisor+: divisor }), - mixinInstance(divisor):: __divisorMixin(divisor), - }, - divisorType:: hidden.core.resource.quantity, - // Required: resource to select - withResource(resource):: self + __resourceFieldRefMixin({ resource: resource }), - }, - resourceFieldRefType:: hidden.core.v1.resourceFieldSelector, - // Selects a key of a secret in the pod's namespace - secretKeyRef:: { - local __secretKeyRefMixin(secretKeyRef) = __valueFromMixin({ secretKeyRef+: secretKeyRef }), - mixinInstance(secretKeyRef):: __secretKeyRefMixin(secretKeyRef), - // The key of the secret to select from. Must be a valid secret key. - withKey(key):: self + __secretKeyRefMixin({ key: key }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretKeyRefMixin({ name: name }), - // Specify whether the Secret or it's key must be defined - withOptional(optional):: self + __secretKeyRefMixin({ optional: optional }), - }, - secretKeyRefType:: hidden.core.v1.secretKeySelector, - }, - valueFromType:: hidden.core.v1.envVarSource, - }, - }, - // EnvVarSource represents a source for the value of an EnvVar. - envVarSource:: { - new():: {}, - mixin:: { - // Selects a key of a ConfigMap. - configMapKeyRef:: { - local __configMapKeyRefMixin(configMapKeyRef) = { configMapKeyRef+: configMapKeyRef }, - mixinInstance(configMapKeyRef):: __configMapKeyRefMixin(configMapKeyRef), - // The key to select. - withKey(key):: self + __configMapKeyRefMixin({ key: key }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapKeyRefMixin({ name: name }), - // Specify whether the ConfigMap or it's key must be defined - withOptional(optional):: self + __configMapKeyRefMixin({ optional: optional }), - }, - configMapKeyRefType:: hidden.core.v1.configMapKeySelector, - // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP. - fieldRef:: { - local __fieldRefMixin(fieldRef) = { fieldRef+: fieldRef }, - mixinInstance(fieldRef):: __fieldRefMixin(fieldRef), - // Path of the field to select in the specified API version. - withFieldPath(fieldPath):: self + __fieldRefMixin({ fieldPath: fieldPath }), - }, - fieldRefType:: hidden.core.v1.objectFieldSelector, - // 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:: { - local __resourceFieldRefMixin(resourceFieldRef) = { resourceFieldRef+: resourceFieldRef }, - mixinInstance(resourceFieldRef):: __resourceFieldRefMixin(resourceFieldRef), - // Container name: required for volumes, optional for env vars - withContainerName(containerName):: self + __resourceFieldRefMixin({ containerName: containerName }), - // Specifies the output format of the exposed resources, defaults to "1" - divisor:: { - local __divisorMixin(divisor) = __resourceFieldRefMixin({ divisor+: divisor }), - mixinInstance(divisor):: __divisorMixin(divisor), - }, - divisorType:: hidden.core.resource.quantity, - // Required: resource to select - withResource(resource):: self + __resourceFieldRefMixin({ resource: resource }), - }, - resourceFieldRefType:: hidden.core.v1.resourceFieldSelector, - // Selects a key of a secret in the pod's namespace - secretKeyRef:: { - local __secretKeyRefMixin(secretKeyRef) = { secretKeyRef+: secretKeyRef }, - mixinInstance(secretKeyRef):: __secretKeyRefMixin(secretKeyRef), - // The key of the secret to select from. Must be a valid secret key. - withKey(key):: self + __secretKeyRefMixin({ key: key }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretKeyRefMixin({ name: name }), - // Specify whether the Secret or it's key must be defined - withOptional(optional):: self + __secretKeyRefMixin({ optional: optional }), - }, - secretKeyRefType:: hidden.core.v1.secretKeySelector, - }, - }, - // EventList is a list of events. - eventList:: { - new(items=''):: self.withItems(items), - // List of events - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of events - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.event, - mixin:: {}, - }, - // EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. - eventSeries:: { - new():: {}, - // Number of occurrences in this series up to the last heartbeat time - withCount(count):: self + { count: count }, - // Time of the last occurrence observed - withLastObservedTime(lastObservedTime):: self + { lastObservedTime: lastObservedTime }, - // State of this Series: Ongoing or Finished - withState(state):: self + { state: state }, - mixin:: {}, - }, - // EventSource contains information for an event. - eventSource:: { - new():: {}, - // Component from which the event is generated. - withComponent(component):: self + { component: component }, - // Node name on which the event is generated. - withHost(host):: self + { host: host }, - mixin:: {}, - }, - // ExecAction describes a "run in container" action. - execAction:: { - new():: {}, - // 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. - withCommand(command):: self + if std.type(command) == 'array' then { command: command } else { command: [command] }, - // 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. - withCommandMixin(command):: self + if std.type(command) == 'array' then { command+: command } else { command+: [command] }, - mixin:: {}, - }, - // 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. - fcVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + { fsType: fsType }, - // Optional: FC target lun number - withLun(lun):: self + { lun: lun }, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // Optional: FC target worldwide names (WWNs) - withTargetWwns(targetWwns):: self + if std.type(targetWwns) == 'array' then { targetWWNs: targetWwns } else { targetWWNs: [targetWwns] }, - // Optional: FC target worldwide names (WWNs) - withTargetWwnsMixin(targetWwns):: self + if std.type(targetWwns) == 'array' then { targetWWNs+: targetWwns } else { targetWWNs+: [targetWwns] }, - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwids(wwids):: self + if std.type(wwids) == 'array' then { wwids: wwids } else { wwids: [wwids] }, - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwidsMixin(wwids):: self + if std.type(wwids) == 'array' then { wwids+: wwids } else { wwids+: [wwids] }, - mixin:: {}, - }, - // FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin. - flexPersistentVolumeSource:: { - new():: {}, - // Driver is the name of the driver to use for this volume. - withDriver(driver):: self + { driver: 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. - withFsType(fsType):: self + { fsType: fsType }, - // Optional: Extra command options if any. - withOptions(options):: self + { options: options }, - // Optional: Extra command options if any. - withOptionsMixin(options):: self + { options+: options }, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - mixin:: { - // 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:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - }, - }, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. - flexVolumeSource:: { - new():: {}, - // Driver is the name of the driver to use for this volume. - withDriver(driver):: self + { driver: 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. - withFsType(fsType):: self + { fsType: fsType }, - // Optional: Extra command options if any. - withOptions(options):: self + { options: options }, - // Optional: Extra command options if any. - withOptionsMixin(options):: self + { options+: options }, - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - mixin:: { - // 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:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // 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. - flockerVolumeSource:: { - new():: {}, - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - withDatasetName(datasetName):: self + { datasetName: datasetName }, - // UUID of the dataset. This is unique identifier of a Flocker dataset - withDatasetUuid(datasetUuid):: self + { datasetUUID: datasetUuid }, - mixin:: {}, - }, - // 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. - gcePersistentDiskVolumeSource:: { - new():: {}, - // 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 - withFsType(fsType):: self + { fsType: 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 - withPartition(partition):: self + { partition: partition }, - // 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 - withPdName(pdName):: self + { pdName: pdName }, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - withReadOnly(readOnly):: self + { readOnly: readOnly }, - mixin:: {}, - }, - // 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. - gitRepoVolumeSource:: { - new():: {}, - // 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. - withDirectory(directory):: self + { directory: directory }, - // Repository URL - withRepository(repository):: self + { repository: repository }, - // Commit hash for the specified revision. - withRevision(revision):: self + { revision: revision }, - mixin:: {}, - }, - // Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. - glusterfsPersistentVolumeSource:: { - new():: {}, - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withEndpoints(endpoints):: self + { endpoints: endpoints }, - // 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://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withEndpointsNamespace(endpointsNamespace):: self + { endpointsNamespace: endpointsNamespace }, - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withPath(path):: self + { path: path }, - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withReadOnly(readOnly):: self + { readOnly: readOnly }, - mixin:: {}, - }, - // Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling. - glusterfsVolumeSource:: { - new():: {}, - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withEndpoints(endpoints):: self + { endpoints: endpoints }, - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withPath(path):: self + { path: path }, - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withReadOnly(readOnly):: self + { readOnly: readOnly }, - mixin:: {}, - }, - // Handler defines a specific action that should be taken - handler:: { - new():: {}, - mixin:: { - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = { exec+: exec }, - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == 'array' then __execMixin({ command: command }) else __execMixin({ command: [command] }), - // 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. - withCommandMixin(command):: self + if std.type(command) == 'array' then __execMixin({ command+: command }) else __execMixin({ command+: [command] }), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = { httpGet+: httpGet }, - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({ host: host }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders: httpHeaders }) else __httpGetMixin({ httpHeaders: [httpHeaders] }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders+: httpHeaders }) else __httpGetMixin({ httpHeaders+: [httpHeaders] }), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({ path: path }), - // 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. - withPort(port):: self + __httpGetMixin({ port: port }), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({ scheme: scheme }), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = { tcpSocket+: tcpSocket }, - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({ host: host }), - // 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. - withPort(port):: self + __tcpSocketMixin({ port: port }), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - }, - // HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. - hostAlias:: { - new():: {}, - // Hostnames for the above IP address. - withHostnames(hostnames):: self + if std.type(hostnames) == 'array' then { hostnames: hostnames } else { hostnames: [hostnames] }, - // Hostnames for the above IP address. - withHostnamesMixin(hostnames):: self + if std.type(hostnames) == 'array' then { hostnames+: hostnames } else { hostnames+: [hostnames] }, - // IP address of the host file entry. - withIp(ip):: self + { ip: ip }, - mixin:: {}, - }, - // Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling. - hostPathVolumeSource:: { - new():: {}, - // 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 - withPath(path):: self + { path: path }, - // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - withType(type):: self + { type: type }, - mixin:: {}, - }, - // HTTPGetAction describes an action based on HTTP Get requests. - httpGetAction:: { - new():: {}, - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + { host: host }, - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == 'array' then { httpHeaders: httpHeaders } else { httpHeaders: [httpHeaders] }, - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == 'array' then { httpHeaders+: httpHeaders } else { httpHeaders+: [httpHeaders] }, - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + { path: path }, - // 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. - withPort(port):: self + { port: port }, - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + { scheme: scheme }, - mixin:: {}, - }, - // HTTPHeader describes a custom header to be used in HTTP probes - httpHeader:: { - new():: {}, - // The header field name - withName(name):: self + { name: name }, - // The header field value - withValue(value):: self + { value: value }, - mixin:: {}, - }, - // ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. - iscsiPersistentVolumeSource:: { - new():: {}, - // whether support iSCSI Discovery CHAP authentication - withChapAuthDiscovery(chapAuthDiscovery):: self + { chapAuthDiscovery: chapAuthDiscovery }, - // whether support iSCSI Session CHAP authentication - withChapAuthSession(chapAuthSession):: self + { chapAuthSession: 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 - withFsType(fsType):: self + { fsType: fsType }, - // Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - withInitiatorName(initiatorName):: self + { initiatorName: initiatorName }, - // Target iSCSI Qualified Name. - withIqn(iqn):: self + { iqn: iqn }, - // iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). - withIscsiInterface(iscsiInterface):: self + { iscsiInterface: iscsiInterface }, - // iSCSI Target Lun number. - withLun(lun):: self + { lun: lun }, - // 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). - withPortals(portals):: self + if std.type(portals) == 'array' then { portals: portals } else { portals: [portals] }, - // 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). - withPortalsMixin(portals):: self + if std.type(portals) == 'array' then { portals+: portals } else { portals+: [portals] }, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // 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). - withTargetPortal(targetPortal):: self + { targetPortal: targetPortal }, - mixin:: { - // CHAP Secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - }, - }, - // Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling. - iscsiVolumeSource:: { - new():: {}, - // whether support iSCSI Discovery CHAP authentication - withChapAuthDiscovery(chapAuthDiscovery):: self + { chapAuthDiscovery: chapAuthDiscovery }, - // whether support iSCSI Session CHAP authentication - withChapAuthSession(chapAuthSession):: self + { chapAuthSession: 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 - withFsType(fsType):: self + { fsType: fsType }, - // Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - withInitiatorName(initiatorName):: self + { initiatorName: initiatorName }, - // Target iSCSI Qualified Name. - withIqn(iqn):: self + { iqn: iqn }, - // iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). - withIscsiInterface(iscsiInterface):: self + { iscsiInterface: iscsiInterface }, - // iSCSI Target Lun number. - withLun(lun):: self + { lun: lun }, - // 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). - withPortals(portals):: self + if std.type(portals) == 'array' then { portals: portals } else { portals: [portals] }, - // 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). - withPortalsMixin(portals):: self + if std.type(portals) == 'array' then { portals+: portals } else { portals+: [portals] }, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // 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). - withTargetPortal(targetPortal):: self + { targetPortal: targetPortal }, - mixin:: { - // CHAP Secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // Maps a string key to a path within a volume. - keyToPath:: { - new(key='', path=''):: self.withKey(key).withPath(path), - // The key to project. - withKey(key):: self + { key: key }, - // Optional: mode bits to use on this file, must be a value between 0 and 0777. 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. - withMode(mode):: self + { mode: mode }, - // 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 '..'. - withPath(path):: self + { path: path }, - mixin:: {}, - }, - // 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. - lifecycle:: { - new():: {}, - mixin:: { - // 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:: { - local __postStartMixin(postStart) = { postStart+: postStart }, - mixinInstance(postStart):: __postStartMixin(postStart), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __postStartMixin({ exec+: exec }), - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == 'array' then __execMixin({ command: command }) else __execMixin({ command: [command] }), - // 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. - withCommandMixin(command):: self + if std.type(command) == 'array' then __execMixin({ command+: command }) else __execMixin({ command+: [command] }), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __postStartMixin({ httpGet+: httpGet }), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({ host: host }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders: httpHeaders }) else __httpGetMixin({ httpHeaders: [httpHeaders] }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders+: httpHeaders }) else __httpGetMixin({ httpHeaders+: [httpHeaders] }), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({ path: path }), - // 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. - withPort(port):: self + __httpGetMixin({ port: port }), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({ scheme: scheme }), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __postStartMixin({ tcpSocket+: tcpSocket }), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({ host: host }), - // 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. - withPort(port):: self + __tcpSocketMixin({ port: port }), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - postStartType:: hidden.core.v1.handler, - // PreStop is called immediately before a container is terminated due to an API request or management event such as liveness 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:: { - local __preStopMixin(preStop) = { preStop+: preStop }, - mixinInstance(preStop):: __preStopMixin(preStop), - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = __preStopMixin({ exec+: exec }), - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == 'array' then __execMixin({ command: command }) else __execMixin({ command: [command] }), - // 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. - withCommandMixin(command):: self + if std.type(command) == 'array' then __execMixin({ command+: command }) else __execMixin({ command+: [command] }), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = __preStopMixin({ httpGet+: httpGet }), - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({ host: host }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders: httpHeaders }) else __httpGetMixin({ httpHeaders: [httpHeaders] }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders+: httpHeaders }) else __httpGetMixin({ httpHeaders+: [httpHeaders] }), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({ path: path }), - // 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. - withPort(port):: self + __httpGetMixin({ port: port }), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({ scheme: scheme }), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = __preStopMixin({ tcpSocket+: tcpSocket }), - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({ host: host }), - // 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. - withPort(port):: self + __tcpSocketMixin({ port: port }), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - preStopType:: hidden.core.v1.handler, - }, - }, - // LimitRangeItem defines a min/max usage limit for any resource that matches on kind. - limitRangeItem:: { - new():: {}, - // Default resource requirement limit value by resource name if resource limit is omitted. - withDefault(default):: self + { default: default }, - // Default resource requirement limit value by resource name if resource limit is omitted. - withDefaultMixin(default):: self + { default+: default }, - // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. - withDefaultRequest(defaultRequest):: self + { defaultRequest: defaultRequest }, - // DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. - withDefaultRequestMixin(defaultRequest):: self + { defaultRequest+: defaultRequest }, - // Max usage constraints on this kind by resource name. - withMax(max):: self + { max: max }, - // Max usage constraints on this kind by resource name. - withMaxMixin(max):: self + { max+: 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. - withMaxLimitRequestRatio(maxLimitRequestRatio):: self + { maxLimitRequestRatio: maxLimitRequestRatio }, - // 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. - withMaxLimitRequestRatioMixin(maxLimitRequestRatio):: self + { maxLimitRequestRatio+: maxLimitRequestRatio }, - // Min usage constraints on this kind by resource name. - withMin(min):: self + { min: min }, - // Min usage constraints on this kind by resource name. - withMinMixin(min):: self + { min+: min }, - // Type of resource that this limit applies to. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // LimitRangeList is a list of LimitRange items. - limitRangeList:: { - new(items=''):: self.withItems(items), - // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of LimitRange objects. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.limitRange, - mixin:: {}, - }, - // LimitRangeSpec defines a min/max usage limit for resources that match on kind. - limitRangeSpec:: { - new():: {}, - // Limits is the list of LimitRangeItem objects that are enforced. - withLimits(limits):: self + if std.type(limits) == 'array' then { limits: limits } else { limits: [limits] }, - // Limits is the list of LimitRangeItem objects that are enforced. - withLimitsMixin(limits):: self + if std.type(limits) == 'array' then { limits+: limits } else { limits+: [limits] }, - limitsType:: hidden.core.v1.limitRangeItem, - mixin:: {}, - }, - // LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point. - loadBalancerIngress:: { - new():: {}, - // Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers) - withHostname(hostname):: self + { hostname: hostname }, - // IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers) - withIp(ip):: self + { ip: ip }, - mixin:: {}, - }, - // LoadBalancerStatus represents the status of a load-balancer. - loadBalancerStatus:: { - new():: {}, - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngress(ingress):: self + if std.type(ingress) == 'array' then { ingress: ingress } else { ingress: [ingress] }, - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngressMixin(ingress):: self + if std.type(ingress) == 'array' then { ingress+: ingress } else { ingress+: [ingress] }, - ingressType:: hidden.core.v1.loadBalancerIngress, - mixin:: {}, - }, - // LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. - localObjectReference:: { - new():: {}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + { name: name }, - mixin:: {}, - }, - // Local represents directly-attached storage with node affinity (Beta feature) - localVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + { fsType: fsType }, - // The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...). - withPath(path):: self + { path: path }, - mixin:: {}, - }, - // NamespaceList is a list of Namespaces. - namespaceList:: { - new(items=''):: self.withItems(items), - // Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of Namespace objects in the list. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.namespace, - mixin:: {}, - }, - // NamespaceSpec describes the attributes on a Namespace. - namespaceSpec:: { - new():: {}, - // 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/ - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then { finalizers: finalizers } else { finalizers: [finalizers] }, - // 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/ - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then { finalizers+: finalizers } else { finalizers+: [finalizers] }, - mixin:: {}, - }, - // NamespaceStatus is information about the current status of a Namespace. - namespaceStatus:: { - new():: {}, - // Phase is the current lifecycle phase of the namespace. More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ - withPhase(phase):: self + { phase: phase }, - mixin:: {}, - }, - // Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling. - nfsVolumeSource:: { - new():: {}, - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withPath(path):: self + { path: path }, - // 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 - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withServer(server):: self + { server: server }, - mixin:: {}, - }, - // NodeAddress contains information for the node's address. - nodeAddress:: { - new():: {}, - // The node address. - withAddress(address):: self + { address: address }, - // Node address type, one of Hostname, ExternalIP or InternalIP. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // Node affinity is a group of node affinity scheduling rules. - nodeAffinity:: { - new():: {}, - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then { preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution } else { preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }, - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then { preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution } else { preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }, - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - mixin:: { - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = { requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }, - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - }, - // NodeCondition contains condition information for a node. - nodeCondition:: { - new():: {}, - // Last time we got an update on a given condition. - withLastHeartbeatTime(lastHeartbeatTime):: self + { lastHeartbeatTime: lastHeartbeatTime }, - // Last time the condition transit from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // Human readable message indicating details about last transition. - withMessage(message):: self + { message: message }, - // (brief) reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of node condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. - nodeConfigSource:: { - new():: {}, - mixin:: { - // ConfigMap is a reference to a Node's ConfigMap - configMap:: { - local __configMapMixin(configMap) = { configMap+: configMap }, - mixinInstance(configMap):: __configMapMixin(configMap), - // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. - withKubeletConfigKey(kubeletConfigKey):: self + __configMapMixin({ kubeletConfigKey: kubeletConfigKey }), - // Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. - withName(name):: self + __configMapMixin({ name: name }), - // Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. - withNamespace(namespace):: self + __configMapMixin({ namespace: namespace }), - // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withResourceVersion(resourceVersion):: self + __configMapMixin({ resourceVersion: resourceVersion }), - // UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withUid(uid):: self + __configMapMixin({ uid: uid }), - }, - configMapType:: hidden.core.v1.configMapNodeConfigSource, - }, - }, - // NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource. - nodeConfigStatus:: { - new():: {}, - // Error describes any problems reconciling the Spec.ConfigSource to the Active config. Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting to load or validate the Assigned config, etc. Errors may occur at different points while syncing config. Earlier errors (e.g. download or checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error by fixing the config assigned in Spec.ConfigSource. You can find additional information for debugging by searching the error message in the Kubelet log. Error is a human-readable description of the error state; machines can check whether or not Error is empty, but should not rely on the stability of the Error text across Kubelet versions. - withErrorParam(errorParam):: self + { "error": errorParam }, - mixin:: { - // Active reports the checkpointed config the node is actively using. Active will represent either the current version of the Assigned config, or the current LastKnownGood config, depending on whether attempting to use the Assigned config results in an error. - active:: { - local __activeMixin(active) = { active+: active }, - mixinInstance(active):: __activeMixin(active), - // ConfigMap is a reference to a Node's ConfigMap - configMap:: { - local __configMapMixin(configMap) = __activeMixin({ configMap+: configMap }), - mixinInstance(configMap):: __configMapMixin(configMap), - // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. - withKubeletConfigKey(kubeletConfigKey):: self + __configMapMixin({ kubeletConfigKey: kubeletConfigKey }), - // Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. - withName(name):: self + __configMapMixin({ name: name }), - // Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. - withNamespace(namespace):: self + __configMapMixin({ namespace: namespace }), - // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withResourceVersion(resourceVersion):: self + __configMapMixin({ resourceVersion: resourceVersion }), - // UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withUid(uid):: self + __configMapMixin({ uid: uid }), - }, - configMapType:: hidden.core.v1.configMapNodeConfigSource, - }, - activeType:: hidden.core.v1.nodeConfigSource, - // Assigned reports the checkpointed config the node will try to use. When Node.Spec.ConfigSource is updated, the node checkpoints the associated config payload to local disk, along with a record indicating intended config. The node refers to this record to choose its config checkpoint, and reports this record in Assigned. Assigned only updates in the status after the record has been checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned config the Active config by loading and validating the checkpointed payload identified by Assigned. - assigned:: { - local __assignedMixin(assigned) = { assigned+: assigned }, - mixinInstance(assigned):: __assignedMixin(assigned), - // ConfigMap is a reference to a Node's ConfigMap - configMap:: { - local __configMapMixin(configMap) = __assignedMixin({ configMap+: configMap }), - mixinInstance(configMap):: __configMapMixin(configMap), - // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. - withKubeletConfigKey(kubeletConfigKey):: self + __configMapMixin({ kubeletConfigKey: kubeletConfigKey }), - // Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. - withName(name):: self + __configMapMixin({ name: name }), - // Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. - withNamespace(namespace):: self + __configMapMixin({ namespace: namespace }), - // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withResourceVersion(resourceVersion):: self + __configMapMixin({ resourceVersion: resourceVersion }), - // UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withUid(uid):: self + __configMapMixin({ uid: uid }), - }, - configMapType:: hidden.core.v1.configMapNodeConfigSource, - }, - assignedType:: hidden.core.v1.nodeConfigSource, - // LastKnownGood reports the checkpointed config the node will fall back to when it encounters an error attempting to use the Assigned config. The Assigned config becomes the LastKnownGood config when the node determines that the Assigned config is stable and correct. This is currently implemented as a 10-minute soak period starting when the local record of Assigned config is updated. If the Assigned config is Active at the end of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, because the local default config is always assumed good. You should not make assumptions about the node's method of determining config stability and correctness, as this may change or become configurable in the future. - lastKnownGood:: { - local __lastKnownGoodMixin(lastKnownGood) = { lastKnownGood+: lastKnownGood }, - mixinInstance(lastKnownGood):: __lastKnownGoodMixin(lastKnownGood), - // ConfigMap is a reference to a Node's ConfigMap - configMap:: { - local __configMapMixin(configMap) = __lastKnownGoodMixin({ configMap+: configMap }), - mixinInstance(configMap):: __configMapMixin(configMap), - // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. - withKubeletConfigKey(kubeletConfigKey):: self + __configMapMixin({ kubeletConfigKey: kubeletConfigKey }), - // Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. - withName(name):: self + __configMapMixin({ name: name }), - // Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. - withNamespace(namespace):: self + __configMapMixin({ namespace: namespace }), - // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withResourceVersion(resourceVersion):: self + __configMapMixin({ resourceVersion: resourceVersion }), - // UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withUid(uid):: self + __configMapMixin({ uid: uid }), - }, - configMapType:: hidden.core.v1.configMapNodeConfigSource, - }, - lastKnownGoodType:: hidden.core.v1.nodeConfigSource, - }, - }, - // NodeDaemonEndpoints lists ports opened by daemons running on the Node. - nodeDaemonEndpoints:: { - new():: {}, - mixin:: { - // Endpoint on which Kubelet is listening. - kubeletEndpoint:: { - local __kubeletEndpointMixin(kubeletEndpoint) = { kubeletEndpoint+: kubeletEndpoint }, - mixinInstance(kubeletEndpoint):: __kubeletEndpointMixin(kubeletEndpoint), - // Port number of the given endpoint. - withPort(port):: self + __kubeletEndpointMixin({ Port: port }), - }, - kubeletEndpointType:: hidden.core.v1.daemonEndpoint, - }, - }, - // NodeList is the whole list of all Nodes which have been registered with master. - nodeList:: { - new(items=''):: self.withItems(items), - // List of nodes - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of nodes - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.node, - mixin:: {}, - }, - // 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. - nodeSelector:: { - new():: {}, - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then { nodeSelectorTerms: nodeSelectorTerms } else { nodeSelectorTerms: [nodeSelectorTerms] }, - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then { nodeSelectorTerms+: nodeSelectorTerms } else { nodeSelectorTerms+: [nodeSelectorTerms] }, - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - mixin:: {}, - }, - // A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - nodeSelectorRequirement:: { - new():: {}, - // The label key that the selector applies to. - withKey(key):: self + { key: key }, - // Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - withOperator(operator):: self + { operator: 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. - withValues(values):: self + if std.type(values) == 'array' then { values: values } else { values: [values] }, - // 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. - withValuesMixin(values):: self + if std.type(values) == 'array' then { values+: values } else { values+: [values] }, - mixin:: {}, - }, - // 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. - nodeSelectorTerm:: { - new():: {}, - // A list of node selector requirements by node's labels. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then { matchExpressions: matchExpressions } else { matchExpressions: [matchExpressions] }, - // A list of node selector requirements by node's labels. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then { matchExpressions+: matchExpressions } else { matchExpressions+: [matchExpressions] }, - matchExpressionsType:: hidden.core.v1.nodeSelectorRequirement, - // A list of node selector requirements by node's fields. - withMatchFields(matchFields):: self + if std.type(matchFields) == 'array' then { matchFields: matchFields } else { matchFields: [matchFields] }, - // A list of node selector requirements by node's fields. - withMatchFieldsMixin(matchFields):: self + if std.type(matchFields) == 'array' then { matchFields+: matchFields } else { matchFields+: [matchFields] }, - matchFieldsType:: hidden.core.v1.nodeSelectorRequirement, - mixin:: {}, - }, - // NodeSpec describes the attributes that a node is created with. - nodeSpec:: { - new():: {}, - // Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966 - withExternalId(externalId):: self + { externalID: externalId }, - // PodCIDR represents the pod IP range assigned to the node. - withPodCidr(podCidr):: self + { podCIDR: podCidr }, - // ID of the node assigned by the cloud provider in the format: :// - withProviderId(providerId):: self + { providerID: providerId }, - // If specified, the node's taints. - withTaints(taints):: self + if std.type(taints) == 'array' then { taints: taints } else { taints: [taints] }, - // If specified, the node's taints. - withTaintsMixin(taints):: self + if std.type(taints) == 'array' then { taints+: taints } else { taints+: [taints] }, - taintsType:: hidden.core.v1.taint, - // Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration - withUnschedulable(unschedulable):: self + { unschedulable: unschedulable }, - mixin:: { - // If specified, the source to get node configuration from The DynamicKubeletConfig feature gate must be enabled for the Kubelet to use this field - configSource:: { - local __configSourceMixin(configSource) = { configSource+: configSource }, - mixinInstance(configSource):: __configSourceMixin(configSource), - // ConfigMap is a reference to a Node's ConfigMap - configMap:: { - local __configMapMixin(configMap) = __configSourceMixin({ configMap+: configMap }), - mixinInstance(configMap):: __configMapMixin(configMap), - // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. - withKubeletConfigKey(kubeletConfigKey):: self + __configMapMixin({ kubeletConfigKey: kubeletConfigKey }), - // Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. - withName(name):: self + __configMapMixin({ name: name }), - // Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. - withNamespace(namespace):: self + __configMapMixin({ namespace: namespace }), - // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withResourceVersion(resourceVersion):: self + __configMapMixin({ resourceVersion: resourceVersion }), - // UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withUid(uid):: self + __configMapMixin({ uid: uid }), - }, - configMapType:: hidden.core.v1.configMapNodeConfigSource, - }, - configSourceType:: hidden.core.v1.nodeConfigSource, - }, - }, - // NodeStatus is information about the current status of a node. - nodeStatus:: { - new():: {}, - // List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses - withAddresses(addresses):: self + if std.type(addresses) == 'array' then { addresses: addresses } else { addresses: [addresses] }, - // List of addresses reachable to the node. Queried from cloud provider, if available. More info: https://kubernetes.io/docs/concepts/nodes/node/#addresses - withAddressesMixin(addresses):: self + if std.type(addresses) == 'array' then { addresses+: addresses } else { addresses+: [addresses] }, - addressesType:: hidden.core.v1.nodeAddress, - // Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity. - withAllocatable(allocatable):: self + { allocatable: allocatable }, - // Allocatable represents the resources of a node that are available for scheduling. Defaults to Capacity. - withAllocatableMixin(allocatable):: self + { allocatable+: allocatable }, - // Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - withCapacity(capacity):: self + { capacity: capacity }, - // Capacity represents the total resources of a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - withCapacityMixin(capacity):: self + { capacity+: capacity }, - // Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Conditions is an array of current observed node conditions. More info: https://kubernetes.io/docs/concepts/nodes/node/#condition - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.core.v1.nodeCondition, - // List of container images on this node - withImages(images):: self + if std.type(images) == 'array' then { images: images } else { images: [images] }, - // List of container images on this node - withImagesMixin(images):: self + if std.type(images) == 'array' then { images+: images } else { images+: [images] }, - imagesType:: hidden.core.v1.containerImage, - // NodePhase is the recently observed lifecycle phase of the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#phase The field is never populated, and now is deprecated. - withPhase(phase):: self + { phase: phase }, - // List of volumes that are attached to the node. - withVolumesAttached(volumesAttached):: self + if std.type(volumesAttached) == 'array' then { volumesAttached: volumesAttached } else { volumesAttached: [volumesAttached] }, - // List of volumes that are attached to the node. - withVolumesAttachedMixin(volumesAttached):: self + if std.type(volumesAttached) == 'array' then { volumesAttached+: volumesAttached } else { volumesAttached+: [volumesAttached] }, - volumesAttachedType:: hidden.core.v1.attachedVolume, - // List of attachable volumes in use (mounted) by the node. - withVolumesInUse(volumesInUse):: self + if std.type(volumesInUse) == 'array' then { volumesInUse: volumesInUse } else { volumesInUse: [volumesInUse] }, - // List of attachable volumes in use (mounted) by the node. - withVolumesInUseMixin(volumesInUse):: self + if std.type(volumesInUse) == 'array' then { volumesInUse+: volumesInUse } else { volumesInUse+: [volumesInUse] }, - mixin:: { - // Status of the config assigned to the node via the dynamic Kubelet config feature. - config:: { - local __configMixin(config) = { config+: config }, - mixinInstance(config):: __configMixin(config), - // Active reports the checkpointed config the node is actively using. Active will represent either the current version of the Assigned config, or the current LastKnownGood config, depending on whether attempting to use the Assigned config results in an error. - active:: { - local __activeMixin(active) = __configMixin({ active+: active }), - mixinInstance(active):: __activeMixin(active), - // ConfigMap is a reference to a Node's ConfigMap - configMap:: { - local __configMapMixin(configMap) = __activeMixin({ configMap+: configMap }), - mixinInstance(configMap):: __configMapMixin(configMap), - // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. - withKubeletConfigKey(kubeletConfigKey):: self + __configMapMixin({ kubeletConfigKey: kubeletConfigKey }), - // Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. - withName(name):: self + __configMapMixin({ name: name }), - // Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. - withNamespace(namespace):: self + __configMapMixin({ namespace: namespace }), - // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withResourceVersion(resourceVersion):: self + __configMapMixin({ resourceVersion: resourceVersion }), - // UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withUid(uid):: self + __configMapMixin({ uid: uid }), - }, - configMapType:: hidden.core.v1.configMapNodeConfigSource, - }, - activeType:: hidden.core.v1.nodeConfigSource, - // Assigned reports the checkpointed config the node will try to use. When Node.Spec.ConfigSource is updated, the node checkpoints the associated config payload to local disk, along with a record indicating intended config. The node refers to this record to choose its config checkpoint, and reports this record in Assigned. Assigned only updates in the status after the record has been checkpointed to disk. When the Kubelet is restarted, it tries to make the Assigned config the Active config by loading and validating the checkpointed payload identified by Assigned. - assigned:: { - local __assignedMixin(assigned) = __configMixin({ assigned+: assigned }), - mixinInstance(assigned):: __assignedMixin(assigned), - // ConfigMap is a reference to a Node's ConfigMap - configMap:: { - local __configMapMixin(configMap) = __assignedMixin({ configMap+: configMap }), - mixinInstance(configMap):: __configMapMixin(configMap), - // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. - withKubeletConfigKey(kubeletConfigKey):: self + __configMapMixin({ kubeletConfigKey: kubeletConfigKey }), - // Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. - withName(name):: self + __configMapMixin({ name: name }), - // Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. - withNamespace(namespace):: self + __configMapMixin({ namespace: namespace }), - // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withResourceVersion(resourceVersion):: self + __configMapMixin({ resourceVersion: resourceVersion }), - // UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withUid(uid):: self + __configMapMixin({ uid: uid }), - }, - configMapType:: hidden.core.v1.configMapNodeConfigSource, - }, - assignedType:: hidden.core.v1.nodeConfigSource, - // Error describes any problems reconciling the Spec.ConfigSource to the Active config. Errors may occur, for example, attempting to checkpoint Spec.ConfigSource to the local Assigned record, attempting to checkpoint the payload associated with Spec.ConfigSource, attempting to load or validate the Assigned config, etc. Errors may occur at different points while syncing config. Earlier errors (e.g. download or checkpointing errors) will not result in a rollback to LastKnownGood, and may resolve across Kubelet retries. Later errors (e.g. loading or validating a checkpointed config) will result in a rollback to LastKnownGood. In the latter case, it is usually possible to resolve the error by fixing the config assigned in Spec.ConfigSource. You can find additional information for debugging by searching the error message in the Kubelet log. Error is a human-readable description of the error state; machines can check whether or not Error is empty, but should not rely on the stability of the Error text across Kubelet versions. - withErrorParam(errorParam):: self + __configMixin({ "error": errorParam }), - // LastKnownGood reports the checkpointed config the node will fall back to when it encounters an error attempting to use the Assigned config. The Assigned config becomes the LastKnownGood config when the node determines that the Assigned config is stable and correct. This is currently implemented as a 10-minute soak period starting when the local record of Assigned config is updated. If the Assigned config is Active at the end of this period, it becomes the LastKnownGood. Note that if Spec.ConfigSource is reset to nil (use local defaults), the LastKnownGood is also immediately reset to nil, because the local default config is always assumed good. You should not make assumptions about the node's method of determining config stability and correctness, as this may change or become configurable in the future. - lastKnownGood:: { - local __lastKnownGoodMixin(lastKnownGood) = __configMixin({ lastKnownGood+: lastKnownGood }), - mixinInstance(lastKnownGood):: __lastKnownGoodMixin(lastKnownGood), - // ConfigMap is a reference to a Node's ConfigMap - configMap:: { - local __configMapMixin(configMap) = __lastKnownGoodMixin({ configMap+: configMap }), - mixinInstance(configMap):: __configMapMixin(configMap), - // KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. - withKubeletConfigKey(kubeletConfigKey):: self + __configMapMixin({ kubeletConfigKey: kubeletConfigKey }), - // Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. - withName(name):: self + __configMapMixin({ name: name }), - // Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. - withNamespace(namespace):: self + __configMapMixin({ namespace: namespace }), - // ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withResourceVersion(resourceVersion):: self + __configMapMixin({ resourceVersion: resourceVersion }), - // UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. - withUid(uid):: self + __configMapMixin({ uid: uid }), - }, - configMapType:: hidden.core.v1.configMapNodeConfigSource, - }, - lastKnownGoodType:: hidden.core.v1.nodeConfigSource, - }, - configType:: hidden.core.v1.nodeConfigStatus, - // Endpoints of daemons running on the Node. - daemonEndpoints:: { - local __daemonEndpointsMixin(daemonEndpoints) = { daemonEndpoints+: daemonEndpoints }, - mixinInstance(daemonEndpoints):: __daemonEndpointsMixin(daemonEndpoints), - // Endpoint on which Kubelet is listening. - kubeletEndpoint:: { - local __kubeletEndpointMixin(kubeletEndpoint) = __daemonEndpointsMixin({ kubeletEndpoint+: kubeletEndpoint }), - mixinInstance(kubeletEndpoint):: __kubeletEndpointMixin(kubeletEndpoint), - // Port number of the given endpoint. - withPort(port):: self + __kubeletEndpointMixin({ Port: port }), - }, - kubeletEndpointType:: hidden.core.v1.daemonEndpoint, - }, - daemonEndpointsType:: hidden.core.v1.nodeDaemonEndpoints, - // Set of ids/uuids to uniquely identify the node. More info: https://kubernetes.io/docs/concepts/nodes/node/#info - nodeInfo:: { - local __nodeInfoMixin(nodeInfo) = { nodeInfo+: nodeInfo }, - mixinInstance(nodeInfo):: __nodeInfoMixin(nodeInfo), - // The Architecture reported by the node - withArchitecture(architecture):: self + __nodeInfoMixin({ architecture: architecture }), - // Boot ID reported by the node. - withBootId(bootId):: self + __nodeInfoMixin({ bootID: bootId }), - // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). - withContainerRuntimeVersion(containerRuntimeVersion):: self + __nodeInfoMixin({ containerRuntimeVersion: containerRuntimeVersion }), - // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). - withKernelVersion(kernelVersion):: self + __nodeInfoMixin({ kernelVersion: kernelVersion }), - // KubeProxy Version reported by the node. - withKubeProxyVersion(kubeProxyVersion):: self + __nodeInfoMixin({ kubeProxyVersion: kubeProxyVersion }), - // Kubelet Version reported by the node. - withKubeletVersion(kubeletVersion):: self + __nodeInfoMixin({ kubeletVersion: kubeletVersion }), - // MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - withMachineId(machineId):: self + __nodeInfoMixin({ machineID: machineId }), - // The Operating System reported by the node - withOperatingSystem(operatingSystem):: self + __nodeInfoMixin({ operatingSystem: operatingSystem }), - // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). - withOsImage(osImage):: self + __nodeInfoMixin({ osImage: osImage }), - // SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html - withSystemUuid(systemUuid):: self + __nodeInfoMixin({ systemUUID: systemUuid }), - }, - nodeInfoType:: hidden.core.v1.nodeSystemInfo, - }, - }, - // NodeSystemInfo is a set of ids/uuids to uniquely identify the node. - nodeSystemInfo:: { - new():: {}, - // The Architecture reported by the node - withArchitecture(architecture):: self + { architecture: architecture }, - // Boot ID reported by the node. - withBootId(bootId):: self + { bootID: bootId }, - // ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0). - withContainerRuntimeVersion(containerRuntimeVersion):: self + { containerRuntimeVersion: containerRuntimeVersion }, - // Kernel Version reported by the node from 'uname -r' (e.g. 3.16.0-0.bpo.4-amd64). - withKernelVersion(kernelVersion):: self + { kernelVersion: kernelVersion }, - // KubeProxy Version reported by the node. - withKubeProxyVersion(kubeProxyVersion):: self + { kubeProxyVersion: kubeProxyVersion }, - // Kubelet Version reported by the node. - withKubeletVersion(kubeletVersion):: self + { kubeletVersion: kubeletVersion }, - // MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html - withMachineId(machineId):: self + { machineID: machineId }, - // The Operating System reported by the node - withOperatingSystem(operatingSystem):: self + { operatingSystem: operatingSystem }, - // OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)). - withOsImage(osImage):: self + { osImage: osImage }, - // SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html - withSystemUuid(systemUuid):: self + { systemUUID: systemUuid }, - mixin:: {}, - }, - // ObjectFieldSelector selects an APIVersioned field of an object. - objectFieldSelector:: { - new():: {}, - // Path of the field to select in the specified API version. - withFieldPath(fieldPath):: self + { fieldPath: fieldPath }, - mixin:: {}, - }, - // ObjectReference contains enough information to let you inspect or modify the referred object. - objectReference:: { - new():: {}, - // 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. - withFieldPath(fieldPath):: self + { fieldPath: fieldPath }, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + { name: name }, - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + { namespace: namespace }, - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + { resourceVersion: resourceVersion }, - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + { uid: uid }, - mixin:: {}, - }, - // PersistentVolumeClaimCondition contails details about state of pvc - persistentVolumeClaimCondition:: { - new():: {}, - // Last time we probed the condition. - withLastProbeTime(lastProbeTime):: self + { lastProbeTime: lastProbeTime }, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // Human-readable message indicating details about last transition. - withMessage(message):: self + { message: message }, - // Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports "ResizeStarted" that means the underlying persistent volume is being resized. - withReason(reason):: self + { reason: reason }, - withStatus(status):: self + { status: status }, - withType(type):: self + { type: type }, - mixin:: {}, - }, - // PersistentVolumeClaimList is a list of PersistentVolumeClaim items. - persistentVolumeClaimList:: { - new(items=''):: self.withItems(items), - // A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // A list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.persistentVolumeClaim, - mixin:: {}, - }, - // PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes - persistentVolumeClaimSpec:: { - new():: {}, - // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - withAccessModes(accessModes):: self + if std.type(accessModes) == 'array' then { accessModes: accessModes } else { accessModes: [accessModes] }, - // AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - withAccessModesMixin(accessModes):: self + if std.type(accessModes) == 'array' then { accessModes+: accessModes } else { accessModes+: [accessModes] }, - // Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - withStorageClassName(storageClassName):: self + { storageClassName: storageClassName }, - // volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature. - withVolumeMode(volumeMode):: self + { volumeMode: volumeMode }, - // VolumeName is the binding reference to the PersistentVolume backing this claim. - withVolumeName(volumeName):: self + { volumeName: volumeName }, - mixin:: { - // This field requires the VolumeSnapshotDataSource alpha feature gate to be enabled and currently VolumeSnapshot is the only supported data source. If the provisioner can support VolumeSnapshot data source, it will create a new volume and data will be restored to the volume at the same time. If the provisioner does not support VolumeSnapshot data source, volume will not be created and the failure will be reported as an event. In the future, we plan to support more data source types and the behavior of the provisioner may change. - dataSource:: { - local __dataSourceMixin(dataSource) = { dataSource+: dataSource }, - mixinInstance(dataSource):: __dataSourceMixin(dataSource), - // 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. - withApiGroup(apiGroup):: self + __dataSourceMixin({ apiGroup: apiGroup }), - // Kind is the type of resource being referenced - withKind(kind):: self + __dataSourceMixin({ kind: kind }), - // Name is the name of resource being referenced - withName(name):: self + __dataSourceMixin({ name: name }), - }, - dataSourceType:: hidden.core.v1.typedLocalObjectReference, - // Resources represents the minimum resources the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - resources:: { - local __resourcesMixin(resources) = { resources+: resources }, - mixinInstance(resources):: __resourcesMixin(resources), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimits(limits):: self + __resourcesMixin({ limits: limits }), - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimitsMixin(limits):: self + __resourcesMixin({ limits+: 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-compute-resources-container/ - withRequests(requests):: self + __resourcesMixin({ requests: requests }), - // 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-compute-resources-container/ - withRequestsMixin(requests):: self + __resourcesMixin({ requests+: requests }), - }, - resourcesType:: hidden.core.v1.resourceRequirements, - // A label query over volumes to consider for binding. - selector:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - }, - // PersistentVolumeClaimStatus is the current status of a persistent volume claim. - persistentVolumeClaimStatus:: { - new():: {}, - // AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - withAccessModes(accessModes):: self + if std.type(accessModes) == 'array' then { accessModes: accessModes } else { accessModes: [accessModes] }, - // AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - withAccessModesMixin(accessModes):: self + if std.type(accessModes) == 'array' then { accessModes+: accessModes } else { accessModes+: [accessModes] }, - // Represents the actual resources of the underlying volume. - withCapacity(capacity):: self + { capacity: capacity }, - // Represents the actual resources of the underlying volume. - withCapacityMixin(capacity):: self + { capacity+: capacity }, - // Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.core.v1.persistentVolumeClaimCondition, - // Phase represents the current phase of PersistentVolumeClaim. - withPhase(phase):: self + { phase: phase }, - mixin:: {}, - }, - // 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). - persistentVolumeClaimVolumeSource:: { - new():: {}, - // 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 - withClaimName(claimName):: self + { claimName: claimName }, - // Will force the ReadOnly setting in VolumeMounts. Default false. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - mixin:: {}, - }, - // PersistentVolumeList is a list of PersistentVolume items. - persistentVolumeList:: { - new(items=''):: self.withItems(items), - // List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of persistent volumes. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.persistentVolume, - mixin:: {}, - }, - // PersistentVolumeSpec is the specification of a persistent volume. - persistentVolumeSpec:: { - new():: {}, - // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - withAccessModes(accessModes):: self + if std.type(accessModes) == 'array' then { accessModes: accessModes } else { accessModes: [accessModes] }, - // AccessModes contains all ways the volume can be mounted. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes - withAccessModesMixin(accessModes):: self + if std.type(accessModes) == 'array' then { accessModes+: accessModes } else { accessModes+: [accessModes] }, - // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - withCapacity(capacity):: self + { capacity: capacity }, - // A description of the persistent volume's resources and capacity. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity - withCapacityMixin(capacity):: self + { capacity+: capacity }, - // 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 - withMountOptions(mountOptions):: self + if std.type(mountOptions) == 'array' then { mountOptions: mountOptions } else { mountOptions: [mountOptions] }, - // 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 - withMountOptionsMixin(mountOptions):: self + if std.type(mountOptions) == 'array' then { mountOptions+: mountOptions } else { mountOptions+: [mountOptions] }, - // 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 - withPersistentVolumeReclaimPolicy(persistentVolumeReclaimPolicy):: self + { persistentVolumeReclaimPolicy: persistentVolumeReclaimPolicy }, - // Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass. - withStorageClassName(storageClassName):: self + { storageClassName: storageClassName }, - // 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. This is a beta feature. - withVolumeMode(volumeMode):: self + { volumeMode: volumeMode }, - mixin:: { - // 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:: { - local __awsElasticBlockStoreMixin(awsElasticBlockStore) = { awsElasticBlockStore+: awsElasticBlockStore }, - mixinInstance(awsElasticBlockStore):: __awsElasticBlockStoreMixin(awsElasticBlockStore), - // 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 - withFsType(fsType):: self + __awsElasticBlockStoreMixin({ fsType: 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). - withPartition(partition):: self + __awsElasticBlockStoreMixin({ partition: 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 - withReadOnly(readOnly):: self + __awsElasticBlockStoreMixin({ readOnly: readOnly }), - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - withVolumeId(volumeId):: self + __awsElasticBlockStoreMixin({ volumeID: volumeId }), - }, - awsElasticBlockStoreType:: hidden.core.v1.awsElasticBlockStoreVolumeSource, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk:: { - local __azureDiskMixin(azureDisk) = { azureDisk+: azureDisk }, - mixinInstance(azureDisk):: __azureDiskMixin(azureDisk), - // Host Caching mode: None, Read Only, Read Write. - withCachingMode(cachingMode):: self + __azureDiskMixin({ cachingMode: cachingMode }), - // The Name of the data disk in the blob storage - withDiskName(diskName):: self + __azureDiskMixin({ diskName: diskName }), - // The URI the data disk in the blob storage - withDiskUri(diskUri):: self + __azureDiskMixin({ diskURI: diskUri }), - // 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. - withFsType(fsType):: self + __azureDiskMixin({ fsType: fsType }), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __azureDiskMixin({ readOnly: readOnly }), - }, - azureDiskType:: hidden.core.v1.azureDiskVolumeSource, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile:: { - local __azureFileMixin(azureFile) = { azureFile+: azureFile }, - mixinInstance(azureFile):: __azureFileMixin(azureFile), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __azureFileMixin({ readOnly: readOnly }), - // the name of secret that contains Azure Storage Account Name and Key - withSecretName(secretName):: self + __azureFileMixin({ secretName: secretName }), - // the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod - withSecretNamespace(secretNamespace):: self + __azureFileMixin({ secretNamespace: secretNamespace }), - // Share Name - withShareName(shareName):: self + __azureFileMixin({ shareName: shareName }), - }, - azureFileType:: hidden.core.v1.azureFilePersistentVolumeSource, - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs:: { - local __cephfsMixin(cephfs) = { cephfs+: cephfs }, - mixinInstance(cephfs):: __cephfsMixin(cephfs), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == 'array' then __cephfsMixin({ monitors: monitors }) else __cephfsMixin({ monitors: [monitors] }), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == 'array' then __cephfsMixin({ monitors+: monitors }) else __cephfsMixin({ monitors+: [monitors] }), - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - withPath(path):: self + __cephfsMixin({ path: path }), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withReadOnly(readOnly):: self + __cephfsMixin({ readOnly: readOnly }), - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withSecretFile(secretFile):: self + __cephfsMixin({ secretFile: secretFile }), - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __cephfsMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withUser(user):: self + __cephfsMixin({ user: user }), - }, - cephfsType:: hidden.core.v1.cephFsPersistentVolumeSource, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder:: { - local __cinderMixin(cinder) = { cinder+: cinder }, - mixinInstance(cinder):: __cinderMixin(cinder), - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withFsType(fsType):: self + __cinderMixin({ fsType: fsType }), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withReadOnly(readOnly):: self + __cinderMixin({ readOnly: readOnly }), - // Optional: points to a secret object containing parameters used to connect to OpenStack. - secretRef:: { - local __secretRefMixin(secretRef) = __cinderMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withVolumeId(volumeId):: self + __cinderMixin({ volumeID: volumeId }), - }, - cinderType:: hidden.core.v1.cinderPersistentVolumeSource, - // 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:: { - local __claimRefMixin(claimRef) = { claimRef+: claimRef }, - mixinInstance(claimRef):: __claimRefMixin(claimRef), - // 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. - withFieldPath(fieldPath):: self + __claimRefMixin({ fieldPath: fieldPath }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __claimRefMixin({ name: name }), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __claimRefMixin({ namespace: namespace }), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __claimRefMixin({ resourceVersion: resourceVersion }), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __claimRefMixin({ uid: uid }), - }, - claimRefType:: hidden.core.v1.objectReference, - // CSI represents storage that is handled by an external CSI driver (Beta feature). - csi:: { - local __csiMixin(csi) = { csi+: csi }, - mixinInstance(csi):: __csiMixin(csi), - // 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:: { - local __controllerPublishSecretRefMixin(controllerPublishSecretRef) = __csiMixin({ controllerPublishSecretRef+: controllerPublishSecretRef }), - mixinInstance(controllerPublishSecretRef):: __controllerPublishSecretRefMixin(controllerPublishSecretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __controllerPublishSecretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __controllerPublishSecretRefMixin({ namespace: namespace }), - }, - controllerPublishSecretRefType:: hidden.core.v1.secretReference, - // Driver is the name of the driver to use for this volume. Required. - withDriver(driver):: self + __csiMixin({ driver: driver }), - // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". - withFsType(fsType):: self + __csiMixin({ fsType: 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:: { - local __nodePublishSecretRefMixin(nodePublishSecretRef) = __csiMixin({ nodePublishSecretRef+: nodePublishSecretRef }), - mixinInstance(nodePublishSecretRef):: __nodePublishSecretRefMixin(nodePublishSecretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __nodePublishSecretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __nodePublishSecretRefMixin({ namespace: namespace }), - }, - nodePublishSecretRefType:: hidden.core.v1.secretReference, - // 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:: { - local __nodeStageSecretRefMixin(nodeStageSecretRef) = __csiMixin({ nodeStageSecretRef+: nodeStageSecretRef }), - mixinInstance(nodeStageSecretRef):: __nodeStageSecretRefMixin(nodeStageSecretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __nodeStageSecretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __nodeStageSecretRefMixin({ namespace: namespace }), - }, - nodeStageSecretRefType:: hidden.core.v1.secretReference, - // Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write). - withReadOnly(readOnly):: self + __csiMixin({ readOnly: readOnly }), - // Attributes of the volume to publish. - withVolumeAttributes(volumeAttributes):: self + __csiMixin({ volumeAttributes: volumeAttributes }), - // Attributes of the volume to publish. - withVolumeAttributesMixin(volumeAttributes):: self + __csiMixin({ volumeAttributes+: volumeAttributes }), - // VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required. - withVolumeHandle(volumeHandle):: self + __csiMixin({ volumeHandle: volumeHandle }), - }, - csiType:: hidden.core.v1.csiPersistentVolumeSource, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc:: { - local __fcMixin(fc) = { fc+: fc }, - mixinInstance(fc):: __fcMixin(fc), - // 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. - withFsType(fsType):: self + __fcMixin({ fsType: fsType }), - // Optional: FC target lun number - withLun(lun):: self + __fcMixin({ lun: lun }), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __fcMixin({ readOnly: readOnly }), - // Optional: FC target worldwide names (WWNs) - withTargetWwns(targetWwns):: self + if std.type(targetWwns) == 'array' then __fcMixin({ targetWWNs: targetWwns }) else __fcMixin({ targetWWNs: [targetWwns] }), - // Optional: FC target worldwide names (WWNs) - withTargetWwnsMixin(targetWwns):: self + if std.type(targetWwns) == 'array' then __fcMixin({ targetWWNs+: targetWwns }) else __fcMixin({ targetWWNs+: [targetWwns] }), - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwids(wwids):: self + if std.type(wwids) == 'array' then __fcMixin({ wwids: wwids }) else __fcMixin({ wwids: [wwids] }), - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwidsMixin(wwids):: self + if std.type(wwids) == 'array' then __fcMixin({ wwids+: wwids }) else __fcMixin({ wwids+: [wwids] }), - }, - fcType:: hidden.core.v1.fcVolumeSource, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. - flexVolume:: { - local __flexVolumeMixin(flexVolume) = { flexVolume+: flexVolume }, - mixinInstance(flexVolume):: __flexVolumeMixin(flexVolume), - // Driver is the name of the driver to use for this volume. - withDriver(driver):: self + __flexVolumeMixin({ driver: 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. - withFsType(fsType):: self + __flexVolumeMixin({ fsType: fsType }), - // Optional: Extra command options if any. - withOptions(options):: self + __flexVolumeMixin({ options: options }), - // Optional: Extra command options if any. - withOptionsMixin(options):: self + __flexVolumeMixin({ options+: options }), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __flexVolumeMixin({ readOnly: 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:: { - local __secretRefMixin(secretRef) = __flexVolumeMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - }, - flexVolumeType:: hidden.core.v1.flexPersistentVolumeSource, - // 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:: { - local __flockerMixin(flocker) = { flocker+: flocker }, - mixinInstance(flocker):: __flockerMixin(flocker), - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - withDatasetName(datasetName):: self + __flockerMixin({ datasetName: datasetName }), - // UUID of the dataset. This is unique identifier of a Flocker dataset - withDatasetUuid(datasetUuid):: self + __flockerMixin({ datasetUUID: datasetUuid }), - }, - flockerType:: hidden.core.v1.flockerVolumeSource, - // 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:: { - local __gcePersistentDiskMixin(gcePersistentDisk) = { gcePersistentDisk+: gcePersistentDisk }, - mixinInstance(gcePersistentDisk):: __gcePersistentDiskMixin(gcePersistentDisk), - // 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 - withFsType(fsType):: self + __gcePersistentDiskMixin({ fsType: 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 - withPartition(partition):: self + __gcePersistentDiskMixin({ partition: partition }), - // 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 - withPdName(pdName):: self + __gcePersistentDiskMixin({ pdName: pdName }), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - withReadOnly(readOnly):: self + __gcePersistentDiskMixin({ readOnly: readOnly }), - }, - gcePersistentDiskType:: hidden.core.v1.gcePersistentDiskVolumeSource, - // Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. Provisioned by an admin. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs:: { - local __glusterfsMixin(glusterfs) = { glusterfs+: glusterfs }, - mixinInstance(glusterfs):: __glusterfsMixin(glusterfs), - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withEndpoints(endpoints):: self + __glusterfsMixin({ endpoints: endpoints }), - // 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://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withEndpointsNamespace(endpointsNamespace):: self + __glusterfsMixin({ endpointsNamespace: endpointsNamespace }), - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withPath(path):: self + __glusterfsMixin({ path: path }), - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withReadOnly(readOnly):: self + __glusterfsMixin({ readOnly: readOnly }), - }, - glusterfsType:: hidden.core.v1.glusterfsPersistentVolumeSource, - // 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:: { - local __hostPathMixin(hostPath) = { hostPath+: hostPath }, - mixinInstance(hostPath):: __hostPathMixin(hostPath), - // 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 - withPath(path):: self + __hostPathMixin({ path: path }), - // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - withType(type):: self + __hostPathMixin({ type: type }), - }, - hostPathType:: hidden.core.v1.hostPathVolumeSource, - // 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:: { - local __iscsiMixin(iscsi) = { iscsi+: iscsi }, - mixinInstance(iscsi):: __iscsiMixin(iscsi), - // whether support iSCSI Discovery CHAP authentication - withChapAuthDiscovery(chapAuthDiscovery):: self + __iscsiMixin({ chapAuthDiscovery: chapAuthDiscovery }), - // whether support iSCSI Session CHAP authentication - withChapAuthSession(chapAuthSession):: self + __iscsiMixin({ chapAuthSession: 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 - withFsType(fsType):: self + __iscsiMixin({ fsType: fsType }), - // Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - withInitiatorName(initiatorName):: self + __iscsiMixin({ initiatorName: initiatorName }), - // Target iSCSI Qualified Name. - withIqn(iqn):: self + __iscsiMixin({ iqn: iqn }), - // iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). - withIscsiInterface(iscsiInterface):: self + __iscsiMixin({ iscsiInterface: iscsiInterface }), - // iSCSI Target Lun number. - withLun(lun):: self + __iscsiMixin({ lun: lun }), - // 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). - withPortals(portals):: self + if std.type(portals) == 'array' then __iscsiMixin({ portals: portals }) else __iscsiMixin({ portals: [portals] }), - // 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). - withPortalsMixin(portals):: self + if std.type(portals) == 'array' then __iscsiMixin({ portals+: portals }) else __iscsiMixin({ portals+: [portals] }), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - withReadOnly(readOnly):: self + __iscsiMixin({ readOnly: readOnly }), - // CHAP Secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = __iscsiMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - // 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). - withTargetPortal(targetPortal):: self + __iscsiMixin({ targetPortal: targetPortal }), - }, - iscsiType:: hidden.core.v1.iscsiPersistentVolumeSource, - // Local represents directly-attached storage with node affinity - localStorage:: { - local __localStorageMixin(localStorage) = { localStorage+: localStorage }, - mixinInstance(localStorage):: __localStorageMixin(localStorage), - // 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. - withFsType(fsType):: self + __localStorageMixin({ fsType: fsType }), - // The full path to the volume on the node. It can be either a directory or block device (disk, partition, ...). - withPath(path):: self + __localStorageMixin({ path: path }), - }, - localType:: hidden.core.v1.localVolumeSource, - // NFS represents an NFS mount on the host. Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - nfs:: { - local __nfsMixin(nfs) = { nfs+: nfs }, - mixinInstance(nfs):: __nfsMixin(nfs), - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withPath(path):: self + __nfsMixin({ path: path }), - // 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 - withReadOnly(readOnly):: self + __nfsMixin({ readOnly: readOnly }), - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withServer(server):: self + __nfsMixin({ server: server }), - }, - nfsType:: hidden.core.v1.nfsVolumeSource, - // 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:: { - local __nodeAffinityMixin(nodeAffinity) = { nodeAffinity+: nodeAffinity }, - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // Required specifies hard node constraints that must be met. - required:: { - local __requiredMixin(required) = __nodeAffinityMixin({ required+: required }), - mixinInstance(required):: __requiredMixin(required), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.volumeNodeAffinity, - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk:: { - local __photonPersistentDiskMixin(photonPersistentDisk) = { photonPersistentDisk+: photonPersistentDisk }, - mixinInstance(photonPersistentDisk):: __photonPersistentDiskMixin(photonPersistentDisk), - // 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. - withFsType(fsType):: self + __photonPersistentDiskMixin({ fsType: fsType }), - // ID that identifies Photon Controller persistent disk - withPdId(pdId):: self + __photonPersistentDiskMixin({ pdID: pdId }), - }, - photonPersistentDiskType:: hidden.core.v1.photonPersistentDiskVolumeSource, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume:: { - local __portworxVolumeMixin(portworxVolume) = { portworxVolume+: portworxVolume }, - mixinInstance(portworxVolume):: __portworxVolumeMixin(portworxVolume), - // 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. - withFsType(fsType):: self + __portworxVolumeMixin({ fsType: fsType }), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __portworxVolumeMixin({ readOnly: readOnly }), - // VolumeID uniquely identifies a Portworx volume - withVolumeId(volumeId):: self + __portworxVolumeMixin({ volumeID: volumeId }), - }, - portworxVolumeType:: hidden.core.v1.portworxVolumeSource, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte:: { - local __quobyteMixin(quobyte) = { quobyte+: quobyte }, - mixinInstance(quobyte):: __quobyteMixin(quobyte), - // Group to map volume access to Default is no group - withGroup(group):: self + __quobyteMixin({ group: group }), - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - withReadOnly(readOnly):: self + __quobyteMixin({ readOnly: readOnly }), - // 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 - withRegistry(registry):: self + __quobyteMixin({ registry: registry }), - // Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin - withTenant(tenant):: self + __quobyteMixin({ tenant: tenant }), - // User to map volume access to Defaults to serivceaccount user - withUser(user):: self + __quobyteMixin({ user: user }), - // Volume is a string that references an already created Quobyte volume by name. - withVolume(volume):: self + __quobyteMixin({ volume: volume }), - }, - quobyteType:: hidden.core.v1.quobyteVolumeSource, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd:: { - local __rbdMixin(rbd) = { rbd+: rbd }, - mixinInstance(rbd):: __rbdMixin(rbd), - // 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 - withFsType(fsType):: self + __rbdMixin({ fsType: fsType }), - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withImage(image):: self + __rbdMixin({ image: image }), - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withKeyring(keyring):: self + __rbdMixin({ keyring: keyring }), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == 'array' then __rbdMixin({ monitors: monitors }) else __rbdMixin({ monitors: [monitors] }), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == 'array' then __rbdMixin({ monitors+: monitors }) else __rbdMixin({ monitors+: [monitors] }), - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withPool(pool):: self + __rbdMixin({ pool: pool }), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withReadOnly(readOnly):: self + __rbdMixin({ readOnly: readOnly }), - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __rbdMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withUser(user):: self + __rbdMixin({ user: user }), - }, - rbdType:: hidden.core.v1.rbdPersistentVolumeSource, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIo:: { - local __scaleIoMixin(scaleIo) = { scaleIo+: scaleIo }, - mixinInstance(scaleIo):: __scaleIoMixin(scaleIo), - // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs" - withFsType(fsType):: self + __scaleIoMixin({ fsType: fsType }), - // The host address of the ScaleIO API Gateway. - withGateway(gateway):: self + __scaleIoMixin({ gateway: gateway }), - // The name of the ScaleIO Protection Domain for the configured storage. - withProtectionDomain(protectionDomain):: self + __scaleIoMixin({ protectionDomain: protectionDomain }), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __scaleIoMixin({ readOnly: readOnly }), - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = __scaleIoMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - // Flag to enable/disable SSL communication with Gateway, default false - withSslEnabled(sslEnabled):: self + __scaleIoMixin({ sslEnabled: sslEnabled }), - // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. - withStorageMode(storageMode):: self + __scaleIoMixin({ storageMode: storageMode }), - // The ScaleIO Storage Pool associated with the protection domain. - withStoragePool(storagePool):: self + __scaleIoMixin({ storagePool: storagePool }), - // The name of the storage system as configured in ScaleIO. - withSystem(system):: self + __scaleIoMixin({ system: system }), - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - withVolumeName(volumeName):: self + __scaleIoMixin({ volumeName: volumeName }), - }, - scaleIOType:: hidden.core.v1.scaleIoPersistentVolumeSource, - // StorageOS represents a StorageOS volume that is attached to the kubelet's host machine and mounted into the pod More info: https://releases.k8s.io/HEAD/examples/volumes/storageos/README.md - storageos:: { - local __storageosMixin(storageos) = { storageos+: storageos }, - mixinInstance(storageos):: __storageosMixin(storageos), - // 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. - withFsType(fsType):: self + __storageosMixin({ fsType: fsType }), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __storageosMixin({ readOnly: readOnly }), - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = __storageosMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // 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. - withFieldPath(fieldPath):: self + __secretRefMixin({ fieldPath: fieldPath }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __secretRefMixin({ resourceVersion: resourceVersion }), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __secretRefMixin({ uid: uid }), - }, - secretRefType:: hidden.core.v1.objectReference, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - withVolumeName(volumeName):: self + __storageosMixin({ volumeName: 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. - withVolumeNamespace(volumeNamespace):: self + __storageosMixin({ volumeNamespace: volumeNamespace }), - }, - storageosType:: hidden.core.v1.storageOsPersistentVolumeSource, - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume:: { - local __vsphereVolumeMixin(vsphereVolume) = { vsphereVolume+: vsphereVolume }, - mixinInstance(vsphereVolume):: __vsphereVolumeMixin(vsphereVolume), - // 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. - withFsType(fsType):: self + __vsphereVolumeMixin({ fsType: fsType }), - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - withStoragePolicyId(storagePolicyId):: self + __vsphereVolumeMixin({ storagePolicyID: storagePolicyId }), - // Storage Policy Based Management (SPBM) profile name. - withStoragePolicyName(storagePolicyName):: self + __vsphereVolumeMixin({ storagePolicyName: storagePolicyName }), - // Path that identifies vSphere volume vmdk - withVolumePath(volumePath):: self + __vsphereVolumeMixin({ volumePath: volumePath }), - }, - vsphereVolumeType:: hidden.core.v1.vsphereVirtualDiskVolumeSource, - }, - }, - // PersistentVolumeStatus is the current status of a persistent volume. - persistentVolumeStatus:: { - new():: {}, - // A human-readable message indicating details about why the volume is in this state. - withMessage(message):: self + { message: message }, - // Phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase - withPhase(phase):: self + { phase: phase }, - // Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI. - withReason(reason):: self + { reason: reason }, - mixin:: {}, - }, - // Represents a Photon Controller persistent disk resource. - photonPersistentDiskVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + { fsType: fsType }, - // ID that identifies Photon Controller persistent disk - withPdId(pdId):: self + { pdID: pdId }, - mixin:: {}, - }, - // Pod affinity is a group of inter pod affinity scheduling rules. - podAffinity:: { - new():: {}, - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then { preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution } else { preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }, - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then { preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution } else { preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }, - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then { requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution } else { requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then { requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution } else { requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - mixin:: {}, - }, - // 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 - podAffinityTerm:: { - new():: {}, - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - withNamespaces(namespaces):: self + if std.type(namespaces) == 'array' then { namespaces: namespaces } else { namespaces: [namespaces] }, - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - withNamespacesMixin(namespaces):: self + if std.type(namespaces) == 'array' then { namespaces+: namespaces } else { namespaces+: [namespaces] }, - // 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. - withTopologyKey(topologyKey):: self + { topologyKey: topologyKey }, - mixin:: { - // A label query over a set of resources, in this case pods. - labelSelector:: { - local __labelSelectorMixin(labelSelector) = { labelSelector+: labelSelector }, - mixinInstance(labelSelector):: __labelSelectorMixin(labelSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __labelSelectorMixin({ matchExpressions: matchExpressions }) else __labelSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __labelSelectorMixin({ matchExpressions+: matchExpressions }) else __labelSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __labelSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __labelSelectorMixin({ matchLabels+: matchLabels }), - }, - labelSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // Pod anti affinity is a group of inter pod anti affinity scheduling rules. - podAntiAffinity:: { - new():: {}, - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then { preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution } else { preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }, - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then { preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution } else { preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }, - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then { requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution } else { requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then { requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution } else { requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - mixin:: {}, - }, - // PodCondition contains details for the current condition of this pod. - podCondition:: { - new():: {}, - // Last time we probed the condition. - withLastProbeTime(lastProbeTime):: self + { lastProbeTime: lastProbeTime }, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // Human-readable message indicating details about last transition. - withMessage(message):: self + { message: message }, - // Unique, one-word, CamelCase reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - withStatus(status):: self + { status: status }, - // Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - withType(type):: self + { type: type }, - mixin:: {}, - }, - // PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy. - podDnsConfig:: { - new():: {}, - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then { nameservers: nameservers } else { nameservers: [nameservers] }, - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then { nameservers+: nameservers } else { nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then { options: options } else { options: [options] }, - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then { options+: options } else { options+: [options] }, - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then { searches: searches } else { searches: [searches] }, - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then { searches+: searches } else { searches+: [searches] }, - mixin:: {}, - }, - // PodDNSConfigOption defines DNS resolver options of a pod. - podDnsConfigOption:: { - new():: {}, - // Required. - withName(name):: self + { name: name }, - withValue(value):: self + { value: value }, - mixin:: {}, - }, - // PodList is a list of Pods. - podList:: { - new(items=''):: self.withItems(items), - // List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of pods. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.pod, - mixin:: {}, - }, - // PodReadinessGate contains the reference to a pod condition - podReadinessGate:: { - new():: {}, - // ConditionType refers to a condition in the pod's condition list with matching type. - withConditionType(conditionType):: self + { conditionType: conditionType }, - mixin:: {}, - }, - // 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. - podSecurityContext:: { - new():: {}, - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + { fsGroup: fsGroup }, - // 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. - withRunAsGroup(runAsGroup):: self + { runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + { runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + { runAsUser: runAsUser }, - // 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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then { supplementalGroups: supplementalGroups } else { supplementalGroups: [supplementalGroups] }, - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then { supplementalGroups+: supplementalGroups } else { supplementalGroups+: [supplementalGroups] }, - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then { sysctls: sysctls } else { sysctls: [sysctls] }, - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then { sysctls+: sysctls } else { sysctls+: [sysctls] }, - sysctlsType:: hidden.core.v1.sysctl, - mixin:: { - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = { seLinuxOptions+: seLinuxOptions }, - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - }, - // PodSpec is a description of a pod. - podSpec:: { - new():: {}, - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + { activeDeadlineSeconds: activeDeadlineSeconds }, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + { automountServiceAccountToken: automountServiceAccountToken }, - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then { containers: containers } else { containers: [containers] }, - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then { containers+: containers } else { containers+: [containers] }, - containersType:: hidden.core.v1.container, - // 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'. - withDnsPolicy(dnsPolicy):: self + { dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + { enableServiceLinks: enableServiceLinks }, - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then { hostAliases: hostAliases } else { hostAliases: [hostAliases] }, - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then { hostAliases+: hostAliases } else { hostAliases+: [hostAliases] }, - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + { hostIPC: hostIpc }, - // 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. - withHostNetwork(hostNetwork):: self + { hostNetwork: hostNetwork }, - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + { hostPID: hostPid }, - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + { hostname: hostname }, - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then { imagePullSecrets: imagePullSecrets } else { imagePullSecrets: [imagePullSecrets] }, - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then { imagePullSecrets+: imagePullSecrets } else { imagePullSecrets+: [imagePullSecrets] }, - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then { initContainers: initContainers } else { initContainers: [initContainers] }, - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then { initContainers+: initContainers } else { initContainers+: [initContainers] }, - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + { nodeName: 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/ - withNodeSelector(nodeSelector):: self + { nodeSelector: nodeSelector }, - // 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/ - withNodeSelectorMixin(nodeSelector):: self + { nodeSelector+: nodeSelector }, - // 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. - withPriority(priority):: self + { priority: 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. - withPriorityClassName(priorityClassName):: self + { priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then { readinessGates: readinessGates } else { readinessGates: [readinessGates] }, - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then { readinessGates+: readinessGates } else { readinessGates+: [readinessGates] }, - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + { restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + { runtimeClassName: runtimeClassName }, - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + { schedulerName: schedulerName }, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + { serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + { serviceAccountName: serviceAccountName }, - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + { shareProcessNamespace: shareProcessNamespace }, - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + { subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + { terminationGracePeriodSeconds: terminationGracePeriodSeconds }, - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then { tolerations: tolerations } else { tolerations: [tolerations] }, - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then { tolerations+: tolerations } else { tolerations+: [tolerations] }, - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then { volumes: volumes } else { volumes: [volumes] }, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then { volumes+: volumes } else { volumes+: [volumes] }, - volumesType:: hidden.core.v1.volume, - mixin:: { - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = { affinity+: affinity }, - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = { dnsConfig+: dnsConfig }, - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. - securityContext:: { - local __securityContextMixin(securityContext) = { securityContext+: securityContext }, - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - }, - }, - // PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane. - podStatus:: { - new():: {}, - // Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.core.v1.podCondition, - // The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - withContainerStatuses(containerStatuses):: self + if std.type(containerStatuses) == 'array' then { containerStatuses: containerStatuses } else { containerStatuses: [containerStatuses] }, - // The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - withContainerStatusesMixin(containerStatuses):: self + if std.type(containerStatuses) == 'array' then { containerStatuses+: containerStatuses } else { containerStatuses+: [containerStatuses] }, - containerStatusesType:: hidden.core.v1.containerStatus, - // IP address of the host to which the pod is assigned. Empty if not yet scheduled. - withHostIp(hostIp):: self + { hostIP: hostIp }, - // The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - withInitContainerStatuses(initContainerStatuses):: self + if std.type(initContainerStatuses) == 'array' then { initContainerStatuses: initContainerStatuses } else { initContainerStatuses: [initContainerStatuses] }, - // The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status - withInitContainerStatusesMixin(initContainerStatuses):: self + if std.type(initContainerStatuses) == 'array' then { initContainerStatuses+: initContainerStatuses } else { initContainerStatuses+: [initContainerStatuses] }, - initContainerStatusesType:: hidden.core.v1.containerStatus, - // A human readable message indicating details about why the pod is in this condition. - withMessage(message):: self + { message: message }, - // nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled. - withNominatedNodeName(nominatedNodeName):: self + { nominatedNodeName: nominatedNodeName }, - // The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod's status. There are five possible phase values: - // - // Pending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod. - // - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase - withPhase(phase):: self + { phase: phase }, - // IP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated. - withPodIp(podIp):: self + { podIP: podIp }, - // The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://git.k8s.io/community/contributors/design-proposals/node/resource-qos.md - withQosClass(qosClass):: self + { qosClass: qosClass }, - // A brief CamelCase message indicating details about why the pod is in this state. e.g. 'Evicted' - withReason(reason):: self + { reason: reason }, - // RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod. - withStartTime(startTime):: self + { startTime: startTime }, - mixin:: {}, - }, - // PodTemplateList is a list of PodTemplates. - podTemplateList:: { - new(items=''):: self.withItems(items), - // List of pod templates - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of pod templates - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.podTemplate, - mixin:: {}, - }, - // PodTemplateSpec describes the data a pod should have when created from a template - podTemplateSpec:: { - new():: {}, - mixin:: { - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = { metadata+: metadata }, - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = { spec+: spec }, - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - }, - // PortworxVolumeSource represents a Portworx volume resource. - portworxVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + { fsType: fsType }, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // VolumeID uniquely identifies a Portworx volume - withVolumeId(volumeId):: self + { volumeID: volumeId }, - mixin:: {}, - }, - // 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). - preferredSchedulingTerm:: { - new():: {}, - // Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. - withWeight(weight):: self + { weight: weight }, - mixin:: { - // A node selector term, associated with the corresponding weight. - preference:: { - local __preferenceMixin(preference) = { preference+: preference }, - mixinInstance(preference):: __preferenceMixin(preference), - // A list of node selector requirements by node's labels. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __preferenceMixin({ matchExpressions: matchExpressions }) else __preferenceMixin({ matchExpressions: [matchExpressions] }), - // A list of node selector requirements by node's labels. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __preferenceMixin({ matchExpressions+: matchExpressions }) else __preferenceMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.core.v1.nodeSelectorRequirement, - // A list of node selector requirements by node's fields. - withMatchFields(matchFields):: self + if std.type(matchFields) == 'array' then __preferenceMixin({ matchFields: matchFields }) else __preferenceMixin({ matchFields: [matchFields] }), - // A list of node selector requirements by node's fields. - withMatchFieldsMixin(matchFields):: self + if std.type(matchFields) == 'array' then __preferenceMixin({ matchFields+: matchFields }) else __preferenceMixin({ matchFields+: [matchFields] }), - matchFieldsType:: hidden.core.v1.nodeSelectorRequirement, - }, - preferenceType:: hidden.core.v1.nodeSelectorTerm, - }, - }, - // Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. - probe:: { - new():: {}, - // Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - withFailureThreshold(failureThreshold):: self + { failureThreshold: failureThreshold }, - // 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 - withInitialDelaySeconds(initialDelaySeconds):: self + { initialDelaySeconds: initialDelaySeconds }, - // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - withPeriodSeconds(periodSeconds):: self + { periodSeconds: periodSeconds }, - // Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. - withSuccessThreshold(successThreshold):: self + { successThreshold: successThreshold }, - // 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 - withTimeoutSeconds(timeoutSeconds):: self + { timeoutSeconds: timeoutSeconds }, - mixin:: { - // One and only one of the following should be specified. Exec specifies the action to take. - exec:: { - local __execMixin(exec) = { exec+: exec }, - mixinInstance(exec):: __execMixin(exec), - // 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. - withCommand(command):: self + if std.type(command) == 'array' then __execMixin({ command: command }) else __execMixin({ command: [command] }), - // 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. - withCommandMixin(command):: self + if std.type(command) == 'array' then __execMixin({ command+: command }) else __execMixin({ command+: [command] }), - }, - execType:: hidden.core.v1.execAction, - // HTTPGet specifies the http request to perform. - httpGet:: { - local __httpGetMixin(httpGet) = { httpGet+: httpGet }, - mixinInstance(httpGet):: __httpGetMixin(httpGet), - // Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - withHost(host):: self + __httpGetMixin({ host: host }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeaders(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders: httpHeaders }) else __httpGetMixin({ httpHeaders: [httpHeaders] }), - // Custom headers to set in the request. HTTP allows repeated headers. - withHttpHeadersMixin(httpHeaders):: self + if std.type(httpHeaders) == 'array' then __httpGetMixin({ httpHeaders+: httpHeaders }) else __httpGetMixin({ httpHeaders+: [httpHeaders] }), - httpHeadersType:: hidden.core.v1.httpHeader, - // Path to access on the HTTP server. - withPath(path):: self + __httpGetMixin({ path: path }), - // 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. - withPort(port):: self + __httpGetMixin({ port: port }), - // Scheme to use for connecting to the host. Defaults to HTTP. - withScheme(scheme):: self + __httpGetMixin({ scheme: scheme }), - }, - httpGetType:: hidden.core.v1.httpGetAction, - // TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported - tcpSocket:: { - local __tcpSocketMixin(tcpSocket) = { tcpSocket+: tcpSocket }, - mixinInstance(tcpSocket):: __tcpSocketMixin(tcpSocket), - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + __tcpSocketMixin({ host: host }), - // 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. - withPort(port):: self + __tcpSocketMixin({ port: port }), - }, - tcpSocketType:: hidden.core.v1.tcpSocketAction, - }, - }, - // Represents a projected volume source - projectedVolumeSource:: { - new():: {}, - // Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + { defaultMode: defaultMode }, - // list of volume projections - withSources(sources):: self + if std.type(sources) == 'array' then { sources: sources } else { sources: [sources] }, - // list of volume projections - withSourcesMixin(sources):: self + if std.type(sources) == 'array' then { sources+: sources } else { sources+: [sources] }, - sourcesType:: hidden.core.v1.volumeProjection, - mixin:: {}, - }, - // Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling. - quobyteVolumeSource:: { - new():: {}, - // Group to map volume access to Default is no group - withGroup(group):: self + { group: group }, - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // 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 - withRegistry(registry):: self + { registry: registry }, - // Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin - withTenant(tenant):: self + { tenant: tenant }, - // User to map volume access to Defaults to serivceaccount user - withUser(user):: self + { user: user }, - // Volume is a string that references an already created Quobyte volume by name. - withVolume(volume):: self + { volume: volume }, - mixin:: {}, - }, - // Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. - rbdPersistentVolumeSource:: { - new():: {}, - // 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 - withFsType(fsType):: self + { fsType: fsType }, - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withImage(image):: self + { image: image }, - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withKeyring(keyring):: self + { keyring: keyring }, - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == 'array' then { monitors: monitors } else { monitors: [monitors] }, - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == 'array' then { monitors+: monitors } else { monitors+: [monitors] }, - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withPool(pool):: self + { pool: pool }, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withUser(user):: self + { user: user }, - mixin:: { - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - }, - }, - // Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling. - rbdVolumeSource:: { - new():: {}, - // 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 - withFsType(fsType):: self + { fsType: fsType }, - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withImage(image):: self + { image: image }, - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withKeyring(keyring):: self + { keyring: keyring }, - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == 'array' then { monitors: monitors } else { monitors: [monitors] }, - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == 'array' then { monitors+: monitors } else { monitors+: [monitors] }, - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withPool(pool):: self + { pool: pool }, - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withUser(user):: self + { user: user }, - mixin:: { - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // ReplicationControllerCondition describes the state of a replication controller at a certain point. - replicationControllerCondition:: { - new():: {}, - // The last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of replication controller condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // ReplicationControllerList is a collection of replication controllers. - replicationControllerList:: { - new(items=''):: self.withItems(items), - // List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of replication controllers. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.replicationController, - mixin:: {}, - }, - // ReplicationControllerSpec is the specification of a replication controller. - replicationControllerSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + { minReadySeconds: 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 - withReplicas(replicas):: self + { replicas: 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 - withSelector(selector):: self + { selector: selector }, - // 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 - withSelectorMixin(selector):: self + { selector+: selector }, - mixin:: { - // 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:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // ReplicationControllerStatus represents the current status of a replication controller. - replicationControllerStatus:: { - new():: {}, - // The number of available replicas (ready for at least minReadySeconds) for this replication controller. - withAvailableReplicas(availableReplicas):: self + { availableReplicas: availableReplicas }, - // Represents the latest available observations of a replication controller's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a replication controller's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.core.v1.replicationControllerCondition, - // The number of pods that have labels matching the labels of the pod template of the replication controller. - withFullyLabeledReplicas(fullyLabeledReplicas):: self + { fullyLabeledReplicas: fullyLabeledReplicas }, - // ObservedGeneration reflects the generation of the most recently observed replication controller. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // The number of ready replicas for this replication controller. - withReadyReplicas(readyReplicas):: self + { readyReplicas: readyReplicas }, - // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller - withReplicas(replicas):: self + { replicas: replicas }, - mixin:: {}, - }, - // ResourceFieldSelector represents container resources (cpu, memory) and their output format - resourceFieldSelector:: { - new():: {}, - // Container name: required for volumes, optional for env vars - withContainerName(containerName):: self + { containerName: containerName }, - // Required: resource to select - withResource(resource):: self + { resource: resource }, - mixin:: { - // Specifies the output format of the exposed resources, defaults to "1" - divisor:: { - local __divisorMixin(divisor) = { divisor+: divisor }, - mixinInstance(divisor):: __divisorMixin(divisor), - }, - divisorType:: hidden.core.resource.quantity, - }, - }, - // ResourceQuotaList is a list of ResourceQuota items. - resourceQuotaList:: { - new(items=''):: self.withItems(items), - // Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of ResourceQuota objects. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.resourceQuota, - mixin:: {}, - }, - // ResourceQuotaSpec defines the desired hard limits to enforce for Quota. - resourceQuotaSpec:: { - new():: {}, - // hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - withHard(hard):: self + { hard: hard }, - // hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - withHardMixin(hard):: self + { hard+: hard }, - // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. - withScopes(scopes):: self + if std.type(scopes) == 'array' then { scopes: scopes } else { scopes: [scopes] }, - // A collection of filters that must match each object tracked by a quota. If not specified, the quota matches all objects. - withScopesMixin(scopes):: self + if std.type(scopes) == 'array' then { scopes+: scopes } else { scopes+: [scopes] }, - mixin:: { - // 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:: { - local __scopeSelectorMixin(scopeSelector) = { scopeSelector+: scopeSelector }, - mixinInstance(scopeSelector):: __scopeSelectorMixin(scopeSelector), - // A list of scope selector requirements by scope of the resources. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __scopeSelectorMixin({ matchExpressions: matchExpressions }) else __scopeSelectorMixin({ matchExpressions: [matchExpressions] }), - // A list of scope selector requirements by scope of the resources. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __scopeSelectorMixin({ matchExpressions+: matchExpressions }) else __scopeSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.core.v1.scopedResourceSelectorRequirement, - }, - scopeSelectorType:: hidden.core.v1.scopeSelector, - }, - }, - // ResourceQuotaStatus defines the enforced hard limits and observed use. - resourceQuotaStatus:: { - new():: {}, - // Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - withHard(hard):: self + { hard: hard }, - // Hard is the set of enforced hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ - withHardMixin(hard):: self + { hard+: hard }, - // Used is the current observed total usage of the resource in the namespace. - withUsed(used):: self + { used: used }, - // Used is the current observed total usage of the resource in the namespace. - withUsedMixin(used):: self + { used+: used }, - mixin:: {}, - }, - // ResourceRequirements describes the compute resource requirements. - resourceRequirements:: { - new():: {}, - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimits(limits):: self + { limits: limits }, - // Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - withLimitsMixin(limits):: self + { limits+: 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-compute-resources-container/ - withRequests(requests):: self + { requests: requests }, - // 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-compute-resources-container/ - withRequestsMixin(requests):: self + { requests+: requests }, - mixin:: {}, - }, - // ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume - scaleIoPersistentVolumeSource:: { - new():: {}, - // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs" - withFsType(fsType):: self + { fsType: fsType }, - // The host address of the ScaleIO API Gateway. - withGateway(gateway):: self + { gateway: gateway }, - // The name of the ScaleIO Protection Domain for the configured storage. - withProtectionDomain(protectionDomain):: self + { protectionDomain: protectionDomain }, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // Flag to enable/disable SSL communication with Gateway, default false - withSslEnabled(sslEnabled):: self + { sslEnabled: sslEnabled }, - // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. - withStorageMode(storageMode):: self + { storageMode: storageMode }, - // The ScaleIO Storage Pool associated with the protection domain. - withStoragePool(storagePool):: self + { storagePool: storagePool }, - // The name of the storage system as configured in ScaleIO. - withSystem(system):: self + { system: system }, - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - withVolumeName(volumeName):: self + { volumeName: volumeName }, - mixin:: { - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - }, - secretRefType:: hidden.core.v1.secretReference, - }, - }, - // ScaleIOVolumeSource represents a persistent ScaleIO volume - scaleIoVolumeSource:: { - new():: {}, - // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". - withFsType(fsType):: self + { fsType: fsType }, - // The host address of the ScaleIO API Gateway. - withGateway(gateway):: self + { gateway: gateway }, - // The name of the ScaleIO Protection Domain for the configured storage. - withProtectionDomain(protectionDomain):: self + { protectionDomain: protectionDomain }, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // Flag to enable/disable SSL communication with Gateway, default false - withSslEnabled(sslEnabled):: self + { sslEnabled: sslEnabled }, - // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. - withStorageMode(storageMode):: self + { storageMode: storageMode }, - // The ScaleIO Storage Pool associated with the protection domain. - withStoragePool(storagePool):: self + { storagePool: storagePool }, - // The name of the storage system as configured in ScaleIO. - withSystem(system):: self + { system: system }, - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - withVolumeName(volumeName):: self + { volumeName: volumeName }, - mixin:: { - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements. - scopeSelector:: { - new():: {}, - // A list of scope selector requirements by scope of the resources. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then { matchExpressions: matchExpressions } else { matchExpressions: [matchExpressions] }, - // A list of scope selector requirements by scope of the resources. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then { matchExpressions+: matchExpressions } else { matchExpressions+: [matchExpressions] }, - matchExpressionsType:: hidden.core.v1.scopedResourceSelectorRequirement, - mixin:: {}, - }, - // A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values. - scopedResourceSelectorRequirement:: { - new():: {}, - // Represents a scope's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. - withOperator(operator):: self + { operator: operator }, - // The name of the scope that the selector applies to. - withScopeName(scopeName):: self + { scopeName: 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. - withValues(values):: self + if std.type(values) == 'array' then { values: values } else { values: [values] }, - // 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. - withValuesMixin(values):: self + if std.type(values) == 'array' then { values+: values } else { values+: [values] }, - mixin:: {}, - }, - // SELinuxOptions are the labels to be applied to the container - seLinuxOptions:: { - new():: {}, - // Level is SELinux level label that applies to the container. - withLevel(level):: self + { level: level }, - // Role is a SELinux role label that applies to the container. - withRole(role):: self + { role: role }, - // Type is a SELinux type label that applies to the container. - withType(type):: self + { type: type }, - // User is a SELinux user label that applies to the container. - withUser(user):: self + { user: user }, - mixin:: {}, - }, - // 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. - secretEnvSource:: { - new():: {}, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + { name: name }, - // Specify whether the Secret must be defined - withOptional(optional):: self + { optional: optional }, - mixin:: {}, - }, - // SecretKeySelector selects a key of a Secret. - secretKeySelector:: { - new():: {}, - // The key of the secret to select from. Must be a valid secret key. - withKey(key):: self + { key: key }, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + { name: name }, - // Specify whether the Secret or it's key must be defined - withOptional(optional):: self + { optional: optional }, - mixin:: {}, - }, - // SecretList is a list of Secret. - secretList:: { - new(items=''):: self.withItems(items), - // Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of secret objects. More info: https://kubernetes.io/docs/concepts/configuration/secret - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.secret, - mixin:: {}, - }, - // 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. - secretProjection:: { - new():: {}, - // 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 '..'. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + { name: name }, - // Specify whether the Secret or its key must be defined - withOptional(optional):: self + { optional: optional }, - mixin:: {}, - }, - // SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace - secretReference:: { - new():: {}, - // Name is unique within a namespace to reference a secret resource. - withName(name):: self + { name: name }, - // Namespace defines the space within which the secret name must be unique. - withNamespace(namespace):: self + { namespace: namespace }, - mixin:: {}, - }, - // 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. - secretVolumeSource:: { - new():: {}, - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + { defaultMode: 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 '..'. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.keyToPath, - // Specify whether the Secret or it's keys must be defined - withOptional(optional):: self + { optional: optional }, - // Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - withSecretName(secretName):: self + { secretName: secretName }, - mixin:: {}, - }, - // 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. - securityContext:: { - new():: {}, - // 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 - withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + { allowPrivilegeEscalation: allowPrivilegeEscalation }, - // Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. - withPrivileged(privileged):: self + { privileged: 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. - withProcMount(procMount):: self + { procMount: procMount }, - // 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. - withRunAsGroup(runAsGroup):: self + { runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + { runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + { runAsUser: runAsUser }, - mixin:: { - // The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. - capabilities:: { - local __capabilitiesMixin(capabilities) = { capabilities+: capabilities }, - mixinInstance(capabilities):: __capabilitiesMixin(capabilities), - // Added capabilities - withAdd(add):: self + if std.type(add) == 'array' then __capabilitiesMixin({ add: add }) else __capabilitiesMixin({ add: [add] }), - // Added capabilities - withAddMixin(add):: self + if std.type(add) == 'array' then __capabilitiesMixin({ add+: add }) else __capabilitiesMixin({ add+: [add] }), - // Removed capabilities - withDrop(drop):: self + if std.type(drop) == 'array' then __capabilitiesMixin({ drop: drop }) else __capabilitiesMixin({ drop: [drop] }), - // Removed capabilities - withDropMixin(drop):: self + if std.type(drop) == 'array' then __capabilitiesMixin({ drop+: drop }) else __capabilitiesMixin({ drop+: [drop] }), - }, - capabilitiesType:: hidden.core.v1.capabilities, - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = { seLinuxOptions+: seLinuxOptions }, - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - }, - // ServiceAccountList is a list of ServiceAccount objects - serviceAccountList:: { - new(items=''):: self.withItems(items), - // List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.serviceAccount, - mixin:: {}, - }, - // 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). - serviceAccountTokenProjection:: { - new():: {}, - // 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. - withAudience(audience):: self + { audience: 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. - withExpirationSeconds(expirationSeconds):: self + { expirationSeconds: expirationSeconds }, - // Path is the path relative to the mount point of the file to project the token into. - withPath(path):: self + { path: path }, - mixin:: {}, - }, - // ServiceList holds a list of services. - serviceList:: { - new(items=''):: self.withItems(items), - // List of services - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of services - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.core.v1.service, - mixin:: {}, - }, - // ServicePort contains information on service's port. - servicePort:: { - new(port='', targetPort=''):: self.withPort(port).withTargetPort(targetPort), - newNamed(name='', port='', targetPort=''):: self.withName(name).withPort(port).withTargetPort(targetPort), - // The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the 'Name' field in EndpointPort objects. Optional if only one ServicePort is defined on this service. - withName(name):: self + { name: name }, - // The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport - withNodePort(nodePort):: self + { nodePort: nodePort }, - // The port that will be exposed by this service. - withPort(port):: self + { port: port }, - // The IP protocol for this port. Supports "TCP", "UDP", and "SCTP". Default is TCP. - withProtocol(protocol):: self + { protocol: 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 - withTargetPort(targetPort):: self + { targetPort: targetPort }, - mixin:: {}, - }, - // ServiceSpec describes the attributes that a user creates on a service. - serviceSpec:: { - new():: {}, - // clusterIP is the IP address of the service and is usually assigned randomly by the master. If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are "None", empty string (""), or a valid IP address. "None" can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - withClusterIp(clusterIp):: self + { clusterIP: clusterIp }, - // 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. - withExternalIps(externalIps):: self + if std.type(externalIps) == 'array' then { externalIPs: externalIps } else { externalIPs: [externalIps] }, - // 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. - withExternalIpsMixin(externalIps):: self + if std.type(externalIps) == 'array' then { externalIPs+: externalIps } else { externalIPs+: [externalIps] }, - // externalName is the external reference that kubedns or equivalent will return as a CNAME record for this service. No proxying will be involved. Must be a valid RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires Type to be ExternalName. - withExternalName(externalName):: self + { externalName: 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. - withExternalTrafficPolicy(externalTrafficPolicy):: self + { externalTrafficPolicy: externalTrafficPolicy }, - // healthCheckNodePort specifies the healthcheck nodePort for the service. If not specified, HealthCheckNodePort is created by the service api backend with the allocated nodePort. Will use user-specified nodePort value if specified by the client. Only effects when Type is set to LoadBalancer and ExternalTrafficPolicy is set to Local. - withHealthCheckNodePort(healthCheckNodePort):: self + { healthCheckNodePort: healthCheckNodePort }, - // 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. - withLoadBalancerIp(loadBalancerIp):: self + { loadBalancerIP: 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/configure-cloud-provider-firewall/ - withLoadBalancerSourceRanges(loadBalancerSourceRanges):: self + if std.type(loadBalancerSourceRanges) == 'array' then { loadBalancerSourceRanges: loadBalancerSourceRanges } else { loadBalancerSourceRanges: [loadBalancerSourceRanges] }, - // 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/configure-cloud-provider-firewall/ - withLoadBalancerSourceRangesMixin(loadBalancerSourceRanges):: self + if std.type(loadBalancerSourceRanges) == 'array' then { loadBalancerSourceRanges+: loadBalancerSourceRanges } else { loadBalancerSourceRanges+: [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 - withPorts(ports):: self + if std.type(ports) == 'array' then { ports: ports } else { ports: [ports] }, - // 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 - withPortsMixin(ports):: self + if std.type(ports) == 'array' then { ports+: ports } else { ports+: [ports] }, - portsType:: hidden.core.v1.servicePort, - // publishNotReadyAddresses, when set to true, indicates that DNS implementations must publish the notReadyAddresses of subsets for the Endpoints associated with the Service. The default value is false. The primary use case for setting this field is to use a StatefulSet's Headless Service to propagate SRV records for its Pods without respect to their readiness for purpose of peer discovery. - withPublishNotReadyAddresses(publishNotReadyAddresses):: self + { publishNotReadyAddresses: 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. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ - withSelector(selector):: self + { selector: selector }, - // 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. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/ - withSelectorMixin(selector):: self + { selector+: 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 - withSessionAffinity(sessionAffinity):: self + { sessionAffinity: sessionAffinity }, - // type determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to the specified externalName. "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. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types - withType(type):: self + { type: type }, - mixin:: { - // sessionAffinityConfig contains the configurations of session affinity. - sessionAffinityConfig:: { - local __sessionAffinityConfigMixin(sessionAffinityConfig) = { sessionAffinityConfig+: sessionAffinityConfig }, - mixinInstance(sessionAffinityConfig):: __sessionAffinityConfigMixin(sessionAffinityConfig), - // clientIP contains the configurations of Client IP based session affinity. - clientIp:: { - local __clientIpMixin(clientIp) = __sessionAffinityConfigMixin({ clientIp+: clientIp }), - mixinInstance(clientIp):: __clientIpMixin(clientIp), - // 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). - withTimeoutSeconds(timeoutSeconds):: self + __clientIpMixin({ timeoutSeconds: timeoutSeconds }), - }, - clientIPType:: hidden.core.v1.clientIpConfig, - }, - sessionAffinityConfigType:: hidden.core.v1.sessionAffinityConfig, - }, - }, - // ServiceStatus represents the current status of a service. - serviceStatus:: { - new():: {}, - mixin:: { - // LoadBalancer contains the current status of the load-balancer, if one is present. - loadBalancer:: { - local __loadBalancerMixin(loadBalancer) = { loadBalancer+: loadBalancer }, - mixinInstance(loadBalancer):: __loadBalancerMixin(loadBalancer), - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngress(ingress):: self + if std.type(ingress) == 'array' then __loadBalancerMixin({ ingress: ingress }) else __loadBalancerMixin({ ingress: [ingress] }), - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngressMixin(ingress):: self + if std.type(ingress) == 'array' then __loadBalancerMixin({ ingress+: ingress }) else __loadBalancerMixin({ ingress+: [ingress] }), - ingressType:: hidden.core.v1.loadBalancerIngress, - }, - loadBalancerType:: hidden.core.v1.loadBalancerStatus, - }, - }, - // SessionAffinityConfig represents the configurations of session affinity. - sessionAffinityConfig:: { - new():: {}, - mixin:: { - // clientIP contains the configurations of Client IP based session affinity. - clientIp:: { - local __clientIpMixin(clientIp) = { clientIp+: clientIp }, - mixinInstance(clientIp):: __clientIpMixin(clientIp), - // 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). - withTimeoutSeconds(timeoutSeconds):: self + __clientIpMixin({ timeoutSeconds: timeoutSeconds }), - }, - clientIPType:: hidden.core.v1.clientIpConfig, - }, - }, - // Represents a StorageOS persistent volume resource. - storageOsPersistentVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + { fsType: fsType }, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - withVolumeName(volumeName):: self + { volumeName: 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. - withVolumeNamespace(volumeNamespace):: self + { volumeNamespace: volumeNamespace }, - mixin:: { - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // 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. - withFieldPath(fieldPath):: self + __secretRefMixin({ fieldPath: fieldPath }), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - // Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ - withNamespace(namespace):: self + __secretRefMixin({ namespace: namespace }), - // Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency - withResourceVersion(resourceVersion):: self + __secretRefMixin({ resourceVersion: resourceVersion }), - // UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids - withUid(uid):: self + __secretRefMixin({ uid: uid }), - }, - secretRefType:: hidden.core.v1.objectReference, - }, - }, - // Represents a StorageOS persistent volume resource. - storageOsVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + { fsType: fsType }, - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - withVolumeName(volumeName):: self + { volumeName: 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. - withVolumeNamespace(volumeNamespace):: self + { volumeNamespace: volumeNamespace }, - mixin:: { - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = { secretRef+: secretRef }, - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - }, - // Sysctl defines a kernel parameter to be set - sysctl:: { - new():: {}, - // Name of a property to set - withName(name):: self + { name: name }, - // Value of a property to set - withValue(value):: self + { value: value }, - mixin:: {}, - }, - // The node this Taint is attached to has the "effect" on any pod that does not tolerate the Taint. - taint:: { - new():: {}, - // Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute. - withEffect(effect):: self + { effect: effect }, - // Required. The taint key to be applied to a node. - withKey(key):: self + { key: key }, - // TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints. - withTimeAdded(timeAdded):: self + { timeAdded: timeAdded }, - // Required. The taint value corresponding to the taint key. - withValue(value):: self + { value: value }, - mixin:: {}, - }, - // TCPSocketAction describes an action based on opening a socket - tcpSocketAction:: { - new():: {}, - // Optional: Host name to connect to, defaults to the pod IP. - withHost(host):: self + { host: host }, - // 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. - withPort(port):: self + { port: port }, - mixin:: {}, - }, - // The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator . - toleration:: { - new():: {}, - // Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - withEffect(effect):: self + { effect: 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. - withKey(key):: self + { key: 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. - withOperator(operator):: self + { operator: 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. - withTolerationSeconds(tolerationSeconds):: self + { tolerationSeconds: 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. - withValue(value):: self + { value: value }, - mixin:: {}, - }, - // A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future. - topologySelectorLabelRequirement:: { - new():: {}, - // The label key that the selector applies to. - withKey(key):: self + { key: key }, - // An array of string values. One value must match the label to be selected. Each entry in Values is ORed. - withValues(values):: self + if std.type(values) == 'array' then { values: values } else { values: [values] }, - // An array of string values. One value must match the label to be selected. Each entry in Values is ORed. - withValuesMixin(values):: self + if std.type(values) == 'array' then { values+: values } else { values+: [values] }, - mixin:: {}, - }, - // 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. - topologySelectorTerm:: { - new():: {}, - // A list of topology selector requirements by labels. - withMatchLabelExpressions(matchLabelExpressions):: self + if std.type(matchLabelExpressions) == 'array' then { matchLabelExpressions: matchLabelExpressions } else { matchLabelExpressions: [matchLabelExpressions] }, - // A list of topology selector requirements by labels. - withMatchLabelExpressionsMixin(matchLabelExpressions):: self + if std.type(matchLabelExpressions) == 'array' then { matchLabelExpressions+: matchLabelExpressions } else { matchLabelExpressions+: [matchLabelExpressions] }, - matchLabelExpressionsType:: hidden.core.v1.topologySelectorLabelRequirement, - mixin:: {}, - }, - // TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace. - typedLocalObjectReference:: { - new():: {}, - // 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. - withApiGroup(apiGroup):: self + { apiGroup: apiGroup }, - // Kind is the type of resource being referenced - withKind(kind):: self + { kind: kind }, - // Name is the name of resource being referenced - withName(name):: self + { name: name }, - mixin:: {}, - }, - // Volume represents a named volume in a pod that may be accessed by any container in the pod. - volume:: { - fromConfigMap(name='', configMapName='', configMapItems=''):: self.withName(name) + self.mixin.configMap.withItems(configMapItems).withName(configMapName), - fromEmptyDir(name='', emptyDir={}):: self.withName(name) + self.mixin.emptyDir.mixinInstance(emptyDir), - fromPersistentVolumeClaim(name='', emptyDir=''):: self.withName(name) + self.mixin.persistentVolumeClaim.withClaimName(emptyDir), - fromHostPath(name='', hostPath=''):: self.withName(name) + self.mixin.hostPath.withPath(hostPath), - fromSecret(name='', secretName=''):: self.withName(name) + self.mixin.secret.withSecretName(secretName), - // 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 - withName(name):: self + { name: name }, - mixin:: { - // 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:: { - local __awsElasticBlockStoreMixin(awsElasticBlockStore) = { awsElasticBlockStore+: awsElasticBlockStore }, - mixinInstance(awsElasticBlockStore):: __awsElasticBlockStoreMixin(awsElasticBlockStore), - // 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 - withFsType(fsType):: self + __awsElasticBlockStoreMixin({ fsType: 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). - withPartition(partition):: self + __awsElasticBlockStoreMixin({ partition: 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 - withReadOnly(readOnly):: self + __awsElasticBlockStoreMixin({ readOnly: readOnly }), - // Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - withVolumeId(volumeId):: self + __awsElasticBlockStoreMixin({ volumeID: volumeId }), - }, - awsElasticBlockStoreType:: hidden.core.v1.awsElasticBlockStoreVolumeSource, - // AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - azureDisk:: { - local __azureDiskMixin(azureDisk) = { azureDisk+: azureDisk }, - mixinInstance(azureDisk):: __azureDiskMixin(azureDisk), - // Host Caching mode: None, Read Only, Read Write. - withCachingMode(cachingMode):: self + __azureDiskMixin({ cachingMode: cachingMode }), - // The Name of the data disk in the blob storage - withDiskName(diskName):: self + __azureDiskMixin({ diskName: diskName }), - // The URI the data disk in the blob storage - withDiskUri(diskUri):: self + __azureDiskMixin({ diskURI: diskUri }), - // 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. - withFsType(fsType):: self + __azureDiskMixin({ fsType: fsType }), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __azureDiskMixin({ readOnly: readOnly }), - }, - azureDiskType:: hidden.core.v1.azureDiskVolumeSource, - // AzureFile represents an Azure File Service mount on the host and bind mount to the pod. - azureFile:: { - local __azureFileMixin(azureFile) = { azureFile+: azureFile }, - mixinInstance(azureFile):: __azureFileMixin(azureFile), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __azureFileMixin({ readOnly: readOnly }), - // the name of secret that contains Azure Storage Account Name and Key - withSecretName(secretName):: self + __azureFileMixin({ secretName: secretName }), - // Share Name - withShareName(shareName):: self + __azureFileMixin({ shareName: shareName }), - }, - azureFileType:: hidden.core.v1.azureFileVolumeSource, - // CephFS represents a Ceph FS mount on the host that shares a pod's lifetime - cephfs:: { - local __cephfsMixin(cephfs) = { cephfs+: cephfs }, - mixinInstance(cephfs):: __cephfsMixin(cephfs), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == 'array' then __cephfsMixin({ monitors: monitors }) else __cephfsMixin({ monitors: [monitors] }), - // Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == 'array' then __cephfsMixin({ monitors+: monitors }) else __cephfsMixin({ monitors+: [monitors] }), - // Optional: Used as the mounted root, rather than the full Ceph tree, default is / - withPath(path):: self + __cephfsMixin({ path: path }), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withReadOnly(readOnly):: self + __cephfsMixin({ readOnly: readOnly }), - // Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withSecretFile(secretFile):: self + __cephfsMixin({ secretFile: secretFile }), - // Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __cephfsMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it - withUser(user):: self + __cephfsMixin({ user: user }), - }, - cephfsType:: hidden.core.v1.cephFsVolumeSource, - // Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - cinder:: { - local __cinderMixin(cinder) = { cinder+: cinder }, - mixinInstance(cinder):: __cinderMixin(cinder), - // 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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withFsType(fsType):: self + __cinderMixin({ fsType: fsType }), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withReadOnly(readOnly):: self + __cinderMixin({ readOnly: readOnly }), - // Optional: points to a secret object containing parameters used to connect to OpenStack. - secretRef:: { - local __secretRefMixin(secretRef) = __cinderMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md - withVolumeId(volumeId):: self + __cinderMixin({ volumeID: volumeId }), - }, - cinderType:: hidden.core.v1.cinderVolumeSource, - // ConfigMap represents a configMap that should populate this volume - configMap:: { - local __configMapMixin(configMap) = { configMap+: configMap }, - mixinInstance(configMap):: __configMapMixin(configMap), - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + __configMapMixin({ defaultMode: 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 '..'. - withItems(items):: self + if std.type(items) == 'array' then __configMapMixin({ items: items }) else __configMapMixin({ items: [items] }), - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == 'array' then __configMapMixin({ items+: items }) else __configMapMixin({ items+: [items] }), - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapMixin({ name: name }), - // Specify whether the ConfigMap or it's keys must be defined - withOptional(optional):: self + __configMapMixin({ optional: optional }), - }, - configMapType:: hidden.core.v1.configMapVolumeSource, - // CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature). - csi:: { - local __csiMixin(csi) = { csi+: csi }, - mixinInstance(csi):: __csiMixin(csi), - // 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. - withDriver(driver):: self + __csiMixin({ driver: 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. - withFsType(fsType):: self + __csiMixin({ fsType: 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:: { - local __nodePublishSecretRefMixin(nodePublishSecretRef) = __csiMixin({ nodePublishSecretRef+: nodePublishSecretRef }), - mixinInstance(nodePublishSecretRef):: __nodePublishSecretRefMixin(nodePublishSecretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __nodePublishSecretRefMixin({ name: name }), - }, - nodePublishSecretRefType:: hidden.core.v1.localObjectReference, - // Specifies a read-only configuration for the volume. Defaults to false (read/write). - withReadOnly(readOnly):: self + __csiMixin({ readOnly: readOnly }), - // VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. - withVolumeAttributes(volumeAttributes):: self + __csiMixin({ volumeAttributes: volumeAttributes }), - // VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. - withVolumeAttributesMixin(volumeAttributes):: self + __csiMixin({ volumeAttributes+: volumeAttributes }), - }, - csiType:: hidden.core.v1.csiVolumeSource, - // DownwardAPI represents downward API about the pod that should populate this volume - downwardApi:: { - local __downwardApiMixin(downwardApi) = { downwardApi+: downwardApi }, - mixinInstance(downwardApi):: __downwardApiMixin(downwardApi), - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + __downwardApiMixin({ defaultMode: defaultMode }), - // Items is a list of downward API volume file - withItems(items):: self + if std.type(items) == 'array' then __downwardApiMixin({ items: items }) else __downwardApiMixin({ items: [items] }), - // Items is a list of downward API volume file - withItemsMixin(items):: self + if std.type(items) == 'array' then __downwardApiMixin({ items+: items }) else __downwardApiMixin({ items+: [items] }), - itemsType:: hidden.core.v1.downwardApiVolumeFile, - }, - downwardAPIType:: hidden.core.v1.downwardApiVolumeSource, - // EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - emptyDir:: { - local __emptyDirMixin(emptyDir) = { emptyDir+: emptyDir }, - mixinInstance(emptyDir):: __emptyDirMixin(emptyDir), - // 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 - withMedium(medium):: self + __emptyDirMixin({ medium: 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:: { - local __sizeLimitMixin(sizeLimit) = __emptyDirMixin({ sizeLimit+: sizeLimit }), - mixinInstance(sizeLimit):: __sizeLimitMixin(sizeLimit), - }, - sizeLimitType:: hidden.core.resource.quantity, - }, - emptyDirType:: hidden.core.v1.emptyDirVolumeSource, - // FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. - fc:: { - local __fcMixin(fc) = { fc+: fc }, - mixinInstance(fc):: __fcMixin(fc), - // 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. - withFsType(fsType):: self + __fcMixin({ fsType: fsType }), - // Optional: FC target lun number - withLun(lun):: self + __fcMixin({ lun: lun }), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __fcMixin({ readOnly: readOnly }), - // Optional: FC target worldwide names (WWNs) - withTargetWwns(targetWwns):: self + if std.type(targetWwns) == 'array' then __fcMixin({ targetWWNs: targetWwns }) else __fcMixin({ targetWWNs: [targetWwns] }), - // Optional: FC target worldwide names (WWNs) - withTargetWwnsMixin(targetWwns):: self + if std.type(targetWwns) == 'array' then __fcMixin({ targetWWNs+: targetWwns }) else __fcMixin({ targetWWNs+: [targetWwns] }), - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwids(wwids):: self + if std.type(wwids) == 'array' then __fcMixin({ wwids: wwids }) else __fcMixin({ wwids: [wwids] }), - // Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - withWwidsMixin(wwids):: self + if std.type(wwids) == 'array' then __fcMixin({ wwids+: wwids }) else __fcMixin({ wwids+: [wwids] }), - }, - fcType:: hidden.core.v1.fcVolumeSource, - // FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. - flexVolume:: { - local __flexVolumeMixin(flexVolume) = { flexVolume+: flexVolume }, - mixinInstance(flexVolume):: __flexVolumeMixin(flexVolume), - // Driver is the name of the driver to use for this volume. - withDriver(driver):: self + __flexVolumeMixin({ driver: 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. - withFsType(fsType):: self + __flexVolumeMixin({ fsType: fsType }), - // Optional: Extra command options if any. - withOptions(options):: self + __flexVolumeMixin({ options: options }), - // Optional: Extra command options if any. - withOptionsMixin(options):: self + __flexVolumeMixin({ options+: options }), - // Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __flexVolumeMixin({ readOnly: 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:: { - local __secretRefMixin(secretRef) = __flexVolumeMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - }, - flexVolumeType:: hidden.core.v1.flexVolumeSource, - // Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running - flocker:: { - local __flockerMixin(flocker) = { flocker+: flocker }, - mixinInstance(flocker):: __flockerMixin(flocker), - // Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated - withDatasetName(datasetName):: self + __flockerMixin({ datasetName: datasetName }), - // UUID of the dataset. This is unique identifier of a Flocker dataset - withDatasetUuid(datasetUuid):: self + __flockerMixin({ datasetUUID: datasetUuid }), - }, - flockerType:: hidden.core.v1.flockerVolumeSource, - // 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:: { - local __gcePersistentDiskMixin(gcePersistentDisk) = { gcePersistentDisk+: gcePersistentDisk }, - mixinInstance(gcePersistentDisk):: __gcePersistentDiskMixin(gcePersistentDisk), - // 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 - withFsType(fsType):: self + __gcePersistentDiskMixin({ fsType: 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 - withPartition(partition):: self + __gcePersistentDiskMixin({ partition: partition }), - // 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 - withPdName(pdName):: self + __gcePersistentDiskMixin({ pdName: pdName }), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - withReadOnly(readOnly):: self + __gcePersistentDiskMixin({ readOnly: readOnly }), - }, - gcePersistentDiskType:: hidden.core.v1.gcePersistentDiskVolumeSource, - // 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:: { - local __gitRepoMixin(gitRepo) = { gitRepo+: gitRepo }, - mixinInstance(gitRepo):: __gitRepoMixin(gitRepo), - // 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. - withDirectory(directory):: self + __gitRepoMixin({ directory: directory }), - // Repository URL - withRepository(repository):: self + __gitRepoMixin({ repository: repository }), - // Commit hash for the specified revision. - withRevision(revision):: self + __gitRepoMixin({ revision: revision }), - }, - gitRepoType:: hidden.core.v1.gitRepoVolumeSource, - // Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md - glusterfs:: { - local __glusterfsMixin(glusterfs) = { glusterfs+: glusterfs }, - mixinInstance(glusterfs):: __glusterfsMixin(glusterfs), - // EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withEndpoints(endpoints):: self + __glusterfsMixin({ endpoints: endpoints }), - // Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withPath(path):: self + __glusterfsMixin({ path: path }), - // ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod - withReadOnly(readOnly):: self + __glusterfsMixin({ readOnly: readOnly }), - }, - glusterfsType:: hidden.core.v1.glusterfsVolumeSource, - // 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:: { - local __hostPathMixin(hostPath) = { hostPath+: hostPath }, - mixinInstance(hostPath):: __hostPathMixin(hostPath), - // 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 - withPath(path):: self + __hostPathMixin({ path: path }), - // Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - withType(type):: self + __hostPathMixin({ type: type }), - }, - hostPathType:: hidden.core.v1.hostPathVolumeSource, - // ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md - iscsi:: { - local __iscsiMixin(iscsi) = { iscsi+: iscsi }, - mixinInstance(iscsi):: __iscsiMixin(iscsi), - // whether support iSCSI Discovery CHAP authentication - withChapAuthDiscovery(chapAuthDiscovery):: self + __iscsiMixin({ chapAuthDiscovery: chapAuthDiscovery }), - // whether support iSCSI Session CHAP authentication - withChapAuthSession(chapAuthSession):: self + __iscsiMixin({ chapAuthSession: 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 - withFsType(fsType):: self + __iscsiMixin({ fsType: fsType }), - // Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. - withInitiatorName(initiatorName):: self + __iscsiMixin({ initiatorName: initiatorName }), - // Target iSCSI Qualified Name. - withIqn(iqn):: self + __iscsiMixin({ iqn: iqn }), - // iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp). - withIscsiInterface(iscsiInterface):: self + __iscsiMixin({ iscsiInterface: iscsiInterface }), - // iSCSI Target Lun number. - withLun(lun):: self + __iscsiMixin({ lun: lun }), - // 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). - withPortals(portals):: self + if std.type(portals) == 'array' then __iscsiMixin({ portals: portals }) else __iscsiMixin({ portals: [portals] }), - // 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). - withPortalsMixin(portals):: self + if std.type(portals) == 'array' then __iscsiMixin({ portals+: portals }) else __iscsiMixin({ portals+: [portals] }), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. - withReadOnly(readOnly):: self + __iscsiMixin({ readOnly: readOnly }), - // CHAP Secret for iSCSI target and initiator authentication - secretRef:: { - local __secretRefMixin(secretRef) = __iscsiMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // 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). - withTargetPortal(targetPortal):: self + __iscsiMixin({ targetPortal: targetPortal }), - }, - iscsiType:: hidden.core.v1.iscsiVolumeSource, - // 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:: { - local __nfsMixin(nfs) = { nfs+: nfs }, - mixinInstance(nfs):: __nfsMixin(nfs), - // Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withPath(path):: self + __nfsMixin({ path: path }), - // 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 - withReadOnly(readOnly):: self + __nfsMixin({ readOnly: readOnly }), - // Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - withServer(server):: self + __nfsMixin({ server: server }), - }, - nfsType:: hidden.core.v1.nfsVolumeSource, - // PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - persistentVolumeClaim:: { - local __persistentVolumeClaimMixin(persistentVolumeClaim) = { persistentVolumeClaim+: persistentVolumeClaim }, - mixinInstance(persistentVolumeClaim):: __persistentVolumeClaimMixin(persistentVolumeClaim), - // 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 - withClaimName(claimName):: self + __persistentVolumeClaimMixin({ claimName: claimName }), - // Will force the ReadOnly setting in VolumeMounts. Default false. - withReadOnly(readOnly):: self + __persistentVolumeClaimMixin({ readOnly: readOnly }), - }, - persistentVolumeClaimType:: hidden.core.v1.persistentVolumeClaimVolumeSource, - // PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine - photonPersistentDisk:: { - local __photonPersistentDiskMixin(photonPersistentDisk) = { photonPersistentDisk+: photonPersistentDisk }, - mixinInstance(photonPersistentDisk):: __photonPersistentDiskMixin(photonPersistentDisk), - // 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. - withFsType(fsType):: self + __photonPersistentDiskMixin({ fsType: fsType }), - // ID that identifies Photon Controller persistent disk - withPdId(pdId):: self + __photonPersistentDiskMixin({ pdID: pdId }), - }, - photonPersistentDiskType:: hidden.core.v1.photonPersistentDiskVolumeSource, - // PortworxVolume represents a portworx volume attached and mounted on kubelets host machine - portworxVolume:: { - local __portworxVolumeMixin(portworxVolume) = { portworxVolume+: portworxVolume }, - mixinInstance(portworxVolume):: __portworxVolumeMixin(portworxVolume), - // 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. - withFsType(fsType):: self + __portworxVolumeMixin({ fsType: fsType }), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __portworxVolumeMixin({ readOnly: readOnly }), - // VolumeID uniquely identifies a Portworx volume - withVolumeId(volumeId):: self + __portworxVolumeMixin({ volumeID: volumeId }), - }, - portworxVolumeType:: hidden.core.v1.portworxVolumeSource, - // Items for all in one resources secrets, configmaps, and downward API - projected:: { - local __projectedMixin(projected) = { projected+: projected }, - mixinInstance(projected):: __projectedMixin(projected), - // Mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + __projectedMixin({ defaultMode: defaultMode }), - // list of volume projections - withSources(sources):: self + if std.type(sources) == 'array' then __projectedMixin({ sources: sources }) else __projectedMixin({ sources: [sources] }), - // list of volume projections - withSourcesMixin(sources):: self + if std.type(sources) == 'array' then __projectedMixin({ sources+: sources }) else __projectedMixin({ sources+: [sources] }), - sourcesType:: hidden.core.v1.volumeProjection, - }, - projectedType:: hidden.core.v1.projectedVolumeSource, - // Quobyte represents a Quobyte mount on the host that shares a pod's lifetime - quobyte:: { - local __quobyteMixin(quobyte) = { quobyte+: quobyte }, - mixinInstance(quobyte):: __quobyteMixin(quobyte), - // Group to map volume access to Default is no group - withGroup(group):: self + __quobyteMixin({ group: group }), - // ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - withReadOnly(readOnly):: self + __quobyteMixin({ readOnly: readOnly }), - // 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 - withRegistry(registry):: self + __quobyteMixin({ registry: registry }), - // Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin - withTenant(tenant):: self + __quobyteMixin({ tenant: tenant }), - // User to map volume access to Defaults to serivceaccount user - withUser(user):: self + __quobyteMixin({ user: user }), - // Volume is a string that references an already created Quobyte volume by name. - withVolume(volume):: self + __quobyteMixin({ volume: volume }), - }, - quobyteType:: hidden.core.v1.quobyteVolumeSource, - // RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md - rbd:: { - local __rbdMixin(rbd) = { rbd+: rbd }, - mixinInstance(rbd):: __rbdMixin(rbd), - // 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 - withFsType(fsType):: self + __rbdMixin({ fsType: fsType }), - // The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withImage(image):: self + __rbdMixin({ image: image }), - // Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withKeyring(keyring):: self + __rbdMixin({ keyring: keyring }), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitors(monitors):: self + if std.type(monitors) == 'array' then __rbdMixin({ monitors: monitors }) else __rbdMixin({ monitors: [monitors] }), - // A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withMonitorsMixin(monitors):: self + if std.type(monitors) == 'array' then __rbdMixin({ monitors+: monitors }) else __rbdMixin({ monitors+: [monitors] }), - // The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withPool(pool):: self + __rbdMixin({ pool: pool }), - // ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withReadOnly(readOnly):: self + __rbdMixin({ readOnly: readOnly }), - // SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - secretRef:: { - local __secretRefMixin(secretRef) = __rbdMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it - withUser(user):: self + __rbdMixin({ user: user }), - }, - rbdType:: hidden.core.v1.rbdVolumeSource, - // ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - scaleIo:: { - local __scaleIoMixin(scaleIo) = { scaleIo+: scaleIo }, - mixinInstance(scaleIo):: __scaleIoMixin(scaleIo), - // Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs". - withFsType(fsType):: self + __scaleIoMixin({ fsType: fsType }), - // The host address of the ScaleIO API Gateway. - withGateway(gateway):: self + __scaleIoMixin({ gateway: gateway }), - // The name of the ScaleIO Protection Domain for the configured storage. - withProtectionDomain(protectionDomain):: self + __scaleIoMixin({ protectionDomain: protectionDomain }), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __scaleIoMixin({ readOnly: readOnly }), - // SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. - secretRef:: { - local __secretRefMixin(secretRef) = __scaleIoMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // Flag to enable/disable SSL communication with Gateway, default false - withSslEnabled(sslEnabled):: self + __scaleIoMixin({ sslEnabled: sslEnabled }), - // Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. - withStorageMode(storageMode):: self + __scaleIoMixin({ storageMode: storageMode }), - // The ScaleIO Storage Pool associated with the protection domain. - withStoragePool(storagePool):: self + __scaleIoMixin({ storagePool: storagePool }), - // The name of the storage system as configured in ScaleIO. - withSystem(system):: self + __scaleIoMixin({ system: system }), - // The name of a volume already created in the ScaleIO system that is associated with this volume source. - withVolumeName(volumeName):: self + __scaleIoMixin({ volumeName: volumeName }), - }, - scaleIOType:: hidden.core.v1.scaleIoVolumeSource, - // Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - secret:: { - local __secretMixin(secret) = { secret+: secret }, - mixinInstance(secret):: __secretMixin(secret), - // Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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. - withDefaultMode(defaultMode):: self + __secretMixin({ defaultMode: 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 '..'. - withItems(items):: self + if std.type(items) == 'array' then __secretMixin({ items: items }) else __secretMixin({ items: [items] }), - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == 'array' then __secretMixin({ items+: items }) else __secretMixin({ items+: [items] }), - itemsType:: hidden.core.v1.keyToPath, - // Specify whether the Secret or it's keys must be defined - withOptional(optional):: self + __secretMixin({ optional: optional }), - // Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - withSecretName(secretName):: self + __secretMixin({ secretName: secretName }), - }, - secretType:: hidden.core.v1.secretVolumeSource, - // StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - storageos:: { - local __storageosMixin(storageos) = { storageos+: storageos }, - mixinInstance(storageos):: __storageosMixin(storageos), - // 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. - withFsType(fsType):: self + __storageosMixin({ fsType: fsType }), - // Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - withReadOnly(readOnly):: self + __storageosMixin({ readOnly: readOnly }), - // SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. - secretRef:: { - local __secretRefMixin(secretRef) = __storageosMixin({ secretRef+: secretRef }), - mixinInstance(secretRef):: __secretRefMixin(secretRef), - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretRefMixin({ name: name }), - }, - secretRefType:: hidden.core.v1.localObjectReference, - // VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. - withVolumeName(volumeName):: self + __storageosMixin({ volumeName: 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. - withVolumeNamespace(volumeNamespace):: self + __storageosMixin({ volumeNamespace: volumeNamespace }), - }, - storageosType:: hidden.core.v1.storageOsVolumeSource, - // VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine - vsphereVolume:: { - local __vsphereVolumeMixin(vsphereVolume) = { vsphereVolume+: vsphereVolume }, - mixinInstance(vsphereVolume):: __vsphereVolumeMixin(vsphereVolume), - // 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. - withFsType(fsType):: self + __vsphereVolumeMixin({ fsType: fsType }), - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - withStoragePolicyId(storagePolicyId):: self + __vsphereVolumeMixin({ storagePolicyID: storagePolicyId }), - // Storage Policy Based Management (SPBM) profile name. - withStoragePolicyName(storagePolicyName):: self + __vsphereVolumeMixin({ storagePolicyName: storagePolicyName }), - // Path that identifies vSphere volume vmdk - withVolumePath(volumePath):: self + __vsphereVolumeMixin({ volumePath: volumePath }), - }, - vsphereVolumeType:: hidden.core.v1.vsphereVirtualDiskVolumeSource, - }, - }, - // volumeDevice describes a mapping of a raw block device within a container. - volumeDevice:: { - new():: {}, - // devicePath is the path inside of the container that the device will be mapped to. - withDevicePath(devicePath):: self + { devicePath: devicePath }, - // name must match the name of a persistentVolumeClaim in the pod - withName(name):: self + { name: name }, - mixin:: {}, - }, - // VolumeMount describes a mounting of a Volume within a container. - volumeMount:: { - new(name='', mountPath='', readOnly=false):: self.withMountPath(mountPath).withName(name).withReadOnly(readOnly), - // Path within the container at which the volume should be mounted. Must not contain ':'. - withMountPath(mountPath):: self + { mountPath: mountPath }, - // 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. - withMountPropagation(mountPropagation):: self + { mountPropagation: mountPropagation }, - // This must match the Name of a Volume. - withName(name):: self + { name: name }, - // Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - // Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). - withSubPath(subPath):: self + { subPath: 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. This field is alpha in 1.14. - withSubPathExpr(subPathExpr):: self + { subPathExpr: subPathExpr }, - mixin:: {}, - }, - // VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from. - volumeNodeAffinity:: { - new():: {}, - mixin:: { - // Required specifies hard node constraints that must be met. - required:: { - local __requiredMixin(required) = { required+: required }, - mixinInstance(required):: __requiredMixin(required), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredType:: hidden.core.v1.nodeSelector, - }, - }, - // Projection that may be projected along with other supported volume types - volumeProjection:: { - new():: {}, - mixin:: { - // information about the configMap data to project - configMap:: { - local __configMapMixin(configMap) = { configMap+: configMap }, - mixinInstance(configMap):: __configMapMixin(configMap), - // 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 '..'. - withItems(items):: self + if std.type(items) == 'array' then __configMapMixin({ items: items }) else __configMapMixin({ items: [items] }), - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == 'array' then __configMapMixin({ items+: items }) else __configMapMixin({ items+: [items] }), - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __configMapMixin({ name: name }), - // Specify whether the ConfigMap or it's keys must be defined - withOptional(optional):: self + __configMapMixin({ optional: optional }), - }, - configMapType:: hidden.core.v1.configMapProjection, - // information about the downwardAPI data to project - downwardApi:: { - local __downwardApiMixin(downwardApi) = { downwardApi+: downwardApi }, - mixinInstance(downwardApi):: __downwardApiMixin(downwardApi), - // Items is a list of DownwardAPIVolume file - withItems(items):: self + if std.type(items) == 'array' then __downwardApiMixin({ items: items }) else __downwardApiMixin({ items: [items] }), - // Items is a list of DownwardAPIVolume file - withItemsMixin(items):: self + if std.type(items) == 'array' then __downwardApiMixin({ items+: items }) else __downwardApiMixin({ items+: [items] }), - itemsType:: hidden.core.v1.downwardApiVolumeFile, - }, - downwardAPIType:: hidden.core.v1.downwardApiProjection, - // information about the secret data to project - secret:: { - local __secretMixin(secret) = { secret+: secret }, - mixinInstance(secret):: __secretMixin(secret), - // 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 '..'. - withItems(items):: self + if std.type(items) == 'array' then __secretMixin({ items: items }) else __secretMixin({ items: [items] }), - // 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 '..'. - withItemsMixin(items):: self + if std.type(items) == 'array' then __secretMixin({ items+: items }) else __secretMixin({ items+: [items] }), - itemsType:: hidden.core.v1.keyToPath, - // Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - withName(name):: self + __secretMixin({ name: name }), - // Specify whether the Secret or its key must be defined - withOptional(optional):: self + __secretMixin({ optional: optional }), - }, - secretType:: hidden.core.v1.secretProjection, - // information about the serviceAccountToken data to project - serviceAccountToken:: { - local __serviceAccountTokenMixin(serviceAccountToken) = { serviceAccountToken+: serviceAccountToken }, - mixinInstance(serviceAccountToken):: __serviceAccountTokenMixin(serviceAccountToken), - // 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. - withAudience(audience):: self + __serviceAccountTokenMixin({ audience: 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. - withExpirationSeconds(expirationSeconds):: self + __serviceAccountTokenMixin({ expirationSeconds: expirationSeconds }), - // Path is the path relative to the mount point of the file to project the token into. - withPath(path):: self + __serviceAccountTokenMixin({ path: path }), - }, - serviceAccountTokenType:: hidden.core.v1.serviceAccountTokenProjection, - }, - }, - // Represents a vSphere volume resource. - vsphereVirtualDiskVolumeSource:: { - new():: {}, - // 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. - withFsType(fsType):: self + { fsType: fsType }, - // Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. - withStoragePolicyId(storagePolicyId):: self + { storagePolicyID: storagePolicyId }, - // Storage Policy Based Management (SPBM) profile name. - withStoragePolicyName(storagePolicyName):: self + { storagePolicyName: storagePolicyName }, - // Path that identifies vSphere volume vmdk - withVolumePath(volumePath):: self + { volumePath: volumePath }, - mixin:: {}, - }, - // The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s) - weightedPodAffinityTerm:: { - new():: {}, - // weight associated with matching the corresponding podAffinityTerm, in the range 1-100. - withWeight(weight):: self + { weight: weight }, - mixin:: { - // Required. A pod affinity term, associated with the corresponding weight. - podAffinityTerm:: { - local __podAffinityTermMixin(podAffinityTerm) = { podAffinityTerm+: podAffinityTerm }, - mixinInstance(podAffinityTerm):: __podAffinityTermMixin(podAffinityTerm), - // A label query over a set of resources, in this case pods. - labelSelector:: { - local __labelSelectorMixin(labelSelector) = __podAffinityTermMixin({ labelSelector+: labelSelector }), - mixinInstance(labelSelector):: __labelSelectorMixin(labelSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __labelSelectorMixin({ matchExpressions: matchExpressions }) else __labelSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __labelSelectorMixin({ matchExpressions+: matchExpressions }) else __labelSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __labelSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __labelSelectorMixin({ matchLabels+: matchLabels }), - }, - labelSelectorType:: hidden.meta.v1.labelSelector, - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - withNamespaces(namespaces):: self + if std.type(namespaces) == 'array' then __podAffinityTermMixin({ namespaces: namespaces }) else __podAffinityTermMixin({ namespaces: [namespaces] }), - // namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace" - withNamespacesMixin(namespaces):: self + if std.type(namespaces) == 'array' then __podAffinityTermMixin({ namespaces+: namespaces }) else __podAffinityTermMixin({ namespaces+: [namespaces] }), - // 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. - withTopologyKey(topologyKey):: self + __podAffinityTermMixin({ topologyKey: topologyKey }), - }, - podAffinityTermType:: hidden.core.v1.podAffinityTerm, - }, - }, - }, - }, - events:: { - v1beta1:: { - local apiVersion = { apiVersion: 'events/v1beta1' }, - // EventList is a list of Event objects. - eventList:: { - new():: {}, - // Items is a list of schema objects. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of schema objects. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.events.v1beta1.event, - mixin:: {}, - }, - // EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. - eventSeries:: { - new():: {}, - // Number of occurrences in this series up to the last heartbeat time - withCount(count):: self + { count: count }, - // Time when last Event from the series was seen before last heartbeat. - withLastObservedTime(lastObservedTime):: self + { lastObservedTime: lastObservedTime }, - // Information whether this series is ongoing or finished. - withState(state):: self + { state: state }, - mixin:: {}, - }, - }, - }, - extensions:: { - v1beta1:: { - local apiVersion = { apiVersion: 'extensions/v1beta1' }, - // AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used. - allowedCsiDriver:: { - new():: {}, - // Name is the registered name of the CSI driver - withName(name):: self + { name: name }, - mixin:: {}, - }, - // AllowedFlexVolume represents a single Flexvolume that is allowed to be used. Deprecated: use AllowedFlexVolume from policy API Group instead. - allowedFlexVolume:: { - new():: {}, - // driver is the name of the Flexvolume driver. - withDriver(driver):: self + { driver: driver }, - mixin:: {}, - }, - // 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. Deprecated: use AllowedHostPath from policy API Group instead. - allowedHostPath:: { - new():: {}, - // 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` - withPathPrefix(pathPrefix):: self + { pathPrefix: pathPrefix }, - // when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - mixin:: {}, - }, - // DaemonSetCondition describes the state of a DaemonSet at a certain point. - daemonSetCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of DaemonSet condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // DaemonSetList is a collection of daemon sets. - daemonSetList:: { - new():: {}, - // A list of daemon sets. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // A list of daemon sets. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.extensions.v1beta1.daemonSet, - mixin:: {}, - }, - // DaemonSetSpec is the specification of a daemon set. - daemonSetSpec:: { - new():: {}, - // 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). - withMinReadySeconds(minReadySeconds):: self + { minReadySeconds: 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. - withRevisionHistoryLimit(revisionHistoryLimit):: self + { revisionHistoryLimit: revisionHistoryLimit }, - // DEPRECATED. A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation. - withTemplateGeneration(templateGeneration):: self + { templateGeneration: templateGeneration }, - mixin:: { - // A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - // An update strategy to replace existing DaemonSet pods with new pods. - updateStrategy:: { - local __updateStrategyMixin(updateStrategy) = { updateStrategy+: updateStrategy }, - mixinInstance(updateStrategy):: __updateStrategyMixin(updateStrategy), - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __updateStrategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDaemonSet, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. - withType(type):: self + __updateStrategyMixin({ type: type }), - }, - updateStrategyType:: hidden.extensions.v1beta1.daemonSetUpdateStrategy, - }, - }, - // DaemonSetStatus represents the current status of a daemon set. - daemonSetStatus:: { - new():: {}, - // Count of hash collisions for the DaemonSet. The DaemonSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision. - withCollisionCount(collisionCount):: self + { collisionCount: collisionCount }, - // Represents the latest available observations of a DaemonSet's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a DaemonSet's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.extensions.v1beta1.daemonSetCondition, - // The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withCurrentNumberScheduled(currentNumberScheduled):: self + { currentNumberScheduled: currentNumberScheduled }, - // The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withDesiredNumberScheduled(desiredNumberScheduled):: self + { desiredNumberScheduled: desiredNumberScheduled }, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds) - withNumberAvailable(numberAvailable):: self + { numberAvailable: numberAvailable }, - // The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/ - withNumberMisscheduled(numberMisscheduled):: self + { numberMisscheduled: numberMisscheduled }, - // The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready. - withNumberReady(numberReady):: self + { numberReady: numberReady }, - // The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds) - withNumberUnavailable(numberUnavailable):: self + { numberUnavailable: numberUnavailable }, - // The most recent generation observed by the daemon set controller. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // The total number of nodes that are running updated daemon pod - withUpdatedNumberScheduled(updatedNumberScheduled):: self + { updatedNumberScheduled: updatedNumberScheduled }, - mixin:: {}, - }, - daemonSetUpdateStrategy:: { - new():: {}, - // Type of daemon set update. Can be "RollingUpdate" or "OnDelete". Default is OnDelete. - withType(type):: self + { type: type }, - mixin:: { - // Rolling update config params. Present only if type = "RollingUpdate". - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = { rollingUpdate+: rollingUpdate }, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. 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. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDaemonSet, - }, - }, - // DeploymentCondition describes the state of a deployment at a certain point. - deploymentCondition:: { - new():: {}, - // Last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // The last time this condition was updated. - withLastUpdateTime(lastUpdateTime):: self + { lastUpdateTime: lastUpdateTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of deployment condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // DeploymentList is a list of Deployments. - deploymentList:: { - new(items=''):: self.withItems(items), - // Items is the list of Deployments. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of Deployments. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.extensions.v1beta1.deployment, - mixin:: {}, - }, - // DeploymentSpec is the specification of the desired behavior of the Deployment. - deploymentSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + { minReadySeconds: minReadySeconds }, - // Indicates that the deployment is paused and will not be processed by the deployment controller. - withPaused(paused):: self + { paused: 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. This is set to the max value of int32 (i.e. 2147483647) by default, which means "no deadline". - withProgressDeadlineSeconds(progressDeadlineSeconds):: self + { progressDeadlineSeconds: progressDeadlineSeconds }, - // Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. - withReplicas(replicas):: self + { replicas: replicas }, - // The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. This is set to the max value of int32 (i.e. 2147483647) by default, which means "retaining all old RelicaSets". - withRevisionHistoryLimit(revisionHistoryLimit):: self + { revisionHistoryLimit: revisionHistoryLimit }, - mixin:: { - // DEPRECATED. The config this deployment is rolling back to. Will be cleared after rollback is done. - rollbackTo:: { - local __rollbackToMixin(rollbackTo) = { rollbackTo+: rollbackTo }, - mixinInstance(rollbackTo):: __rollbackToMixin(rollbackTo), - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + __rollbackToMixin({ revision: revision }), - }, - rollbackToType:: hidden.extensions.v1beta1.rollbackConfig, - // Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. - selector:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // The deployment strategy to use to replace existing pods with new ones. - strategy:: { - local __strategyMixin(strategy) = { strategy+: strategy }, - mixinInstance(strategy):: __strategyMixin(strategy), - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = __strategyMixin({ rollingUpdate+: rollingUpdate }), - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC 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. - withMaxSurge(maxSurge):: self + __rollingUpdateMixin({ maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDeployment, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + __strategyMixin({ type: type }), - }, - strategyType:: hidden.extensions.v1beta1.deploymentStrategy, - // Template describes the pods that will be created. - template:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // DeploymentStatus is the most recently observed status of the Deployment. - deploymentStatus:: { - new():: {}, - // Total number of available pods (ready for at least minReadySeconds) targeted by this deployment. - withAvailableReplicas(availableReplicas):: self + { availableReplicas: availableReplicas }, - // Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet. - withCollisionCount(collisionCount):: self + { collisionCount: collisionCount }, - // Represents the latest available observations of a deployment's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a deployment's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.extensions.v1beta1.deploymentCondition, - // The generation observed by the deployment controller. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // Total number of ready pods targeted by this deployment. - withReadyReplicas(readyReplicas):: self + { readyReplicas: readyReplicas }, - // Total number of non-terminated pods targeted by this deployment (their labels match the selector). - withReplicas(replicas):: self + { replicas: replicas }, - // Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created. - withUnavailableReplicas(unavailableReplicas):: self + { unavailableReplicas: unavailableReplicas }, - // Total number of non-terminated pods targeted by this deployment that have the desired template spec. - withUpdatedReplicas(updatedReplicas):: self + { updatedReplicas: updatedReplicas }, - mixin:: {}, - }, - // DeploymentStrategy describes how to replace existing pods with new ones. - deploymentStrategy:: { - new():: {}, - // Type of deployment. Can be "Recreate" or "RollingUpdate". Default is RollingUpdate. - withType(type):: self + { type: type }, - mixin:: { - // Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate. - rollingUpdate:: { - local __rollingUpdateMixin(rollingUpdate) = { rollingUpdate+: rollingUpdate }, - mixinInstance(rollingUpdate):: __rollingUpdateMixin(rollingUpdate), - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC 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. - withMaxSurge(maxSurge):: self + __rollingUpdateMixin({ maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: self + __rollingUpdateMixin({ maxUnavailable: maxUnavailable }), - }, - rollingUpdateType:: hidden.extensions.v1beta1.rollingUpdateDeployment, - }, - }, - // FSGroupStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use FSGroupStrategyOptions from policy API Group instead. - fsGroupStrategyOptions:: { - new():: {}, - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then { ranges: ranges } else { ranges: [ranges] }, - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then { ranges+: ranges } else { ranges+: [ranges] }, - rangesType:: hidden.extensions.v1beta1.idRange, - // rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - withRule(rule):: self + { rule: rule }, - mixin:: {}, - }, - // 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. Deprecated: use HostPortRange from policy API Group instead. - hostPortRange:: { - new():: {}, - // max is the end of the range, inclusive. - withMax(max):: self + { max: max }, - // min is the start of the range, inclusive. - withMin(min):: self + { min: min }, - mixin:: {}, - }, - // HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend. - httpIngressPath:: { - new():: {}, - // Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) 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 '/'. If unspecified, the path defaults to a catch all sending traffic to the backend. - withPath(path):: self + { path: path }, - mixin:: { - // Backend defines the referenced service endpoint to which the traffic will be forwarded to. - backend:: { - local __backendMixin(backend) = { backend+: backend }, - mixinInstance(backend):: __backendMixin(backend), - // Specifies the name of the referenced service. - withServiceName(serviceName):: self + __backendMixin({ serviceName: serviceName }), - // Specifies the port of the referenced service. - withServicePort(servicePort):: self + __backendMixin({ servicePort: servicePort }), - }, - backendType:: hidden.extensions.v1beta1.ingressBackend, - }, - }, - // 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 '#'. - httpIngressRuleValue:: { - new():: {}, - // A collection of paths that map requests to backends. - withPaths(paths):: self + if std.type(paths) == 'array' then { paths: paths } else { paths: [paths] }, - // A collection of paths that map requests to backends. - withPathsMixin(paths):: self + if std.type(paths) == 'array' then { paths+: paths } else { paths+: [paths] }, - pathsType:: hidden.extensions.v1beta1.httpIngressPath, - mixin:: {}, - }, - // IDRange provides a min/max of an allowed range of IDs. Deprecated: use IDRange from policy API Group instead. - idRange:: { - new():: {}, - // max is the end of the range, inclusive. - withMax(max):: self + { max: max }, - // min is the start of the range, inclusive. - withMin(min):: self + { min: min }, - mixin:: {}, - }, - // IngressBackend describes all endpoints for a given service and port. - ingressBackend:: { - new():: {}, - // Specifies the name of the referenced service. - withServiceName(serviceName):: self + { serviceName: serviceName }, - // Specifies the port of the referenced service. - withServicePort(servicePort):: self + { servicePort: servicePort }, - mixin:: {}, - }, - // IngressList is a collection of Ingress. - ingressList:: { - new():: {}, - // Items is the list of Ingress. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of Ingress. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.extensions.v1beta1.ingress, - mixin:: {}, - }, - // 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. - ingressRule:: { - new():: {}, - // 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 the RFC: 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. - withHost(host):: self + { host: host }, - mixin:: { - http:: { - local __httpMixin(http) = { http+: http }, - mixinInstance(http):: __httpMixin(http), - // A collection of paths that map requests to backends. - withPaths(paths):: self + if std.type(paths) == 'array' then __httpMixin({ paths: paths }) else __httpMixin({ paths: [paths] }), - // A collection of paths that map requests to backends. - withPathsMixin(paths):: self + if std.type(paths) == 'array' then __httpMixin({ paths+: paths }) else __httpMixin({ paths+: [paths] }), - pathsType:: hidden.extensions.v1beta1.httpIngressPath, - }, - httpType:: hidden.extensions.v1beta1.httpIngressRuleValue, - }, - }, - // IngressSpec describes the Ingress the user wishes to exist. - ingressSpec:: { - new():: {}, - // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. - withRules(rules):: self + if std.type(rules) == 'array' then { rules: rules } else { rules: [rules] }, - // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. - withRulesMixin(rules):: self + if std.type(rules) == 'array' then { rules+: rules } else { rules+: [rules] }, - rulesType:: hidden.extensions.v1beta1.ingressRule, - // 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. - withTls(tls):: self + if std.type(tls) == 'array' then { tls: tls } else { tls: [tls] }, - // 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. - withTlsMixin(tls):: self + if std.type(tls) == 'array' then { tls+: tls } else { tls+: [tls] }, - tlsType:: hidden.extensions.v1beta1.ingressTls, - mixin:: { - // A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. - backend:: { - local __backendMixin(backend) = { backend+: backend }, - mixinInstance(backend):: __backendMixin(backend), - // Specifies the name of the referenced service. - withServiceName(serviceName):: self + __backendMixin({ serviceName: serviceName }), - // Specifies the port of the referenced service. - withServicePort(servicePort):: self + __backendMixin({ servicePort: servicePort }), - }, - backendType:: hidden.extensions.v1beta1.ingressBackend, - }, - }, - // IngressStatus describe the current state of the Ingress. - ingressStatus:: { - new():: {}, - mixin:: { - // LoadBalancer contains the current status of the load-balancer. - loadBalancer:: { - local __loadBalancerMixin(loadBalancer) = { loadBalancer+: loadBalancer }, - mixinInstance(loadBalancer):: __loadBalancerMixin(loadBalancer), - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngress(ingress):: self + if std.type(ingress) == 'array' then __loadBalancerMixin({ ingress: ingress }) else __loadBalancerMixin({ ingress: [ingress] }), - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngressMixin(ingress):: self + if std.type(ingress) == 'array' then __loadBalancerMixin({ ingress+: ingress }) else __loadBalancerMixin({ ingress+: [ingress] }), - ingressType:: hidden.core.v1.loadBalancerIngress, - }, - loadBalancerType:: hidden.core.v1.loadBalancerStatus, - }, - }, - // IngressTLS describes the transport layer security associated with an Ingress. - ingressTls:: { - new():: {}, - // 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. - withHosts(hosts):: self + if std.type(hosts) == 'array' then { hosts: hosts } else { hosts: [hosts] }, - // 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. - withHostsMixin(hosts):: self + if std.type(hosts) == 'array' then { hosts+: hosts } else { hosts+: [hosts] }, - // SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL 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. - withSecretName(secretName):: self + { secretName: secretName }, - mixin:: {}, - }, - // DEPRECATED 1.9 - This group version of IPBlock is deprecated by networking/v1/IPBlock. IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") 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. - ipBlock:: { - new():: {}, - // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" - withCidr(cidr):: self + { cidr: cidr }, - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExcept(except):: self + if std.type(except) == 'array' then { except: except } else { except: [except] }, - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExceptMixin(except):: self + if std.type(except) == 'array' then { except+: except } else { except+: [except] }, - mixin:: {}, - }, - // DEPRECATED 1.9 - This group version of NetworkPolicyEgressRule is deprecated by networking/v1/NetworkPolicyEgressRule. 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 - networkPolicyEgressRule:: { - new():: {}, - // 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. - withPorts(ports):: self + if std.type(ports) == 'array' then { ports: ports } else { ports: [ports] }, - // 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. - withPortsMixin(ports):: self + if std.type(ports) == 'array' then { ports+: ports } else { ports+: [ports] }, - portsType:: hidden.extensions.v1beta1.networkPolicyPort, - // 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. - withTo(to):: self + if std.type(to) == 'array' then { to: to } else { to: [to] }, - // 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. - withToMixin(to):: self + if std.type(to) == 'array' then { to+: to } else { to+: [to] }, - toType:: hidden.extensions.v1beta1.networkPolicyPeer, - mixin:: {}, - }, - // DEPRECATED 1.9 - This group version of NetworkPolicyIngressRule is deprecated by networking/v1/NetworkPolicyIngressRule. This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from. - networkPolicyIngressRule:: { - new():: {}, - // 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list. - withFrom(from):: self + if std.type(from) == 'array' then { from: from } else { from: [from] }, - // 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list. - withFromMixin(from):: self + if std.type(from) == 'array' then { from+: from } else { from+: [from] }, - fromType:: hidden.extensions.v1beta1.networkPolicyPeer, - // 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. - withPorts(ports):: self + if std.type(ports) == 'array' then { ports: ports } else { ports: [ports] }, - // 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. - withPortsMixin(ports):: self + if std.type(ports) == 'array' then { ports+: ports } else { ports+: [ports] }, - portsType:: hidden.extensions.v1beta1.networkPolicyPort, - mixin:: {}, - }, - // DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by networking/v1/NetworkPolicyList. Network Policy List is a list of NetworkPolicy objects. - networkPolicyList:: { - new():: {}, - // Items is a list of schema objects. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of schema objects. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.extensions.v1beta1.networkPolicy, - mixin:: {}, - }, - // DEPRECATED 1.9 - This group version of NetworkPolicyPeer is deprecated by networking/v1/NetworkPolicyPeer. - networkPolicyPeer:: { - new():: {}, - mixin:: { - // IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. - ipBlock:: { - local __ipBlockMixin(ipBlock) = { ipBlock+: ipBlock }, - mixinInstance(ipBlock):: __ipBlockMixin(ipBlock), - // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" - withCidr(cidr):: self + __ipBlockMixin({ cidr: cidr }), - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExcept(except):: self + if std.type(except) == 'array' then __ipBlockMixin({ except: except }) else __ipBlockMixin({ except: [except] }), - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExceptMixin(except):: self + if std.type(except) == 'array' then __ipBlockMixin({ except+: except }) else __ipBlockMixin({ except+: [except] }), - }, - ipBlockType:: hidden.extensions.v1beta1.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:: { - local __namespaceSelectorMixin(namespaceSelector) = { namespaceSelector+: namespaceSelector }, - mixinInstance(namespaceSelector):: __namespaceSelectorMixin(namespaceSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __namespaceSelectorMixin({ matchExpressions: matchExpressions }) else __namespaceSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __namespaceSelectorMixin({ matchExpressions+: matchExpressions }) else __namespaceSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __namespaceSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __namespaceSelectorMixin({ matchLabels+: matchLabels }), - }, - namespaceSelectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __podSelectorMixin(podSelector) = { podSelector+: podSelector }, - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __podSelectorMixin({ matchExpressions: matchExpressions }) else __podSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __podSelectorMixin({ matchExpressions+: matchExpressions }) else __podSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __podSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({ matchLabels+: matchLabels }), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort. - networkPolicyPort:: { - new():: {}, - // If specified, 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. - withPort(port):: self + { port: port }, - // Optional. The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. - withProtocol(protocol):: self + { protocol: protocol }, - mixin:: {}, - }, - // DEPRECATED 1.9 - This group version of NetworkPolicySpec is deprecated by networking/v1/NetworkPolicySpec. - networkPolicySpec:: { - new():: {}, - // 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 - withEgress(egress):: self + if std.type(egress) == 'array' then { egress: egress } else { egress: [egress] }, - // 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 - withEgressMixin(egress):: self + if std.type(egress) == 'array' then { egress+: egress } else { egress+: [egress] }, - egressType:: hidden.extensions.v1beta1.networkPolicyEgressRule, - // 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 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). - withIngress(ingress):: self + if std.type(ingress) == 'array' then { ingress: ingress } else { ingress: [ingress] }, - // 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 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). - withIngressMixin(ingress):: self + if std.type(ingress) == 'array' then { ingress+: ingress } else { ingress+: [ingress] }, - ingressType:: hidden.extensions.v1beta1.networkPolicyIngressRule, - // 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 - withPolicyTypes(policyTypes):: self + if std.type(policyTypes) == 'array' then { policyTypes: policyTypes } else { policyTypes: [policyTypes] }, - // 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 - withPolicyTypesMixin(policyTypes):: self + if std.type(policyTypes) == 'array' then { policyTypes+: policyTypes } else { policyTypes+: [policyTypes] }, - mixin:: { - // 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:: { - local __podSelectorMixin(podSelector) = { podSelector+: podSelector }, - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __podSelectorMixin({ matchExpressions: matchExpressions }) else __podSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __podSelectorMixin({ matchExpressions+: matchExpressions }) else __podSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __podSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({ matchLabels+: matchLabels }), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // PodSecurityPolicyList is a list of PodSecurityPolicy objects. Deprecated: use PodSecurityPolicyList from policy API Group instead. - podSecurityPolicyList:: { - new():: {}, - // items is a list of schema objects. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // items is a list of schema objects. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.extensions.v1beta1.podSecurityPolicy, - mixin:: {}, - }, - // PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead. - podSecurityPolicySpec:: { - new():: {}, - // allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true. - withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + { allowPrivilegeEscalation: allowPrivilegeEscalation }, - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value means no CSI drivers can run inline within a pod spec. - withAllowedCsiDrivers(allowedCsiDrivers):: self + if std.type(allowedCsiDrivers) == 'array' then { allowedCSIDrivers: allowedCsiDrivers } else { allowedCSIDrivers: [allowedCsiDrivers] }, - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value means no CSI drivers can run inline within a pod spec. - withAllowedCsiDriversMixin(allowedCsiDrivers):: self + if std.type(allowedCsiDrivers) == 'array' then { allowedCSIDrivers+: allowedCsiDrivers } else { allowedCSIDrivers+: [allowedCsiDrivers] }, - allowedCSIDriversType:: hidden.extensions.v1beta1.allowedCsiDriver, - // 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. - withAllowedCapabilities(allowedCapabilities):: self + if std.type(allowedCapabilities) == 'array' then { allowedCapabilities: allowedCapabilities } else { allowedCapabilities: [allowedCapabilities] }, - // 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. - withAllowedCapabilitiesMixin(allowedCapabilities):: self + if std.type(allowedCapabilities) == 'array' then { allowedCapabilities+: allowedCapabilities } else { allowedCapabilities+: [allowedCapabilities] }, - // allowedFlexVolumes is a whitelist of allowed 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. - withAllowedFlexVolumes(allowedFlexVolumes):: self + if std.type(allowedFlexVolumes) == 'array' then { allowedFlexVolumes: allowedFlexVolumes } else { allowedFlexVolumes: [allowedFlexVolumes] }, - // allowedFlexVolumes is a whitelist of allowed 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. - withAllowedFlexVolumesMixin(allowedFlexVolumes):: self + if std.type(allowedFlexVolumes) == 'array' then { allowedFlexVolumes+: allowedFlexVolumes } else { allowedFlexVolumes+: [allowedFlexVolumes] }, - allowedFlexVolumesType:: hidden.extensions.v1beta1.allowedFlexVolume, - // allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used. - withAllowedHostPaths(allowedHostPaths):: self + if std.type(allowedHostPaths) == 'array' then { allowedHostPaths: allowedHostPaths } else { allowedHostPaths: [allowedHostPaths] }, - // allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used. - withAllowedHostPathsMixin(allowedHostPaths):: self + if std.type(allowedHostPaths) == 'array' then { allowedHostPaths+: allowedHostPaths } else { allowedHostPaths+: [allowedHostPaths] }, - allowedHostPathsType:: hidden.extensions.v1beta1.allowedHostPath, - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. - withAllowedProcMountTypes(allowedProcMountTypes):: self + if std.type(allowedProcMountTypes) == 'array' then { allowedProcMountTypes: allowedProcMountTypes } else { allowedProcMountTypes: [allowedProcMountTypes] }, - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. - withAllowedProcMountTypesMixin(allowedProcMountTypes):: self + if std.type(allowedProcMountTypes) == 'array' then { allowedProcMountTypes+: allowedProcMountTypes } else { allowedProcMountTypes+: [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 whitelist 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. - withAllowedUnsafeSysctls(allowedUnsafeSysctls):: self + if std.type(allowedUnsafeSysctls) == 'array' then { allowedUnsafeSysctls: allowedUnsafeSysctls } else { allowedUnsafeSysctls: [allowedUnsafeSysctls] }, - // 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 whitelist 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. - withAllowedUnsafeSysctlsMixin(allowedUnsafeSysctls):: self + if std.type(allowedUnsafeSysctls) == 'array' then { allowedUnsafeSysctls+: allowedUnsafeSysctls } else { allowedUnsafeSysctls+: [allowedUnsafeSysctls] }, - // 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. - withDefaultAddCapabilities(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == 'array' then { defaultAddCapabilities: defaultAddCapabilities } else { defaultAddCapabilities: [defaultAddCapabilities] }, - // 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. - withDefaultAddCapabilitiesMixin(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == 'array' then { defaultAddCapabilities+: defaultAddCapabilities } else { defaultAddCapabilities+: [defaultAddCapabilities] }, - // defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process. - withDefaultAllowPrivilegeEscalation(defaultAllowPrivilegeEscalation):: self + { defaultAllowPrivilegeEscalation: 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. - withForbiddenSysctls(forbiddenSysctls):: self + if std.type(forbiddenSysctls) == 'array' then { forbiddenSysctls: forbiddenSysctls } else { forbiddenSysctls: [forbiddenSysctls] }, - // 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. - withForbiddenSysctlsMixin(forbiddenSysctls):: self + if std.type(forbiddenSysctls) == 'array' then { forbiddenSysctls+: forbiddenSysctls } else { forbiddenSysctls+: [forbiddenSysctls] }, - // hostIPC determines if the policy allows the use of HostIPC in the pod spec. - withHostIpc(hostIpc):: self + { hostIPC: hostIpc }, - // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. - withHostNetwork(hostNetwork):: self + { hostNetwork: hostNetwork }, - // hostPID determines if the policy allows the use of HostPID in the pod spec. - withHostPid(hostPid):: self + { hostPID: hostPid }, - // hostPorts determines which host port ranges are allowed to be exposed. - withHostPorts(hostPorts):: self + if std.type(hostPorts) == 'array' then { hostPorts: hostPorts } else { hostPorts: [hostPorts] }, - // hostPorts determines which host port ranges are allowed to be exposed. - withHostPortsMixin(hostPorts):: self + if std.type(hostPorts) == 'array' then { hostPorts+: hostPorts } else { hostPorts+: [hostPorts] }, - hostPortsType:: hidden.extensions.v1beta1.hostPortRange, - // privileged determines if a pod can request to be run as privileged. - withPrivileged(privileged):: self + { privileged: 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. - withReadOnlyRootFilesystem(readOnlyRootFilesystem):: self + { readOnlyRootFilesystem: readOnlyRootFilesystem }, - // requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - withRequiredDropCapabilities(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == 'array' then { requiredDropCapabilities: requiredDropCapabilities } else { requiredDropCapabilities: [requiredDropCapabilities] }, - // requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - withRequiredDropCapabilitiesMixin(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == 'array' then { requiredDropCapabilities+: requiredDropCapabilities } else { requiredDropCapabilities+: [requiredDropCapabilities] }, - // volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. - withVolumes(volumes):: self + if std.type(volumes) == 'array' then { volumes: volumes } else { volumes: [volumes] }, - // volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then { volumes+: volumes } else { volumes+: [volumes] }, - mixin:: { - // fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. - fsGroup:: { - local __fsGroupMixin(fsGroup) = { fsGroup+: fsGroup }, - mixinInstance(fsGroup):: __fsGroupMixin(fsGroup), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __fsGroupMixin({ ranges: ranges }) else __fsGroupMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __fsGroupMixin({ ranges+: ranges }) else __fsGroupMixin({ ranges+: [ranges] }), - rangesType:: hidden.extensions.v1beta1.idRange, - // rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - withRule(rule):: self + __fsGroupMixin({ rule: rule }), - }, - fsGroupType:: hidden.extensions.v1beta1.fsGroupStrategyOptions, - // 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:: { - local __runAsGroupMixin(runAsGroup) = { runAsGroup+: runAsGroup }, - mixinInstance(runAsGroup):: __runAsGroupMixin(runAsGroup), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __runAsGroupMixin({ ranges: ranges }) else __runAsGroupMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __runAsGroupMixin({ ranges+: ranges }) else __runAsGroupMixin({ ranges+: [ranges] }), - rangesType:: hidden.extensions.v1beta1.idRange, - // rule is the strategy that will dictate the allowable RunAsGroup values that may be set. - withRule(rule):: self + __runAsGroupMixin({ rule: rule }), - }, - runAsGroupType:: hidden.extensions.v1beta1.runAsGroupStrategyOptions, - // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. - runAsUser:: { - local __runAsUserMixin(runAsUser) = { runAsUser+: runAsUser }, - mixinInstance(runAsUser):: __runAsUserMixin(runAsUser), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __runAsUserMixin({ ranges: ranges }) else __runAsUserMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __runAsUserMixin({ ranges+: ranges }) else __runAsUserMixin({ ranges+: [ranges] }), - rangesType:: hidden.extensions.v1beta1.idRange, - // rule is the strategy that will dictate the allowable RunAsUser values that may be set. - withRule(rule):: self + __runAsUserMixin({ rule: rule }), - }, - runAsUserType:: hidden.extensions.v1beta1.runAsUserStrategyOptions, - // seLinux is the strategy that will dictate the allowable labels that may be set. - seLinux:: { - local __seLinuxMixin(seLinux) = { seLinux+: seLinux }, - mixinInstance(seLinux):: __seLinuxMixin(seLinux), - // rule is the strategy that will dictate the allowable labels that may be set. - withRule(rule):: self + __seLinuxMixin({ rule: rule }), - // seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - seLinuxOptions:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __seLinuxMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - seLinuxType:: hidden.extensions.v1beta1.seLinuxStrategyOptions, - // supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. - supplementalGroups:: { - local __supplementalGroupsMixin(supplementalGroups) = { supplementalGroups+: supplementalGroups }, - mixinInstance(supplementalGroups):: __supplementalGroupsMixin(supplementalGroups), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __supplementalGroupsMixin({ ranges: ranges }) else __supplementalGroupsMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __supplementalGroupsMixin({ ranges+: ranges }) else __supplementalGroupsMixin({ ranges+: [ranges] }), - rangesType:: hidden.extensions.v1beta1.idRange, - // rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - withRule(rule):: self + __supplementalGroupsMixin({ rule: rule }), - }, - supplementalGroupsType:: hidden.extensions.v1beta1.supplementalGroupsStrategyOptions, - }, - }, - // ReplicaSetCondition describes the state of a replica set at a certain point. - replicaSetCondition:: { - new():: {}, - // The last time the condition transitioned from one status to another. - withLastTransitionTime(lastTransitionTime):: self + { lastTransitionTime: lastTransitionTime }, - // A human readable message indicating details about the transition. - withMessage(message):: self + { message: message }, - // The reason for the condition's last transition. - withReason(reason):: self + { reason: reason }, - // Status of the condition, one of True, False, Unknown. - withStatus(status):: self + { status: status }, - // Type of replica set condition. - withType(type):: self + { type: type }, - mixin:: {}, - }, - // ReplicaSetList is a collection of ReplicaSets. - replicaSetList:: { - new():: {}, - // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // List of ReplicaSets. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.extensions.v1beta1.replicaSet, - mixin:: {}, - }, - // ReplicaSetSpec is the specification of a ReplicaSet. - replicaSetSpec:: { - new():: {}, - // 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) - withMinReadySeconds(minReadySeconds):: self + { minReadySeconds: 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 - withReplicas(replicas):: self + { replicas: replicas }, - mixin:: { - // Selector is a label query over pods that should match the replica count. If the 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 replica set. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - selector:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __templateMixin(template) = { template+: template }, - mixinInstance(template):: __templateMixin(template), - // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata - metadata:: { - local __metadataMixin(metadata) = __templateMixin({ metadata+: metadata }), - mixinInstance(metadata):: __metadataMixin(metadata), - // 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 - withAnnotations(annotations):: self + __metadataMixin({ annotations: annotations }), - // 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 - withAnnotationsMixin(annotations):: self + __metadataMixin({ annotations+: 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. - withClusterName(clusterName):: self + __metadataMixin({ clusterName: clusterName }), - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers: finalizers }) else __metadataMixin({ finalizers: [finalizers] }), - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then __metadataMixin({ finalizers+: finalizers }) else __metadataMixin({ finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + __metadataMixin({ generateName: generateName }), - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = __metadataMixin({ initializers+: initializers }), - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - // 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 - withLabels(labels):: self + __metadataMixin({ labels: labels }), - // 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 - withLabelsMixin(labels):: self + __metadataMixin({ labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields: managedFields }) else __metadataMixin({ managedFields: [managedFields] }), - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then __metadataMixin({ managedFields+: managedFields }) else __metadataMixin({ managedFields+: [managedFields] }), - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + __metadataMixin({ name: name }), - // Namespace defines the space within 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 - withNamespace(namespace):: self + __metadataMixin({ namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences: ownerReferences }) else __metadataMixin({ ownerReferences: [ownerReferences] }), - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then __metadataMixin({ ownerReferences+: ownerReferences }) else __metadataMixin({ ownerReferences+: [ownerReferences] }), - ownerReferencesType:: hidden.meta.v1.ownerReference, - }, - metadataType:: hidden.meta.v1.objectMeta, - // Specification of the desired behavior of the pod. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status - spec:: { - local __specMixin(spec) = __templateMixin({ spec+: spec }), - mixinInstance(spec):: __specMixin(spec), - // 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. - withActiveDeadlineSeconds(activeDeadlineSeconds):: self + __specMixin({ activeDeadlineSeconds: activeDeadlineSeconds }), - // If specified, the pod's scheduling constraints - affinity:: { - local __affinityMixin(affinity) = __specMixin({ affinity+: affinity }), - mixinInstance(affinity):: __affinityMixin(affinity), - // Describes node affinity scheduling rules for the pod. - nodeAffinity:: { - local __nodeAffinityMixin(nodeAffinity) = __affinityMixin({ nodeAffinity+: nodeAffinity }), - mixinInstance(nodeAffinity):: __nodeAffinityMixin(nodeAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __nodeAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.preferredSchedulingTerm, - // 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:: { - local __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution) = __nodeAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }), - mixinInstance(requiredDuringSchedulingIgnoredDuringExecution):: __requiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTerms(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms: [nodeSelectorTerms] }), - // Required. A list of node selector terms. The terms are ORed. - withNodeSelectorTermsMixin(nodeSelectorTerms):: self + if std.type(nodeSelectorTerms) == 'array' then __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: nodeSelectorTerms }) else __requiredDuringSchedulingIgnoredDuringExecutionMixin({ nodeSelectorTerms+: [nodeSelectorTerms] }), - nodeSelectorTermsType:: hidden.core.v1.nodeSelectorTerm, - }, - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.nodeSelector, - }, - nodeAffinityType:: hidden.core.v1.nodeAffinity, - // Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). - podAffinity:: { - local __podAffinityMixin(podAffinity) = __affinityMixin({ podAffinity+: podAffinity }), - mixinInstance(podAffinity):: __podAffinityMixin(podAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAffinityType:: hidden.core.v1.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:: { - local __podAntiAffinityMixin(podAntiAffinity) = __affinityMixin({ podAntiAffinity+: podAntiAffinity }), - mixinInstance(podAntiAffinity):: __podAntiAffinityMixin(podAntiAffinity), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecution(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution: [preferredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withPreferredDuringSchedulingIgnoredDuringExecutionMixin(preferredDuringSchedulingIgnoredDuringExecution):: self + if std.type(preferredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: preferredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ preferredDuringSchedulingIgnoredDuringExecution+: [preferredDuringSchedulingIgnoredDuringExecution] }), - preferredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.weightedPodAffinityTerm, - // 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. - withRequiredDuringSchedulingIgnoredDuringExecution(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution: [requiredDuringSchedulingIgnoredDuringExecution] }), - // 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. - withRequiredDuringSchedulingIgnoredDuringExecutionMixin(requiredDuringSchedulingIgnoredDuringExecution):: self + if std.type(requiredDuringSchedulingIgnoredDuringExecution) == 'array' then __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: requiredDuringSchedulingIgnoredDuringExecution }) else __podAntiAffinityMixin({ requiredDuringSchedulingIgnoredDuringExecution+: [requiredDuringSchedulingIgnoredDuringExecution] }), - requiredDuringSchedulingIgnoredDuringExecutionType:: hidden.core.v1.podAffinityTerm, - }, - podAntiAffinityType:: hidden.core.v1.podAntiAffinity, - }, - affinityType:: hidden.core.v1.affinity, - // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. - withAutomountServiceAccountToken(automountServiceAccountToken):: self + __specMixin({ automountServiceAccountToken: automountServiceAccountToken }), - // 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. - withContainers(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers: containers }) else __specMixin({ containers: [containers] }), - // 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. - withContainersMixin(containers):: self + if std.type(containers) == 'array' then __specMixin({ containers+: containers }) else __specMixin({ containers+: [containers] }), - containersType:: hidden.core.v1.container, - // Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - dnsConfig:: { - local __dnsConfigMixin(dnsConfig) = __specMixin({ dnsConfig+: dnsConfig }), - mixinInstance(dnsConfig):: __dnsConfigMixin(dnsConfig), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameservers(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers: nameservers }) else __dnsConfigMixin({ nameservers: [nameservers] }), - // A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - withNameserversMixin(nameservers):: self + if std.type(nameservers) == 'array' then __dnsConfigMixin({ nameservers+: nameservers }) else __dnsConfigMixin({ nameservers+: [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. - withOptions(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options: options }) else __dnsConfigMixin({ options: [options] }), - // 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. - withOptionsMixin(options):: self + if std.type(options) == 'array' then __dnsConfigMixin({ options+: options }) else __dnsConfigMixin({ options+: [options] }), - optionsType:: hidden.core.v1.podDnsConfigOption, - // 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. - withSearches(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches: searches }) else __dnsConfigMixin({ searches: [searches] }), - // 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. - withSearchesMixin(searches):: self + if std.type(searches) == 'array' then __dnsConfigMixin({ searches+: searches }) else __dnsConfigMixin({ searches+: [searches] }), - }, - dnsConfigType:: hidden.core.v1.podDnsConfig, - // 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'. - withDnsPolicy(dnsPolicy):: self + __specMixin({ dnsPolicy: 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. - withEnableServiceLinks(enableServiceLinks):: self + __specMixin({ enableServiceLinks: enableServiceLinks }), - // 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. - withHostAliases(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases: hostAliases }) else __specMixin({ hostAliases: [hostAliases] }), - // 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. - withHostAliasesMixin(hostAliases):: self + if std.type(hostAliases) == 'array' then __specMixin({ hostAliases+: hostAliases }) else __specMixin({ hostAliases+: [hostAliases] }), - hostAliasesType:: hidden.core.v1.hostAlias, - // Use the host's ipc namespace. Optional: Default to false. - withHostIpc(hostIpc):: self + __specMixin({ hostIPC: hostIpc }), - // 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. - withHostNetwork(hostNetwork):: self + __specMixin({ hostNetwork: hostNetwork }), - // Use the host's pid namespace. Optional: Default to false. - withHostPid(hostPid):: self + __specMixin({ hostPID: hostPid }), - // Specifies the hostname of the Pod If not specified, the pod's hostname will be set to a system-defined value. - withHostname(hostname):: self + __specMixin({ hostname: hostname }), - // 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 - withImagePullSecrets(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets: imagePullSecrets }) else __specMixin({ imagePullSecrets: [imagePullSecrets] }), - // 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 - withImagePullSecretsMixin(imagePullSecrets):: self + if std.type(imagePullSecrets) == 'array' then __specMixin({ imagePullSecrets+: imagePullSecrets }) else __specMixin({ imagePullSecrets+: [imagePullSecrets] }), - imagePullSecretsType:: hidden.core.v1.localObjectReference, - // 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, or Liveness 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/ - withInitContainers(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers: initContainers }) else __specMixin({ initContainers: [initContainers] }), - // 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, or Liveness 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/ - withInitContainersMixin(initContainers):: self + if std.type(initContainers) == 'array' then __specMixin({ initContainers+: initContainers }) else __specMixin({ initContainers+: [initContainers] }), - initContainersType:: hidden.core.v1.container, - // 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. - withNodeName(nodeName):: self + __specMixin({ nodeName: 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/ - withNodeSelector(nodeSelector):: self + __specMixin({ nodeSelector: nodeSelector }), - // 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/ - withNodeSelectorMixin(nodeSelector):: self + __specMixin({ nodeSelector+: nodeSelector }), - // 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. - withPriority(priority):: self + __specMixin({ priority: 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. - withPriorityClassName(priorityClassName):: self + __specMixin({ priorityClassName: 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/0007-pod-ready%2B%2B.md - withReadinessGates(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates: readinessGates }) else __specMixin({ readinessGates: [readinessGates] }), - // 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/0007-pod-ready%2B%2B.md - withReadinessGatesMixin(readinessGates):: self + if std.type(readinessGates) == 'array' then __specMixin({ readinessGates+: readinessGates }) else __specMixin({ readinessGates+: [readinessGates] }), - readinessGatesType:: hidden.core.v1.podReadinessGate, - // 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 - withRestartPolicy(restartPolicy):: self + __specMixin({ restartPolicy: 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/runtime-class.md This is an alpha feature and may change in the future. - withRuntimeClassName(runtimeClassName):: self + __specMixin({ runtimeClassName: runtimeClassName }), - // If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. - withSchedulerName(schedulerName):: self + __specMixin({ schedulerName: 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:: { - local __securityContextMixin(securityContext) = __specMixin({ securityContext+: securityContext }), - mixinInstance(securityContext):: __securityContextMixin(securityContext), - // 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 the ownership and permissions of any volume. - withFsGroup(fsGroup):: self + __securityContextMixin({ fsGroup: fsGroup }), - // 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. - withRunAsGroup(runAsGroup):: self + __securityContextMixin({ runAsGroup: 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. - withRunAsNonRoot(runAsNonRoot):: self + __securityContextMixin({ runAsNonRoot: 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. - withRunAsUser(runAsUser):: self + __securityContextMixin({ runAsUser: runAsUser }), - // 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:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __securityContextMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.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. - withSupplementalGroups(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups: supplementalGroups }) else __securityContextMixin({ supplementalGroups: [supplementalGroups] }), - // 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. - withSupplementalGroupsMixin(supplementalGroups):: self + if std.type(supplementalGroups) == 'array' then __securityContextMixin({ supplementalGroups+: supplementalGroups }) else __securityContextMixin({ supplementalGroups+: [supplementalGroups] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctls(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls: sysctls }) else __securityContextMixin({ sysctls: [sysctls] }), - // Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch. - withSysctlsMixin(sysctls):: self + if std.type(sysctls) == 'array' then __securityContextMixin({ sysctls+: sysctls }) else __securityContextMixin({ sysctls+: [sysctls] }), - sysctlsType:: hidden.core.v1.sysctl, - }, - securityContextType:: hidden.core.v1.podSecurityContext, - // DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. - withServiceAccount(serviceAccount):: self + __specMixin({ serviceAccount: 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/ - withServiceAccountName(serviceAccountName):: self + __specMixin({ serviceAccountName: serviceAccountName }), - // 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. This field is beta-level and may be disabled with the PodShareProcessNamespace feature. - withShareProcessNamespace(shareProcessNamespace):: self + __specMixin({ shareProcessNamespace: shareProcessNamespace }), - // If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. - withSubdomain(subdomain):: self + __specMixin({ subdomain: 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 delete immediately. 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. - withTerminationGracePeriodSeconds(terminationGracePeriodSeconds):: self + __specMixin({ terminationGracePeriodSeconds: terminationGracePeriodSeconds }), - // If specified, the pod's tolerations. - withTolerations(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations: tolerations }) else __specMixin({ tolerations: [tolerations] }), - // If specified, the pod's tolerations. - withTolerationsMixin(tolerations):: self + if std.type(tolerations) == 'array' then __specMixin({ tolerations+: tolerations }) else __specMixin({ tolerations+: [tolerations] }), - tolerationsType:: hidden.core.v1.toleration, - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumes(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes: volumes }) else __specMixin({ volumes: [volumes] }), - // List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then __specMixin({ volumes+: volumes }) else __specMixin({ volumes+: [volumes] }), - volumesType:: hidden.core.v1.volume, - }, - specType:: hidden.core.v1.podSpec, - }, - templateType:: hidden.core.v1.podTemplateSpec, - }, - }, - // ReplicaSetStatus represents the current status of a ReplicaSet. - replicaSetStatus:: { - new():: {}, - // The number of available replicas (ready for at least minReadySeconds) for this replica set. - withAvailableReplicas(availableReplicas):: self + { availableReplicas: availableReplicas }, - // Represents the latest available observations of a replica set's current state. - withConditions(conditions):: self + if std.type(conditions) == 'array' then { conditions: conditions } else { conditions: [conditions] }, - // Represents the latest available observations of a replica set's current state. - withConditionsMixin(conditions):: self + if std.type(conditions) == 'array' then { conditions+: conditions } else { conditions+: [conditions] }, - conditionsType:: hidden.extensions.v1beta1.replicaSetCondition, - // The number of pods that have labels matching the labels of the pod template of the replicaset. - withFullyLabeledReplicas(fullyLabeledReplicas):: self + { fullyLabeledReplicas: fullyLabeledReplicas }, - // ObservedGeneration reflects the generation of the most recently observed ReplicaSet. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - // The number of ready replicas for this replica set. - withReadyReplicas(readyReplicas):: self + { readyReplicas: readyReplicas }, - // Replicas is the most recently oberved number of replicas. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller - withReplicas(replicas):: self + { replicas: replicas }, - mixin:: {}, - }, - // DEPRECATED. - rollbackConfig:: { - new():: {}, - // The revision to rollback to. If set to 0, rollback to the last revision. - withRevision(revision):: self + { revision: revision }, - mixin:: {}, - }, - // Spec to control the desired behavior of daemon set rolling update. - rollingUpdateDaemonSet:: { - new():: {}, - // 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. 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. - withMaxUnavailable(maxUnavailable):: self + { maxUnavailable: maxUnavailable }, - mixin:: {}, - }, - // Spec to control the desired behavior of rolling update. - rollingUpdateDeployment:: { - new():: {}, - // 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. By default, a value of 1 is used. Example: when this is set to 30%, the new RC 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 RC 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. - withMaxSurge(maxSurge):: self + { maxSurge: 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. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods. - withMaxUnavailable(maxUnavailable):: self + { maxUnavailable: maxUnavailable }, - mixin:: {}, - }, - // RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsGroupStrategyOptions from policy API Group instead. - runAsGroupStrategyOptions:: { - new():: {}, - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then { ranges: ranges } else { ranges: [ranges] }, - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then { ranges+: ranges } else { ranges+: [ranges] }, - rangesType:: hidden.extensions.v1beta1.idRange, - // rule is the strategy that will dictate the allowable RunAsGroup values that may be set. - withRule(rule):: self + { rule: rule }, - mixin:: {}, - }, - // RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use RunAsUserStrategyOptions from policy API Group instead. - runAsUserStrategyOptions:: { - new():: {}, - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then { ranges: ranges } else { ranges: [ranges] }, - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then { ranges+: ranges } else { ranges+: [ranges] }, - rangesType:: hidden.extensions.v1beta1.idRange, - // rule is the strategy that will dictate the allowable RunAsUser values that may be set. - withRule(rule):: self + { rule: rule }, - mixin:: {}, - }, - // describes the attributes of a scale subresource - scaleSpec:: { - new():: {}, - // desired number of instances for the scaled object. - withReplicas(replicas):: self + { replicas: replicas }, - mixin:: {}, - }, - // represents the current status of a scale subresource. - scaleStatus:: { - new():: {}, - // actual number of observed instances of the scaled object. - withReplicas(replicas):: self + { replicas: replicas }, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelector(selector):: self + { selector: selector }, - // label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors - withSelectorMixin(selector):: self + { selector+: selector }, - // label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - withTargetSelector(targetSelector):: self + { targetSelector: targetSelector }, - mixin:: {}, - }, - // SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. Deprecated: use SELinuxStrategyOptions from policy API Group instead. - seLinuxStrategyOptions:: { - new():: {}, - // rule is the strategy that will dictate the allowable labels that may be set. - withRule(rule):: self + { rule: rule }, - mixin:: { - // seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - seLinuxOptions:: { - local __seLinuxOptionsMixin(seLinuxOptions) = { seLinuxOptions+: seLinuxOptions }, - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - }, - // SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. Deprecated: use SupplementalGroupsStrategyOptions from policy API Group instead. - supplementalGroupsStrategyOptions:: { - new():: {}, - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then { ranges: ranges } else { ranges: [ranges] }, - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then { ranges+: ranges } else { ranges+: [ranges] }, - rangesType:: hidden.extensions.v1beta1.idRange, - // rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - withRule(rule):: self + { rule: rule }, - mixin:: {}, - }, - }, - }, - meta:: { - v1:: { - local apiVersion = { apiVersion: 'meta/v1' }, - // APIGroup contains the name, the supported versions, and the preferred version of a group. - apiGroup:: { - new():: {}, - // name is the name of the group. - withName(name):: self + { name: name }, - // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - withServerAddressByClientCidrs(serverAddressByClientCidrs):: self + if std.type(serverAddressByClientCidrs) == 'array' then { serverAddressByClientCIDRs: serverAddressByClientCidrs } else { serverAddressByClientCIDRs: [serverAddressByClientCidrs] }, - // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - withServerAddressByClientCidrsMixin(serverAddressByClientCidrs):: self + if std.type(serverAddressByClientCidrs) == 'array' then { serverAddressByClientCIDRs+: serverAddressByClientCidrs } else { serverAddressByClientCIDRs+: [serverAddressByClientCidrs] }, - serverAddressByClientCIDRsType:: hidden.meta.v1.serverAddressByClientCidr, - // versions are the versions supported in this group. - withVersions(versions):: self + if std.type(versions) == 'array' then { versions: versions } else { versions: [versions] }, - // versions are the versions supported in this group. - withVersionsMixin(versions):: self + if std.type(versions) == 'array' then { versions+: versions } else { versions+: [versions] }, - versionsType:: hidden.meta.v1.groupVersionForDiscovery, - mixin:: { - // preferredVersion is the version preferred by the API server, which probably is the storage version. - preferredVersion:: { - local __preferredVersionMixin(preferredVersion) = { preferredVersion+: preferredVersion }, - mixinInstance(preferredVersion):: __preferredVersionMixin(preferredVersion), - // groupVersion specifies the API group and version in the form "group/version" - withGroupVersion(groupVersion):: self + __preferredVersionMixin({ groupVersion: groupVersion }), - // version specifies the version in the form of "version". This is to save the clients the trouble of splitting the GroupVersion. - withVersion(version):: self + __preferredVersionMixin({ version: version }), - }, - preferredVersionType:: hidden.meta.v1.groupVersionForDiscovery, - }, - }, - // APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis. - apiGroupList:: { - new():: {}, - // groups is a list of APIGroup. - withGroups(groups):: self + if std.type(groups) == 'array' then { groups: groups } else { groups: [groups] }, - // groups is a list of APIGroup. - withGroupsMixin(groups):: self + if std.type(groups) == 'array' then { groups+: groups } else { groups+: [groups] }, - groupsType:: hidden.meta.v1.apiGroup, - mixin:: {}, - }, - // APIResource specifies the name of a resource and whether it is namespaced. - apiResource:: { - new():: {}, - // categories is a list of the grouped resources this resource belongs to (e.g. 'all') - withCategories(categories):: self + if std.type(categories) == 'array' then { categories: categories } else { categories: [categories] }, - // categories is a list of the grouped resources this resource belongs to (e.g. 'all') - withCategoriesMixin(categories):: self + if std.type(categories) == 'array' then { categories+: categories } else { categories+: [categories] }, - // group is the preferred group of the resource. Empty implies the group of the containing resource list. For subresources, this may have a different value, for example: Scale". - withGroup(group):: self + { group: group }, - // kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo') - withKind(kind):: self + { kind: kind }, - // name is the plural name of the resource. - withName(name):: self + { name: name }, - // namespaced indicates if a resource is namespaced or not. - withNamespaced(namespaced):: self + { namespaced: namespaced }, - // shortNames is a list of suggested short names of the resource. - withShortNames(shortNames):: self + if std.type(shortNames) == 'array' then { shortNames: shortNames } else { shortNames: [shortNames] }, - // shortNames is a list of suggested short names of the resource. - withShortNamesMixin(shortNames):: self + if std.type(shortNames) == 'array' then { shortNames+: shortNames } else { shortNames+: [shortNames] }, - // singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface. - withSingularName(singularName):: self + { singularName: singularName }, - // The hash value of the storage version, the version this resource is converted to when written to the data store. Value must be treated as opaque by clients. Only equality comparison on the value is valid. This is an alpha feature and may change or be removed in the future. The field is populated by the apiserver only if the StorageVersionHash feature gate is enabled. This field will remain optional even if it graduates. - withStorageVersionHash(storageVersionHash):: self + { storageVersionHash: storageVersionHash }, - // verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) - withVerbs(verbs):: self + if std.type(verbs) == 'array' then { verbs: verbs } else { verbs: [verbs] }, - // verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy) - withVerbsMixin(verbs):: self + if std.type(verbs) == 'array' then { verbs+: verbs } else { verbs+: [verbs] }, - // version is the preferred version of the resource. Empty implies the version of the containing resource list For subresources, this may have a different value, for example: v1 (while inside a v1beta1 version of the core resource's group)". - withVersion(version):: self + { version: version }, - mixin:: {}, - }, - // APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced. - apiResourceList:: { - new():: {}, - // groupVersion is the group and version this APIResourceList is for. - withGroupVersion(groupVersion):: self + { groupVersion: groupVersion }, - // resources contains the name of the resources and if they are namespaced. - withResources(resources):: self + if std.type(resources) == 'array' then { resources: resources } else { resources: [resources] }, - // resources contains the name of the resources and if they are namespaced. - withResourcesMixin(resources):: self + if std.type(resources) == 'array' then { resources+: resources } else { resources+: [resources] }, - resourcesType:: hidden.meta.v1.apiResource, - mixin:: {}, - }, - // APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API. - apiVersions:: { - new():: {}, - // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - withServerAddressByClientCidrs(serverAddressByClientCidrs):: self + if std.type(serverAddressByClientCidrs) == 'array' then { serverAddressByClientCIDRs: serverAddressByClientCidrs } else { serverAddressByClientCIDRs: [serverAddressByClientCidrs] }, - // a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP. - withServerAddressByClientCidrsMixin(serverAddressByClientCidrs):: self + if std.type(serverAddressByClientCidrs) == 'array' then { serverAddressByClientCIDRs+: serverAddressByClientCidrs } else { serverAddressByClientCIDRs+: [serverAddressByClientCidrs] }, - serverAddressByClientCIDRsType:: hidden.meta.v1.serverAddressByClientCidr, - // versions are the api versions that are available. - withVersions(versions):: self + if std.type(versions) == 'array' then { versions: versions } else { versions: [versions] }, - // versions are the api versions that are available. - withVersionsMixin(versions):: self + if std.type(versions) == 'array' then { versions+: versions } else { versions+: [versions] }, - mixin:: {}, - }, - // DeleteOptions may be provided when deleting an API object. - deleteOptions:: { - new():: {}, - // 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 - withDryRun(dryRun):: self + if std.type(dryRun) == 'array' then { dryRun: dryRun } else { dryRun: [dryRun] }, - // 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 - withDryRunMixin(dryRun):: self + if std.type(dryRun) == 'array' then { dryRun+: dryRun } else { dryRun+: [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. - withGracePeriodSeconds(gracePeriodSeconds):: self + { gracePeriodSeconds: gracePeriodSeconds }, - // 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. - withOrphanDependents(orphanDependents):: self + { orphanDependents: orphanDependents }, - // 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. - withPropagationPolicy(propagationPolicy):: self + { propagationPolicy: propagationPolicy }, - mixin:: { - // Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. - preconditions:: { - local __preconditionsMixin(preconditions) = { preconditions+: preconditions }, - mixinInstance(preconditions):: __preconditionsMixin(preconditions), - // Specifies the target ResourceVersion - withResourceVersion(resourceVersion):: self + __preconditionsMixin({ resourceVersion: resourceVersion }), - // Specifies the target UID. - withUid(uid):: self + __preconditionsMixin({ uid: uid }), - }, - preconditionsType:: hidden.meta.v1.preconditions, - }, - }, - // Fields stores a set of fields in a data structure like a Trie. To understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff - fields:: { - new():: {}, - mixin:: {}, - }, - // GroupVersion contains the "group/version" and "version" string of a version. It is made a struct to keep extensibility. - groupVersionForDiscovery:: { - new():: {}, - // groupVersion specifies the API group and version in the form "group/version" - withGroupVersion(groupVersion):: self + { groupVersion: groupVersion }, - // version specifies the version in the form of "version". This is to save the clients the trouble of splitting the GroupVersion. - withVersion(version):: self + { version: version }, - mixin:: {}, - }, - // Initializer is information about an initializer that has not yet completed. - initializer:: { - new():: {}, - // name of the process that is responsible for initializing this object. - withName(name):: self + { name: name }, - mixin:: {}, - }, - // Initializers tracks the progress of initialization. - initializers:: { - new():: {}, - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then { pending: pending } else { pending: [pending] }, - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then { pending+: pending } else { pending+: [pending] }, - pendingType:: hidden.meta.v1.initializer, - mixin:: {}, - }, - // 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. - labelSelector:: { - new():: {}, - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then { matchExpressions: matchExpressions } else { matchExpressions: [matchExpressions] }, - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then { matchExpressions+: matchExpressions } else { matchExpressions+: [matchExpressions] }, - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + { matchLabels: matchLabels }, - // 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. - withMatchLabelsMixin(matchLabels):: self + { matchLabels+: matchLabels }, - mixin:: {}, - }, - // A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - labelSelectorRequirement:: { - new():: {}, - // key is the label key that the selector applies to. - withKey(key):: self + { key: key }, - // operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - withOperator(operator):: self + { operator: 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. - withValues(values):: self + if std.type(values) == 'array' then { values: values } else { values: [values] }, - // 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. - withValuesMixin(values):: self + if std.type(values) == 'array' then { values+: values } else { values+: [values] }, - mixin:: {}, - }, - // ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. - listMeta:: { - new():: {}, - // 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. - withContinue(continue):: self + { continue: continue }, - mixin:: {}, - }, - // ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to. - managedFieldsEntry:: { - new():: {}, - // Manager is an identifier of the workflow managing these fields. - withManager(manager):: self + { manager: 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'. - withOperation(operation):: self + { operation: operation }, - // Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply' - withTime(time):: self + { time: time }, - mixin:: { - // Fields identifies a set of fields. - fields:: { - local __fieldsMixin(fields) = { fields+: fields }, - mixinInstance(fields):: __fieldsMixin(fields), - }, - fieldsType:: hidden.meta.v1.fields, - }, - }, - // MicroTime is version of Time with microsecond level precision. - microTime:: { - new():: {}, - mixin:: {}, - }, - // ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. - objectMeta:: { - new():: {}, - // 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 - withAnnotations(annotations):: self + { annotations: annotations }, - // 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 - withAnnotationsMixin(annotations):: self + { annotations+: 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. - withClusterName(clusterName):: self + { clusterName: clusterName }, - // 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. - withFinalizers(finalizers):: self + if std.type(finalizers) == 'array' then { finalizers: finalizers } else { finalizers: [finalizers] }, - // 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. - withFinalizersMixin(finalizers):: self + if std.type(finalizers) == 'array' then { finalizers+: finalizers } else { finalizers+: [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/api-conventions.md#idempotency - withGenerateName(generateName):: self + { generateName: generateName }, - // 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 - withLabels(labels):: self + { labels: labels }, - // 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 - withLabelsMixin(labels):: self + { labels+: 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFields(managedFields):: self + if std.type(managedFields) == 'array' then { managedFields: managedFields } else { managedFields: [managedFields] }, - // 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. - // - // This field is alpha and can be changed or removed without notice. - withManagedFieldsMixin(managedFields):: self + if std.type(managedFields) == 'array' then { managedFields+: managedFields } else { managedFields+: [managedFields] }, - managedFieldsType:: hidden.meta.v1.managedFieldsEntry, - // 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 - withName(name):: self + { name: name }, - // Namespace defines the space within 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 - withNamespace(namespace):: self + { namespace: 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. - withOwnerReferences(ownerReferences):: self + if std.type(ownerReferences) == 'array' then { ownerReferences: ownerReferences } else { ownerReferences: [ownerReferences] }, - // 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. - withOwnerReferencesMixin(ownerReferences):: self + if std.type(ownerReferences) == 'array' then { ownerReferences+: ownerReferences } else { ownerReferences+: [ownerReferences] }, - ownerReferencesType:: hidden.meta.v1.ownerReference, - mixin:: { - // An initializer is a controller which enforces some system invariant at object creation time. This field is a list of initializers that have not yet acted on this object. If nil or empty, this object has been completely initialized. Otherwise, the object is considered uninitialized and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to observe uninitialized objects. - // - // When an object is created, the system will populate this list with the current set of initializers. Only privileged users may set or modify this list. Once it is empty, it may not be modified further by any user. - // - // DEPRECATED - initializers are an alpha field and will be removed in v1.15. - initializers:: { - local __initializersMixin(initializers) = { initializers+: initializers }, - mixinInstance(initializers):: __initializersMixin(initializers), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPending(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending: pending }) else __initializersMixin({ pending: [pending] }), - // Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients. - withPendingMixin(pending):: self + if std.type(pending) == 'array' then __initializersMixin({ pending+: pending }) else __initializersMixin({ pending+: [pending] }), - pendingType:: hidden.meta.v1.initializer, - }, - initializersType:: hidden.meta.v1.initializers, - }, - }, - // 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. - ownerReference:: { - new():: {}, - // API version of the referent. - withApiVersion(apiVersion):: self + { apiVersion: apiVersion }, - // 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. - withBlockOwnerDeletion(blockOwnerDeletion):: self + { blockOwnerDeletion: blockOwnerDeletion }, - // If true, this reference points to the managing controller. - withController(controller):: self + { controller: controller }, - // Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds - withKind(kind):: self + { kind: kind }, - // Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names - withName(name):: self + { name: name }, - // UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids - withUid(uid):: self + { uid: uid }, - mixin:: {}, - }, - // Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out. - preconditions:: { - new():: {}, - // Specifies the target ResourceVersion - withResourceVersion(resourceVersion):: self + { resourceVersion: resourceVersion }, - // Specifies the target UID. - withUid(uid):: self + { uid: uid }, - mixin:: {}, - }, - // ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match. - serverAddressByClientCidr:: { - new():: {}, - // The CIDR with which clients can match their IP to figure out the server address that they should use. - withClientCidr(clientCidr):: self + { clientCIDR: clientCidr }, - // Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port. - withServerAddress(serverAddress):: self + { serverAddress: serverAddress }, - mixin:: {}, - }, - // Status is a return value for calls that don't return other objects. - status:: { - new():: {}, - // Suggested HTTP return code for this status, 0 if not set. - withCode(code):: self + { code: code }, - // A human-readable description of the status of this operation. - withMessage(message):: self + { message: message }, - // 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. - withReason(reason):: self + { reason: reason }, - mixin:: { - // 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:: { - local __detailsMixin(details) = { details+: details }, - mixinInstance(details):: __detailsMixin(details), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == 'array' then __detailsMixin({ causes: causes }) else __detailsMixin({ causes: [causes] }), - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == 'array' then __detailsMixin({ causes+: causes }) else __detailsMixin({ causes+: [causes] }), - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + __detailsMixin({ group: group }), - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + __detailsMixin({ name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + __detailsMixin({ retryAfterSeconds: 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 - withUid(uid):: self + __detailsMixin({ uid: uid }), - }, - detailsType:: hidden.meta.v1.statusDetails, - }, - }, - // StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered. - statusCause:: { - new():: {}, - // 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" - withField(field):: self + { field: field }, - // A human-readable description of the cause of the error. This field may be presented as-is to a reader. - withMessage(message):: self + { message: message }, - // A machine-readable description of the cause of the error. If this value is empty there is no information available. - withReason(reason):: self + { reason: reason }, - mixin:: {}, - }, - // 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. - statusDetails:: { - new():: {}, - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCauses(causes):: self + if std.type(causes) == 'array' then { causes: causes } else { causes: [causes] }, - // The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes. - withCausesMixin(causes):: self + if std.type(causes) == 'array' then { causes+: causes } else { causes+: [causes] }, - causesType:: hidden.meta.v1.statusCause, - // The group attribute of the resource associated with the status StatusReason. - withGroup(group):: self + { group: group }, - // The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). - withName(name):: self + { name: 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. - withRetryAfterSeconds(retryAfterSeconds):: self + { retryAfterSeconds: 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 - withUid(uid):: self + { uid: uid }, - mixin:: {}, - }, - // Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers. - time:: { - new():: {}, - mixin:: {}, - }, - // Event represents a single event to a watched resource. - watchEvent:: { - new():: {}, - withType(type):: self + { type: type }, - mixin:: { - // Object is: - // * If Type is Added or Modified: the new state of the object. - // * If Type is Deleted: the state of the object immediately before deletion. - // * If Type is Error: *Status is recommended; other types may make sense - // depending on context. - object:: { - local __objectMixin(object) = { object+: object }, - mixinInstance(object):: __objectMixin(object), - // Raw is the underlying serialization of this object. - withRaw(raw):: self + __objectMixin({ Raw: raw }), - }, - }, - }, - }, - }, - networking:: { - v1:: { - local apiVersion = { apiVersion: 'networking/v1' }, - // IPBlock describes a particular CIDR (Ex. "192.168.1.1/24") 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. - ipBlock:: { - new():: {}, - // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" - withCidr(cidr):: self + { cidr: cidr }, - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExcept(except):: self + if std.type(except) == 'array' then { except: except } else { except: [except] }, - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExceptMixin(except):: self + if std.type(except) == 'array' then { except+: except } else { except+: [except] }, - mixin:: {}, - }, - // 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 - networkPolicyEgressRule:: { - new():: {}, - // 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. - withPorts(ports):: self + if std.type(ports) == 'array' then { ports: ports } else { ports: [ports] }, - // 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. - withPortsMixin(ports):: self + if std.type(ports) == 'array' then { ports+: ports } else { ports+: [ports] }, - portsType:: hidden.networking.v1.networkPolicyPort, - // 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. - withTo(to):: self + if std.type(to) == 'array' then { to: to } else { to: [to] }, - // 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. - withToMixin(to):: self + if std.type(to) == 'array' then { to+: to } else { to+: [to] }, - toType:: hidden.networking.v1.networkPolicyPeer, - mixin:: {}, - }, - // 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. - networkPolicyIngressRule:: { - new():: {}, - // 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list. - withFrom(from):: self + if std.type(from) == 'array' then { from: from } else { from: [from] }, - // 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 on item, this rule allows traffic only if the traffic matches at least one item in the from list. - withFromMixin(from):: self + if std.type(from) == 'array' then { from+: from } else { from+: [from] }, - fromType:: hidden.networking.v1.networkPolicyPeer, - // 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. - withPorts(ports):: self + if std.type(ports) == 'array' then { ports: ports } else { ports: [ports] }, - // 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. - withPortsMixin(ports):: self + if std.type(ports) == 'array' then { ports+: ports } else { ports+: [ports] }, - portsType:: hidden.networking.v1.networkPolicyPort, - mixin:: {}, - }, - // NetworkPolicyList is a list of NetworkPolicy objects. - networkPolicyList:: { - new():: {}, - // Items is a list of schema objects. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of schema objects. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.networking.v1.networkPolicy, - mixin:: {}, - }, - // NetworkPolicyPeer describes a peer to allow traffic from. Only certain combinations of fields are allowed - networkPolicyPeer:: { - new():: {}, - mixin:: { - // IPBlock defines policy on a particular IPBlock. If this field is set then neither of the other fields can be. - ipBlock:: { - local __ipBlockMixin(ipBlock) = { ipBlock+: ipBlock }, - mixinInstance(ipBlock):: __ipBlockMixin(ipBlock), - // CIDR is a string representing the IP Block Valid examples are "192.168.1.1/24" - withCidr(cidr):: self + __ipBlockMixin({ cidr: cidr }), - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExcept(except):: self + if std.type(except) == 'array' then __ipBlockMixin({ except: except }) else __ipBlockMixin({ except: [except] }), - // Except is a slice of CIDRs that should not be included within an IP Block Valid examples are "192.168.1.1/24" Except values will be rejected if they are outside the CIDR range - withExceptMixin(except):: self + if std.type(except) == 'array' then __ipBlockMixin({ except+: except }) else __ipBlockMixin({ except+: [except] }), - }, - ipBlockType:: hidden.networking.v1.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:: { - local __namespaceSelectorMixin(namespaceSelector) = { namespaceSelector+: namespaceSelector }, - mixinInstance(namespaceSelector):: __namespaceSelectorMixin(namespaceSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __namespaceSelectorMixin({ matchExpressions: matchExpressions }) else __namespaceSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __namespaceSelectorMixin({ matchExpressions+: matchExpressions }) else __namespaceSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __namespaceSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __namespaceSelectorMixin({ matchLabels+: matchLabels }), - }, - namespaceSelectorType:: hidden.meta.v1.labelSelector, - // 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:: { - local __podSelectorMixin(podSelector) = { podSelector+: podSelector }, - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __podSelectorMixin({ matchExpressions: matchExpressions }) else __podSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __podSelectorMixin({ matchExpressions+: matchExpressions }) else __podSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __podSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({ matchLabels+: matchLabels }), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - // NetworkPolicyPort describes a port to allow traffic on - networkPolicyPort:: { - new():: {}, - // 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. - withPort(port):: self + { port: port }, - // The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP. - withProtocol(protocol):: self + { protocol: protocol }, - mixin:: {}, - }, - // NetworkPolicySpec provides the specification of a NetworkPolicy - networkPolicySpec:: { - new():: {}, - // 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 - withEgress(egress):: self + if std.type(egress) == 'array' then { egress: egress } else { egress: [egress] }, - // 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 - withEgressMixin(egress):: self + if std.type(egress) == 'array' then { egress+: egress } else { egress+: [egress] }, - egressType:: hidden.networking.v1.networkPolicyEgressRule, - // 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) - withIngress(ingress):: self + if std.type(ingress) == 'array' then { ingress: ingress } else { ingress: [ingress] }, - // 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) - withIngressMixin(ingress):: self + if std.type(ingress) == 'array' then { ingress+: ingress } else { ingress+: [ingress] }, - ingressType:: hidden.networking.v1.networkPolicyIngressRule, - // 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 - withPolicyTypes(policyTypes):: self + if std.type(policyTypes) == 'array' then { policyTypes: policyTypes } else { policyTypes: [policyTypes] }, - // 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 - withPolicyTypesMixin(policyTypes):: self + if std.type(policyTypes) == 'array' then { policyTypes+: policyTypes } else { policyTypes+: [policyTypes] }, - mixin:: { - // 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:: { - local __podSelectorMixin(podSelector) = { podSelector+: podSelector }, - mixinInstance(podSelector):: __podSelectorMixin(podSelector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __podSelectorMixin({ matchExpressions: matchExpressions }) else __podSelectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __podSelectorMixin({ matchExpressions+: matchExpressions }) else __podSelectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __podSelectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __podSelectorMixin({ matchLabels+: matchLabels }), - }, - podSelectorType:: hidden.meta.v1.labelSelector, - }, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'networking/v1beta1' }, - // HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend. - httpIngressPath:: { - new():: {}, - // Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) 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 '/'. If unspecified, the path defaults to a catch all sending traffic to the backend. - withPath(path):: self + { path: path }, - mixin:: { - // Backend defines the referenced service endpoint to which the traffic will be forwarded to. - backend:: { - local __backendMixin(backend) = { backend+: backend }, - mixinInstance(backend):: __backendMixin(backend), - // Specifies the name of the referenced service. - withServiceName(serviceName):: self + __backendMixin({ serviceName: serviceName }), - // Specifies the port of the referenced service. - withServicePort(servicePort):: self + __backendMixin({ servicePort: servicePort }), - }, - backendType:: hidden.networking.v1beta1.ingressBackend, - }, - }, - // 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 '#'. - httpIngressRuleValue:: { - new():: {}, - // A collection of paths that map requests to backends. - withPaths(paths):: self + if std.type(paths) == 'array' then { paths: paths } else { paths: [paths] }, - // A collection of paths that map requests to backends. - withPathsMixin(paths):: self + if std.type(paths) == 'array' then { paths+: paths } else { paths+: [paths] }, - pathsType:: hidden.networking.v1beta1.httpIngressPath, - mixin:: {}, - }, - // IngressBackend describes all endpoints for a given service and port. - ingressBackend:: { - new():: {}, - // Specifies the name of the referenced service. - withServiceName(serviceName):: self + { serviceName: serviceName }, - // Specifies the port of the referenced service. - withServicePort(servicePort):: self + { servicePort: servicePort }, - mixin:: {}, - }, - // IngressList is a collection of Ingress. - ingressList:: { - new():: {}, - // Items is the list of Ingress. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of Ingress. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.networking.v1beta1.ingress, - mixin:: {}, - }, - // 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. - ingressRule:: { - new():: {}, - // 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 the RFC: 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. - withHost(host):: self + { host: host }, - mixin:: { - http:: { - local __httpMixin(http) = { http+: http }, - mixinInstance(http):: __httpMixin(http), - // A collection of paths that map requests to backends. - withPaths(paths):: self + if std.type(paths) == 'array' then __httpMixin({ paths: paths }) else __httpMixin({ paths: [paths] }), - // A collection of paths that map requests to backends. - withPathsMixin(paths):: self + if std.type(paths) == 'array' then __httpMixin({ paths+: paths }) else __httpMixin({ paths+: [paths] }), - pathsType:: hidden.networking.v1beta1.httpIngressPath, - }, - httpType:: hidden.networking.v1beta1.httpIngressRuleValue, - }, - }, - // IngressSpec describes the Ingress the user wishes to exist. - ingressSpec:: { - new():: {}, - // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. - withRules(rules):: self + if std.type(rules) == 'array' then { rules: rules } else { rules: [rules] }, - // A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend. - withRulesMixin(rules):: self + if std.type(rules) == 'array' then { rules+: rules } else { rules+: [rules] }, - rulesType:: hidden.networking.v1beta1.ingressRule, - // 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. - withTls(tls):: self + if std.type(tls) == 'array' then { tls: tls } else { tls: [tls] }, - // 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. - withTlsMixin(tls):: self + if std.type(tls) == 'array' then { tls+: tls } else { tls+: [tls] }, - tlsType:: hidden.networking.v1beta1.ingressTls, - mixin:: { - // A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default. - backend:: { - local __backendMixin(backend) = { backend+: backend }, - mixinInstance(backend):: __backendMixin(backend), - // Specifies the name of the referenced service. - withServiceName(serviceName):: self + __backendMixin({ serviceName: serviceName }), - // Specifies the port of the referenced service. - withServicePort(servicePort):: self + __backendMixin({ servicePort: servicePort }), - }, - backendType:: hidden.networking.v1beta1.ingressBackend, - }, - }, - // IngressStatus describe the current state of the Ingress. - ingressStatus:: { - new():: {}, - mixin:: { - // LoadBalancer contains the current status of the load-balancer. - loadBalancer:: { - local __loadBalancerMixin(loadBalancer) = { loadBalancer+: loadBalancer }, - mixinInstance(loadBalancer):: __loadBalancerMixin(loadBalancer), - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngress(ingress):: self + if std.type(ingress) == 'array' then __loadBalancerMixin({ ingress: ingress }) else __loadBalancerMixin({ ingress: [ingress] }), - // Ingress is a list containing ingress points for the load-balancer. Traffic intended for the service should be sent to these ingress points. - withIngressMixin(ingress):: self + if std.type(ingress) == 'array' then __loadBalancerMixin({ ingress+: ingress }) else __loadBalancerMixin({ ingress+: [ingress] }), - ingressType:: hidden.core.v1.loadBalancerIngress, - }, - loadBalancerType:: hidden.core.v1.loadBalancerStatus, - }, - }, - // IngressTLS describes the transport layer security associated with an Ingress. - ingressTls:: { - new():: {}, - // 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. - withHosts(hosts):: self + if std.type(hosts) == 'array' then { hosts: hosts } else { hosts: [hosts] }, - // 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. - withHostsMixin(hosts):: self + if std.type(hosts) == 'array' then { hosts+: hosts } else { hosts+: [hosts] }, - // SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL 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. - withSecretName(secretName):: self + { secretName: secretName }, - mixin:: {}, - }, - }, - }, - node:: { - v1beta1:: { - local apiVersion = { apiVersion: 'node/v1beta1' }, - // RuntimeClassList is a list of RuntimeClass objects. - runtimeClassList:: { - new():: {}, - // Items is a list of schema objects. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of schema objects. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.node.v1beta1.runtimeClass, - mixin:: {}, - }, - }, - }, - policy:: { - v1beta1:: { - local apiVersion = { apiVersion: 'policy/v1beta1' }, - // AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used. - allowedCsiDriver:: { - new():: {}, - // Name is the registered name of the CSI driver - withName(name):: self + { name: name }, - mixin:: {}, - }, - // AllowedFlexVolume represents a single Flexvolume that is allowed to be used. - allowedFlexVolume:: { - new():: {}, - // driver is the name of the Flexvolume driver. - withDriver(driver):: self + { driver: driver }, - mixin:: {}, - }, - // 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. - allowedHostPath:: { - new():: {}, - // 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` - withPathPrefix(pathPrefix):: self + { pathPrefix: pathPrefix }, - // when set to true, will allow host volumes matching the pathPrefix only if all volume mounts are readOnly. - withReadOnly(readOnly):: self + { readOnly: readOnly }, - mixin:: {}, - }, - // FSGroupStrategyOptions defines the strategy type and options used to create the strategy. - fsGroupStrategyOptions:: { - new():: {}, - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then { ranges: ranges } else { ranges: [ranges] }, - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then { ranges+: ranges } else { ranges+: [ranges] }, - rangesType:: hidden.policy.v1beta1.idRange, - // rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - withRule(rule):: self + { rule: rule }, - mixin:: {}, - }, - // 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. - hostPortRange:: { - new():: {}, - // max is the end of the range, inclusive. - withMax(max):: self + { max: max }, - // min is the start of the range, inclusive. - withMin(min):: self + { min: min }, - mixin:: {}, - }, - // IDRange provides a min/max of an allowed range of IDs. - idRange:: { - new():: {}, - // max is the end of the range, inclusive. - withMax(max):: self + { max: max }, - // min is the start of the range, inclusive. - withMin(min):: self + { min: min }, - mixin:: {}, - }, - // PodDisruptionBudgetList is a collection of PodDisruptionBudgets. - podDisruptionBudgetList:: { - new():: {}, - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.policy.v1beta1.podDisruptionBudget, - mixin:: {}, - }, - // PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. - podDisruptionBudgetSpec:: { - new():: {}, - // 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". - withMaxUnavailable(maxUnavailable):: self + { maxUnavailable: 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%". - withMinAvailable(minAvailable):: self + { minAvailable: minAvailable }, - mixin:: { - // Label query over pods whose evictions are managed by the disruption budget. - selector:: { - local __selectorMixin(selector) = { selector+: selector }, - mixinInstance(selector):: __selectorMixin(selector), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressions(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions: matchExpressions }) else __selectorMixin({ matchExpressions: [matchExpressions] }), - // matchExpressions is a list of label selector requirements. The requirements are ANDed. - withMatchExpressionsMixin(matchExpressions):: self + if std.type(matchExpressions) == 'array' then __selectorMixin({ matchExpressions+: matchExpressions }) else __selectorMixin({ matchExpressions+: [matchExpressions] }), - matchExpressionsType:: hidden.meta.v1.labelSelectorRequirement, - // 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. - withMatchLabels(matchLabels):: self + __selectorMixin({ matchLabels: matchLabels }), - // 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. - withMatchLabelsMixin(matchLabels):: self + __selectorMixin({ matchLabels+: matchLabels }), - }, - selectorType:: hidden.meta.v1.labelSelector, - }, - }, - // PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system. - podDisruptionBudgetStatus:: { - new():: {}, - // current number of healthy pods - withCurrentHealthy(currentHealthy):: self + { currentHealthy: currentHealthy }, - // minimum desired number of healthy pods - withDesiredHealthy(desiredHealthy):: self + { desiredHealthy: desiredHealthy }, - // DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. - withDisruptedPods(disruptedPods):: self + { disruptedPods: disruptedPods }, - // DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions. - withDisruptedPodsMixin(disruptedPods):: self + { disruptedPods+: disruptedPods }, - // Number of pod disruptions that are currently allowed. - withDisruptionsAllowed(disruptionsAllowed):: self + { disruptionsAllowed: disruptionsAllowed }, - // total number of pods counted by this disruption budget - withExpectedPods(expectedPods):: self + { expectedPods: expectedPods }, - // Most recent generation observed when updating this PDB status. PodDisruptionsAllowed and other status informatio is valid only if observedGeneration equals to PDB's object generation. - withObservedGeneration(observedGeneration):: self + { observedGeneration: observedGeneration }, - mixin:: {}, - }, - // PodSecurityPolicyList is a list of PodSecurityPolicy objects. - podSecurityPolicyList:: { - new():: {}, - // items is a list of schema objects. - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // items is a list of schema objects. - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.policy.v1beta1.podSecurityPolicy, - mixin:: {}, - }, - // PodSecurityPolicySpec defines the policy enforced. - podSecurityPolicySpec:: { - new():: {}, - // allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true. - withAllowPrivilegeEscalation(allowPrivilegeEscalation):: self + { allowPrivilegeEscalation: allowPrivilegeEscalation }, - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value means no CSI drivers can run inline within a pod spec. - withAllowedCsiDrivers(allowedCsiDrivers):: self + if std.type(allowedCsiDrivers) == 'array' then { allowedCSIDrivers: allowedCsiDrivers } else { allowedCSIDrivers: [allowedCsiDrivers] }, - // AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value means no CSI drivers can run inline within a pod spec. - withAllowedCsiDriversMixin(allowedCsiDrivers):: self + if std.type(allowedCsiDrivers) == 'array' then { allowedCSIDrivers+: allowedCsiDrivers } else { allowedCSIDrivers+: [allowedCsiDrivers] }, - allowedCSIDriversType:: hidden.policy.v1beta1.allowedCsiDriver, - // 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. - withAllowedCapabilities(allowedCapabilities):: self + if std.type(allowedCapabilities) == 'array' then { allowedCapabilities: allowedCapabilities } else { allowedCapabilities: [allowedCapabilities] }, - // 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. - withAllowedCapabilitiesMixin(allowedCapabilities):: self + if std.type(allowedCapabilities) == 'array' then { allowedCapabilities+: allowedCapabilities } else { allowedCapabilities+: [allowedCapabilities] }, - // allowedFlexVolumes is a whitelist of allowed 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. - withAllowedFlexVolumes(allowedFlexVolumes):: self + if std.type(allowedFlexVolumes) == 'array' then { allowedFlexVolumes: allowedFlexVolumes } else { allowedFlexVolumes: [allowedFlexVolumes] }, - // allowedFlexVolumes is a whitelist of allowed 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. - withAllowedFlexVolumesMixin(allowedFlexVolumes):: self + if std.type(allowedFlexVolumes) == 'array' then { allowedFlexVolumes+: allowedFlexVolumes } else { allowedFlexVolumes+: [allowedFlexVolumes] }, - allowedFlexVolumesType:: hidden.policy.v1beta1.allowedFlexVolume, - // allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used. - withAllowedHostPaths(allowedHostPaths):: self + if std.type(allowedHostPaths) == 'array' then { allowedHostPaths: allowedHostPaths } else { allowedHostPaths: [allowedHostPaths] }, - // allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used. - withAllowedHostPathsMixin(allowedHostPaths):: self + if std.type(allowedHostPaths) == 'array' then { allowedHostPaths+: allowedHostPaths } else { allowedHostPaths+: [allowedHostPaths] }, - allowedHostPathsType:: hidden.policy.v1beta1.allowedHostPath, - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. - withAllowedProcMountTypes(allowedProcMountTypes):: self + if std.type(allowedProcMountTypes) == 'array' then { allowedProcMountTypes: allowedProcMountTypes } else { allowedProcMountTypes: [allowedProcMountTypes] }, - // AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled. - withAllowedProcMountTypesMixin(allowedProcMountTypes):: self + if std.type(allowedProcMountTypes) == 'array' then { allowedProcMountTypes+: allowedProcMountTypes } else { allowedProcMountTypes+: [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 whitelist 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. - withAllowedUnsafeSysctls(allowedUnsafeSysctls):: self + if std.type(allowedUnsafeSysctls) == 'array' then { allowedUnsafeSysctls: allowedUnsafeSysctls } else { allowedUnsafeSysctls: [allowedUnsafeSysctls] }, - // 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 whitelist 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. - withAllowedUnsafeSysctlsMixin(allowedUnsafeSysctls):: self + if std.type(allowedUnsafeSysctls) == 'array' then { allowedUnsafeSysctls+: allowedUnsafeSysctls } else { allowedUnsafeSysctls+: [allowedUnsafeSysctls] }, - // 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. - withDefaultAddCapabilities(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == 'array' then { defaultAddCapabilities: defaultAddCapabilities } else { defaultAddCapabilities: [defaultAddCapabilities] }, - // 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. - withDefaultAddCapabilitiesMixin(defaultAddCapabilities):: self + if std.type(defaultAddCapabilities) == 'array' then { defaultAddCapabilities+: defaultAddCapabilities } else { defaultAddCapabilities+: [defaultAddCapabilities] }, - // defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process. - withDefaultAllowPrivilegeEscalation(defaultAllowPrivilegeEscalation):: self + { defaultAllowPrivilegeEscalation: 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. - withForbiddenSysctls(forbiddenSysctls):: self + if std.type(forbiddenSysctls) == 'array' then { forbiddenSysctls: forbiddenSysctls } else { forbiddenSysctls: [forbiddenSysctls] }, - // 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. - withForbiddenSysctlsMixin(forbiddenSysctls):: self + if std.type(forbiddenSysctls) == 'array' then { forbiddenSysctls+: forbiddenSysctls } else { forbiddenSysctls+: [forbiddenSysctls] }, - // hostIPC determines if the policy allows the use of HostIPC in the pod spec. - withHostIpc(hostIpc):: self + { hostIPC: hostIpc }, - // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. - withHostNetwork(hostNetwork):: self + { hostNetwork: hostNetwork }, - // hostPID determines if the policy allows the use of HostPID in the pod spec. - withHostPid(hostPid):: self + { hostPID: hostPid }, - // hostPorts determines which host port ranges are allowed to be exposed. - withHostPorts(hostPorts):: self + if std.type(hostPorts) == 'array' then { hostPorts: hostPorts } else { hostPorts: [hostPorts] }, - // hostPorts determines which host port ranges are allowed to be exposed. - withHostPortsMixin(hostPorts):: self + if std.type(hostPorts) == 'array' then { hostPorts+: hostPorts } else { hostPorts+: [hostPorts] }, - hostPortsType:: hidden.policy.v1beta1.hostPortRange, - // privileged determines if a pod can request to be run as privileged. - withPrivileged(privileged):: self + { privileged: 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. - withReadOnlyRootFilesystem(readOnlyRootFilesystem):: self + { readOnlyRootFilesystem: readOnlyRootFilesystem }, - // requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - withRequiredDropCapabilities(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == 'array' then { requiredDropCapabilities: requiredDropCapabilities } else { requiredDropCapabilities: [requiredDropCapabilities] }, - // requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added. - withRequiredDropCapabilitiesMixin(requiredDropCapabilities):: self + if std.type(requiredDropCapabilities) == 'array' then { requiredDropCapabilities+: requiredDropCapabilities } else { requiredDropCapabilities+: [requiredDropCapabilities] }, - // volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. - withVolumes(volumes):: self + if std.type(volumes) == 'array' then { volumes: volumes } else { volumes: [volumes] }, - // volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use '*'. - withVolumesMixin(volumes):: self + if std.type(volumes) == 'array' then { volumes+: volumes } else { volumes+: [volumes] }, - mixin:: { - // fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. - fsGroup:: { - local __fsGroupMixin(fsGroup) = { fsGroup+: fsGroup }, - mixinInstance(fsGroup):: __fsGroupMixin(fsGroup), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __fsGroupMixin({ ranges: ranges }) else __fsGroupMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __fsGroupMixin({ ranges+: ranges }) else __fsGroupMixin({ ranges+: [ranges] }), - rangesType:: hidden.policy.v1beta1.idRange, - // rule is the strategy that will dictate what FSGroup is used in the SecurityContext. - withRule(rule):: self + __fsGroupMixin({ rule: rule }), - }, - fsGroupType:: hidden.policy.v1beta1.fsGroupStrategyOptions, - // 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:: { - local __runAsGroupMixin(runAsGroup) = { runAsGroup+: runAsGroup }, - mixinInstance(runAsGroup):: __runAsGroupMixin(runAsGroup), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __runAsGroupMixin({ ranges: ranges }) else __runAsGroupMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __runAsGroupMixin({ ranges+: ranges }) else __runAsGroupMixin({ ranges+: [ranges] }), - rangesType:: hidden.policy.v1beta1.idRange, - // rule is the strategy that will dictate the allowable RunAsGroup values that may be set. - withRule(rule):: self + __runAsGroupMixin({ rule: rule }), - }, - runAsGroupType:: hidden.policy.v1beta1.runAsGroupStrategyOptions, - // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. - runAsUser:: { - local __runAsUserMixin(runAsUser) = { runAsUser+: runAsUser }, - mixinInstance(runAsUser):: __runAsUserMixin(runAsUser), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __runAsUserMixin({ ranges: ranges }) else __runAsUserMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __runAsUserMixin({ ranges+: ranges }) else __runAsUserMixin({ ranges+: [ranges] }), - rangesType:: hidden.policy.v1beta1.idRange, - // rule is the strategy that will dictate the allowable RunAsUser values that may be set. - withRule(rule):: self + __runAsUserMixin({ rule: rule }), - }, - runAsUserType:: hidden.policy.v1beta1.runAsUserStrategyOptions, - // seLinux is the strategy that will dictate the allowable labels that may be set. - seLinux:: { - local __seLinuxMixin(seLinux) = { seLinux+: seLinux }, - mixinInstance(seLinux):: __seLinuxMixin(seLinux), - // rule is the strategy that will dictate the allowable labels that may be set. - withRule(rule):: self + __seLinuxMixin({ rule: rule }), - // seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - seLinuxOptions:: { - local __seLinuxOptionsMixin(seLinuxOptions) = __seLinuxMixin({ seLinuxOptions+: seLinuxOptions }), - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - seLinuxType:: hidden.policy.v1beta1.seLinuxStrategyOptions, - // supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. - supplementalGroups:: { - local __supplementalGroupsMixin(supplementalGroups) = { supplementalGroups+: supplementalGroups }, - mixinInstance(supplementalGroups):: __supplementalGroupsMixin(supplementalGroups), - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then __supplementalGroupsMixin({ ranges: ranges }) else __supplementalGroupsMixin({ ranges: [ranges] }), - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then __supplementalGroupsMixin({ ranges+: ranges }) else __supplementalGroupsMixin({ ranges+: [ranges] }), - rangesType:: hidden.policy.v1beta1.idRange, - // rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - withRule(rule):: self + __supplementalGroupsMixin({ rule: rule }), - }, - supplementalGroupsType:: hidden.policy.v1beta1.supplementalGroupsStrategyOptions, - }, - }, - // RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy. - runAsGroupStrategyOptions:: { - new():: {}, - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then { ranges: ranges } else { ranges: [ranges] }, - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then { ranges+: ranges } else { ranges+: [ranges] }, - rangesType:: hidden.policy.v1beta1.idRange, - // rule is the strategy that will dictate the allowable RunAsGroup values that may be set. - withRule(rule):: self + { rule: rule }, - mixin:: {}, - }, - // RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. - runAsUserStrategyOptions:: { - new():: {}, - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then { ranges: ranges } else { ranges: [ranges] }, - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then { ranges+: ranges } else { ranges+: [ranges] }, - rangesType:: hidden.policy.v1beta1.idRange, - // rule is the strategy that will dictate the allowable RunAsUser values that may be set. - withRule(rule):: self + { rule: rule }, - mixin:: {}, - }, - // SELinuxStrategyOptions defines the strategy type and any options used to create the strategy. - seLinuxStrategyOptions:: { - new():: {}, - // rule is the strategy that will dictate the allowable labels that may be set. - withRule(rule):: self + { rule: rule }, - mixin:: { - // seLinuxOptions required to run as; required for MustRunAs More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - seLinuxOptions:: { - local __seLinuxOptionsMixin(seLinuxOptions) = { seLinuxOptions+: seLinuxOptions }, - mixinInstance(seLinuxOptions):: __seLinuxOptionsMixin(seLinuxOptions), - // Level is SELinux level label that applies to the container. - withLevel(level):: self + __seLinuxOptionsMixin({ level: level }), - // Role is a SELinux role label that applies to the container. - withRole(role):: self + __seLinuxOptionsMixin({ role: role }), - // Type is a SELinux type label that applies to the container. - withType(type):: self + __seLinuxOptionsMixin({ type: type }), - // User is a SELinux user label that applies to the container. - withUser(user):: self + __seLinuxOptionsMixin({ user: user }), - }, - seLinuxOptionsType:: hidden.core.v1.seLinuxOptions, - }, - }, - // SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. - supplementalGroupsStrategyOptions:: { - new():: {}, - // 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. - withRanges(ranges):: self + if std.type(ranges) == 'array' then { ranges: ranges } else { ranges: [ranges] }, - // 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. - withRangesMixin(ranges):: self + if std.type(ranges) == 'array' then { ranges+: ranges } else { ranges+: [ranges] }, - rangesType:: hidden.policy.v1beta1.idRange, - // rule is the strategy that will dictate what supplemental groups is used in the SecurityContext. - withRule(rule):: self + { rule: rule }, - mixin:: {}, - }, - }, - }, - rbac:: { - v1:: { - local apiVersion = { apiVersion: 'rbac/v1' }, - // AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole - aggregationRule:: { - new():: {}, - // 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 - withClusterRoleSelectors(clusterRoleSelectors):: self + if std.type(clusterRoleSelectors) == 'array' then { clusterRoleSelectors: clusterRoleSelectors } else { clusterRoleSelectors: [clusterRoleSelectors] }, - // 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 - withClusterRoleSelectorsMixin(clusterRoleSelectors):: self + if std.type(clusterRoleSelectors) == 'array' then { clusterRoleSelectors+: clusterRoleSelectors } else { clusterRoleSelectors+: [clusterRoleSelectors] }, - clusterRoleSelectorsType:: hidden.meta.v1.labelSelector, - mixin:: {}, - }, - // ClusterRoleBindingList is a collection of ClusterRoleBindings - clusterRoleBindingList:: { - new():: {}, - // Items is a list of ClusterRoleBindings - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of ClusterRoleBindings - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.rbac.v1.clusterRoleBinding, - mixin:: {}, - }, - // ClusterRoleList is a collection of ClusterRoles - clusterRoleList:: { - new():: {}, - // Items is a list of ClusterRoles - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of ClusterRoles - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.rbac.v1.clusterRole, - mixin:: {}, - }, - // 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. - policyRule:: { - new():: {}, - // 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. - withApiGroups(apiGroups):: self + if std.type(apiGroups) == 'array' then { apiGroups: apiGroups } else { apiGroups: [apiGroups] }, - // 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. - withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == 'array' then { apiGroups+: apiGroups } else { apiGroups+: [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. - withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == 'array' then { nonResourceURLs: nonResourceUrls } else { nonResourceURLs: [nonResourceUrls] }, - // 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. - withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == 'array' then { nonResourceURLs+: nonResourceUrls } else { nonResourceURLs+: [nonResourceUrls] }, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - withResourceNames(resourceNames):: self + if std.type(resourceNames) == 'array' then { resourceNames: resourceNames } else { resourceNames: [resourceNames] }, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == 'array' then { resourceNames+: resourceNames } else { resourceNames+: [resourceNames] }, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. - withResources(resources):: self + if std.type(resources) == 'array' then { resources: resources } else { resources: [resources] }, - // Resources is a list of resources this rule applies to. ResourceAll represents all resources. - withResourcesMixin(resources):: self + if std.type(resources) == 'array' then { resources+: resources } else { resources+: [resources] }, - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - withVerbs(verbs):: self + if std.type(verbs) == 'array' then { verbs: verbs } else { verbs: [verbs] }, - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - withVerbsMixin(verbs):: self + if std.type(verbs) == 'array' then { verbs+: verbs } else { verbs+: [verbs] }, - mixin:: {}, - }, - // RoleBindingList is a collection of RoleBindings - roleBindingList:: { - new():: {}, - // Items is a list of RoleBindings - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of RoleBindings - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.rbac.v1.roleBinding, - mixin:: {}, - }, - // RoleList is a collection of Roles - roleList:: { - new():: {}, - // Items is a list of Roles - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of Roles - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.rbac.v1.role, - mixin:: {}, - }, - // RoleRef contains information that points to the role being used - roleRef:: { - new():: {}, - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + { apiGroup: apiGroup }, - // Kind is the type of resource being referenced - withKind(kind):: self + { kind: kind }, - // Name is the name of resource being referenced - withName(name):: self + { name: name }, - mixin:: {}, - }, - // 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. - subject:: { - new():: {}, - // 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. - withApiGroup(apiGroup):: self + { apiGroup: apiGroup }, - // 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. - withKind(kind):: self + { kind: kind }, - // Name of the object being referenced. - withName(name):: self + { name: name }, - // 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. - withNamespace(namespace):: self + { namespace: namespace }, - mixin:: {}, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'rbac/v1beta1' }, - // AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole - aggregationRule:: { - new():: {}, - // 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 - withClusterRoleSelectors(clusterRoleSelectors):: self + if std.type(clusterRoleSelectors) == 'array' then { clusterRoleSelectors: clusterRoleSelectors } else { clusterRoleSelectors: [clusterRoleSelectors] }, - // 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 - withClusterRoleSelectorsMixin(clusterRoleSelectors):: self + if std.type(clusterRoleSelectors) == 'array' then { clusterRoleSelectors+: clusterRoleSelectors } else { clusterRoleSelectors+: [clusterRoleSelectors] }, - clusterRoleSelectorsType:: hidden.meta.v1.labelSelector, - mixin:: {}, - }, - // ClusterRoleBindingList is a collection of ClusterRoleBindings - clusterRoleBindingList:: { - new():: {}, - // Items is a list of ClusterRoleBindings - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of ClusterRoleBindings - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.rbac.v1beta1.clusterRoleBinding, - mixin:: {}, - }, - // ClusterRoleList is a collection of ClusterRoles - clusterRoleList:: { - new():: {}, - // Items is a list of ClusterRoles - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of ClusterRoles - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.rbac.v1beta1.clusterRole, - mixin:: {}, - }, - // 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. - policyRule:: { - new():: {}, - // 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. - withApiGroups(apiGroups):: self + if std.type(apiGroups) == 'array' then { apiGroups: apiGroups } else { apiGroups: [apiGroups] }, - // 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. - withApiGroupsMixin(apiGroups):: self + if std.type(apiGroups) == 'array' then { apiGroups+: apiGroups } else { apiGroups+: [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. - withNonResourceUrls(nonResourceUrls):: self + if std.type(nonResourceUrls) == 'array' then { nonResourceURLs: nonResourceUrls } else { nonResourceURLs: [nonResourceUrls] }, - // 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. - withNonResourceUrlsMixin(nonResourceUrls):: self + if std.type(nonResourceUrls) == 'array' then { nonResourceURLs+: nonResourceUrls } else { nonResourceURLs+: [nonResourceUrls] }, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - withResourceNames(resourceNames):: self + if std.type(resourceNames) == 'array' then { resourceNames: resourceNames } else { resourceNames: [resourceNames] }, - // ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - withResourceNamesMixin(resourceNames):: self + if std.type(resourceNames) == 'array' then { resourceNames+: resourceNames } else { resourceNames+: [resourceNames] }, - // Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups. - withResources(resources):: self + if std.type(resources) == 'array' then { resources: resources } else { resources: [resources] }, - // Resources is a list of resources this rule applies to. '*' represents all resources in the specified apiGroups. '*/foo' represents the subresource 'foo' for all resources in the specified apiGroups. - withResourcesMixin(resources):: self + if std.type(resources) == 'array' then { resources+: resources } else { resources+: [resources] }, - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - withVerbs(verbs):: self + if std.type(verbs) == 'array' then { verbs: verbs } else { verbs: [verbs] }, - // Verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - withVerbsMixin(verbs):: self + if std.type(verbs) == 'array' then { verbs+: verbs } else { verbs+: [verbs] }, - mixin:: {}, - }, - // RoleBindingList is a collection of RoleBindings - roleBindingList:: { - new():: {}, - // Items is a list of RoleBindings - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of RoleBindings - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.rbac.v1beta1.roleBinding, - mixin:: {}, - }, - // RoleList is a collection of Roles - roleList:: { - new():: {}, - // Items is a list of Roles - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is a list of Roles - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.rbac.v1beta1.role, - mixin:: {}, - }, - // RoleRef contains information that points to the role being used - roleRef:: { - new():: {}, - // APIGroup is the group for the resource being referenced - withApiGroup(apiGroup):: self + { apiGroup: apiGroup }, - // Kind is the type of resource being referenced - withKind(kind):: self + { kind: kind }, - // Name is the name of resource being referenced - withName(name):: self + { name: name }, - mixin:: {}, - }, - // 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. - subject:: { - new():: {}, - // 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. - withApiGroup(apiGroup):: self + { apiGroup: apiGroup }, - // 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. - withKind(kind):: self + { kind: kind }, - // Name of the object being referenced. - withName(name):: self + { name: name }, - // 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. - withNamespace(namespace):: self + { namespace: namespace }, - mixin:: {}, - }, - }, - }, - scheduling:: { - v1:: { - local apiVersion = { apiVersion: 'scheduling/v1' }, - // PriorityClassList is a collection of priority classes. - priorityClassList:: { - new():: {}, - // items is the list of PriorityClasses - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // items is the list of PriorityClasses - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.scheduling.v1.priorityClass, - mixin:: {}, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'scheduling/v1beta1' }, - // PriorityClassList is a collection of priority classes. - priorityClassList:: { - new():: {}, - // items is the list of PriorityClasses - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // items is the list of PriorityClasses - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.scheduling.v1beta1.priorityClass, - mixin:: {}, - }, - }, - }, - storage:: { - v1:: { - local apiVersion = { apiVersion: 'storage/v1' }, - // StorageClassList is a collection of storage classes. - storageClassList:: { - new():: {}, - // Items is the list of StorageClasses - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of StorageClasses - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.storage.v1.storageClass, - mixin:: {}, - }, - // VolumeAttachmentList is a collection of VolumeAttachment objects. - volumeAttachmentList:: { - new():: {}, - // Items is the list of VolumeAttachments - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of VolumeAttachments - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.storage.v1.volumeAttachment, - mixin:: {}, - }, - // 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. - volumeAttachmentSource:: { - new():: {}, - // Name of the persistent volume to attach. - withPersistentVolumeName(persistentVolumeName):: self + { persistentVolumeName: persistentVolumeName }, - mixin:: {}, - }, - // VolumeAttachmentSpec is the specification of a VolumeAttachment request. - volumeAttachmentSpec:: { - new():: {}, - // Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName(). - withAttacher(attacher):: self + { attacher: attacher }, - // The node that the volume should be attached to. - withNodeName(nodeName):: self + { nodeName: nodeName }, - mixin:: { - // Source represents the volume that should be attached. - source:: { - local __sourceMixin(source) = { source+: source }, - mixinInstance(source):: __sourceMixin(source), - // Name of the persistent volume to attach. - withPersistentVolumeName(persistentVolumeName):: self + __sourceMixin({ persistentVolumeName: persistentVolumeName }), - }, - sourceType:: hidden.storage.v1.volumeAttachmentSource, - }, - }, - // VolumeAttachmentStatus is the status of a VolumeAttachment request. - volumeAttachmentStatus:: { - new():: {}, - // Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher. - withAttached(attached):: self + { attached: attached }, - // Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher. - withAttachmentMetadata(attachmentMetadata):: self + { attachmentMetadata: attachmentMetadata }, - // Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher. - withAttachmentMetadataMixin(attachmentMetadata):: self + { attachmentMetadata+: attachmentMetadata }, - mixin:: { - // The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher. - attachError:: { - local __attachErrorMixin(attachError) = { attachError+: attachError }, - mixinInstance(attachError):: __attachErrorMixin(attachError), - // String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information. - withMessage(message):: self + __attachErrorMixin({ message: message }), - // Time the error was encountered. - withTime(time):: self + __attachErrorMixin({ time: time }), - }, - attachErrorType:: hidden.storage.v1.volumeError, - // The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher. - detachError:: { - local __detachErrorMixin(detachError) = { detachError+: detachError }, - mixinInstance(detachError):: __detachErrorMixin(detachError), - // String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information. - withMessage(message):: self + __detachErrorMixin({ message: message }), - // Time the error was encountered. - withTime(time):: self + __detachErrorMixin({ time: time }), - }, - detachErrorType:: hidden.storage.v1.volumeError, - }, - }, - // VolumeError captures an error encountered during a volume operation. - volumeError:: { - new():: {}, - // String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information. - withMessage(message):: self + { message: message }, - // Time the error was encountered. - withTime(time):: self + { time: time }, - mixin:: {}, - }, - }, - v1beta1:: { - local apiVersion = { apiVersion: 'storage/v1beta1' }, - // CSIDriverList is a collection of CSIDriver objects. - csiDriverList:: { - new():: {}, - // items is the list of CSIDriver - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // items is the list of CSIDriver - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.storage.v1beta1.csiDriver, - mixin:: {}, - }, - // CSIDriverSpec is the specification of a CSIDriver. - csiDriverSpec:: { - new():: {}, - // 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. - withAttachRequired(attachRequired):: self + { attachRequired: attachRequired }, - // 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) - withPodInfoOnMount(podInfoOnMount):: self + { podInfoOnMount: podInfoOnMount }, - mixin:: {}, - }, - // CSINodeDriver holds information about the specification of one CSI driver installed on a node - csiNodeDriver:: { - new():: {}, - // 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. - withName(name):: self + { name: 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. - withNodeId(nodeId):: self + { nodeID: nodeId }, - // 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. - withTopologyKeys(topologyKeys):: self + if std.type(topologyKeys) == 'array' then { topologyKeys: topologyKeys } else { topologyKeys: [topologyKeys] }, - // 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. - withTopologyKeysMixin(topologyKeys):: self + if std.type(topologyKeys) == 'array' then { topologyKeys+: topologyKeys } else { topologyKeys+: [topologyKeys] }, - mixin:: {}, - }, - // CSINodeList is a collection of CSINode objects. - csiNodeList:: { - new():: {}, - // items is the list of CSINode - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // items is the list of CSINode - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.storage.v1beta1.csiNode, - mixin:: {}, - }, - // CSINodeSpec holds information about the specification of all CSI drivers installed on a node - csiNodeSpec:: { - new():: {}, - // 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. - withDrivers(drivers):: self + if std.type(drivers) == 'array' then { drivers: drivers } else { drivers: [drivers] }, - // 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. - withDriversMixin(drivers):: self + if std.type(drivers) == 'array' then { drivers+: drivers } else { drivers+: [drivers] }, - driversType:: hidden.storage.v1beta1.csiNodeDriver, - mixin:: {}, - }, - // StorageClassList is a collection of storage classes. - storageClassList:: { - new():: {}, - // Items is the list of StorageClasses - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of StorageClasses - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.storage.v1beta1.storageClass, - mixin:: {}, - }, - // VolumeAttachmentList is a collection of VolumeAttachment objects. - volumeAttachmentList:: { - new():: {}, - // Items is the list of VolumeAttachments - withItems(items):: self + if std.type(items) == 'array' then { items: items } else { items: [items] }, - // Items is the list of VolumeAttachments - withItemsMixin(items):: self + if std.type(items) == 'array' then { items+: items } else { items+: [items] }, - itemsType:: hidden.storage.v1beta1.volumeAttachment, - mixin:: {}, - }, - // 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. - volumeAttachmentSource:: { - new():: {}, - // Name of the persistent volume to attach. - withPersistentVolumeName(persistentVolumeName):: self + { persistentVolumeName: persistentVolumeName }, - mixin:: {}, - }, - // VolumeAttachmentSpec is the specification of a VolumeAttachment request. - volumeAttachmentSpec:: { - new():: {}, - // Attacher indicates the name of the volume driver that MUST handle this request. This is the name returned by GetPluginName(). - withAttacher(attacher):: self + { attacher: attacher }, - // The node that the volume should be attached to. - withNodeName(nodeName):: self + { nodeName: nodeName }, - mixin:: { - // Source represents the volume that should be attached. - source:: { - local __sourceMixin(source) = { source+: source }, - mixinInstance(source):: __sourceMixin(source), - // Name of the persistent volume to attach. - withPersistentVolumeName(persistentVolumeName):: self + __sourceMixin({ persistentVolumeName: persistentVolumeName }), - }, - sourceType:: hidden.storage.v1beta1.volumeAttachmentSource, - }, - }, - // VolumeAttachmentStatus is the status of a VolumeAttachment request. - volumeAttachmentStatus:: { - new():: {}, - // Indicates the volume is successfully attached. This field must only be set by the entity completing the attach operation, i.e. the external-attacher. - withAttached(attached):: self + { attached: attached }, - // Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher. - withAttachmentMetadata(attachmentMetadata):: self + { attachmentMetadata: attachmentMetadata }, - // Upon successful attach, this field is populated with any information returned by the attach operation that must be passed into subsequent WaitForAttach or Mount calls. This field must only be set by the entity completing the attach operation, i.e. the external-attacher. - withAttachmentMetadataMixin(attachmentMetadata):: self + { attachmentMetadata+: attachmentMetadata }, - mixin:: { - // The last error encountered during attach operation, if any. This field must only be set by the entity completing the attach operation, i.e. the external-attacher. - attachError:: { - local __attachErrorMixin(attachError) = { attachError+: attachError }, - mixinInstance(attachError):: __attachErrorMixin(attachError), - // String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information. - withMessage(message):: self + __attachErrorMixin({ message: message }), - // Time the error was encountered. - withTime(time):: self + __attachErrorMixin({ time: time }), - }, - attachErrorType:: hidden.storage.v1beta1.volumeError, - // The last error encountered during detach operation, if any. This field must only be set by the entity completing the detach operation, i.e. the external-attacher. - detachError:: { - local __detachErrorMixin(detachError) = { detachError+: detachError }, - mixinInstance(detachError):: __detachErrorMixin(detachError), - // String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information. - withMessage(message):: self + __detachErrorMixin({ message: message }), - // Time the error was encountered. - withTime(time):: self + __detachErrorMixin({ time: time }), - }, - detachErrorType:: hidden.storage.v1beta1.volumeError, - }, - }, - // VolumeError captures an error encountered during a volume operation. - volumeError:: { - new():: {}, - // String detailing the error encountered during Attach or Detach operation. This string may be logged, so it should not contain sensitive information. - withMessage(message):: self + { message: message }, - // Time the error was encountered. - withTime(time):: self + { time: time }, - mixin:: {}, - }, - }, - }, - }, -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/scripts/install_jsonnet.sh b/sources/kube-prometheus/jsonnet/vendor/ksonnet/scripts/install_jsonnet.sh deleted file mode 100644 index 703a114b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/scripts/install_jsonnet.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# -# install jsonnet - -set -e - -JSONNET_VERSION=$ - -# TODO: fetch jsonnet -curl -O - -# TODO: build jsonnet \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/tests/ctors-1.8.golden.json b/sources/kube-prometheus/jsonnet/vendor/ksonnet/tests/ctors-1.8.golden.json deleted file mode 100644 index 73d3fdf2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/tests/ctors-1.8.golden.json +++ /dev/null @@ -1,646 +0,0 @@ -{ - "admissionregistration": { - "v1beta1": { - "externalAdmissionHookConfiguration": { - "apiVersion": "admissionregistration.k8s.io/v1alpha1", - "items": [ ], - "kind": "ExternalAdmissionHookConfigurationList" - }, - "initializerConfigurationList": { - "apiVersion": "admissionregistration.k8s.io/v1alpha1", - "items": [ ], - "kind": "InitializerConfigurationList" - } - } - }, - "apps": { - "v1beta1": { - "controllerRevisionList": { - "apiVersion": "apps/v1beta1", - "items": [ ], - "kind": "ControllerRevisionList" - }, - "deployment": { - "apiVersion": "apps/v1beta1", - "kind": "Deployment", - "metadata": { - "name": "deployment" - }, - "spec": { - "replicas": 3, - "template": { - "metadata": { - "labels": { } - }, - "spec": { - "containers": [ ] - } - } - } - }, - "deploymentList": { - "apiVersion": "apps/v1beta1", - "items": [ - { - "apiVersion": "apps/v1beta1", - "kind": "Deployment", - "metadata": { - "name": "deployment" - }, - "spec": { - "replicas": 3, - "template": { - "metadata": { - "labels": { } - }, - "spec": { - "containers": [ ] - } - } - } - } - ], - "kind": "DeploymentList" - }, - "deploymentRollback": { - "apiVersion": "apps/v1beta1", - "kind": "DeploymentRollback", - "name": "deploymentRollback" - }, - "scale": { - "apiVersion": "apps/v1beta1", - "kind": "Scale", - "spec": { - "replicas": 4 - } - }, - "statefulSet": { - "apiVersion": "apps/v1beta1", - "kind": "StatefulSet", - "metadata": { - "name": "deployment" - }, - "spec": { - "replicas": 3, - "template": { - "metadata": { - "labels": { } - }, - "spec": { - "containers": [ ] - } - }, - "volumeClaimTemplates": [ ] - } - }, - "statefulSetList": { - "apiVersion": "apps/v1beta1", - "items": [ - { - "apiVersion": "apps/v1beta1", - "kind": "StatefulSet", - "metadata": { - "name": "deployment" - }, - "spec": { - "replicas": 3, - "template": { - "metadata": { - "labels": { } - }, - "spec": { - "containers": [ ] - } - }, - "volumeClaimTemplates": [ ] - } - } - ], - "kind": "StatefulSetList" - } - }, - "v1beta2": { - "controllerRevisionList": { - "apiVersion": "apps/v1beta2", - "items": [ ], - "kind": "ControllerRevisionList" - }, - "daemonSetList": { - "apiVersion": "apps/v1beta2", - "items": [ ], - "kind": "DaemonSetList" - }, - "deployment": { - "apiVersion": "apps/v1beta2", - "kind": "Deployment", - "metadata": { - "name": "deployment" - }, - "spec": { - "replicas": 3, - "template": { - "metadata": { - "labels": { } - }, - "spec": { - "containers": [ ] - } - } - } - }, - "deploymentList": { - "apiVersion": "apps/v1beta2", - "items": [ - { - "apiVersion": "apps/v1beta2", - "kind": "Deployment", - "metadata": { - "name": "deployment" - }, - "spec": { - "replicas": 3, - "template": { - "metadata": { - "labels": { } - }, - "spec": { - "containers": [ ] - } - } - } - } - ], - "kind": "DeploymentList" - }, - "replicaSetList": { - "apiVersion": "apps/v1beta2", - "items": [ ], - "kind": "ReplicaSetList" - }, - "scale": { - "apiVersion": "apps/v1beta2", - "kind": "Scale", - "spec": { - "replicas": 4 - } - }, - "statefulSet": { - "apiVersion": "apps/v1beta2", - "kind": "StatefulSet", - "metadata": { - "name": "deployment" - }, - "spec": { - "replicas": 3, - "template": { - "metadata": { - "labels": { } - }, - "spec": { - "containers": [ ] - } - }, - "volumeClaimTemplates": [ ] - } - }, - "statefulSetList": { - "apiVersion": "apps/v1beta2", - "items": [ - { - "apiVersion": "apps/v1beta2", - "kind": "StatefulSet", - "metadata": { - "name": "deployment" - }, - "spec": { - "replicas": 3, - "template": { - "metadata": { - "labels": { } - }, - "spec": { - "containers": [ ] - } - }, - "volumeClaimTemplates": [ ] - } - } - ], - "kind": "StatefulSetList" - } - } - }, - "authentication": { - "v1": { - "tokenReview": { - "apiVersion": "authentication.k8s.io/v1", - "kind": "TokenReview", - "spec": { - "token": { } - } - } - }, - "v1beta1": { - "tokenReview": { - "apiVersion": "authentication.k8s.io/v1beta1", - "kind": "TokenReview", - "spec": { - "token": { } - } - } - } - }, - "autoscaling": { - "v1": { - "horizontalPodAutoscalerList": { - "apiVersion": "autoscaling/v1", - "items": [ ], - "kind": "HorizontalPodAutoscalerList" - }, - "scale": { - "apiVersion": "autoscaling/v1", - "kind": "Scale", - "spec": { - "replicas": 4 - } - } - }, - "v2beta1": { - "horizontalPodAutoscalerList": { - "apiVersion": "autoscaling/v2beta1", - "items": [ ], - "kind": "HorizontalPodAutoscalerList" - } - } - }, - "batch": { - "v1": { - "jobList": { - "apiVersion": "batch/v1", - "items": [ ], - "kind": "JobList" - } - }, - "v1beta1": { - "jobList": { - "apiVersion": "batch/v1beta1", - "items": [ ], - "kind": "CronJobList" - } - }, - "v2alpha1": { - "jobList": { - "apiVersion": "batch/v2alpha1", - "items": [ ], - "kind": "CronJobList" - } - } - }, - "certificates": { - "v1beta1": { - "jobList": { - "apiVersion": "certificates.k8s.io/v1beta1", - "items": [ ], - "kind": "CertificateSigningRequestList" - } - } - }, - "core": { - "v1": { - "configMap": { - "apiVersion": "v1", - "data": { }, - "kind": "ConfigMap", - "metadata": { - "name": "configMap" - } - }, - "configMapList": { - "apiVersion": "v1", - "items": [ ], - "kind": "ConfigMapList" - }, - "container": { - "image": "nginx", - "name": "container" - }, - "containerPort": { - "containerPort": 99 - }, - "endpointsList": { - "apiVersion": "v1", - "items": [ ], - "kind": "EndpointsList" - }, - "envVar": { - "name": "env", - "value": 99 - }, - "envVarFieldPath": { - "name": "env", - "valueFrom": { - "fieldRef": { - "fieldPath": "foo.bar" - } - } - }, - "envVarSecret": { - "name": "env", - "valueFrom": { - "secretKeyRef": { - "key": "secretName", - "name": "secret" - } - } - }, - "eventList": { - "apiVersion": "v1", - "items": [ ], - "kind": "EventList" - }, - "limitRangeList": { - "apiVersion": "v1", - "items": [ ], - "kind": "LimitRangeList" - }, - "namedContainerPort": { - "containerPort": 99, - "name": "port" - }, - "namespace": { - "apiVersion": "v1", - "kind": "Namespace", - "metadata": { - "name": "ns" - } - }, - "namespaceList": { - "apiVersion": "v1", - "items": [ ], - "kind": "NamespaceList" - }, - "nodeList": { - "apiVersion": "v1", - "items": [ ], - "kind": "NodeList" - }, - "persistentVolumeClaimList": { - "apiVersion": "v1", - "items": [ ], - "kind": "PersistentVolumeClaimList" - }, - "persistentVolumeList": { - "apiVersion": "v1", - "items": [ ], - "kind": "PersistentVolumeList" - }, - "podList": { - "apiVersion": "v1", - "items": [ ], - "kind": "PodList" - }, - "podTemplateList": { - "apiVersion": "v1", - "items": [ ], - "kind": "PodTemplateList" - }, - "replicationControllerList": { - "apiVersion": "v1", - "items": [ ], - "kind": "ReplicationControllerList" - }, - "resourceQuotaList": { - "apiVersion": "v1", - "items": [ ], - "kind": "ResourceQuotaList" - }, - "secret": { - "apiVersion": "v1", - "data": { }, - "kind": "Secret", - "metadata": { - "name": "secret" - }, - "type": "Opaque" - }, - "secretList": { - "apiVersion": "v1", - "items": [ ], - "kind": "SecretList" - }, - "secretString": { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "secret" - }, - "stringData": "foo", - "type": "Opaque" - }, - "service": { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": "service" - }, - "spec": { - "ports": [ ], - "selector": { } - } - }, - "serviceAccount": { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "name": "serviceAccount" - } - }, - "serviceAccountList": { - "apiVersion": "v1", - "items": [ ], - "kind": "ServiceAccountList" - } - } - }, - "extensions": { - "v1beta1": { - "daemonSetList": { - "apiVersion": "extensions/v1beta1", - "items": [ ], - "kind": "DaemonSetList" - }, - "deployment": { - "apiVersion": "extensions/v1beta1", - "kind": "Deployment", - "metadata": { - "name": "deployment" - }, - "spec": { - "replicas": 3, - "template": { - "metadata": { - "labels": { } - }, - "spec": { - "containers": [ ] - } - } - } - }, - "deploymentList": { - "apiVersion": "extensions/v1beta1", - "items": [ - { - "apiVersion": "extensions/v1beta1", - "kind": "Deployment", - "metadata": { - "name": "deployment" - }, - "spec": { - "replicas": 3, - "template": { - "metadata": { - "labels": { } - }, - "spec": { - "containers": [ ] - } - } - } - } - ], - "kind": "DeploymentList" - }, - "deploymentRollback": { - "apiVersion": "extensions/v1beta1", - "kind": "DeploymentRollback", - "name": "deploymentRollback" - }, - "ingressList": { - "apiVersion": "extensions/v1beta1", - "items": [ ], - "kind": "IngressList" - }, - "networkPolicyList": { - "apiVersion": "extensions/v1beta1", - "items": [ ], - "kind": "NetworkPolicyList" - }, - "podSecurityPolicyList": { - "apiVersion": "extensions/v1beta1", - "items": [ ], - "kind": "PodSecurityPolicyList" - }, - "replicaSetList": { - "apiVersion": "extensions/v1beta1", - "items": [ ], - "kind": "ReplicaSetList" - }, - "scale": { - "apiVersion": "extensions/v1beta1", - "kind": "Scale", - "spec": { - "replicas": 4 - } - } - } - }, - "networking": { - "v1": { - "networkPolicyList": { - "apiVersion": "networking.k8s.io/v1", - "items": [ ], - "kind": "NetworkPolicyList" - } - } - }, - "policy": { - "v1beta1": { - "podDisruptionBudgetList": { - "apiVersion": "policy/v1beta1", - "items": [ ], - "kind": "PodDisruptionBudgetList" - } - } - }, - "rbac": { - "v1": { - "clusterRoleBindingList": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "items": [ ], - "kind": "ClusterRoleBindingList" - }, - "clusterRoleList": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "items": [ ], - "kind": "ClusterRoleList" - }, - "roleBindingList": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "items": [ ], - "kind": "RoleBindingList" - }, - "roleList": { - "apiVersion": "rbac.authorization.k8s.io/v1", - "items": [ ], - "kind": "RoleList" - } - }, - "v1beta1": { - "clusterRoleBindingList": { - "apiVersion": "rbac.authorization.k8s.io/v1beta1", - "items": [ ], - "kind": "ClusterRoleBindingList" - }, - "clusterRoleList": { - "apiVersion": "rbac.authorization.k8s.io/v1beta1", - "items": [ ], - "kind": "ClusterRoleList" - }, - "roleBindingList": { - "apiVersion": "rbac.authorization.k8s.io/v1beta1", - "items": [ ], - "kind": "RoleBindingList" - }, - "roleList": { - "apiVersion": "rbac.authorization.k8s.io/v1beta1", - "items": [ ], - "kind": "RoleList" - } - } - }, - "scheduling": { - "v1alpha1": { - "priorityClassList": { - "apiVersion": "scheduling.k8s.io/v1alpha1", - "items": [ ], - "kind": "PriorityClassList" - } - } - }, - "settings": { - "v1alpha1": { - "podPresetList": { - "apiVersion": "settings.k8s.io/v1alpha1", - "items": [ ], - "kind": "PodPresetList" - } - } - }, - "storage": { - "v1": { - "storageClassList": { - "apiVersion": "storage.k8s.io/v1", - "items": [ ], - "kind": "StorageClassList" - } - }, - "v1beta1": { - "storageClassList": { - "apiVersion": "storage.k8s.io/v1", - "items": [ ], - "kind": "StorageClassList" - } - } - } -} diff --git a/sources/kube-prometheus/jsonnet/vendor/ksonnet/tests/ctors-1.8.jsonnet b/sources/kube-prometheus/jsonnet/vendor/ksonnet/tests/ctors-1.8.jsonnet deleted file mode 100644 index 3a43d624..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/ksonnet/tests/ctors-1.8.jsonnet +++ /dev/null @@ -1,175 +0,0 @@ -local k = import "../ksonnet.beta.3/k.libsonnet"; - -{ - admissionregistration: { - v1beta1: { - local api = k.admissionregistration.v1alpha1, - externalAdmissionHookConfiguration: api.externalAdmissionHookConfigurationList.new([]), - initializerConfigurationList: api.initializerConfigurationList.new([]), - } - }, - apps: { - v1beta1: { - local api = k.apps.v1beta1, - controllerRevisionList: api.controllerRevisionList.new([]), - deployment: api.deployment.new("deployment", 3, [], {}), - deploymentList: api.deploymentList.new(self.deployment), - deploymentRollback: api.deploymentRollback.new("deploymentRollback"), - scale: api.scale.new(4), - statefulSet: api.statefulSet.new("deployment", 3, [], [], {}), - statefulSetList: api.statefulSetList.new(self.statefulSet), - }, - v1beta2: { - local api = k.apps.v1beta2, - controllerRevisionList: api.controllerRevisionList.new([]), - daemonSetList: api.daemonSetList.new([]), - deployment: api.deployment.new("deployment", 3, [], {}), - deploymentList: api.deploymentList.new(self.deployment), - replicaSetList: api.replicaSetList.new([]), - scale: api.scale.new(4), - statefulSet: api.statefulSet.new("deployment", 3, [], [], {}), - statefulSetList: api.statefulSetList.new(self.statefulSet), - }, - }, - authentication: { - v1beta1: { - local api = k.authentication.v1beta1, - tokenReview: api.tokenReview.new({}), - }, - v1: { - local api = k.authentication.v1, - tokenReview: api.tokenReview.new({}), - }, - }, - autoscaling: { - v1: { - local api = k.autoscaling.v1, - horizontalPodAutoscalerList: api.horizontalPodAutoscalerList.new([]), - scale: api.scale.new(4), - }, - v2beta1: { - local api = k.autoscaling.v2beta1, - horizontalPodAutoscalerList: api.horizontalPodAutoscalerList.new([]), - }, - }, - batch: { - v1: { - local api = k.batch.v1, - jobList: api.jobList.new([]), - }, - v1beta1: { - local api = k.batch.v1beta1, - jobList: api.cronJobList.new([]), - }, - v2alpha1: { - local api = k.batch.v2alpha1, - jobList: api.cronJobList.new([]), - }, - }, - certificates: { - v1beta1: { - local api = k.certificates.v1beta1, - jobList: api.certificateSigningRequestList.new([]), - }, - }, - extensions: { - v1beta1: { - local api = k.extensions.v1beta1, - daemonSetList: api.daemonSetList.new([]), - deployment: api.deployment.new("deployment", 3, [], {}), - deploymentList: api.deploymentList.new(self.deployment), - deploymentRollback: api.deploymentRollback.new("deploymentRollback"), - ingressList: api.ingressList.new([]), - networkPolicyList: api.networkPolicyList.new([]), - podSecurityPolicyList: api.podSecurityPolicyList.new([]), - replicaSetList: api.replicaSetList.new([]), - scale: api.scale.new(4), - }, - }, - networking: { - v1: { - local api = k.networking.v1, - networkPolicyList: api.networkPolicyList.new([]), - }, - }, - policy: { - v1beta1: { - local api = k.policy.v1beta1, - podDisruptionBudgetList: api.podDisruptionBudgetList.new([]), - }, - }, - rbac: { - v1: { - local api = k.rbac.v1, - clusterRoleBindingList: api.clusterRoleBindingList.new([]), - clusterRoleList: api.clusterRoleList.new([]), - roleBindingList: api.roleBindingList.new([]), - roleList: api.roleList.new([]), - }, - v1beta1: { - local api = k.rbac.v1beta1, - clusterRoleBindingList: api.clusterRoleBindingList.new([]), - clusterRoleList: api.clusterRoleList.new([]), - roleBindingList: api.roleBindingList.new([]), - roleList: api.roleList.new([]), - }, - }, - scheduling: { - v1alpha1: { - local api = k.scheduling.v1alpha1, - priorityClassList: api.priorityClassList.new([]), - }, - }, - settings: { - v1alpha1: { - local api = k.settings.v1alpha1, - podPresetList: api.podPresetList.new([]), - }, - }, - storage: { - v1: { - local api = k.storage.v1, - storageClassList: api.storageClassList.new([]), - }, - v1beta1: { - local api = k.storage.v1, - storageClassList: api.storageClassList.new([]), - }, - }, - - // - // Core. - // - - core: { - v1: { - local api = k.core.v1, - configMap: api.configMap.new("configMap", {}), - configMapList: api.configMapList.new([]), - container: api.pod.mixin.spec.containersType.new("container", "nginx"), - containerPort: api.pod.mixin.spec.containersType.portsType.new(99), - namedContainerPort: api.pod.mixin.spec.containersType.portsType.newNamed("port", 99), - endpointsList: api.endpointsList.new([]), - envVar: api.pod.mixin.spec.containersType.envType.new("env", 99), - envVarSecret: api.pod.mixin.spec.containersType.envType.fromSecretRef("env", "secret", "secretName"), - envVarFieldPath: api.pod.mixin.spec.containersType.envType.fromFieldPath("env", "foo.bar"), - eventList: api.eventList.new([]), - limitRangeList: api.limitRangeList.new([]), - namespace: api.namespace.new("ns"), - namespaceList: api.namespaceList.new([]), - nodeList: api.nodeList.new([]), - persistentVolumeClaimList: api.persistentVolumeClaimList.new([]), - persistentVolumeList: api.persistentVolumeList.new([]), - podList: api.podList.new([]), - podTemplateList: api.podTemplateList.new([]), - replicationControllerList: api.replicationControllerList.new([]), - resourceQuotaList: api.resourceQuotaList.new([]), - secret: api.secret.new("secret", {}), - secretString: api.secret.fromString("secret", "foo"), - secretList: api.secretList.new([]), - service: api.service.new("service", {}, []), - serviceAccount: api.serviceAccount.new("serviceAccount"), - serviceAccountList: api.serviceAccountList.new([]), - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/.gitignore b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/.gitignore deleted file mode 100644 index 52a75ecb..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -jsonnetfile.lock.json -vendor/ diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alertmanager/alertmanager.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alertmanager/alertmanager.libsonnet deleted file mode 100644 index 7cd81ad9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alertmanager/alertmanager.libsonnet +++ /dev/null @@ -1,125 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; - -{ - _config+:: { - namespace: 'default', - - versions+:: { - alertmanager: 'v0.18.0', - }, - - imageRepos+:: { - alertmanager: 'quay.io/prometheus/alertmanager', - }, - - alertmanager+:: { - name: $._config.alertmanager.name, - config: { - global: { - resolve_timeout: '5m', - }, - route: { - group_by: ['job'], - group_wait: '30s', - group_interval: '5m', - repeat_interval: '12h', - receiver: 'null', - routes: [ - { - receiver: 'null', - match: { - alertname: 'Watchdog', - }, - }, - ], - }, - receivers: [ - { - name: 'null', - }, - ], - }, - replicas: 3, - }, - }, - - alertmanager+:: { - secret: - local secret = k.core.v1.secret; - - if std.type($._config.alertmanager.config) == 'object' then - secret.new('alertmanager-' + $._config.alertmanager.name, { 'alertmanager.yaml': std.base64(std.manifestYamlDoc($._config.alertmanager.config)) }) + - secret.mixin.metadata.withNamespace($._config.namespace) - else - secret.new('alertmanager-' + $._config.alertmanager.name, { 'alertmanager.yaml': std.base64($._config.alertmanager.config) }) + - secret.mixin.metadata.withNamespace($._config.namespace), - - serviceAccount: - local serviceAccount = k.core.v1.serviceAccount; - - serviceAccount.new('alertmanager-' + $._config.alertmanager.name) + - serviceAccount.mixin.metadata.withNamespace($._config.namespace), - - service: - local service = k.core.v1.service; - local servicePort = k.core.v1.service.mixin.spec.portsType; - - local alertmanagerPort = servicePort.newNamed('web', 9093, 'web'); - - service.new('alertmanager-' + $._config.alertmanager.name, { app: 'alertmanager', alertmanager: $._config.alertmanager.name }, alertmanagerPort) + - service.mixin.spec.withSessionAffinity('ClientIP') + - service.mixin.metadata.withNamespace($._config.namespace) + - service.mixin.metadata.withLabels({ alertmanager: $._config.alertmanager.name }), - - serviceMonitor: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'ServiceMonitor', - metadata: { - name: 'alertmanager', - namespace: $._config.namespace, - labels: { - 'k8s-app': 'alertmanager', - }, - }, - spec: { - selector: { - matchLabels: { - alertmanager: $._config.alertmanager.name, - }, - }, - endpoints: [ - { - port: 'web', - interval: '30s', - }, - ], - }, - }, - - alertmanager: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'Alertmanager', - metadata: { - name: $._config.alertmanager.name, - namespace: $._config.namespace, - labels: { - alertmanager: $._config.alertmanager.name, - }, - }, - spec: { - replicas: $._config.alertmanager.replicas, - version: $._config.versions.alertmanager, - baseImage: $._config.imageRepos.alertmanager, - nodeSelector: { 'kubernetes.io/os': 'linux' }, - serviceAccountName: 'alertmanager-' + $._config.alertmanager.name, - securityContext: { - runAsUser: 1000, - runAsNonRoot: true, - fsGroup: 2000, - }, - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/alertmanager.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/alertmanager.libsonnet deleted file mode 100644 index bda69d00..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/alertmanager.libsonnet +++ /dev/null @@ -1,52 +0,0 @@ -{ - prometheusAlerts+:: { - groups+: [ - { - name: 'alertmanager.rules', - rules: [ - { - alert: 'AlertmanagerConfigInconsistent', - annotations: { - message: 'The configuration of the instances of the Alertmanager cluster `{{$labels.service}}` are out of sync.', - }, - expr: ||| - count_values("config_hash", alertmanager_config_hash{%(alertmanagerSelector)s}) BY (service) / ON(service) GROUP_LEFT() label_replace(max(prometheus_operator_spec_replicas{%(prometheusOperatorSelector)s,controller="alertmanager"}) by (name, job, namespace, controller), "service", "alertmanager-$1", "name", "(.*)") != 1 - ||| % $._config, - 'for': '5m', - labels: { - severity: 'critical', - }, - }, - { - alert: 'AlertmanagerFailedReload', - annotations: { - message: "Reloading Alertmanager's configuration has failed for {{ $labels.namespace }}/{{ $labels.pod}}.", - }, - expr: ||| - alertmanager_config_last_reload_successful{%(alertmanagerSelector)s} == 0 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - }, - { - alert: 'AlertmanagerMembersInconsistent', - annotations: { - message: 'Alertmanager has not found all other members of the cluster.', - }, - expr: ||| - alertmanager_cluster_members{%(alertmanagerSelector)s} - != on (service) GROUP_LEFT() - count by (service) (alertmanager_cluster_members{%(alertmanagerSelector)s}) - ||| % $._config, - 'for': '5m', - labels: { - severity: 'critical', - }, - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/alerts.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/alerts.libsonnet deleted file mode 100644 index 3521aa82..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/alerts.libsonnet +++ /dev/null @@ -1,4 +0,0 @@ -(import 'alertmanager.libsonnet') + -(import 'general.libsonnet') + -(import 'node.libsonnet') + -(import 'prometheus-operator.libsonnet') diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/general.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/general.libsonnet deleted file mode 100644 index 4f949156..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/general.libsonnet +++ /dev/null @@ -1,38 +0,0 @@ -{ - prometheusAlerts+:: { - groups+: [ - { - name: 'general.rules', - rules: [ - { - alert: 'TargetDown', - annotations: { - message: '{{ $value }}% of the {{ $labels.job }} targets are down.', - }, - expr: '100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job, namespace, service)) > 10', - 'for': '10m', - labels: { - severity: 'warning', - }, - }, - { - alert: 'Watchdog', - annotations: { - message: ||| - This is an alert meant to ensure that the entire alerting pipeline is functional. - This alert is always firing, therefore it should always be firing in Alertmanager - and always fire against a receiver. There are integrations with various notification - mechanisms that send a notification when this alert is not firing. For example the - "DeadMansSnitch" integration in PagerDuty. - |||, - }, - expr: 'vector(1)', - labels: { - severity: 'none', - }, - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/node.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/node.libsonnet deleted file mode 100644 index 2346ecfa..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/node.libsonnet +++ /dev/null @@ -1,42 +0,0 @@ -{ - prometheusAlerts+:: { - groups+: [ - { - name: 'node-time', - rules: [ - { - alert: 'ClockSkewDetected', - annotations: { - message: 'Clock skew detected on node-exporter {{ $labels.namespace }}/{{ $labels.pod }}. Ensure NTP is configured correctly on this host.', - }, - expr: ||| - abs(node_timex_offset_seconds{%(nodeExporterSelector)s}) > 0.05 - ||| % $._config, - 'for': '2m', - labels: { - severity: 'warning', - }, - }, - ], - }, - { - name: 'node-network', - rules: [ - { - alert: 'NodeNetworkInterfaceFlapping', - annotations: { - message: 'Network interface "{{ $labels.device }}" changing it\'s up status often on node-exporter {{ $labels.namespace }}/{{ $labels.pod }}"', - }, - expr: ||| - changes(node_network_up{%(nodeExporterSelector)s,%(hostNetworkInterfaceSelector)s}[2m]) > 2 - ||| % $._config, - 'for': '2m', - labels: { - severity: 'warning', - }, - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/prometheus-operator.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/prometheus-operator.libsonnet deleted file mode 100644 index a430c505..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/prometheus-operator.libsonnet +++ /dev/null @@ -1,37 +0,0 @@ -{ - prometheusAlerts+:: { - groups+: [ - { - name: 'prometheus-operator', - rules: [ - { - alert: 'PrometheusOperatorReconcileErrors', - expr: ||| - rate(prometheus_operator_reconcile_errors_total{%(prometheusOperatorSelector)s}[5m]) > 0.1 - ||| % $._config, - labels: { - severity: 'warning', - }, - annotations: { - message: 'Errors while reconciling {{ $labels.controller }} in {{ $labels.namespace }} Namespace.', - }, - 'for': '10m', - }, - { - alert: 'PrometheusOperatorNodeLookupErrors', - expr: ||| - rate(prometheus_operator_node_address_lookup_errors_total{%(prometheusOperatorSelector)s}[5m]) > 0.1 - ||| % $._config, - labels: { - severity: 'warning', - }, - annotations: { - message: 'Errors while reconciling Prometheus in {{ $labels.namespace }} Namespace.', - }, - 'for': '10m', - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/tests.yaml b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/tests.yaml deleted file mode 100644 index 532bb895..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/alerts/tests.yaml +++ /dev/null @@ -1,157 +0,0 @@ -# TODO(metalmatze): This file is temporarily saved here for later reference -# until we find out how to integrate the tests into our jsonnet stack. - -rule_files: - - rules.yaml - -evaluation_interval: 1m - -tests: - - interval: 1m - input_series: - - series: 'alertmanager_cluster_members{job="alertmanager-main",instance="10.10.10.0",namespace="monitoring",pod="alertmanager-main-0",service="alertmanager-main"}' - values: '3 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 0 0 0 0 0 0' - - series: 'alertmanager_cluster_members{job="alertmanager-main",instance="10.10.10.1",namespace="monitoring",pod="alertmanager-main-1",service="alertmanager-main"}' - values: '3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3' - - series: 'alertmanager_cluster_members{job="alertmanager-main",instance="10.10.10.2",namespace="monitoring",pod="alertmanager-main-2",service="alertmanager-main"}' - values: '3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3' - alert_rule_test: - - eval_time: 5m - alertname: AlertmanagerMembersInconsistent - - eval_time: 11m - alertname: AlertmanagerMembersInconsistent - exp_alerts: - - exp_labels: - service: 'alertmanager-main' - severity: critical - job: 'alertmanager-main' - instance: 10.10.10.0 - namespace: monitoring - pod: alertmanager-main-0 - exp_annotations: - message: 'Alertmanager has not found all other members of the cluster.' - - eval_time: 17m - alertname: AlertmanagerMembersInconsistent - exp_alerts: - - exp_labels: - service: 'alertmanager-main' - severity: critical - job: 'alertmanager-main' - instance: 10.10.10.0 - namespace: monitoring - pod: alertmanager-main-0 - exp_annotations: - message: 'Alertmanager has not found all other members of the cluster.' - - eval_time: 23m - alertname: AlertmanagerMembersInconsistent - exp_alerts: - - exp_labels: - service: 'alertmanager-main' - severity: critical - job: 'alertmanager-main' - instance: 10.10.10.0 - namespace: monitoring - pod: alertmanager-main-0 - exp_annotations: - message: 'Alertmanager has not found all other members of the cluster.' - - interval: 1m - input_series: - - series: 'alertmanager_cluster_members{job="alertmanager-main",instance="10.10.10.0",namespace="monitoring",pod="alertmanager-main-0",service="alertmanager-main"}' - values: '3 3 3 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1' - - series: 'alertmanager_cluster_members{job="alertmanager-main",instance="10.10.10.1",namespace="monitoring",pod="alertmanager-main-1",service="alertmanager-main"}' - values: '3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2' - - series: 'alertmanager_cluster_members{job="alertmanager-main",instance="10.10.10.2",namespace="monitoring",pod="alertmanager-main-2",service="alertmanager-main"}' - values: '3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2' - alert_rule_test: - - eval_time: 5m - alertname: AlertmanagerMembersInconsistent - - eval_time: 11m - alertname: AlertmanagerMembersInconsistent - exp_alerts: - - exp_labels: - service: 'alertmanager-main' - severity: critical - job: 'alertmanager-main' - instance: 10.10.10.0 - namespace: monitoring - pod: alertmanager-main-0 - exp_annotations: - message: 'Alertmanager has not found all other members of the cluster.' - - exp_labels: - service: 'alertmanager-main' - severity: critical - job: 'alertmanager-main' - instance: 10.10.10.1 - namespace: monitoring - pod: alertmanager-main-1 - exp_annotations: - message: 'Alertmanager has not found all other members of the cluster.' - - exp_labels: - service: 'alertmanager-main' - severity: critical - job: 'alertmanager-main' - instance: 10.10.10.2 - namespace: monitoring - pod: alertmanager-main-2 - exp_annotations: - message: 'Alertmanager has not found all other members of the cluster.' - - eval_time: 17m - alertname: AlertmanagerMembersInconsistent - exp_alerts: - - exp_labels: - service: 'alertmanager-main' - severity: critical - job: 'alertmanager-main' - instance: 10.10.10.0 - namespace: monitoring - pod: alertmanager-main-0 - exp_annotations: - message: 'Alertmanager has not found all other members of the cluster.' - - exp_labels: - service: 'alertmanager-main' - severity: critical - job: 'alertmanager-main' - instance: 10.10.10.1 - namespace: monitoring - pod: alertmanager-main-1 - exp_annotations: - message: 'Alertmanager has not found all other members of the cluster.' - - exp_labels: - service: 'alertmanager-main' - severity: critical - job: 'alertmanager-main' - instance: 10.10.10.2 - namespace: monitoring - pod: alertmanager-main-2 - exp_annotations: - message: 'Alertmanager has not found all other members of the cluster.' - - eval_time: 23m - alertname: AlertmanagerMembersInconsistent - exp_alerts: - - exp_labels: - service: 'alertmanager-main' - severity: critical - job: 'alertmanager-main' - instance: 10.10.10.0 - namespace: monitoring - pod: alertmanager-main-0 - exp_annotations: - message: 'Alertmanager has not found all other members of the cluster.' - - exp_labels: - service: 'alertmanager-main' - severity: critical - job: 'alertmanager-main' - instance: 10.10.10.1 - namespace: monitoring - pod: alertmanager-main-1 - exp_annotations: - message: 'Alertmanager has not found all other members of the cluster.' - - exp_labels: - service: 'alertmanager-main' - severity: critical - job: 'alertmanager-main' - instance: 10.10.10.2 - namespace: monitoring - pod: alertmanager-main-2 - exp_annotations: - message: 'Alertmanager has not found all other members of the cluster.' diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/jsonnetfile.json b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/jsonnetfile.json deleted file mode 100644 index 4817e20c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/jsonnetfile.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "dependencies": [ - { - "name": "ksonnet", - "source": { - "git": { - "remote": "https://github.com/ksonnet/ksonnet-lib", - "subdir": "" - } - }, - "version": "master" - }, - { - "name": "kubernetes-mixin", - "source": { - "git": { - "remote": "https://github.com/kubernetes-monitoring/kubernetes-mixin", - "subdir": "" - } - }, - "version": "master" - }, - { - "name": "grafana", - "source": { - "git": { - "remote": "https://github.com/brancz/kubernetes-grafana", - "subdir": "grafana" - } - }, - "version": "master" - }, - { - "name": "prometheus-operator", - "source": { - "git": { - "remote": "https://github.com/coreos/prometheus-operator", - "subdir": "jsonnet/prometheus-operator" - } - }, - "version": "release-0.33" - }, - { - "name": "etcd-mixin", - "source": { - "git": { - "remote": "https://github.com/coreos/etcd", - "subdir": "Documentation/etcd-mixin" - } - }, - "version": "master" - }, - { - "name": "prometheus", - "source": { - "git": { - "remote": "https://github.com/prometheus/prometheus", - "subdir": "documentation/prometheus-mixin" - } - }, - "version": "master" - }, - { - "name": "node-mixin", - "source": { - "git": { - "remote": "https://github.com/prometheus/node_exporter", - "subdir": "docs/node-mixin" - } - }, - "version": "master" - } - ] -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-anti-affinity.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-anti-affinity.libsonnet deleted file mode 100644 index dafe4ec9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-anti-affinity.libsonnet +++ /dev/null @@ -1,39 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; -local statefulSet = k.apps.v1.statefulSet; -local affinity = statefulSet.mixin.spec.template.spec.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecutionType; -local matchExpression = affinity.mixin.podAffinityTerm.labelSelector.matchExpressionsType; - -{ - local antiaffinity(key, values) = { - affinity: { - podAntiAffinity: { - preferredDuringSchedulingIgnoredDuringExecution: [ - affinity.new() + - affinity.withWeight(100) + - affinity.mixin.podAffinityTerm.withNamespaces($._config.namespace) + - affinity.mixin.podAffinityTerm.withTopologyKey('kubernetes.io/hostname') + - affinity.mixin.podAffinityTerm.labelSelector.withMatchExpressions([ - matchExpression.new() + - matchExpression.withKey(key) + - matchExpression.withOperator('In') + - matchExpression.withValues(values), - ]), - ], - }, - }, - }, - - alertmanager+:: { - alertmanager+: { - spec+: - antiaffinity('alertmanager', [$._config.alertmanager.name]), - }, - }, - - prometheus+: { - prometheus+: { - spec+: - antiaffinity('prometheus', [$._config.prometheus.name]), - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-bootkube.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-bootkube.libsonnet deleted file mode 100644 index 3e2094a5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-bootkube.libsonnet +++ /dev/null @@ -1,23 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; -local service = k.core.v1.service; -local servicePort = k.core.v1.service.mixin.spec.portsType; - -{ - prometheus+:: { - kubeControllerManagerPrometheusDiscoveryService: - service.new('kube-controller-manager-prometheus-discovery', { 'k8s-app': 'kube-controller-manager' }, servicePort.newNamed('http-metrics', 10252, 10252)) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-controller-manager' }) + - service.mixin.spec.withClusterIp('None'), - kubeSchedulerPrometheusDiscoveryService: - service.new('kube-scheduler-prometheus-discovery', { 'k8s-app': 'kube-scheduler' }, servicePort.newNamed('http-metrics', 10251, 10251)) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-scheduler' }) + - service.mixin.spec.withClusterIp('None'), - kubeDnsPrometheusDiscoveryService: - service.new('kube-dns-prometheus-discovery', { 'k8s-app': 'kube-dns' }, [servicePort.newNamed('http-metrics-skydns', 10055, 10055), servicePort.newNamed('http-metrics-dnsmasq', 10054, 10054)]) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-dns' }) + - service.mixin.spec.withClusterIp('None'), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-config-mixins.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-config-mixins.libsonnet deleted file mode 100644 index ad278407..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-config-mixins.libsonnet +++ /dev/null @@ -1,20 +0,0 @@ -local l = import 'lib/lib.libsonnet'; - -// withImageRepository is a mixin that replaces all images prefixes by repository. eg. -// quay.io/coreos/addon-resizer -> $repository/addon-resizer -// grafana/grafana -> grafana $repository/grafana -local withImageRepository(repository) = { - local oldRepos = super._config.imageRepos, - local substituteRepository(image, repository) = - if repository == null then image else repository + '/' + l.imageName(image), - _config+:: { - imageRepos:: { - [field]: substituteRepository(oldRepos[field], repository), - for field in std.objectFields(oldRepos) - } - }, -}; - -{ - withImageRepository:: withImageRepository, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-insecure-kubelet.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-insecure-kubelet.libsonnet deleted file mode 100644 index 1bd64e1b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-insecure-kubelet.libsonnet +++ /dev/null @@ -1,25 +0,0 @@ -{ - prometheus+:: { - serviceMonitorKubelet+: - { - spec+: { - endpoints: [ - { - port: 'http-metrics', - scheme: 'http', - interval: '30s', - bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', - }, - { - port: 'http-metrics', - scheme: 'http', - path: '/metrics/cadvisor', - interval: '30s', - honorLabels: true, - bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', - }, - ], - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kops-coredns.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kops-coredns.libsonnet deleted file mode 100644 index 8a309d28..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kops-coredns.libsonnet +++ /dev/null @@ -1,13 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; -local service = k.core.v1.service; -local servicePort = k.core.v1.service.mixin.spec.portsType; - -{ - prometheus+:: { - kubeDnsPrometheusDiscoveryService: - service.new('kube-dns-prometheus-discovery', { 'k8s-app': 'kube-dns' }, [servicePort.newNamed('metrics', 9153, 9153)]) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-dns' }) + - service.mixin.spec.withClusterIp('None'), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kops.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kops.libsonnet deleted file mode 100644 index 01b6e2e7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kops.libsonnet +++ /dev/null @@ -1,23 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; -local service = k.core.v1.service; -local servicePort = k.core.v1.service.mixin.spec.portsType; - -{ - prometheus+:: { - kubeControllerManagerPrometheusDiscoveryService: - service.new('kube-controller-manager-prometheus-discovery', { 'k8s-app': 'kube-controller-manager' }, servicePort.newNamed('http-metrics', 10252, 10252)) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-controller-manager' }) + - service.mixin.spec.withClusterIp('None'), - kubeSchedulerPrometheusDiscoveryService: - service.new('kube-scheduler-prometheus-discovery', { 'k8s-app': 'kube-scheduler' }, servicePort.newNamed('http-metrics', 10251, 10251)) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-scheduler' }) + - service.mixin.spec.withClusterIp('None'), - kubeDnsPrometheusDiscoveryService: - service.new('kube-dns-prometheus-discovery', { 'k8s-app': 'kube-dns' }, [servicePort.newNamed('metrics', 10055, 10055), servicePort.newNamed('http-metrics-dnsmasq', 10054, 10054)]) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-dns' }) + - service.mixin.spec.withClusterIp('None'), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-ksonnet.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-ksonnet.libsonnet deleted file mode 100644 index 664e1912..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-ksonnet.libsonnet +++ /dev/null @@ -1,8 +0,0 @@ -local kp = (import 'kube-prometheus/kube-prometheus.libsonnet'); - -{ ['0prometheus-operator-' + name]: kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) } + -{ ['node-exporter-' + name]: kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) } + -{ ['kube-state-metrics-' + name]: kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) } + -{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) } + -{ ['prometheus-' + name]: kp.prometheus[name] for name in std.objectFields(kp.prometheus) } + -{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) } diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kube-aws.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kube-aws.libsonnet deleted file mode 100644 index 23b33c9f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kube-aws.libsonnet +++ /dev/null @@ -1,18 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; -local service = k.core.v1.service; -local servicePort = k.core.v1.service.mixin.spec.portsType; - -{ - prometheus+: { - kubeControllerManagerPrometheusDiscoveryService: - service.new('kube-controller-manager-prometheus-discovery', { 'k8s-app': 'kube-controller-manager' }, servicePort.newNamed('http-metrics', 10252, 10252)) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-controller-manager' }) + - service.mixin.spec.withClusterIp('None'), - kubeSchedulerPrometheusDiscoveryService: - service.new('kube-scheduler-prometheus-discovery', { 'k8s-app': 'kube-scheduler' }, servicePort.newNamed('http-metrics', 10251, 10251)) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-scheduler' }) + - service.mixin.spec.withClusterIp('None'), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kubeadm.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kubeadm.libsonnet deleted file mode 100644 index 9e497cd6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kubeadm.libsonnet +++ /dev/null @@ -1,18 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; -local service = k.core.v1.service; -local servicePort = k.core.v1.service.mixin.spec.portsType; - -{ - prometheus+: { - kubeControllerManagerPrometheusDiscoveryService: - service.new('kube-controller-manager-prometheus-discovery', { component: 'kube-controller-manager' }, servicePort.newNamed('http-metrics', 10252, 10252)) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-controller-manager' }) + - service.mixin.spec.withClusterIp('None'), - kubeSchedulerPrometheusDiscoveryService: - service.new('kube-scheduler-prometheus-discovery', { component: 'kube-scheduler' }, servicePort.newNamed('http-metrics', 10251, 10251)) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-scheduler' }) + - service.mixin.spec.withClusterIp('None'), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kubespray.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kubespray.libsonnet deleted file mode 100644 index 6ef1a34e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-kubespray.libsonnet +++ /dev/null @@ -1,40 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; -local service = k.core.v1.service; -local servicePort = k.core.v1.service.mixin.spec.portsType; - -{ - - prometheus+: { - kubeControllerManagerPrometheusDiscoveryService: - service.new('kube-controller-manager-prometheus-discovery', { 'component': 'kube-controller-manager' }, servicePort.newNamed('http-metrics', 10252, 10252)) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-controller-manager' }) + - service.mixin.spec.withClusterIp('None'), - kubeSchedulerPrometheusDiscoveryService: - service.new('kube-scheduler-prometheus-discovery', { 'component': 'kube-scheduler' }, servicePort.newNamed('http-metrics', 10251, 10251)) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-scheduler' }) + - service.mixin.spec.withClusterIp('None'), - - serviceMonitorKubeScheduler+: { - spec+: { - selector+: { - matchLabels: { - 'k8s-app': 'kube-scheduler', - }, - }, - }, - }, - - serviceMonitorKubeControllerManager+: { - spec+: { - selector+: { - matchLabels: { - 'k8s-app': 'kube-controller-manager', - }, - }, - }, - }, - - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-managed-cluster.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-managed-cluster.libsonnet deleted file mode 100644 index 442c0261..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-managed-cluster.libsonnet +++ /dev/null @@ -1,28 +0,0 @@ -// On managed Kubernetes clusters some of the control plane components are not exposed to customers. -// Disable scrape jobs and service monitors for these components by overwriting 'kube-prometheus.libsonnet' defaults -// Note this doesn't disable generation of associated alerting rules but the rules don't trigger - -{ - _config+:: { - // This snippet walks the original object (super.jobs, set as temp var j) and creates a replacement jobs object - // excluding any members of the set specified (eg: controller and scheduler). - local j = super.jobs, - jobs: { - [k]: j[k] - for k in std.objectFields(j) - if !std.setMember(k, ['KubeControllerManager', 'KubeScheduler']) - }, - }, - - // Same as above but for ServiceMonitor's - local p = super.prometheus, - prometheus: { - [q]: p[q] - for q in std.objectFields(p) - if !std.setMember(q, ['serviceMonitorKubeControllerManager', 'serviceMonitorKubeScheduler']) - }, - - // TODO: disable generationg of alerting rules - // manifests/prometheus-rules.yaml:52: - name: kube-scheduler.rules - -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-node-ports.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-node-ports.libsonnet deleted file mode 100644 index b10a1bb4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-node-ports.libsonnet +++ /dev/null @@ -1,21 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; -local service = k.core.v1.service; -local servicePort = k.core.v1.service.mixin.spec.portsType; - -{ - prometheus+: { - service+: - service.mixin.spec.withPorts(servicePort.newNamed('web', 9090, 'web') + servicePort.withNodePort(30900)) + - service.mixin.spec.withType('NodePort'), - }, - alertmanager+: { - service+: - service.mixin.spec.withPorts(servicePort.newNamed('web', 9093, 'web') + servicePort.withNodePort(30903)) + - service.mixin.spec.withType('NodePort'), - }, - grafana+: { - service+: - service.mixin.spec.withPorts(servicePort.newNamed('http', 3000, 'http') + servicePort.withNodePort(30902)) + - service.mixin.spec.withType('NodePort'), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-static-etcd.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-static-etcd.libsonnet deleted file mode 100644 index 63094f15..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-static-etcd.libsonnet +++ /dev/null @@ -1,99 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; - -(import 'etcd-mixin/mixin.libsonnet') + { - _config+:: { - etcd: { - ips: [], - clientCA: null, - clientKey: null, - clientCert: null, - serverName: null, - insecureSkipVerify: null, - }, - }, - prometheus+:: { - serviceEtcd: - local service = k.core.v1.service; - local servicePort = k.core.v1.service.mixin.spec.portsType; - - local etcdServicePort = servicePort.newNamed('metrics', 2379, 2379); - - service.new('etcd', null, etcdServicePort) + - service.mixin.metadata.withNamespace('kube-system') + - service.mixin.metadata.withLabels({ 'k8s-app': 'etcd' }) + - service.mixin.spec.withClusterIp('None'), - endpointsEtcd: - local endpoints = k.core.v1.endpoints; - local endpointSubset = endpoints.subsetsType; - local endpointPort = endpointSubset.portsType; - - local etcdPort = endpointPort.new() + - endpointPort.withName('metrics') + - endpointPort.withPort(2379) + - endpointPort.withProtocol('TCP'); - - local subset = endpointSubset.new() + - endpointSubset.withAddresses([ - { ip: etcdIP } - for etcdIP in $._config.etcd.ips - ]) + - endpointSubset.withPorts(etcdPort); - - endpoints.new() + - endpoints.mixin.metadata.withName('etcd') + - endpoints.mixin.metadata.withNamespace('kube-system') + - endpoints.mixin.metadata.withLabels({ 'k8s-app': 'etcd' }) + - endpoints.withSubsets(subset), - serviceMonitorEtcd: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'ServiceMonitor', - metadata: { - name: 'etcd', - namespace: 'kube-system', - labels: { - 'k8s-app': 'etcd', - }, - }, - spec: { - jobLabel: 'k8s-app', - endpoints: [ - { - port: 'metrics', - interval: '30s', - scheme: 'https', - // Prometheus Operator (and Prometheus) allow us to specify a tlsConfig. This is required as most likely your etcd metrics end points is secure. - tlsConfig: { - caFile: '/etc/prometheus/secrets/kube-etcd-client-certs/etcd-client-ca.crt', - keyFile: '/etc/prometheus/secrets/kube-etcd-client-certs/etcd-client.key', - certFile: '/etc/prometheus/secrets/kube-etcd-client-certs/etcd-client.crt', - [if $._config.etcd.serverName != null then 'serverName']: $._config.etcd.serverName, - [if $._config.etcd.insecureSkipVerify != null then 'insecureSkipVerify']: $._config.etcd.insecureSkipVerify, - }, - }, - ], - selector: { - matchLabels: { - 'k8s-app': 'etcd', - }, - }, - }, - }, - secretEtcdCerts: - // Prometheus Operator allows us to mount secrets in the pod. By loading the secrets as files, they can be made available inside the Prometheus pod. - local secret = k.core.v1.secret; - secret.new('kube-etcd-client-certs', { - 'etcd-client-ca.crt': std.base64($._config.etcd.clientCA), - 'etcd-client.key': std.base64($._config.etcd.clientKey), - 'etcd-client.crt': std.base64($._config.etcd.clientCert), - }) + - secret.mixin.metadata.withNamespace($._config.namespace), - prometheus+: - { - // Reference info: https://coreos.com/operators/prometheus/docs/latest/api.html#prometheusspec - spec+: { - secrets+: [$.prometheus.secretEtcdCerts.metadata.name], - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-strip-limits.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-strip-limits.libsonnet deleted file mode 100644 index 52660d7b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-strip-limits.libsonnet +++ /dev/null @@ -1,32 +0,0 @@ -// Strips spec.containers[].limits for certain containers -// https://github.com/coreos/kube-prometheus/issues/72 -{ - _config+:: { - resources+:: { - 'addon-resizer'+: { - limits: {}, - }, - 'kube-rbac-proxy'+: { - limits: {}, - }, - 'node-exporter'+: { - limits: {}, - }, - }, - }, - prometheusOperator+: { - deployment+: { - spec+: { - template+: { - spec+: { - local addArgs(c) = - if c.name == 'prometheus-operator' - then c + {args+: ['--config-reloader-cpu=0']} - else c, - containers: std.map(addArgs, super.containers), - }, - }, - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet deleted file mode 100644 index ebe9872b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet +++ /dev/null @@ -1,39 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; -local service = k.core.v1.service; -local servicePort = k.core.v1.service.mixin.spec.portsType; - -{ - _config+:: { - versions+:: { - thanos: 'v0.7.0', - }, - imageRepos+:: { - thanos: 'quay.io/thanos/thanos', - }, - thanos+:: { - objectStorageConfig: { - key: 'thanos.yaml', // How the file inside the secret is called - name: 'thanos-objectstorage', // This is the name of your Kubernetes secret with the config - }, - }, - }, - prometheus+:: { - // Add the grpc port to the Prometheus service to be able to query it with the Thanos Querier - service+: { - spec+: { - ports+: [ - servicePort.newNamed('grpc', 10901, 10901), - ], - }, - }, - prometheus+: { - spec+: { - thanos+: { - version: $._config.versions.thanos, - baseImage: $._config.imageRepos.thanos, - objectStorageConfig: $._config.thanos.objectStorageConfig, - }, - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus.libsonnet deleted file mode 100644 index 497dbbbf..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-prometheus.libsonnet +++ /dev/null @@ -1,133 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; -local k3 = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; -local configMapList = k3.core.v1.configMapList; - -(import 'grafana/grafana.libsonnet') + -(import 'kube-state-metrics/kube-state-metrics.libsonnet') + -(import 'node-exporter/node-exporter.libsonnet') + -(import 'node-mixin/mixin.libsonnet') + -(import 'alertmanager/alertmanager.libsonnet') + -(import 'prometheus-operator/prometheus-operator.libsonnet') + -(import 'prometheus/prometheus.libsonnet') + -(import 'prometheus-adapter/prometheus-adapter.libsonnet') + -(import 'kubernetes-mixin/mixin.libsonnet') + -(import 'prometheus/mixin.libsonnet') + -(import 'alerts/alerts.libsonnet') + -(import 'rules/rules.libsonnet') + { - kubePrometheus+:: { - namespace: k.core.v1.namespace.new($._config.namespace), - }, - grafana+:: { - dashboardDefinitions: configMapList.new(super.dashboardDefinitions), - serviceMonitor: { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'ServiceMonitor', - metadata: { - name: 'grafana', - namespace: $._config.namespace, - }, - spec: { - selector: { - matchLabels: { - app: 'grafana', - }, - }, - endpoints: [ - { - port: 'http', - interval: '15s', - }, - ], - }, - }, - }, -} + { - _config+:: { - namespace: 'default', - - versions+:: { - grafana: '6.2.2', - }, - - tlsCipherSuites: [ - 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256', // required by h2: http://golang.org/cl/30721 - 'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256', // required by h2: http://golang.org/cl/30721 - - // 'TLS_RSA_WITH_RC4_128_SHA', // insecure: https://access.redhat.com/security/cve/cve-2013-2566 - // 'TLS_RSA_WITH_3DES_EDE_CBC_SHA', // insecure: https://access.redhat.com/articles/2548661 - // 'TLS_RSA_WITH_AES_128_CBC_SHA', // disabled by h2 - // 'TLS_RSA_WITH_AES_256_CBC_SHA', // disabled by h2 - 'TLS_RSA_WITH_AES_128_CBC_SHA256', - // 'TLS_RSA_WITH_AES_128_GCM_SHA256', // disabled by h2 - // 'TLS_RSA_WITH_AES_256_GCM_SHA384', // disabled by h2 - // 'TLS_ECDHE_ECDSA_WITH_RC4_128_SHA', // insecure: https://access.redhat.com/security/cve/cve-2013-2566 - // 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA',// disabled by h2 - // 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA',// disabled by h2 - // 'TLS_ECDHE_RSA_WITH_RC4_128_SHA', // insecure: https://access.redhat.com/security/cve/cve-2013-2566 - // 'TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA', // insecure: https://access.redhat.com/articles/2548661 - // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA', // disabled by h2 - // 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA', // disabled by h2 - 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256', - 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256', - - // disabled by h2 means: https://github.com/golang/net/blob/e514e69ffb8bc3c76a71ae40de0118d794855992/http2/ciphers.go - - // 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384', // TODO: Might not work with h2 - // 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384', // TODO: Might not work with h2 - // 'TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305', // TODO: Might not work with h2 - // 'TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305', // TODO: Might not work with h2 - ], - - cadvisorSelector: 'job="kubelet"', - kubeletSelector: 'job="kubelet"', - kubeStateMetricsSelector: 'job="kube-state-metrics"', - nodeExporterSelector: 'job="node-exporter"', - notKubeDnsSelector: 'job!="kube-dns"', - kubeSchedulerSelector: 'job="kube-scheduler"', - kubeControllerManagerSelector: 'job="kube-controller-manager"', - kubeApiserverSelector: 'job="apiserver"', - coreDNSSelector: 'job="kube-dns"', - podLabel: 'pod', - - alertmanagerSelector: 'job="alertmanager-' + $._config.alertmanager.name + '",namespace="' + $._config.namespace + '"', - prometheusSelector: 'job="prometheus-' + $._config.prometheus.name + '",namespace="' + $._config.namespace + '"', - prometheusName: '{{$labels.namespace}}/{{$labels.pod}}', - prometheusOperatorSelector: 'job="prometheus-operator",namespace="' + $._config.namespace + '"', - - jobs: { - Kubelet: $._config.kubeletSelector, - KubeScheduler: $._config.kubeSchedulerSelector, - KubeControllerManager: $._config.kubeControllerManagerSelector, - KubeAPI: $._config.kubeApiserverSelector, - KubeStateMetrics: $._config.kubeStateMetricsSelector, - NodeExporter: $._config.nodeExporterSelector, - Alertmanager: $._config.alertmanagerSelector, - Prometheus: $._config.prometheusSelector, - PrometheusOperator: $._config.prometheusOperatorSelector, - CoreDNS: $._config.coreDNSSelector, - }, - - resources+:: { - 'addon-resizer': { - requests: { cpu: '10m', memory: '30Mi' }, - limits: { cpu: '50m', memory: '30Mi' }, - }, - 'kube-rbac-proxy': { - requests: { cpu: '10m', memory: '20Mi' }, - limits: { cpu: '20m', memory: '40Mi' }, - }, - 'node-exporter': { - requests: { cpu: '102m', memory: '180Mi' }, - limits: { cpu: '250m', memory: '180Mi' }, - }, - }, - prometheus+:: { - rules: $.prometheusRules + $.prometheusAlerts, - }, - - grafana+:: { - dashboards: $.grafanaDashboards, - }, - - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-state-metrics/kube-state-metrics.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-state-metrics/kube-state-metrics.libsonnet deleted file mode 100644 index 7814e8ec..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/kube-state-metrics/kube-state-metrics.libsonnet +++ /dev/null @@ -1,330 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; - -{ - _config+:: { - namespace: 'default', - - kubeStateMetrics+:: { - collectors: '', // empty string gets a default set - scrapeInterval: '30s', - scrapeTimeout: '30s', - - baseCPU: '100m', - baseMemory: '150Mi', - cpuPerNode: '2m', - memoryPerNode: '30Mi', - }, - - versions+:: { - kubeStateMetrics: 'v1.7.2', - kubeRbacProxy: 'v0.4.1', - addonResizer: '1.8.4', - }, - - imageRepos+:: { - kubeStateMetrics: 'quay.io/coreos/kube-state-metrics', - kubeRbacProxy: 'quay.io/coreos/kube-rbac-proxy', - addonResizer: 'k8s.gcr.io/addon-resizer', - }, - }, - - kubeStateMetrics+:: { - clusterRoleBinding: - local clusterRoleBinding = k.rbac.v1.clusterRoleBinding; - - clusterRoleBinding.new() + - clusterRoleBinding.mixin.metadata.withName('kube-state-metrics') + - clusterRoleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + - clusterRoleBinding.mixin.roleRef.withName('kube-state-metrics') + - clusterRoleBinding.mixin.roleRef.mixinInstance({ kind: 'ClusterRole' }) + - clusterRoleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'kube-state-metrics', namespace: $._config.namespace }]), - - clusterRole: - local clusterRole = k.rbac.v1.clusterRole; - local rulesType = clusterRole.rulesType; - - local rules = [ - rulesType.new() + - rulesType.withApiGroups(['']) + - rulesType.withResources([ - 'configmaps', - 'secrets', - 'nodes', - 'pods', - 'services', - 'resourcequotas', - 'replicationcontrollers', - 'limitranges', - 'persistentvolumeclaims', - 'persistentvolumes', - 'namespaces', - 'endpoints', - ]) + - rulesType.withVerbs(['list', 'watch']), - - rulesType.new() + - rulesType.withApiGroups(['extensions']) + - rulesType.withResources([ - 'daemonsets', - 'deployments', - 'replicasets', - 'ingresses', - ]) + - rulesType.withVerbs(['list', 'watch']), - - rulesType.new() + - rulesType.withApiGroups(['apps']) + - rulesType.withResources([ - 'statefulsets', - 'daemonsets', - 'deployments', - 'replicasets', - ]) + - rulesType.withVerbs(['list', 'watch']), - - rulesType.new() + - rulesType.withApiGroups(['batch']) + - rulesType.withResources([ - 'cronjobs', - 'jobs', - ]) + - rulesType.withVerbs(['list', 'watch']), - - rulesType.new() + - rulesType.withApiGroups(['autoscaling']) + - rulesType.withResources([ - 'horizontalpodautoscalers', - ]) + - rulesType.withVerbs(['list', 'watch']), - - rulesType.new() + - rulesType.withApiGroups(['authentication.k8s.io']) + - rulesType.withResources([ - 'tokenreviews', - ]) + - rulesType.withVerbs(['create']), - - rulesType.new() + - rulesType.withApiGroups(['authorization.k8s.io']) + - rulesType.withResources([ - 'subjectaccessreviews', - ]) + - rulesType.withVerbs(['create']), - - rulesType.new() + - rulesType.withApiGroups(['policy']) + - rulesType.withResources([ - 'poddisruptionbudgets', - ]) + - rulesType.withVerbs(['list', 'watch']), - - rulesType.new() + - rulesType.withApiGroups(['certificates.k8s.io']) + - rulesType.withResources([ - 'certificatesigningrequests', - ]) + - rulesType.withVerbs(['list', 'watch']), - - rulesType.new() + - rulesType.withApiGroups(['storage.k8s.io']) + - rulesType.withResources([ - 'storageclasses', - ]) + - rulesType.withVerbs(['list', 'watch']), - ]; - - clusterRole.new() + - clusterRole.mixin.metadata.withName('kube-state-metrics') + - clusterRole.withRules(rules), - deployment: - local deployment = k.apps.v1.deployment; - local container = deployment.mixin.spec.template.spec.containersType; - local volume = deployment.mixin.spec.template.spec.volumesType; - local containerPort = container.portsType; - local containerVolumeMount = container.volumeMountsType; - local podSelector = deployment.mixin.spec.template.spec.selectorType; - - local podLabels = { app: 'kube-state-metrics' }; - - local proxyClusterMetrics = - container.new('kube-rbac-proxy-main', $._config.imageRepos.kubeRbacProxy + ':' + $._config.versions.kubeRbacProxy) + - container.withArgs([ - '--logtostderr', - '--secure-listen-address=:8443', - '--tls-cipher-suites=' + std.join(',', $._config.tlsCipherSuites), - '--upstream=http://127.0.0.1:8081/', - ]) + - container.withPorts(containerPort.newNamed(8443, 'https-main',)) + - container.mixin.resources.withRequests($._config.resources['kube-rbac-proxy'].requests) + - container.mixin.resources.withLimits($._config.resources['kube-rbac-proxy'].limits); - - local proxySelfMetrics = - container.new('kube-rbac-proxy-self', $._config.imageRepos.kubeRbacProxy + ':' + $._config.versions.kubeRbacProxy) + - container.withArgs([ - '--logtostderr', - '--secure-listen-address=:9443', - '--tls-cipher-suites=' + std.join(',', $._config.tlsCipherSuites), - '--upstream=http://127.0.0.1:8082/', - ]) + - container.withPorts(containerPort.newNamed(9443, 'https-self',)) + - container.mixin.resources.withRequests($._config.resources['kube-rbac-proxy'].requests) + - container.mixin.resources.withLimits($._config.resources['kube-rbac-proxy'].limits); - - local kubeStateMetrics = - container.new('kube-state-metrics', $._config.imageRepos.kubeStateMetrics + ':' + $._config.versions.kubeStateMetrics) + - container.withArgs([ - '--host=127.0.0.1', - '--port=8081', - '--telemetry-host=127.0.0.1', - '--telemetry-port=8082', - ] + if $._config.kubeStateMetrics.collectors != '' then ['--collectors=' + $._config.kubeStateMetrics.collectors] else []) + - container.mixin.resources.withRequests({ cpu: $._config.kubeStateMetrics.baseCPU, memory: $._config.kubeStateMetrics.baseMemory }) + - container.mixin.resources.withLimits({ cpu: $._config.kubeStateMetrics.baseCPU, memory: $._config.kubeStateMetrics.baseMemory }); - - local addonResizer = - container.new('addon-resizer', $._config.imageRepos.addonResizer + ':' + $._config.versions.addonResizer) + - container.withCommand([ - '/pod_nanny', - '--container=kube-state-metrics', - '--cpu=' + $._config.kubeStateMetrics.baseCPU, - '--extra-cpu=' + $._config.kubeStateMetrics.cpuPerNode, - '--memory=' + $._config.kubeStateMetrics.baseMemory, - '--extra-memory=' + $._config.kubeStateMetrics.memoryPerNode, - '--threshold=5', - '--deployment=kube-state-metrics', - ]) + - container.withEnv([ - { - name: 'MY_POD_NAME', - valueFrom: { - fieldRef: { apiVersion: 'v1', fieldPath: 'metadata.name' }, - }, - }, - { - name: 'MY_POD_NAMESPACE', - valueFrom: { - fieldRef: { apiVersion: 'v1', fieldPath: 'metadata.namespace' }, - }, - }, - ]) + - container.mixin.resources.withRequests($._config.resources['addon-resizer'].requests) + - container.mixin.resources.withLimits($._config.resources['addon-resizer'].limits); - - local c = [proxyClusterMetrics, proxySelfMetrics, kubeStateMetrics, addonResizer]; - - deployment.new('kube-state-metrics', 1, c, podLabels) + - deployment.mixin.metadata.withNamespace($._config.namespace) + - deployment.mixin.metadata.withLabels(podLabels) + - deployment.mixin.spec.selector.withMatchLabels(podLabels) + - deployment.mixin.spec.template.spec.withNodeSelector({ 'kubernetes.io/os': 'linux' }) + - deployment.mixin.spec.template.spec.securityContext.withRunAsNonRoot(true) + - deployment.mixin.spec.template.spec.securityContext.withRunAsUser(65534) + - deployment.mixin.spec.template.spec.withServiceAccountName('kube-state-metrics'), - - roleBinding: - local roleBinding = k.rbac.v1.roleBinding; - - roleBinding.new() + - roleBinding.mixin.metadata.withName('kube-state-metrics') + - roleBinding.mixin.metadata.withNamespace($._config.namespace) + - roleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + - roleBinding.mixin.roleRef.withName('kube-state-metrics') + - roleBinding.mixin.roleRef.mixinInstance({ kind: 'Role' }) + - roleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'kube-state-metrics' }]), - - role: - local role = k.rbac.v1.role; - local rulesType = role.rulesType; - - local coreRule = rulesType.new() + - rulesType.withApiGroups(['']) + - rulesType.withResources([ - 'pods', - ]) + - rulesType.withVerbs(['get']); - - local extensionsRule = rulesType.new() + - rulesType.withApiGroups(['extensions']) + - rulesType.withResources([ - 'deployments', - ]) + - rulesType.withVerbs(['get', 'update']) + - rulesType.withResourceNames(['kube-state-metrics']); - - local appsRule = rulesType.new() + - rulesType.withApiGroups(['apps']) + - rulesType.withResources([ - 'deployments', - ]) + - rulesType.withVerbs(['get', 'update']) + - rulesType.withResourceNames(['kube-state-metrics']); - - local rules = [coreRule, extensionsRule, appsRule]; - - role.new() + - role.mixin.metadata.withName('kube-state-metrics') + - role.mixin.metadata.withNamespace($._config.namespace) + - role.withRules(rules), - - serviceAccount: - local serviceAccount = k.core.v1.serviceAccount; - - serviceAccount.new('kube-state-metrics') + - serviceAccount.mixin.metadata.withNamespace($._config.namespace), - - service: - local service = k.core.v1.service; - local servicePort = service.mixin.spec.portsType; - - local ksmServicePortMain = servicePort.newNamed('https-main', 8443, 'https-main'); - local ksmServicePortSelf = servicePort.newNamed('https-self', 9443, 'https-self'); - - service.new('kube-state-metrics', $.kubeStateMetrics.deployment.spec.selector.matchLabels, [ksmServicePortMain, ksmServicePortSelf]) + - service.mixin.metadata.withNamespace($._config.namespace) + - service.mixin.metadata.withLabels({ 'k8s-app': 'kube-state-metrics' }) + - service.mixin.spec.withClusterIp('None'), - - serviceMonitor: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'ServiceMonitor', - metadata: { - name: 'kube-state-metrics', - namespace: $._config.namespace, - labels: { - 'k8s-app': 'kube-state-metrics', - }, - }, - spec: { - jobLabel: 'k8s-app', - selector: { - matchLabels: { - 'k8s-app': 'kube-state-metrics', - }, - }, - endpoints: [ - { - port: 'https-main', - scheme: 'https', - interval: $._config.kubeStateMetrics.scrapeInterval, - scrapeTimeout: $._config.kubeStateMetrics.scrapeTimeout, - honorLabels: true, - bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', - tlsConfig: { - insecureSkipVerify: true, - }, - }, - { - port: 'https-self', - scheme: 'https', - interval: '30s', - bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', - tlsConfig: { - insecureSkipVerify: true, - }, - }, - ], - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/lib/image.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/lib/image.libsonnet deleted file mode 100644 index 0561e33c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/lib/image.libsonnet +++ /dev/null @@ -1,21 +0,0 @@ -// imageName extracts the image name from a fully qualified image string. eg. -// quay.io/coreos/addon-resizer -> addon-resizer -// grafana/grafana -> grafana -local imageName(image) = - local parts = std.split(image, '/'); - local len = std.length(parts); - if len == 3 then - # registry.com/org/image - parts[2] - else if len == 2 then - # org/image - parts[1] - else if len == 1 then - # image, ie. busybox - parts[0] - else - error 'unknown image format: ' + image; - -{ - imageName:: imageName, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/lib/lib.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/lib/lib.libsonnet deleted file mode 100644 index c30f976f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/lib/lib.libsonnet +++ /dev/null @@ -1 +0,0 @@ -(import 'image.libsonnet') diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/node-exporter/node-exporter.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/node-exporter/node-exporter.libsonnet deleted file mode 100644 index 02fc8b10..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/node-exporter/node-exporter.libsonnet +++ /dev/null @@ -1,201 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; - -{ - _config+:: { - namespace: 'default', - - versions+:: { - nodeExporter: 'v0.18.1', - kubeRbacProxy: 'v0.4.1', - }, - - imageRepos+:: { - nodeExporter: 'quay.io/prometheus/node-exporter', - kubeRbacProxy: 'quay.io/coreos/kube-rbac-proxy', - }, - - nodeExporter+:: { - port: 9100, - }, - }, - - nodeExporter+:: { - clusterRoleBinding: - local clusterRoleBinding = k.rbac.v1.clusterRoleBinding; - - clusterRoleBinding.new() + - clusterRoleBinding.mixin.metadata.withName('node-exporter') + - clusterRoleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + - clusterRoleBinding.mixin.roleRef.withName('node-exporter') + - clusterRoleBinding.mixin.roleRef.mixinInstance({ kind: 'ClusterRole' }) + - clusterRoleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'node-exporter', namespace: $._config.namespace }]), - - clusterRole: - local clusterRole = k.rbac.v1.clusterRole; - local policyRule = clusterRole.rulesType; - - local authenticationRole = policyRule.new() + - policyRule.withApiGroups(['authentication.k8s.io']) + - policyRule.withResources([ - 'tokenreviews', - ]) + - policyRule.withVerbs(['create']); - - local authorizationRole = policyRule.new() + - policyRule.withApiGroups(['authorization.k8s.io']) + - policyRule.withResources([ - 'subjectaccessreviews', - ]) + - policyRule.withVerbs(['create']); - - local rules = [authenticationRole, authorizationRole]; - - clusterRole.new() + - clusterRole.mixin.metadata.withName('node-exporter') + - clusterRole.withRules(rules), - - daemonset: - local daemonset = k.apps.v1.daemonSet; - local container = daemonset.mixin.spec.template.spec.containersType; - local volume = daemonset.mixin.spec.template.spec.volumesType; - local containerPort = container.portsType; - local containerVolumeMount = container.volumeMountsType; - local podSelector = daemonset.mixin.spec.template.spec.selectorType; - local toleration = daemonset.mixin.spec.template.spec.tolerationsType; - local containerEnv = container.envType; - - local podLabels = { app: 'node-exporter' }; - - local existsToleration = toleration.new() + - toleration.withOperator('Exists'); - local procVolumeName = 'proc'; - local procVolume = volume.fromHostPath(procVolumeName, '/proc'); - local procVolumeMount = containerVolumeMount.new(procVolumeName, '/host/proc'); - - local sysVolumeName = 'sys'; - local sysVolume = volume.fromHostPath(sysVolumeName, '/sys'); - local sysVolumeMount = containerVolumeMount.new(sysVolumeName, '/host/sys'); - - local rootVolumeName = 'root'; - local rootVolume = volume.fromHostPath(rootVolumeName, '/'); - local rootVolumeMount = containerVolumeMount.new(rootVolumeName, '/host/root'). - withMountPropagation('HostToContainer'). - withReadOnly(true); - - local nodeExporter = - container.new('node-exporter', $._config.imageRepos.nodeExporter + ':' + $._config.versions.nodeExporter) + - container.withArgs([ - '--web.listen-address=127.0.0.1:' + $._config.nodeExporter.port, - '--path.procfs=/host/proc', - '--path.sysfs=/host/sys', - '--path.rootfs=/host/root', - - // The following settings have been taken from - // https://github.com/prometheus/node_exporter/blob/0662673/collector/filesystem_linux.go#L30-L31 - // Once node exporter is being released with those settings, this can be removed. - '--collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+)($|/)', - '--collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$', - ]) + - container.withVolumeMounts([procVolumeMount, sysVolumeMount, rootVolumeMount]) + - container.mixin.resources.withRequests($._config.resources['node-exporter'].requests) + - container.mixin.resources.withLimits($._config.resources['node-exporter'].limits); - - local ip = containerEnv.fromFieldPath('IP', 'status.podIP'); - local proxy = - container.new('kube-rbac-proxy', $._config.imageRepos.kubeRbacProxy + ':' + $._config.versions.kubeRbacProxy) + - container.withArgs([ - '--logtostderr', - '--secure-listen-address=$(IP):' + $._config.nodeExporter.port, - '--tls-cipher-suites=' + std.join(',', $._config.tlsCipherSuites), - '--upstream=http://127.0.0.1:' + $._config.nodeExporter.port + '/', - ]) + - // Keep `hostPort` here, rather than in the node-exporter container - // because Kubernetes mandates that if you define a `hostPort` then - // `containerPort` must match. In our case, we are splitting the - // host port and container port between the two containers. - // We'll keep the port specification here so that the named port - // used by the service is tied to the proxy container. We *could* - // forgo declaring the host port, however it is important to declare - // it so that the scheduler can decide if the pod is schedulable. - container.withPorts(containerPort.new($._config.nodeExporter.port) + containerPort.withHostPort($._config.nodeExporter.port) + containerPort.withName('https')) + - container.mixin.resources.withRequests({ cpu: '10m', memory: '20Mi' }) + - container.mixin.resources.withLimits({ cpu: '20m', memory: '60Mi' }) + - container.withEnv([ip]); - - local c = [nodeExporter, proxy]; - - daemonset.new() + - daemonset.mixin.metadata.withName('node-exporter') + - daemonset.mixin.metadata.withNamespace($._config.namespace) + - daemonset.mixin.metadata.withLabels(podLabels) + - daemonset.mixin.spec.selector.withMatchLabels(podLabels) + - daemonset.mixin.spec.template.metadata.withLabels(podLabels) + - daemonset.mixin.spec.template.spec.withTolerations([existsToleration]) + - daemonset.mixin.spec.template.spec.withNodeSelector({ 'kubernetes.io/os': 'linux' }) + - daemonset.mixin.spec.template.spec.withContainers(c) + - daemonset.mixin.spec.template.spec.withVolumes([procVolume, sysVolume, rootVolume]) + - daemonset.mixin.spec.template.spec.securityContext.withRunAsNonRoot(true) + - daemonset.mixin.spec.template.spec.securityContext.withRunAsUser(65534) + - daemonset.mixin.spec.template.spec.withServiceAccountName('node-exporter') + - daemonset.mixin.spec.template.spec.withHostPid(true) + - daemonset.mixin.spec.template.spec.withHostNetwork(true), - - serviceAccount: - local serviceAccount = k.core.v1.serviceAccount; - - serviceAccount.new('node-exporter') + - serviceAccount.mixin.metadata.withNamespace($._config.namespace), - - serviceMonitor: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'ServiceMonitor', - metadata: { - name: 'node-exporter', - namespace: $._config.namespace, - labels: { - 'k8s-app': 'node-exporter', - }, - }, - spec: { - jobLabel: 'k8s-app', - selector: { - matchLabels: { - 'k8s-app': 'node-exporter', - }, - }, - endpoints: [ - { - port: 'https', - scheme: 'https', - interval: '30s', - bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', - relabelings: [ - { - action: 'replace', - regex: '(.*)', - replacment: '$1', - sourceLabels: ['__meta_kubernetes_pod_node_name'], - targetLabel: 'instance', - }, - ], - tlsConfig: { - insecureSkipVerify: true, - }, - }, - ], - }, - }, - - service: - local service = k.core.v1.service; - local servicePort = k.core.v1.service.mixin.spec.portsType; - - local nodeExporterPort = servicePort.newNamed('https', $._config.nodeExporter.port, 'https'); - - service.new('node-exporter', $.nodeExporter.daemonset.spec.selector.matchLabels, nodeExporterPort) + - service.mixin.metadata.withNamespace($._config.namespace) + - service.mixin.metadata.withLabels({ 'k8s-app': 'node-exporter' }) + - service.mixin.spec.withClusterIp('None'), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet deleted file mode 100644 index 428a3c3d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet +++ /dev/null @@ -1,221 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; - -{ - _config+:: { - namespace: 'default', - - versions+:: { - prometheusAdapter: 'v0.4.1', - }, - - imageRepos+:: { - prometheusAdapter: 'quay.io/coreos/k8s-prometheus-adapter-amd64', - }, - - prometheusAdapter+:: { - name: 'prometheus-adapter', - labels: { name: $._config.prometheusAdapter.name }, - prometheusURL: 'http://prometheus-' + $._config.prometheus.name + '.' + $._config.namespace + '.svc:9090/', - config: ||| - resourceRules: - cpu: - containerQuery: sum(rate(container_cpu_usage_seconds_total{<<.LabelMatchers>>,container_name!="POD",container_name!="",pod_name!=""}[1m])) by (<<.GroupBy>>) - nodeQuery: sum(1 - rate(node_cpu_seconds_total{mode="idle"}[1m]) * on(namespace, pod) group_left(node) node_namespace_pod:kube_pod_info:{<<.LabelMatchers>>}) by (<<.GroupBy>>) - resources: - overrides: - node: - resource: node - namespace: - resource: namespace - pod_name: - resource: pod - containerLabel: container_name - memory: - containerQuery: sum(container_memory_working_set_bytes{<<.LabelMatchers>>,container_name!="POD",container_name!="",pod_name!=""}) by (<<.GroupBy>>) - nodeQuery: sum(node_memory_MemTotal_bytes{job="node-exporter",<<.LabelMatchers>>} - node_memory_MemAvailable_bytes{job="node-exporter",<<.LabelMatchers>>}) by (<<.GroupBy>>) - resources: - overrides: - instance: - resource: node - namespace: - resource: namespace - pod_name: - resource: pod - containerLabel: container_name - window: 1m - |||, - }, - }, - - prometheusAdapter+:: { - apiService: - { - apiVersion: 'apiregistration.k8s.io/v1', - kind: 'APIService', - metadata: { - name: 'v1beta1.metrics.k8s.io', - }, - spec: { - service: { - name: $.prometheusAdapter.service.metadata.name, - namespace: $._config.namespace, - }, - group: 'metrics.k8s.io', - version: 'v1beta1', - insecureSkipTLSVerify: true, - groupPriorityMinimum: 100, - versionPriority: 100, - }, - }, - - configMap: - local configmap = k.core.v1.configMap; - - configmap.new('adapter-config', { 'config.yaml': $._config.prometheusAdapter.config }) + - configmap.mixin.metadata.withNamespace($._config.namespace), - - service: - local service = k.core.v1.service; - local servicePort = k.core.v1.service.mixin.spec.portsType; - - service.new( - $._config.prometheusAdapter.name, - $._config.prometheusAdapter.labels, - servicePort.newNamed('https', 443, 6443), - ) + - service.mixin.metadata.withNamespace($._config.namespace) + - service.mixin.metadata.withLabels($._config.prometheusAdapter.labels), - - deployment: - local deployment = k.apps.v1.deployment; - local volume = deployment.mixin.spec.template.spec.volumesType; - local container = deployment.mixin.spec.template.spec.containersType; - local containerVolumeMount = container.volumeMountsType; - - local c = - container.new($._config.prometheusAdapter.name, $._config.imageRepos.prometheusAdapter + ':' + $._config.versions.prometheusAdapter) + - container.withArgs([ - '--cert-dir=/var/run/serving-cert', - '--config=/etc/adapter/config.yaml', - '--logtostderr=true', - '--metrics-relist-interval=1m', - '--prometheus-url=' + $._config.prometheusAdapter.prometheusURL, - '--secure-port=6443', - ]) + - container.withPorts([{ containerPort: 6443 }]) + - container.withVolumeMounts([ - containerVolumeMount.new('tmpfs', '/tmp'), - containerVolumeMount.new('volume-serving-cert', '/var/run/serving-cert'), - containerVolumeMount.new('config', '/etc/adapter'), - ],); - - deployment.new($._config.prometheusAdapter.name, 1, c, $._config.prometheusAdapter.labels) + - deployment.mixin.metadata.withNamespace($._config.namespace) + - deployment.mixin.spec.selector.withMatchLabels($._config.prometheusAdapter.labels) + - deployment.mixin.spec.template.spec.withServiceAccountName($.prometheusAdapter.serviceAccount.metadata.name) + - deployment.mixin.spec.template.spec.withNodeSelector({ 'kubernetes.io/os': 'linux' }) + - deployment.mixin.spec.strategy.rollingUpdate.withMaxSurge(1) + - deployment.mixin.spec.strategy.rollingUpdate.withMaxUnavailable(0) + - deployment.mixin.spec.template.spec.withVolumes([ - volume.fromEmptyDir(name='tmpfs'), - volume.fromEmptyDir(name='volume-serving-cert'), - { name: 'config', configMap: { name: 'adapter-config' } }, - ]), - - serviceAccount: - local serviceAccount = k.core.v1.serviceAccount; - - serviceAccount.new($._config.prometheusAdapter.name) + - serviceAccount.mixin.metadata.withNamespace($._config.namespace), - - clusterRole: - local clusterRole = k.rbac.v1.clusterRole; - local policyRule = clusterRole.rulesType; - - local rules = - policyRule.new() + - policyRule.withApiGroups(['']) + - policyRule.withResources(['nodes', 'namespaces', 'pods', 'services']) + - policyRule.withVerbs(['get', 'list', 'watch']); - - clusterRole.new() + - clusterRole.mixin.metadata.withName($._config.prometheusAdapter.name) + - clusterRole.withRules(rules), - - clusterRoleBinding: - local clusterRoleBinding = k.rbac.v1.clusterRoleBinding; - - clusterRoleBinding.new() + - clusterRoleBinding.mixin.metadata.withName($._config.prometheusAdapter.name) + - clusterRoleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + - clusterRoleBinding.mixin.roleRef.withName($.prometheusAdapter.clusterRole.metadata.name) + - clusterRoleBinding.mixin.roleRef.mixinInstance({ kind: 'ClusterRole' }) + - clusterRoleBinding.withSubjects([{ - kind: 'ServiceAccount', - name: $.prometheusAdapter.serviceAccount.metadata.name, - namespace: $._config.namespace, - }]), - - clusterRoleBindingDelegator: - local clusterRoleBinding = k.rbac.v1.clusterRoleBinding; - - clusterRoleBinding.new() + - clusterRoleBinding.mixin.metadata.withName('resource-metrics:system:auth-delegator') + - clusterRoleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + - clusterRoleBinding.mixin.roleRef.withName('system:auth-delegator') + - clusterRoleBinding.mixin.roleRef.mixinInstance({ kind: 'ClusterRole' }) + - clusterRoleBinding.withSubjects([{ - kind: 'ServiceAccount', - name: $.prometheusAdapter.serviceAccount.metadata.name, - namespace: $._config.namespace, - }]), - - clusterRoleServerResources: - local clusterRole = k.rbac.v1.clusterRole; - local policyRule = clusterRole.rulesType; - - local rules = - policyRule.new() + - policyRule.withApiGroups(['metrics.k8s.io']) + - policyRule.withResources(['*']) + - policyRule.withVerbs(['*']); - - clusterRole.new() + - clusterRole.mixin.metadata.withName('resource-metrics-server-resources') + - clusterRole.withRules(rules), - - clusterRoleAggregatedMetricsReader: - local clusterRole = k.rbac.v1.clusterRole; - local policyRule = clusterRole.rulesType; - - local rules = - policyRule.new() + - policyRule.withApiGroups(['metrics.k8s.io']) + - policyRule.withResources(['pods']) + - policyRule.withVerbs(['get','list','watch']); - - clusterRole.new() + - clusterRole.mixin.metadata.withName('system:aggregated-metrics-reader') + - clusterRole.mixin.metadata.withLabels({ - "rbac.authorization.k8s.io/aggregate-to-admin": "true", - "rbac.authorization.k8s.io/aggregate-to-edit": "true", - "rbac.authorization.k8s.io/aggregate-to-view": "true", - }) + - clusterRole.withRules(rules), - - roleBindingAuthReader: - local roleBinding = k.rbac.v1.roleBinding; - - roleBinding.new() + - roleBinding.mixin.metadata.withName('resource-metrics-auth-reader') + - roleBinding.mixin.metadata.withNamespace('kube-system') + - roleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + - roleBinding.mixin.roleRef.withName('extension-apiserver-authentication-reader') + - roleBinding.mixin.roleRef.mixinInstance({ kind: 'Role' }) + - roleBinding.withSubjects([{ - kind: 'ServiceAccount', - name: $.prometheusAdapter.serviceAccount.metadata.name, - namespace: $._config.namespace, - }]), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/prometheus/prometheus.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/prometheus/prometheus.libsonnet deleted file mode 100644 index 8ee894aa..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/prometheus/prometheus.libsonnet +++ /dev/null @@ -1,436 +0,0 @@ -local k3 = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; - -{ - _config+:: { - namespace: 'default', - - versions+:: { - prometheus: 'v2.11.0', - }, - - imageRepos+:: { - prometheus: 'quay.io/prometheus/prometheus', - }, - - alertmanager+:: { - name: 'main', - }, - - prometheus+:: { - name: 'k8s', - replicas: 2, - rules: {}, - renderedRules: {}, - namespaces: ['default', 'kube-system', $._config.namespace], - }, - }, - - prometheus+:: { - serviceAccount: - local serviceAccount = k.core.v1.serviceAccount; - - serviceAccount.new('prometheus-' + $._config.prometheus.name) + - serviceAccount.mixin.metadata.withNamespace($._config.namespace), - service: - local service = k.core.v1.service; - local servicePort = k.core.v1.service.mixin.spec.portsType; - - local prometheusPort = servicePort.newNamed('web', 9090, 'web'); - - service.new('prometheus-' + $._config.prometheus.name, { app: 'prometheus', prometheus: $._config.prometheus.name }, prometheusPort) + - service.mixin.spec.withSessionAffinity('ClientIP') + - service.mixin.metadata.withNamespace($._config.namespace) + - service.mixin.metadata.withLabels({ prometheus: $._config.prometheus.name }), - [if $._config.prometheus.rules != null && $._config.prometheus.rules != {} then 'rules']: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'PrometheusRule', - metadata: { - labels: { - prometheus: $._config.prometheus.name, - role: 'alert-rules', - }, - name: 'prometheus-' + $._config.prometheus.name + '-rules', - namespace: $._config.namespace, - }, - spec: { - groups: $._config.prometheus.rules.groups, - }, - }, - roleBindingSpecificNamespaces: - local roleBinding = k.rbac.v1.roleBinding; - - local newSpecificRoleBinding(namespace) = - roleBinding.new() + - roleBinding.mixin.metadata.withName('prometheus-' + $._config.prometheus.name) + - roleBinding.mixin.metadata.withNamespace(namespace) + - roleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + - roleBinding.mixin.roleRef.withName('prometheus-' + $._config.prometheus.name) + - roleBinding.mixin.roleRef.mixinInstance({ kind: 'Role' }) + - roleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'prometheus-' + $._config.prometheus.name, namespace: $._config.namespace }]); - - local roleBindingList = k3.rbac.v1.roleBindingList; - roleBindingList.new([newSpecificRoleBinding(x) for x in $._config.prometheus.namespaces]), - clusterRole: - local clusterRole = k.rbac.v1.clusterRole; - local policyRule = clusterRole.rulesType; - - local nodeMetricsRule = policyRule.new() + - policyRule.withApiGroups(['']) + - policyRule.withResources(['nodes/metrics']) + - policyRule.withVerbs(['get']); - - local metricsRule = policyRule.new() + - policyRule.withNonResourceUrls('/metrics') + - policyRule.withVerbs(['get']); - - local rules = [nodeMetricsRule, metricsRule]; - - clusterRole.new() + - clusterRole.mixin.metadata.withName('prometheus-' + $._config.prometheus.name) + - clusterRole.withRules(rules), - roleConfig: - local role = k.rbac.v1.role; - local policyRule = role.rulesType; - - local configmapRule = policyRule.new() + - policyRule.withApiGroups(['']) + - policyRule.withResources([ - 'configmaps', - ]) + - policyRule.withVerbs(['get']); - - role.new() + - role.mixin.metadata.withName('prometheus-' + $._config.prometheus.name + '-config') + - role.mixin.metadata.withNamespace($._config.namespace) + - role.withRules(configmapRule), - roleBindingConfig: - local roleBinding = k.rbac.v1.roleBinding; - - roleBinding.new() + - roleBinding.mixin.metadata.withName('prometheus-' + $._config.prometheus.name + '-config') + - roleBinding.mixin.metadata.withNamespace($._config.namespace) + - roleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + - roleBinding.mixin.roleRef.withName('prometheus-' + $._config.prometheus.name + '-config') + - roleBinding.mixin.roleRef.mixinInstance({ kind: 'Role' }) + - roleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'prometheus-' + $._config.prometheus.name, namespace: $._config.namespace }]), - clusterRoleBinding: - local clusterRoleBinding = k.rbac.v1.clusterRoleBinding; - - clusterRoleBinding.new() + - clusterRoleBinding.mixin.metadata.withName('prometheus-' + $._config.prometheus.name) + - clusterRoleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + - clusterRoleBinding.mixin.roleRef.withName('prometheus-' + $._config.prometheus.name) + - clusterRoleBinding.mixin.roleRef.mixinInstance({ kind: 'ClusterRole' }) + - clusterRoleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'prometheus-' + $._config.prometheus.name, namespace: $._config.namespace }]), - roleSpecificNamespaces: - local role = k.rbac.v1.role; - local policyRule = role.rulesType; - local coreRule = policyRule.new() + - policyRule.withApiGroups(['']) + - policyRule.withResources([ - 'services', - 'endpoints', - 'pods', - ]) + - policyRule.withVerbs(['get', 'list', 'watch']); - - local newSpecificRole(namespace) = - role.new() + - role.mixin.metadata.withName('prometheus-' + $._config.prometheus.name) + - role.mixin.metadata.withNamespace(namespace) + - role.withRules(coreRule); - - local roleList = k3.rbac.v1.roleList; - roleList.new([newSpecificRole(x) for x in $._config.prometheus.namespaces]), - prometheus: - local statefulSet = k.apps.v1.statefulSet; - local container = statefulSet.mixin.spec.template.spec.containersType; - local resourceRequirements = container.mixin.resourcesType; - local selector = statefulSet.mixin.spec.selectorType; - - local resources = - resourceRequirements.new() + - resourceRequirements.withRequests({ memory: '400Mi' }); - - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'Prometheus', - metadata: { - name: $._config.prometheus.name, - namespace: $._config.namespace, - labels: { - prometheus: $._config.prometheus.name, - }, - }, - spec: { - replicas: $._config.prometheus.replicas, - version: $._config.versions.prometheus, - baseImage: $._config.imageRepos.prometheus, - serviceAccountName: 'prometheus-' + $._config.prometheus.name, - serviceMonitorSelector: {}, - podMonitorSelector: {}, - serviceMonitorNamespaceSelector: {}, - nodeSelector: { 'kubernetes.io/os': 'linux' }, - ruleSelector: selector.withMatchLabels({ - role: 'alert-rules', - prometheus: $._config.prometheus.name, - }), - resources: resources, - alerting: { - alertmanagers: [ - { - namespace: $._config.namespace, - name: 'alertmanager-' + $._config.alertmanager.name, - port: 'web', - }, - ], - }, - securityContext: { - runAsUser: 1000, - runAsNonRoot: true, - fsGroup: 2000, - }, - }, - }, - serviceMonitor: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'ServiceMonitor', - metadata: { - name: 'prometheus', - namespace: $._config.namespace, - labels: { - 'k8s-app': 'prometheus', - }, - }, - spec: { - selector: { - matchLabels: { - prometheus: $._config.prometheus.name, - }, - }, - endpoints: [ - { - port: 'web', - interval: '30s', - }, - ], - }, - }, - serviceMonitorKubeScheduler: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'ServiceMonitor', - metadata: { - name: 'kube-scheduler', - namespace: $._config.namespace, - labels: { - 'k8s-app': 'kube-scheduler', - }, - }, - spec: { - jobLabel: 'k8s-app', - endpoints: [ - { - port: 'http-metrics', - interval: '30s', - }, - ], - selector: { - matchLabels: { - 'k8s-app': 'kube-scheduler', - }, - }, - namespaceSelector: { - matchNames: [ - 'kube-system', - ], - }, - }, - }, - serviceMonitorKubelet: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'ServiceMonitor', - metadata: { - name: 'kubelet', - namespace: $._config.namespace, - labels: { - 'k8s-app': 'kubelet', - }, - }, - spec: { - jobLabel: 'k8s-app', - endpoints: [ - { - port: 'https-metrics', - scheme: 'https', - interval: '30s', - honorLabels: true, - tlsConfig: { - insecureSkipVerify: true, - }, - bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', - }, - { - port: 'https-metrics', - scheme: 'https', - path: '/metrics/cadvisor', - interval: '30s', - honorLabels: true, - tlsConfig: { - insecureSkipVerify: true, - }, - bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', - metricRelabelings: [ - // Drop a bunch of metrics which are disabled but still sent, see - // https://github.com/google/cadvisor/issues/1925. - { - sourceLabels: ['__name__'], - regex: 'container_(network_tcp_usage_total|network_udp_usage_total|tasks_state|cpu_load_average_10s)', - action: 'drop', - }, - ], - }, - ], - selector: { - matchLabels: { - 'k8s-app': 'kubelet', - }, - }, - namespaceSelector: { - matchNames: [ - 'kube-system', - ], - }, - }, - }, - serviceMonitorKubeControllerManager: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'ServiceMonitor', - metadata: { - name: 'kube-controller-manager', - namespace: $._config.namespace, - labels: { - 'k8s-app': 'kube-controller-manager', - }, - }, - spec: { - jobLabel: 'k8s-app', - endpoints: [ - { - port: 'http-metrics', - interval: '30s', - metricRelabelings: [ - { - sourceLabels: ['__name__'], - regex: 'etcd_(debugging|disk|request|server).*', - action: 'drop', - }, - ], - }, - ], - selector: { - matchLabels: { - 'k8s-app': 'kube-controller-manager', - }, - }, - namespaceSelector: { - matchNames: [ - 'kube-system', - ], - }, - }, - }, - serviceMonitorApiserver: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'ServiceMonitor', - metadata: { - name: 'kube-apiserver', - namespace: $._config.namespace, - labels: { - 'k8s-app': 'apiserver', - }, - }, - spec: { - jobLabel: 'component', - selector: { - matchLabels: { - component: 'apiserver', - provider: 'kubernetes', - }, - }, - namespaceSelector: { - matchNames: [ - 'default', - ], - }, - endpoints: [ - { - port: 'https', - interval: '30s', - scheme: 'https', - tlsConfig: { - caFile: '/var/run/secrets/kubernetes.io/serviceaccount/ca.crt', - serverName: 'kubernetes', - }, - bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', - metricRelabelings: [ - { - sourceLabels: ['__name__'], - regex: 'etcd_(debugging|disk|request|server).*', - action: 'drop', - }, - { - sourceLabels: ['__name__'], - regex: 'apiserver_admission_controller_admission_latencies_seconds_.*', - action: 'drop', - }, - { - sourceLabels: ['__name__'], - regex: 'apiserver_admission_step_admission_latencies_seconds_.*', - action: 'drop', - }, - ], - }, - ], - }, - }, - serviceMonitorCoreDNS: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'ServiceMonitor', - metadata: { - name: 'coredns', - namespace: $._config.namespace, - labels: { - 'k8s-app': 'coredns', - }, - }, - spec: { - jobLabel: 'k8s-app', - selector: { - matchLabels: { - 'k8s-app': 'kube-dns', - }, - }, - namespaceSelector: { - matchNames: [ - 'kube-system', - ], - }, - endpoints: [ - { - port: 'metrics', - interval: '15s', - bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token', - }, - ], - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/rules/node-rules.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/rules/node-rules.libsonnet deleted file mode 100644 index e3396b08..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/rules/node-rules.libsonnet +++ /dev/null @@ -1,39 +0,0 @@ -{ - prometheusRules+:: { - groups+: [ - { - name: 'kube-prometheus-node-recording.rules', - rules: [ - { - expr: 'sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait"}[3m])) BY (instance)', - record: 'instance:node_cpu:rate:sum', - }, - { - expr: 'sum((node_filesystem_size_bytes{mountpoint="/"} - node_filesystem_free_bytes{mountpoint="/"})) BY (instance)', - record: 'instance:node_filesystem_usage:sum', - }, - { - expr: 'sum(rate(node_network_receive_bytes_total[3m])) BY (instance)', - record: 'instance:node_network_receive_bytes:rate:sum', - }, - { - expr: 'sum(rate(node_network_transmit_bytes_total[3m])) BY (instance)', - record: 'instance:node_network_transmit_bytes:rate:sum', - }, - { - expr: 'sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait"}[5m])) WITHOUT (cpu, mode) / ON(instance) GROUP_LEFT() count(sum(node_cpu_seconds_total) BY (instance, cpu)) BY (instance)', - record: 'instance:node_cpu:ratio', - }, - { - expr: 'sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait"}[5m]))', - record: 'cluster:node_cpu:sum_rate5m', - }, - { - expr: 'cluster:node_cpu_seconds_total:rate5m / count(sum(node_cpu_seconds_total) BY (instance, cpu))', - record: 'cluster:node_cpu:ratio', - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/rules/rules.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/rules/rules.libsonnet deleted file mode 100644 index b0217aba..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kube-prometheus/rules/rules.libsonnet +++ /dev/null @@ -1 +0,0 @@ -(import 'node-rules.libsonnet') diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/.circleci/Dockerfile b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/.circleci/Dockerfile deleted file mode 100644 index 5f905fb1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/.circleci/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -# Dockerfile for image used to run CI. - -FROM alpine:3.7 -RUN apk --no-cache add alpine-sdk git openssl-dev - -RUN git clone https://github.com/google/jsonnet && \ - git -C jsonnet checkout v0.12.1 && \ - make -C jsonnet LDFLAGS=-static - -FROM prom/prometheus:v2.8.1 - -FROM circleci/golang:1.10.3-stretch -COPY --from=0 jsonnet/jsonnet /usr/bin -COPY --from=1 /bin/promtool /usr/bin -RUN go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/.circleci/config.yml b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/.circleci/config.yml deleted file mode 100644 index c1d55f4e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/.circleci/config.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: csmarchbanks/kubernetes-mixin-build:0.1.1 - - working_directory: /go/src/github.com/kubernetes-monitoring/kubernetes-mixin - steps: - - checkout - - run: jb install - - run: make diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/.gitignore b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/.gitignore deleted file mode 100644 index b23a75c9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.yaml -dashboards_out -vendor -jsonnetfile.lock.json diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/LICENSE b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/LICENSE deleted file mode 100644 index d6456956..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/Makefile b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/Makefile deleted file mode 100644 index e3cdb5f7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -JSONNET_ARGS := -n 2 --max-blank-lines 2 --string-style s --comment-style s -ifneq (,$(shell which jsonnetfmt)) - JSONNET_FMT_CMD := jsonnetfmt -else - JSONNET_FMT_CMD := jsonnet - JSONNET_FMT_ARGS := fmt $(JSONNET_ARGS) -endif -JSONNET_FMT := $(JSONNET_FMT_CMD) $(JSONNET_FMT_ARGS) - -all: fmt prometheus_alerts.yaml prometheus_rules.yaml dashboards_out lint test - -fmt: - find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \ - xargs -n 1 -- $(JSONNET_FMT) -i - -prometheus_alerts.yaml: mixin.libsonnet lib/alerts.jsonnet alerts/*.libsonnet - jsonnet -S lib/alerts.jsonnet > $@ - -prometheus_rules.yaml: mixin.libsonnet lib/rules.jsonnet rules/*.libsonnet - jsonnet -S lib/rules.jsonnet > $@ - -dashboards_out: mixin.libsonnet lib/dashboards.jsonnet dashboards/*.libsonnet - @mkdir -p dashboards_out - jsonnet -J vendor -m dashboards_out lib/dashboards.jsonnet - -lint: prometheus_alerts.yaml prometheus_rules.yaml - find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \ - while read f; do \ - $(JSONNET_FMT) "$$f" | diff -u "$$f" -; \ - done - - promtool check rules prometheus_rules.yaml - promtool check rules prometheus_alerts.yaml - -clean: - rm -rf dashboards_out prometheus_alerts.yaml prometheus_rules.yaml - -test: prometheus_alerts.yaml prometheus_rules.yaml - promtool test rules tests.yaml diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/OWNERS b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/OWNERS deleted file mode 100644 index 71c146e2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/OWNERS +++ /dev/null @@ -1,13 +0,0 @@ -# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md - -approvers: -- brancz -- csmarchbanks -- metalmatze -- tomwilkie - -reviewers: -- brancz -- csmarchbanks -- metalmatze -- tomwilkie diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/README.md b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/README.md deleted file mode 100644 index d236c650..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/README.md +++ /dev/null @@ -1,190 +0,0 @@ -# Prometheus Monitoring Mixin for Kubernetes -[![CircleCI](https://circleci.com/gh/kubernetes-monitoring/kubernetes-mixin/tree/master.svg?style=shield)](https://circleci.com/gh/kubernetes-monitoring/kubernetes-mixin) - -> NOTE: This project is *pre-release* stage. Flags, configuration, behaviour and design may change significantly in following releases. - -A set of Grafana dashboards and Prometheus alerts for Kubernetes. - -## Releases - -| Release | Kubernetes Compatibility | -| ------- | -------------------------- | -| master | Kubernetes 1.14+ | -| v0.1.x | Kubernetes 1.13 and before | - -In Kubernetes 1.14 there was a major [metrics overhaul](https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/0031-kubernetes-metrics-overhaul.md) implemented. -Therefore v0.1.x of this repository is the last release to support Kubernetes 1.13 and previous version on a best effort basis. - -## How to use - -This mixin is designed to be vendored into the repo with your infrastructure config. -To do this, use [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler): - -You then have three options for deploying your dashboards -1. Generate the config files and deploy them yourself -1. Use ksonnet to deploy this mixin along with Prometheus and Grafana -1. Use prometheus-operator to deploy this mixin (TODO) - -## Generate config files - -You can manually generate the alerts, dashboards and rules files, but first you -must install some tools: - -``` -$ go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb -$ brew install jsonnet -``` - -Then, grab the mixin and its dependencies: - -``` -$ git clone https://github.com/kubernetes-monitoring/kubernetes-mixin -$ cd kubernetes-mixin -$ jb install -``` - -Finally, build the mixin: - -``` -$ make prometheus_alerts.yaml -$ make prometheus_rules.yaml -$ make dashboards_out -``` - -The `prometheus_alerts.yaml` and `prometheus_rules.yaml` file then need to passed -to your Prometheus server, and the files in `dashboards_out` need to be imported -into you Grafana server. The exact details will depending on how you deploy your -monitoring stack to Kubernetes. - -### Dashboards for Windows Nodes -There are separate dashboards for windows resources. -1) Compute Resources / Cluster(Windows) -2) Compute Resources / Namespace(Windows) -3) Compute Resources / Pod(Windows) -4) USE Method / Cluster(Windows) -5) USE Method / Node(Windows) - -These dashboards are based on metrics populated by wmi_exporter(https://github.com/martinlindhe/wmi_exporter) from each Windows node. - -Steps to configure wmi_exporter -1) Download the latest version(v0.7.0 or higher) of wmi_exporter from release page(https://github.com/martinlindhe/wmi_exporter/releases/) -2) Install the wmi_exporter service. -``` - msiexec /i ENABLED_COLLECTORS=cpu,cs,logical_disk,net,os,system,container,memory LISTEN_PORT= -``` -3) Update the Prometheus server to scrap the metrics from wmi_exporter endpoint. - - -## Using with prometheus-ksonnet - -Alternatively you can also use the mixin with -[prometheus-ksonnet](https://github.com/kausalco/public/tree/master/prometheus-ksonnet), -a [ksonnet](https://github.com/ksonnet/ksonnet) module to deploy a fully-fledged -Prometheus-based monitoring system for Kubernetes: - -Make sure you have the ksonnet v0.8.0: - -``` -$ brew install https://raw.githubusercontent.com/ksonnet/homebrew-tap/82ef24cb7b454d1857db40e38671426c18cd8820/ks.rb -$ brew pin ks -$ ks version -ksonnet version: v0.8.0 -jsonnet version: v0.9.5 -client-go version: v1.6.8-beta.0+$Format:%h$ -``` - -In your config repo, if you don't have a ksonnet application, make a new one (will copy credentials from current context): - -``` -$ ks init -$ cd -$ ks env add default -``` - -Grab the kubernetes-jsonnet module using and its dependencies, which include -the kubernetes-mixin: - -``` -$ go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb -$ jb init -$ jb install github.com/kausalco/public/prometheus-ksonnet - -``` - -Assuming you want to run in the default namespace ('environment' in ksonnet parlance), add the follow to the file `environments/default/main.jsonnet`: - -``` -local prometheus = import "prometheus-ksonnet/prometheus-ksonnet.libsonnet"; - -prometheus { - _config+:: { - namespace: "default", - }, -} -``` - -Apply your config: - -``` -$ ks apply default -``` - -## Using prometheus-operator - -TODO - -## Multi-cluster support - -Kubernetes-mixin can support dashboards across multiple clusters. You need either a multi-cluster [Thanos](https://github.com/improbable-eng/thanos) installation with `external_labels` configured or a [Cortex](https://github.com/cortexproject/cortex) system where a cluster label exists. To enable this feature you need to configure the following: - -``` - // Opt-in to multiCluster dashboards by overriding this and the clusterLabel. - showMultiCluster: true, - clusterLabel: '', -``` - -## Customising the mixin - -Kubernetes-mixin allows you to override the selectors used for various jobs, -to match those used in your Prometheus set. You can also customize the dashboard -names and add grafana tags. - -In a new directory, add a file `mixin.libsonnet`: - -``` -local kubernetes = import "kubernetes-mixin/mixin.libsonnet"; - -kubernetes { - _config+:: { - kubeStateMetricsSelector: 'job="kube-state-metrics"', - cadvisorSelector: 'job="kubernetes-cadvisor"', - nodeExporterSelector: 'job="kubernetes-node-exporter"', - kubeletSelector: 'job="kubernetes-kubelet"', - grafanaK8s+:: { - dashboardNamePrefix: 'Mixin / ', - dashboardTags: ['kubernetes', 'infrastucture'], - }, - }, -} -``` - -Then, install the kubernetes-mixin: - -``` -$ jb init -$ jb install github.com/kubernetes-monitoring/kubernetes-mixin -``` - -Generate the alerts, rules and dashboards: - -``` -$ jsonnet -J vendor -S -e 'std.manifestYamlDoc((import "mixin.libsonnet").prometheusAlerts)' > alerts.yml -$ jsonnet -J vendor -S -e 'std.manifestYamlDoc((import "mixin.libsonnet").prometheusRules)' >files/rules.yml -$ jsonnet -J vendor -m files/dashboards -e '(import "mixin.libsonnet").grafanaDashboards' -``` - -## Background - -* For more motivation, see -"[The RED Method: How to instrument your services](https://kccncna17.sched.com/event/CU8K/the-red-method-how-to-instrument-your-services-b-tom-wilkie-kausal?iframe=no&w=100%&sidebar=yes&bg=no)" talk from CloudNativeCon Austin. -* For more information about monitoring mixins, see this [design doc](https://docs.google.com/document/d/1A9xvzwqnFVSOZ5fD3blKODXfsat5fg6ZhnKu9LK3lB4/edit#). diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/SECURITY_CONTACTS b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/SECURITY_CONTACTS deleted file mode 100644 index 0f85c94f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/SECURITY_CONTACTS +++ /dev/null @@ -1,16 +0,0 @@ -# Defined below are the security contacts for this repo. -# -# They are the contact point for the Product Security Committee to reach out -# to for triaging and handling of incoming issues. -# -# The below names agree to abide by the -# [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) -# and will be removed and replaced if they violate that agreement. -# -# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE -# INSTRUCTIONS AT https://kubernetes.io/security/ - -brancz -csmarchbanks -metalmatze -tomwilkie diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/absent_alerts.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/absent_alerts.libsonnet deleted file mode 100644 index 54ef781e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/absent_alerts.libsonnet +++ /dev/null @@ -1,25 +0,0 @@ -{ - prometheusAlerts+:: { - groups+: [ - { - name: 'kubernetes-absent', - rules: [ - { - alert: '%sDown' % name, - expr: ||| - absent(up{%s} == 1) - ||| % $._config.jobs[name], - 'for': '15m', - labels: { - severity: 'critical', - }, - annotations: { - message: '%s has disappeared from Prometheus target discovery.' % name, - }, - } - for name in std.objectFields($._config.jobs) - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/add-runbook-links.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/add-runbook-links.libsonnet deleted file mode 100644 index 1124f482..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/add-runbook-links.libsonnet +++ /dev/null @@ -1,23 +0,0 @@ -local utils = import '../lib/utils.libsonnet'; - -local lower(x) = - local cp(c) = std.codepoint(c); - local lowerLetter(c) = - if cp(c) >= 65 && cp(c) < 91 - then std.char(cp(c) + 32) - else c; - std.join('', std.map(lowerLetter, std.stringChars(x))); - -{ - _config+:: { - runbookURLPattern: 'https://github.com/kubernetes-monitoring/kubernetes-mixin/tree/master/runbook.md#alert-name-%s', - }, - - prometheusAlerts+:: - local addRunbookURL(rule) = rule { - [if 'alert' in rule then 'annotations']+: { - runbook_url: $._config.runbookURLPattern % lower(rule.alert), - }, - }; - utils.mapRuleGroups(addRunbookURL), -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/alerts.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/alerts.libsonnet deleted file mode 100644 index 623a7949..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/alerts.libsonnet +++ /dev/null @@ -1,6 +0,0 @@ -(import 'absent_alerts.libsonnet') + -(import 'apps_alerts.libsonnet') + -(import 'resource_alerts.libsonnet') + -(import 'storage_alerts.libsonnet') + -(import 'system_alerts.libsonnet') + -(import 'add-runbook-links.libsonnet') diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/apps_alerts.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/apps_alerts.libsonnet deleted file mode 100644 index 16c81f29..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/apps_alerts.libsonnet +++ /dev/null @@ -1,234 +0,0 @@ -{ - prometheusAlerts+:: { - groups+: [ - { - name: 'kubernetes-apps', - rules: [ - { - expr: ||| - rate(kube_pod_container_status_restarts_total{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s}[15m]) * 60 * 5 > 0 - ||| % $._config, - labels: { - severity: 'critical', - }, - annotations: { - message: 'Pod {{ $labels.namespace }}/{{ $labels.pod }} ({{ $labels.container }}) is restarting {{ printf "%.2f" $value }} times / 5 minutes.', - }, - 'for': '15m', - alert: 'KubePodCrashLooping', - }, - { - expr: ||| - sum by (namespace, pod) (kube_pod_status_phase{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, phase=~"Failed|Pending|Unknown"}) > 0 - ||| % $._config, - labels: { - severity: 'critical', - }, - annotations: { - message: 'Pod {{ $labels.namespace }}/{{ $labels.pod }} has been in a non-ready state for longer than 15 minutes.', - }, - 'for': '15m', - alert: 'KubePodNotReady', - }, - { - expr: ||| - kube_deployment_status_observed_generation{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - != - kube_deployment_metadata_generation{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - ||| % $._config, - labels: { - severity: 'critical', - }, - annotations: { - message: 'Deployment generation for {{ $labels.namespace }}/{{ $labels.deployment }} does not match, this indicates that the Deployment has failed but has not been rolled back.', - }, - 'for': '15m', - alert: 'KubeDeploymentGenerationMismatch', - }, - { - expr: ||| - kube_deployment_spec_replicas{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - != - kube_deployment_status_replicas_available{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - ||| % $._config, - labels: { - severity: 'critical', - }, - annotations: { - message: 'Deployment {{ $labels.namespace }}/{{ $labels.deployment }} has not matched the expected number of replicas for longer than 15 minutes.', - }, - 'for': '15m', - alert: 'KubeDeploymentReplicasMismatch', - }, - { - expr: ||| - kube_statefulset_status_replicas_ready{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - != - kube_statefulset_status_replicas{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - ||| % $._config, - labels: { - severity: 'critical', - }, - annotations: { - message: 'StatefulSet {{ $labels.namespace }}/{{ $labels.statefulset }} has not matched the expected number of replicas for longer than 15 minutes.', - }, - 'for': '15m', - alert: 'KubeStatefulSetReplicasMismatch', - }, - { - expr: ||| - kube_statefulset_status_observed_generation{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - != - kube_statefulset_metadata_generation{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - ||| % $._config, - labels: { - severity: 'critical', - }, - annotations: { - message: 'StatefulSet generation for {{ $labels.namespace }}/{{ $labels.statefulset }} does not match, this indicates that the StatefulSet has failed but has not been rolled back.', - }, - 'for': '15m', - alert: 'KubeStatefulSetGenerationMismatch', - }, - { - expr: ||| - max without (revision) ( - kube_statefulset_status_current_revision{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - unless - kube_statefulset_status_update_revision{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - ) - * - ( - kube_statefulset_replicas{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - != - kube_statefulset_status_replicas_updated{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - ) - ||| % $._config, - labels: { - severity: 'critical', - }, - annotations: { - message: 'StatefulSet {{ $labels.namespace }}/{{ $labels.statefulset }} update has not been rolled out.', - }, - 'for': '15m', - alert: 'KubeStatefulSetUpdateNotRolledOut', - }, - { - alert: 'KubeDaemonSetRolloutStuck', - expr: ||| - kube_daemonset_status_number_ready{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - / - kube_daemonset_status_desired_number_scheduled{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} * 100 < 100 - ||| % $._config, - labels: { - severity: 'critical', - }, - annotations: { - message: 'Only {{ $value }}% of the desired Pods of DaemonSet {{ $labels.namespace }}/{{ $labels.daemonset }} are scheduled and ready.', - }, - 'for': '15m', - }, - { - alert: 'KubeDaemonSetNotScheduled', - expr: ||| - kube_daemonset_status_desired_number_scheduled{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - - - kube_daemonset_status_current_number_scheduled{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} > 0 - ||| % $._config, - labels: { - severity: 'warning', - }, - annotations: { - message: '{{ $value }} Pods of DaemonSet {{ $labels.namespace }}/{{ $labels.daemonset }} are not scheduled.', - }, - 'for': '10m', - }, - { - alert: 'KubeDaemonSetMisScheduled', - expr: ||| - kube_daemonset_status_number_misscheduled{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} > 0 - ||| % $._config, - labels: { - severity: 'warning', - }, - annotations: { - message: '{{ $value }} Pods of DaemonSet {{ $labels.namespace }}/{{ $labels.daemonset }} are running where they are not supposed to run.', - }, - 'for': '10m', - }, - { - alert: 'KubeCronJobRunning', - expr: ||| - time() - kube_cronjob_next_schedule_time{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} > 3600 - ||| % $._config, - 'for': '1h', - labels: { - severity: 'warning', - }, - annotations: { - message: 'CronJob {{ $labels.namespace }}/{{ $labels.cronjob }} is taking more than 1h to complete.', - }, - }, - { - alert: 'KubeJobCompletion', - expr: ||| - kube_job_spec_completions{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - kube_job_status_succeeded{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} > 0 - ||| % $._config, - 'for': '1h', - labels: { - severity: 'warning', - }, - annotations: { - message: 'Job {{ $labels.namespace }}/{{ $labels.job_name }} is taking more than one hour to complete.', - }, - }, - { - alert: 'KubeJobFailed', - expr: ||| - kube_job_failed{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} > 0 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'Job {{ $labels.namespace }}/{{ $labels.job_name }} failed to complete.', - }, - }, - { - expr: ||| - (kube_hpa_status_desired_replicas{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - != - kube_hpa_status_current_replicas{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s}) - and - changes(kube_hpa_status_current_replicas[15m]) == 0 - ||| % $._config, - labels: { - severity: 'warning', - }, - annotations: { - message: 'HPA {{ $labels.namespace }}/{{ $labels.hpa }} has not matched the desired number of replicas for longer than 15 minutes.', - }, - 'for': '15m', - alert: 'KubeHpaReplicasMismatch', - }, - { - expr: ||| - kube_hpa_status_current_replicas{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - == - kube_hpa_spec_max_replicas{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} - ||| % $._config, - labels: { - severity: 'warning', - }, - annotations: { - message: 'HPA {{ $labels.namespace }}/{{ $labels.hpa }} has been running at max replicas for longer than 15 minutes.', - }, - 'for': '15m', - alert: 'KubeHpaMaxedOut', - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/resource_alerts.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/resource_alerts.libsonnet deleted file mode 100644 index 13b56375..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/resource_alerts.libsonnet +++ /dev/null @@ -1,111 +0,0 @@ -{ - prometheusAlerts+:: { - groups+: [ - { - name: 'kubernetes-resources', - rules: [ - { - alert: 'KubeCPUOvercommit', - expr: ||| - sum(namespace:kube_pod_container_resource_requests_cpu_cores:sum) - / - sum(kube_node_status_allocatable_cpu_cores) - > - (count(kube_node_status_allocatable_cpu_cores)-1) / count(kube_node_status_allocatable_cpu_cores) - ||| % $._config, - labels: { - severity: 'warning', - }, - annotations: { - message: 'Cluster has overcommitted CPU resource requests for Pods and cannot tolerate node failure.', - }, - 'for': '5m', - }, - { - alert: 'KubeMemOvercommit', - expr: ||| - sum(namespace:kube_pod_container_resource_requests_memory_bytes:sum) - / - sum(kube_node_status_allocatable_memory_bytes) - > - (count(kube_node_status_allocatable_memory_bytes)-1) - / - count(kube_node_status_allocatable_memory_bytes) - ||| % $._config, - labels: { - severity: 'warning', - }, - annotations: { - message: 'Cluster has overcommitted memory resource requests for Pods and cannot tolerate node failure.', - }, - 'for': '5m', - }, - { - alert: 'KubeCPUOvercommit', - expr: ||| - sum(kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="hard", resource="cpu"}) - / - sum(kube_node_status_allocatable_cpu_cores) - > %(namespaceOvercommitFactor)s - ||| % $._config, - labels: { - severity: 'warning', - }, - annotations: { - message: 'Cluster has overcommitted CPU resource requests for Namespaces.', - }, - 'for': '5m', - }, - { - alert: 'KubeMemOvercommit', - expr: ||| - sum(kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="hard", resource="memory"}) - / - sum(kube_node_status_allocatable_memory_bytes{%(nodeExporterSelector)s}) - > %(namespaceOvercommitFactor)s - ||| % $._config, - labels: { - severity: 'warning', - }, - annotations: { - message: 'Cluster has overcommitted memory resource requests for Namespaces.', - }, - 'for': '5m', - }, - { - alert: 'KubeQuotaExceeded', - expr: ||| - 100 * kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="used"} - / ignoring(instance, job, type) - (kube_resourcequota{%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s, type="hard"} > 0) - > 90 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'Namespace {{ $labels.namespace }} is using {{ printf "%0.0f" $value }}% of its {{ $labels.resource }} quota.', - }, - }, - { - alert: 'CPUThrottlingHigh', - expr: ||| - 100 * sum(increase(container_cpu_cfs_throttled_periods_total{container!="", %(cpuThrottlingSelector)s}[5m])) by (container, pod, namespace) - / - sum(increase(container_cpu_cfs_periods_total{%(cpuThrottlingSelector)s}[5m])) by (container, pod, namespace) - > %(cpuThrottlingPercent)s - ||| % $._config, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - message: '{{ printf "%0.0f" $value }}% throttling of CPU in namespace {{ $labels.namespace }} for container {{ $labels.container }} in pod {{ $labels.pod }}.', - }, - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/storage_alerts.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/storage_alerts.libsonnet deleted file mode 100644 index ba23ce5b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/storage_alerts.libsonnet +++ /dev/null @@ -1,59 +0,0 @@ -{ - prometheusAlerts+:: { - groups+: [ - { - name: 'kubernetes-storage', - rules: [ - { - alert: 'KubePersistentVolumeUsageCritical', - expr: ||| - 100 * kubelet_volume_stats_available_bytes{%(prefixedNamespaceSelector)s%(kubeletSelector)s} - / - kubelet_volume_stats_capacity_bytes{%(prefixedNamespaceSelector)s%(kubeletSelector)s} - < 3 - ||| % $._config, - 'for': '1m', - labels: { - severity: 'critical', - }, - annotations: { - message: 'The PersistentVolume claimed by {{ $labels.persistentvolumeclaim }} in Namespace {{ $labels.namespace }} is only {{ printf "%0.2f" $value }}% free.', - }, - }, - { - alert: 'KubePersistentVolumeFullInFourDays', - expr: ||| - 100 * ( - kubelet_volume_stats_available_bytes{%(prefixedNamespaceSelector)s%(kubeletSelector)s} - / - kubelet_volume_stats_capacity_bytes{%(prefixedNamespaceSelector)s%(kubeletSelector)s} - ) < 15 - and - predict_linear(kubelet_volume_stats_available_bytes{%(prefixedNamespaceSelector)s%(kubeletSelector)s}[%(volumeFullPredictionSampleTime)s], 4 * 24 * 3600) < 0 - ||| % $._config, - 'for': '5m', - labels: { - severity: 'critical', - }, - annotations: { - message: 'Based on recent sampling, the PersistentVolume claimed by {{ $labels.persistentvolumeclaim }} in Namespace {{ $labels.namespace }} is expected to fill up within four days. Currently {{ printf "%0.2f" $value }}% is available.', - }, - }, - { - alert: 'KubePersistentVolumeErrors', - expr: ||| - kube_persistentvolume_status_phase{phase=~"Failed|Pending",%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} > 0 - ||| % $._config, - 'for': '5m', - labels: { - severity: 'critical', - }, - annotations: { - message: 'The persistent volume {{ $labels.persistentvolume }} has status {{ $labels.phase }}.', - }, - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/system_alerts.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/system_alerts.libsonnet deleted file mode 100644 index 28aa3e74..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/system_alerts.libsonnet +++ /dev/null @@ -1,194 +0,0 @@ -local utils = import 'utils.libsonnet'; - -{ - prometheusAlerts+:: { - groups+: [ - { - name: 'kubernetes-system', - rules: [ - { - expr: ||| - kube_node_status_condition{%(kubeStateMetricsSelector)s,condition="Ready",status="true"} == 0 - ||| % $._config, - labels: { - severity: 'warning', - }, - annotations: { - message: '{{ $labels.node }} has been unready for more than an hour.', - }, - 'for': '15m', - alert: 'KubeNodeNotReady', - }, - { - alert: 'KubeVersionMismatch', - expr: ||| - count(count by (gitVersion) (label_replace(kubernetes_build_info{%(notKubeDnsCoreDnsSelector)s},"gitVersion","$1","gitVersion","(v[0-9]*.[0-9]*.[0-9]*).*"))) > 1 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'There are {{ $value }} different semantic versions of Kubernetes components running.', - }, - }, - { - alert: 'KubeClientErrors', - // Many clients use get requests to check the existence of objects, - // this is normal and an expected error, therefore it should be - // ignored in this alert. - expr: ||| - (sum(rate(rest_client_requests_total{code=~"5.."}[5m])) by (instance, job) - / - sum(rate(rest_client_requests_total[5m])) by (instance, job)) - * 100 > 1 - |||, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - message: "Kubernetes API server client '{{ $labels.job }}/{{ $labels.instance }}' is experiencing {{ printf \"%0.0f\" $value }}% errors.'", - }, - }, - { - alert: 'KubeClientErrors', - expr: ||| - sum(rate(ksm_scrape_error_total{%(kubeStateMetricsSelector)s}[5m])) by (instance, job) > 0.1 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - message: "Kubernetes API server client '{{ $labels.job }}/{{ $labels.instance }}' is experiencing {{ printf \"%0.0f\" $value }} errors / second.", - }, - }, - { - alert: 'KubeletTooManyPods', - expr: ||| - kubelet_running_pod_count{%(kubeletSelector)s} > %(kubeletPodLimit)s * 0.9 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'Kubelet {{ $labels.instance }} is running {{ $value }} Pods, close to the limit of %d.' % $._config.kubeletPodLimit, - }, - }, - { - alert: 'KubeAPILatencyHigh', - expr: ||| - cluster_quantile:apiserver_request_duration_seconds:histogram_quantile{%(kubeApiserverSelector)s,quantile="0.99",subresource!="log",verb!~"^(?:LIST|WATCH|WATCHLIST|PROXY|CONNECT)$"} > %(kubeAPILatencyWarningSeconds)s - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'The API server has a 99th percentile latency of {{ $value }} seconds for {{ $labels.verb }} {{ $labels.resource }}.', - }, - }, - { - alert: 'KubeAPILatencyHigh', - expr: ||| - cluster_quantile:apiserver_request_duration_seconds:histogram_quantile{%(kubeApiserverSelector)s,quantile="0.99",subresource!="log",verb!~"^(?:LIST|WATCH|WATCHLIST|PROXY|CONNECT)$"} > %(kubeAPILatencyCriticalSeconds)s - ||| % $._config, - 'for': '10m', - labels: { - severity: 'critical', - }, - annotations: { - message: 'The API server has a 99th percentile latency of {{ $value }} seconds for {{ $labels.verb }} {{ $labels.resource }}.', - }, - }, - { - alert: 'KubeAPIErrorsHigh', - expr: ||| - sum(rate(apiserver_request_total{%(kubeApiserverSelector)s,code=~"^(?:5..)$"}[5m])) - / - sum(rate(apiserver_request_total{%(kubeApiserverSelector)s}[5m])) * 100 > 3 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'critical', - }, - annotations: { - message: 'API server is returning errors for {{ $value }}% of requests.', - }, - }, - { - alert: 'KubeAPIErrorsHigh', - expr: ||| - sum(rate(apiserver_request_total{%(kubeApiserverSelector)s,code=~"^(?:5..)$"}[5m])) - / - sum(rate(apiserver_request_total{%(kubeApiserverSelector)s}[5m])) * 100 > 1 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'API server is returning errors for {{ $value }}% of requests.', - }, - }, - { - alert: 'KubeAPIErrorsHigh', - expr: ||| - sum(rate(apiserver_request_total{%(kubeApiserverSelector)s,code=~"^(?:5..)$"}[5m])) by (resource,subresource,verb) - / - sum(rate(apiserver_request_total{%(kubeApiserverSelector)s}[5m])) by (resource,subresource,verb) * 100 > 10 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'critical', - }, - annotations: { - message: 'API server is returning errors for {{ $value }}% of requests for {{ $labels.verb }} {{ $labels.resource }} {{ $labels.subresource }}.', - }, - }, - { - alert: 'KubeAPIErrorsHigh', - expr: ||| - sum(rate(apiserver_request_total{%(kubeApiserverSelector)s,code=~"^(?:5..)$"}[5m])) by (resource,subresource,verb) - / - sum(rate(apiserver_request_total{%(kubeApiserverSelector)s}[5m])) by (resource,subresource,verb) * 100 > 5 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - message: 'API server is returning errors for {{ $value }}% of requests for {{ $labels.verb }} {{ $labels.resource }} {{ $labels.subresource }}.', - }, - }, - { - alert: 'KubeClientCertificateExpiration', - expr: ||| - apiserver_client_certificate_expiration_seconds_count{%(kubeApiserverSelector)s} > 0 and histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{%(kubeApiserverSelector)s}[5m]))) < %(certExpirationWarningSeconds)s - ||| % $._config, - labels: { - severity: 'warning', - }, - annotations: { - message: 'A client certificate used to authenticate to the apiserver is expiring in less than %s.' % (utils.humanizeSeconds($._config.certExpirationWarningSeconds)), - }, - }, - { - alert: 'KubeClientCertificateExpiration', - expr: ||| - apiserver_client_certificate_expiration_seconds_count{%(kubeApiserverSelector)s} > 0 and histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{%(kubeApiserverSelector)s}[5m]))) < %(certExpirationCriticalSeconds)s - ||| % $._config, - labels: { - severity: 'critical', - }, - annotations: { - message: 'A client certificate used to authenticate to the apiserver is expiring in less than %s.' % (utils.humanizeSeconds($._config.certExpirationCriticalSeconds)), - }, - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/utils.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/utils.libsonnet deleted file mode 100644 index 7af45571..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/alerts/utils.libsonnet +++ /dev/null @@ -1,6 +0,0 @@ -{ - humanizeSeconds(s):: - if s > 60 * 60 * 24 - then '%.1f days' % (s / 60 / 60 / 24) - else '%.1f hours' % (s / 60 / 60), -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/config.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/config.libsonnet deleted file mode 100644 index 0dfddfb6..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/config.libsonnet +++ /dev/null @@ -1,95 +0,0 @@ -{ - _config+:: { - // Selectors are inserted between {} in Prometheus queries. - cadvisorSelector: 'job="cadvisor"', - kubeletSelector: 'job="kubelet"', - kubeStateMetricsSelector: 'job="kube-state-metrics"', - nodeExporterSelector: 'job="node-exporter"', - notKubeDnsCoreDnsSelector: 'job!~"kube-dns|coredns"', - kubeSchedulerSelector: 'job="kube-scheduler"', - kubeControllerManagerSelector: 'job="kube-controller-manager"', - kubeApiserverSelector: 'job="kube-apiserver"', - kubeProxySelector: 'job="kube-proxy"', - podLabel: 'pod', - namespaceSelector: null, - prefixedNamespaceSelector: if self.namespaceSelector != null then self.namespaceSelector + ',' else '', - hostNetworkInterfaceSelector: 'device!~"veth.+"', - hostMountpointSelector: 'mountpoint="/"', - wmiExporterSelector: 'job="wmi-exporter"', - - // We build alerts for the presence of all these jobs. - jobs: { - Kubelet: $._config.kubeletSelector, - KubeScheduler: $._config.kubeSchedulerSelector, - KubeControllerManager: $._config.kubeControllerManagerSelector, - KubeAPI: $._config.kubeApiserverSelector, - }, - - // Grafana dashboard IDs are necessary for stable links for dashboards - grafanaDashboardIDs: { - 'k8s-resources-multicluster.json': '1gBgaexoVZ4TpBNAt2eGRsc4LNjNhdjcZd6cqU6S', - 'k8s-resources-cluster.json': 'ZnbvYbcXkob7GLqcDPLTj1ZL4MRX87tOh8xdr831', - 'k8s-resources-namespace.json': 'XaY4UCP3J51an4ikqtkUGBSjLpDW4pg39xe2FuxP', - 'k8s-resources-pod.json': 'wU56sdGSNYZTL3eO0db3pONtVmTvsyV7w8aadbYF', - 'k8s-multicluster-rsrc-use.json': 'NJ9AlnsObVgj9uKiJMeAqfzMi1wihOMupcsDhlhR', - 'k8s-cluster-rsrc-use.json': 'uXQldxzqUNgIOUX6FyZNvqgP2vgYb78daNu4GiDc', - 'k8s-node-rsrc-use.json': 'E577CMUOwmPsxVVqM9lj40czM1ZPjclw7hGa7OT7', - 'nodes.json': 'kcb9C2QDe4IYcjiTOmYyfhsImuzxRcvwWC3YLJPS', - 'persistentvolumesusage.json': 'AhCeikee0xoa6faec0Weep2nee6shaiquigahw8b', - 'pods.json': 'AMK9hS0rSbSz7cKjPHcOtk6CGHFjhSHwhbQ3sedK', - 'statefulset.json': 'dPiBt0FRG5BNYo0XJ4L0Meoc7DWs9eL40c1CRc1g', - 'k8s-resources-windows-cluster.json': '4d08557fd9391b100730f2494bccac68', - 'k8s-resources-windows-namespace.json': '490b402361724ab1d4c45666c1fa9b6f', - 'k8s-resources-windows-pod.json': '40597a704a610e936dc6ed374a7ce023', - 'k8s-windows-cluster-rsrc-use.json': '53a43377ec9aaf2ff64dfc7a1f539334', - 'k8s-windows-node-rsrc-use.json': '96e7484b0bb53b74fbc2bcb7723cd40b', - 'k8s-resources-workloads-namespace.json': 'L29WgMrccBDauPs3Xsti3fwaKjMB6fReufWj6Gl1', - 'k8s-resources-workload.json': 'hZCNbUPfUqjc95N3iumVsaEVHXzaBr3IFKRFvUJf', - 'apiserver.json': 'eswbt59QCroA3XLdKFvdOHlKB8Iks3h7d2ohstxr', - 'controller-manager.json': '5g73oHG0pCRz4X1t6gNYouVUv9urrQd4wCdHR2mI', - 'scheduler.json': '4uMPZ9jmwvYJcM5fcNcNrrt9Sf6ufQL4IKFri2Gp', - 'proxy.json': 'hhT4orXD1Ott4U1bNNps0R26EHTwMypdcaCjDRPM', - 'kubelet.json': 'B1azll2ETo7DTiM8CysrH6g4s5NCgkOz6ZdU8Q0j', - }, - - // Config for the Grafana dashboards in the Kubernetes Mixin - grafanaK8s: { - dashboardNamePrefix: 'Kubernetes / ', - dashboardTags: ['kubernetes-mixin'], - - // For links between grafana dashboards, you need to tell us if your grafana - // servers under some non-root path. - linkPrefix: '', - }, - - // We alert when the aggregate (CPU, Memory) quota for all namespaces is - // greater than the amount of the resources in the cluster. We do however - // allow you to overcommit if you wish. - namespaceOvercommitFactor: 1.5, - kubeletPodLimit: 110, - certExpirationWarningSeconds: 7 * 24 * 3600, - certExpirationCriticalSeconds: 1 * 24 * 3600, - cpuThrottlingPercent: 25, - cpuThrottlingSelector: '', - kubeAPILatencyWarningSeconds: 1, - kubeAPILatencyCriticalSeconds: 4, - - // We alert when a disk is expected to fill up in four days. Depending on - // the data-set it might be useful to change the sampling-time for the - // prediction - volumeFullPredictionSampleTime: '6h', - - - // Opt-in to multiCluster dashboards by overriding this and the clusterLabel. - showMultiCluster: false, - clusterLabel: 'cluster', - - // This list of filesystem is referenced in various expressions. - fstypes: ['ext[234]', 'btrfs', 'xfs', 'zfs'], - fstypeSelector: 'fstype=~"%s"' % std.join('|', self.fstypes), - - // This list of disk device names is referenced in various expressions. - diskDevices: ['nvme.+', 'rbd.+', 'sd.+', 'vd.+', 'xvd.+', 'dm-.+'], - diskDeviceSelector: 'device=~"%s"' % std.join('|', self.diskDevices), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/apiserver.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/apiserver.libsonnet deleted file mode 100644 index 8058f769..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/apiserver.libsonnet +++ /dev/null @@ -1,197 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local dashboard = grafana.dashboard; -local row = grafana.row; -local prometheus = grafana.prometheus; -local template = grafana.template; -local graphPanel = grafana.graphPanel; -local singlestat = grafana.singlestat; - -{ - grafanaDashboards+:: { - 'apiserver.json': - local upCount = - singlestat.new( - 'Up', - datasource='$datasource', - span=2, - valueName='min', - ) - .addTarget(prometheus.target('sum(up{%(kubeApiserverSelector)s})' % $._config)); - - local rpcRate = - graphPanel.new( - 'RPC Rate', - datasource='$datasource', - span=5, - format='ops', - ) - .addTarget(prometheus.target('sum(rate(apiserver_request_total{%(kubeApiserverSelector)s, instance=~"$instance",code=~"2.."}[5m]))' % $._config, legendFormat='2xx')) - .addTarget(prometheus.target('sum(rate(apiserver_request_total{%(kubeApiserverSelector)s, instance=~"$instance",code=~"3.."}[5m]))' % $._config, legendFormat='3xx')) - .addTarget(prometheus.target('sum(rate(apiserver_request_total{%(kubeApiserverSelector)s, instance=~"$instance",code=~"4.."}[5m]))' % $._config, legendFormat='4xx')) - .addTarget(prometheus.target('sum(rate(apiserver_request_total{%(kubeApiserverSelector)s, instance=~"$instance",code=~"5.."}[5m]))' % $._config, legendFormat='5xx')); - - local requestDuration = - graphPanel.new( - 'Request duration 99th quantile', - datasource='$datasource', - span=5, - format='s', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(apiserver_request_duration_seconds_bucket{%(kubeApiserverSelector)s, instance=~"$instance"}[5m])) by (verb, le))' % $._config, legendFormat='{{verb}}')); - - local workQueueAddRate = - graphPanel.new( - 'Work Queue Add Rate', - datasource='$datasource', - span=6, - format='ops', - legend_show=false, - min=0, - ) - .addTarget(prometheus.target('sum(rate(workqueue_adds_total{%(kubeApiserverSelector)s, instance=~"$instance"}[5m])) by (instance, name)' % $._config, legendFormat='{{instance}} {{name}}')); - - local workQueueDepth = - graphPanel.new( - 'Work Queue Depth', - datasource='$datasource', - span=6, - format='short', - legend_show=false, - min=0, - ) - .addTarget(prometheus.target('sum(rate(workqueue_depth{%(kubeApiserverSelector)s, instance=~"$instance"}[5m])) by (instance, name)' % $._config, legendFormat='{{instance}} {{name}}')); - - - local workQueueLatency = - graphPanel.new( - 'Work Queue Latency', - datasource='$datasource', - span=12, - format='s', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{%(kubeApiserverSelector)s, instance=~"$instance"}[5m])) by (instance, name, le))' % $._config, legendFormat='{{instance}} {{name}}')); - - local etcdCacheEntryTotal = - graphPanel.new( - 'ETCD Cache Entry Total', - datasource='$datasource', - span=4, - format='short', - min=0, - ) - .addTarget(prometheus.target('etcd_helper_cache_entry_total{%(kubeApiserverSelector)s, instance=~"$instance"}' % $._config, legendFormat='{{instance}}')); - - local etcdCacheEntryRate = - graphPanel.new( - 'ETCD Cache Hit/Miss Rate', - datasource='$datasource', - span=4, - format='ops', - min=0, - ) - .addTarget(prometheus.target('sum(rate(etcd_helper_cache_hit_total{%(kubeApiserverSelector)s,instance=~"$instance"}[5m])) by (intance)' % $._config, legendFormat='{{instance}} hit')) - .addTarget(prometheus.target('sum(rate(etcd_helper_cache_miss_total{%(kubeApiserverSelector)s,instance=~"$instance"}[5m])) by (instance)' % $._config, legendFormat='{{instance}} miss')); - - local etcdCacheLatency = - graphPanel.new( - 'ETCD Cache Duration 99th Quantile', - datasource='$datasource', - span=4, - format='s', - min=0, - ) - .addTarget(prometheus.target('histogram_quantile(0.99,sum(rate(etcd_request_cache_get_duration_seconds_bucket{%(kubeApiserverSelector)s,instance=~"$instance"}[5m])) by (instance, le))' % $._config, legendFormat='{{instance}} get')) - .addTarget(prometheus.target('histogram_quantile(0.99,sum(rate(etcd_request_cache_add_duration_seconds_bucket{%(kubeApiserverSelector)s,instance=~"$instance"}[5m])) by (instance, le))' % $._config, legendFormat='{{instance}} miss')); - - local memory = - graphPanel.new( - 'Memory', - datasource='$datasource', - span=4, - format='bytes', - ) - .addTarget(prometheus.target('process_resident_memory_bytes{%(kubeApiserverSelector)s,instance=~"$instance"}' % $._config, legendFormat='{{instance}}')); - - local cpu = - graphPanel.new( - 'CPU usage', - datasource='$datasource', - span=4, - format='short', - min=0, - ) - .addTarget(prometheus.target('rate(process_cpu_seconds_total{%(kubeApiserverSelector)s,instance=~"$instance"}[5m])' % $._config, legendFormat='{{instance}}')); - - local goroutines = - graphPanel.new( - 'Goroutines', - datasource='$datasource', - span=4, - format='short', - ) - .addTarget(prometheus.target('go_goroutines{%(kubeApiserverSelector)s,instance=~"$instance"}' % $._config, legendFormat='{{instance}}')); - - - dashboard.new( - '%(dashboardNamePrefix)sAPI server' % $._config.grafanaK8s, - time_from='now-1h', - uid=($._config.grafanaDashboardIDs['apiserver.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addTemplate( - template.new( - 'instance', - '$datasource', - 'label_values(apiserver_request_total{%(kubeApiserverSelector)s}, instance)' % $._config, - refresh='time', - includeAll=true, - ) - ) - .addRow( - row.new() - .addPanel(upCount) - .addPanel(rpcRate) - .addPanel(requestDuration) - ).addRow( - row.new() - .addPanel(workQueueAddRate) - .addPanel(workQueueDepth) - .addPanel(workQueueLatency) - ).addRow( - row.new() - .addPanel(etcdCacheEntryTotal) - .addPanel(etcdCacheEntryRate) - .addPanel(etcdCacheLatency) - ).addRow( - row.new() - .addPanel(memory) - .addPanel(cpu) - .addPanel(goroutines) - ), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/controller-manager.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/controller-manager.libsonnet deleted file mode 100644 index 3754ebe4..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/controller-manager.libsonnet +++ /dev/null @@ -1,184 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local dashboard = grafana.dashboard; -local row = grafana.row; -local prometheus = grafana.prometheus; -local template = grafana.template; -local graphPanel = grafana.graphPanel; -local singlestat = grafana.singlestat; - -{ - grafanaDashboards+:: { - 'controller-manager.json': - local upCount = - singlestat.new( - 'Up', - datasource='$datasource', - span=2, - valueName='min', - ) - .addTarget(prometheus.target('sum(up{%(kubeControllerManagerSelector)s})' % $._config)); - - local workQueueAddRate = - graphPanel.new( - 'Work Queue Add Rate', - datasource='$datasource', - span=10, - format='ops', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('sum(rate(workqueue_adds_total{%(kubeControllerManagerSelector)s, instance=~"$instance"}[5m])) by (instance, name)' % $._config, legendFormat='{{instance}} {{name}}')); - - local workQueueDepth = - graphPanel.new( - 'Work Queue Depth', - datasource='$datasource', - span=12, - min=0, - format='short', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('sum(rate(workqueue_depth{%(kubeControllerManagerSelector)s, instance=~"$instance"}[5m])) by (instance, name)' % $._config, legendFormat='{{instance}} {{name}}')); - - local workQueueLatency = - graphPanel.new( - 'Work Queue Latency', - datasource='$datasource', - span=12, - format='s', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(workqueue_queue_duration_seconds_bucket{%(kubeControllerManagerSelector)s, instance=~"$instance"}[5m])) by (instance, name, le))' % $._config, legendFormat='{{instance}} {{name}}')); - - local rpcRate = - graphPanel.new( - 'Kube API Request Rate', - datasource='$datasource', - span=4, - format='ops', - ) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeControllerManagerSelector)s, instance=~"$instance",code=~"2.."}[5m]))' % $._config, legendFormat='2xx')) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeControllerManagerSelector)s, instance=~"$instance",code=~"3.."}[5m]))' % $._config, legendFormat='3xx')) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeControllerManagerSelector)s, instance=~"$instance",code=~"4.."}[5m]))' % $._config, legendFormat='4xx')) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeControllerManagerSelector)s, instance=~"$instance",code=~"5.."}[5m]))' % $._config, legendFormat='5xx')); - - local postRequestLatency = - graphPanel.new( - 'Post Request Latency 99th Quantile', - datasource='$datasource', - span=8, - format='s', - min=0, - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{%(kubeControllerManagerSelector)s, instance=~"$instance", verb="POST"}[5m])) by (verb, url, le))' % $._config, legendFormat='{{verb}} {{url}}')); - - local getRequestLatency = - graphPanel.new( - 'Get Request Latency 99th Quantile', - datasource='$datasource', - span=12, - format='s', - min=0, - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{%(kubeControllerManagerSelector)s, instance=~"$instance", verb="GET"}[5m])) by (verb, url, le))' % $._config, legendFormat='{{verb}} {{url}}')); - - local memory = - graphPanel.new( - 'Memory', - datasource='$datasource', - span=4, - format='bytes', - ) - .addTarget(prometheus.target('process_resident_memory_bytes{%(kubeControllerManagerSelector)s,instance=~"$instance"}' % $._config, legendFormat='{{instance}}')); - - local cpu = - graphPanel.new( - 'CPU usage', - datasource='$datasource', - span=4, - format='short', - min=0, - ) - .addTarget(prometheus.target('rate(process_cpu_seconds_total{%(kubeControllerManagerSelector)s,instance=~"$instance"}[5m])' % $._config, legendFormat='{{instance}}')); - - local goroutines = - graphPanel.new( - 'Goroutines', - datasource='$datasource', - span=4, - format='short', - ) - .addTarget(prometheus.target('go_goroutines{%(kubeControllerManagerSelector)s,instance=~"$instance"}' % $._config, legendFormat='{{instance}}')); - - - dashboard.new( - '%(dashboardNamePrefix)sController Manager' % $._config.grafanaK8s, - time_from='now-1h', - uid=($._config.grafanaDashboardIDs['controller-manager.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addTemplate( - template.new( - 'instance', - '$datasource', - 'label_values(process_cpu_seconds_total{%(kubeControllerManagerSelector)s}, instance)' % $._config, - refresh='time', - includeAll=true, - ) - ) - .addRow( - row.new() - .addPanel(upCount) - .addPanel(workQueueAddRate) - ).addRow( - row.new() - .addPanel(workQueueDepth) - ).addRow( - row.new() - .addPanel(workQueueLatency) - ).addRow( - row.new() - .addPanel(rpcRate) - .addPanel(postRequestLatency) - ).addRow( - row.new() - .addPanel(getRequestLatency) - ).addRow( - row.new() - .addPanel(memory) - .addPanel(cpu) - .addPanel(goroutines) - ), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/dashboards.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/dashboards.libsonnet deleted file mode 100644 index 8bae6fd3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/dashboards.libsonnet +++ /dev/null @@ -1,10 +0,0 @@ -(import 'persistentvolumesusage.libsonnet') + -(import 'pods.libsonnet') + -(import 'resources.libsonnet') + -(import 'statefulset.libsonnet') + -(import 'apiserver.libsonnet') + -(import 'controller-manager.libsonnet') + -(import 'scheduler.libsonnet') + -(import 'proxy.libsonnet') + -(import 'kubelet.libsonnet') + -(import 'defaults.libsonnet') diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/defaults.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/defaults.libsonnet deleted file mode 100644 index 12f430dc..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/defaults.libsonnet +++ /dev/null @@ -1,29 +0,0 @@ -{ - local grafanaDashboards = super.grafanaDashboards, - - // Automatically add a uid to each dashboard based on the base64 encoding - // of the file name and set the timezone to be 'default'. - grafanaDashboards:: { - [filename]: grafanaDashboards[filename] { - uid: std.md5(filename), - timezone: '', - - // Modify tooltip to only show a single value - rows: [ - row { - panels: [ - panel { - tooltip+: { - shared: false, - }, - } - for panel in super.panels - ], - } - for row in super.rows - ], - - } - for filename in std.objectFields(grafanaDashboards) - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/kubelet.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/kubelet.libsonnet deleted file mode 100644 index 2d68a490..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/kubelet.libsonnet +++ /dev/null @@ -1,406 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local dashboard = grafana.dashboard; -local row = grafana.row; -local prometheus = grafana.prometheus; -local template = grafana.template; -local graphPanel = grafana.graphPanel; -local tablePanel = grafana.tablePanel; -local singlestat = grafana.singlestat; - -{ - grafanaDashboards+:: { - 'kubelet.json': - local upCount = - singlestat.new( - 'Up', - datasource='$datasource', - span=2, - valueName='min', - ) - .addTarget(prometheus.target('sum(up{%(kubeletSelector)s})' % $._config)); - - local runningPodCount = - singlestat.new( - 'Running Pods', - datasource='$datasource', - span=2, - valueName='min', - ) - .addTarget(prometheus.target('sum(kubelet_running_pod_count{%(kubeletSelector)s, instance=~"$instance"})' % $._config, legendFormat='{{instance}}')); - - local runningContainerCount = - singlestat.new( - 'Running Container', - datasource='$datasource', - span=2, - valueName='min', - ) - .addTarget(prometheus.target('sum(kubelet_running_container_count{%(kubeletSelector)s, instance=~"$instance"})' % $._config, legendFormat='{{instance}}')); - - local actualVolumeCount = - singlestat.new( - 'Actual Volume Count', - datasource='$datasource', - span=2, - valueName='min', - ) - .addTarget(prometheus.target('sum(volume_manager_total_volumes{%(kubeletSelector)s, instance=~"$instance", state="actual_state_of_world"})' % $._config, legendFormat='{{instance}}')); - - local desiredVolumeCount = - singlestat.new( - 'Desired Volume Count', - datasource='$datasource', - span=2, - valueName='min', - ) - .addTarget(prometheus.target('sum(volume_manager_total_volumes{%(kubeletSelector)s, instance=~"$instance",state="desired_state_of_world"})' % $._config, legendFormat='{{instance}}')); - - local configErrorCount = - singlestat.new( - 'Config Error Count', - datasource='$datasource', - span=2, - valueName='min', - ) - .addTarget(prometheus.target('sum(rate(kubelet_node_config_error{%(kubeletSelector)s, instance=~"$instance"}[5m]))' % $._config, legendFormat='{{instance}}')); - - local operationRate = - graphPanel.new( - 'Operation Rate', - datasource='$datasource', - span=6, - format='ops', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('sum(rate(kubelet_runtime_operations_total{%(kubeletSelector)s,instance=~"$instance"}[5m])) by (operation_type, instance)' % $._config, legendFormat='{{instance}} {{operation_type}}')); - - local operationErrorRate = - graphPanel.new( - 'Operation Error Rate', - datasource='$datasource', - span=6, - min=0, - format='ops', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('sum(rate(kubelet_runtime_operations_errors_total{%(kubeletSelector)s,instance=~"$instance"}[5m])) by (instance, operation_type)' % $._config, legendFormat='{{instance}} {{operation_type}}')); - - local operationLatency = - graphPanel.new( - 'Operation duration 99th quantile', - datasource='$datasource', - span=12, - format='s', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(kubelet_runtime_operations_duration_seconds_bucket{%(kubeletSelector)s,instance=~"$instance"}[5m])) by (instance, operation_type, le))' % $._config, legendFormat='{{instance}} {{operation_type}}')); - - local podStartRate = - graphPanel.new( - 'Pod Start Rate', - datasource='$datasource', - span=6, - min=0, - format='ops', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('sum(rate(kubelet_pod_start_duration_seconds_count{%(kubeletSelector)s,instance=~"$instance"}[5m])) by (instance)' % $._config, legendFormat='{{instance}} pod')) - .addTarget(prometheus.target('sum(rate(kubelet_pod_worker_duration_seconds_count{%(kubeletSelector)s,instance=~"$instance"}[5m])) by (instance)' % $._config, legendFormat='{{instance}} worker')); - - local podStartLatency = - graphPanel.new( - 'Pod Start Duration', - datasource='$datasource', - span=6, - min=0, - format='s', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(kubelet_pod_start_duration_seconds_count{%(kubeletSelector)s,instance=~"$instance"}[5m])) by (instance, le))' % $._config, legendFormat='{{instance}} pod')) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(kubelet_pod_worker_duration_seconds_bucket{%(kubeletSelector)s,instance=~"$instance"}[5m])) by (instance, le))' % $._config, legendFormat='{{instance}} worker')); - - local storageOperationRate = - graphPanel.new( - 'Storage Operation Rate', - datasource='$datasource', - span=6, - min=0, - format='ops', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - legend_hideEmpty='true', - legend_hideZero='true', - ) - .addTarget(prometheus.target('sum(rate(storage_operation_duration_seconds_count{%(kubeletSelector)s,instance=~"$instance"}[5m])) by (instance, operation_name, volume_plugin)' % $._config, legendFormat='{{instance}} {{operation_name}} {{volume_plugin}}')); - - local storageOperationErrorRate = - graphPanel.new( - 'Storage Operation Error Rate', - datasource='$datasource', - span=6, - min=0, - format='ops', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - legend_hideEmpty='true', - legend_hideZero='true', - ) - .addTarget(prometheus.target('sum(rate(storage_operation_errors_total{%(kubeletSelector)s,instance=~"$instance"}[5m])) by (instance, operation_name, volume_plugin)' % $._config, legendFormat='{{instance}} {{operation_name}} {{volume_plugin}}')); - - - local storageOperationLatency = - graphPanel.new( - 'Storage Operation Duration 99th quantile', - datasource='$datasource', - span=12, - min=0, - format='s', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - legend_hideEmpty='true', - legend_hideZero='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(storage_operation_duration_seconds_bucket{%(kubeletSelector)s, instance=~"$instance"}[5m])) by (instance, operation_name, volume_plugin, le))' % $._config, legendFormat='{{instance}} {{operation_name}} {{volume_plugin}}')); - - local cgroupManagerRate = - graphPanel.new( - 'Cgroup manager operation rate', - datasource='$datasource', - span=6, - min=0, - format='ops', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('sum(rate(kubelet_cgroup_manager_duration_seconds_count{%(kubeletSelector)s, instance=~"$instance"}[5m])) by (instance, operation_type)' % $._config, legendFormat='{{operation_type}}')); - - local cgroupManagerDuration = - graphPanel.new( - 'Cgroup manager 99th quantile', - datasource='$datasource', - span=6, - min=0, - format='s', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(kubelet_cgroup_manager_duration_seconds_bucket{%(kubeletSelector)s, instance=~"$instance"}[5m])) by (instance, operation_type, le))' % $._config, legendFormat='{{instance}} {{operation_type}}')); - - local plegRelistRate = - graphPanel.new( - 'PLEG relist rate', - datasource='$datasource', - span=6, - min=0, - description='Pod lifecycle event generator', - format='ops', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('sum(rate(kubelet_pleg_relist_duration_seconds_count{%(kubeletSelector)s, instance=~"$instance"}[5m])) by (instance)' % $._config, legendFormat='{{instance}}')); - - local plegRelistDuration = - graphPanel.new( - 'PLEG relist duration', - datasource='$datasource', - span=12, - min=0, - format='s', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_duration_seconds_bucket{%(kubeletSelector)s,instance=~"$instance"}[5m])) by (instance, le))' % $._config, legendFormat='{{instance}}')); - - local plegRelistInterval = - graphPanel.new( - 'PLEG relist interval', - datasource='$datasource', - span=6, - min=0, - format='s', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(kubelet_pleg_relist_interval_seconds_bucket{%(kubeletSelector)s,instance=~"$instance"}[5m])) by (instance, le))' % $._config, legendFormat='{{instance}}')); - - local rpcRate = - graphPanel.new( - 'RPC Rate', - datasource='$datasource', - span=12, - min=0, - format='ops', - ) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeletSelector)s, instance=~"$instance",code=~"2.."}[5m]))' % $._config, legendFormat='2xx')) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeletSelector)s, instance=~"$instance",code=~"3.."}[5m]))' % $._config, legendFormat='3xx')) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeletSelector)s, instance=~"$instance",code=~"4.."}[5m]))' % $._config, legendFormat='4xx')) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeletSelector)s, instance=~"$instance",code=~"5.."}[5m]))' % $._config, legendFormat='5xx')); - - local requestDuration = - graphPanel.new( - 'Request duration 99th quantile', - datasource='$datasource', - span=12, - min=0, - format='s', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{%(kubeletSelector)s, instance=~"$instance"}[5m])) by (instance, verb, url, le))' % $._config, legendFormat='{{instance}} {{verb}} {{url}}')); - - local memory = - graphPanel.new( - 'Memory', - datasource='$datasource', - span=4, - format='bytes', - ) - .addTarget(prometheus.target('process_resident_memory_bytes{%(kubeletSelector)s,instance=~"$instance"}' % $._config, legendFormat='{{instance}}')); - - local cpu = - graphPanel.new( - 'CPU usage', - datasource='$datasource', - span=4, - format='short', - min=0, - ) - .addTarget(prometheus.target('rate(process_cpu_seconds_total{%(kubeletSelector)s,instance=~"$instance"}[5m])' % $._config, legendFormat='{{instance}}')); - - local goroutines = - graphPanel.new( - 'Goroutines', - datasource='$datasource', - span=4, - format='short', - ) - .addTarget(prometheus.target('go_goroutines{%(kubeletSelector)s,instance=~"$instance"}' % $._config, legendFormat='{{instance}}')); - - - dashboard.new( - '%(dashboardNamePrefix)sKubelet' % $._config.grafanaK8s, - time_from='now-1h', - uid=($._config.grafanaDashboardIDs['kubelet.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addTemplate( - template.new( - 'instance', - '$datasource', - 'label_values(kubelet_runtime_operations{%(kubeletSelector)s}, instance)' % $._config, - refresh='time', - includeAll=true, - ) - ) - .addRow( - row.new() - .addPanel(upCount) - .addPanel(runningPodCount) - .addPanel(runningContainerCount) - .addPanel(actualVolumeCount) - .addPanel(desiredVolumeCount) - .addPanel(configErrorCount) - ).addRow( - row.new() - .addPanel(operationRate) - .addPanel(operationErrorRate) - ).addRow( - row.new() - .addPanel(operationLatency) - ).addRow( - row.new() - .addPanel(podStartRate) - .addPanel(podStartLatency) - ).addRow( - row.new() - .addPanel(storageOperationRate) - .addPanel(storageOperationErrorRate) - ).addRow( - row.new() - .addPanel(storageOperationLatency) - ).addRow( - row.new() - .addPanel(cgroupManagerRate) - .addPanel(cgroupManagerDuration) - ).addRow( - row.new() - .addPanel(plegRelistRate) - .addPanel(plegRelistInterval) - ).addRow( - row.new() - .addPanel(plegRelistDuration) - ).addRow( - row.new() - .addPanel(rpcRate) - ).addRow( - row.new() - .addPanel(requestDuration) - ).addRow( - row.new() - .addPanel(memory) - .addPanel(cpu) - .addPanel(goroutines) - ), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/persistentvolumesusage.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/persistentvolumesusage.libsonnet deleted file mode 100644 index e85361e1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/persistentvolumesusage.libsonnet +++ /dev/null @@ -1,168 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local dashboard = grafana.dashboard; -local row = grafana.row; -local prometheus = grafana.prometheus; -local template = grafana.template; -local graphPanel = grafana.graphPanel; -local promgrafonnet = import '../lib/promgrafonnet/promgrafonnet.libsonnet'; -local numbersinglestat = promgrafonnet.numbersinglestat; -local gauge = promgrafonnet.gauge; - -{ - grafanaDashboards+:: { - 'persistentvolumesusage.json': - local sizeGraph = graphPanel.new( - 'Volume Space Usage', - datasource='$datasource', - format='bytes', - min=0, - span=9, - stack=true, - legend_show=true, - legend_values=true, - legend_min=true, - legend_max=true, - legend_current=true, - legend_total=false, - legend_avg=true, - legend_alignAsTable=true, - legend_rightSide=false, - ).addTarget(prometheus.target( - ||| - ( - sum without(instance, node) (kubelet_volume_stats_capacity_bytes{%(clusterLabel)s="$cluster", %(kubeletSelector)s, namespace="$namespace", persistentvolumeclaim="$volume"}) - - - sum without(instance, node) (kubelet_volume_stats_available_bytes{%(clusterLabel)s="$cluster", %(kubeletSelector)s, namespace="$namespace", persistentvolumeclaim="$volume"}) - ) - ||| % $._config, - legendFormat='Used Space', - intervalFactor=1, - )).addTarget(prometheus.target( - ||| - sum without(instance, node) (kubelet_volume_stats_available_bytes{%(clusterLabel)s="$cluster", %(kubeletSelector)s, namespace="$namespace", persistentvolumeclaim="$volume"}) - ||| % $._config, - legendFormat='Free Space', - intervalFactor=1, - )); - - local sizeGauge = gauge.new( - 'Volume Space Usage', - ||| - ( - kubelet_volume_stats_capacity_bytes{%(clusterLabel)s="$cluster", %(kubeletSelector)s, namespace="$namespace", persistentvolumeclaim="$volume"} - - - kubelet_volume_stats_available_bytes{%(clusterLabel)s="$cluster", %(kubeletSelector)s, namespace="$namespace", persistentvolumeclaim="$volume"} - ) - / - kubelet_volume_stats_capacity_bytes{%(clusterLabel)s="$cluster", %(kubeletSelector)s, namespace="$namespace", persistentvolumeclaim="$volume"} - * 100 - ||| % $._config, - ).withLowerBeingBetter(); - - - local inodesGraph = graphPanel.new( - 'Volume inodes Usage', - datasource='$datasource', - format='none', - min=0, - span=9, - stack=true, - legend_show=true, - legend_values=true, - legend_min=true, - legend_max=true, - legend_current=true, - legend_total=false, - legend_avg=true, - legend_alignAsTable=true, - legend_rightSide=false, - ).addTarget(prometheus.target( - ||| - sum without(instance, node) (kubelet_volume_stats_inodes_used{%(clusterLabel)s="$cluster", %(kubeletSelector)s, namespace="$namespace", persistentvolumeclaim="$volume"}) - ||| % $._config, - legendFormat='Used inodes', - intervalFactor=1, - )).addTarget(prometheus.target( - ||| - ( - sum without(instance, node) (kubelet_volume_stats_inodes{%(clusterLabel)s="$cluster", %(kubeletSelector)s, namespace="$namespace", persistentvolumeclaim="$volume"}) - - - sum without(instance, node) (kubelet_volume_stats_inodes_used{%(clusterLabel)s="$cluster", %(kubeletSelector)s, namespace="$namespace", persistentvolumeclaim="$volume"}) - ) - ||| % $._config, - legendFormat=' Free inodes', - intervalFactor=1, - )); - - local inodeGauge = gauge.new( - 'Volume inodes Usage', - ||| - kubelet_volume_stats_inodes_used{%(clusterLabel)s="$cluster", %(kubeletSelector)s, namespace="$namespace", persistentvolumeclaim="$volume"} - / - kubelet_volume_stats_inodes{%(clusterLabel)s="$cluster", %(kubeletSelector)s, namespace="$namespace", persistentvolumeclaim="$volume"} - * 100 - ||| % $._config, - ).withLowerBeingBetter(); - - - dashboard.new( - '%(dashboardNamePrefix)sPersistent Volumes' % $._config.grafanaK8s, - time_from='now-7d', - uid=($._config.grafanaDashboardIDs['persistentvolumesusage.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addTemplate( - template.new( - 'cluster', - '$datasource', - 'label_values(kubelet_volume_stats_capacity_bytes, %s)' % $._config.clusterLabel, - label='cluster', - refresh='time', - hide=if $._config.showMultiCluster then '' else 'variable', - ) - ) - .addTemplate( - template.new( - 'namespace', - '$datasource', - 'label_values(kubelet_volume_stats_capacity_bytes{%(clusterLabel)s="$cluster", %(kubeletSelector)s}, namespace)' % $._config, - label='Namespace', - refresh='time', - ) - ) - .addTemplate( - template.new( - 'volume', - '$datasource', - 'label_values(kubelet_volume_stats_capacity_bytes{%(clusterLabel)s="$cluster", %(kubeletSelector)s, namespace="$namespace"}, persistentvolumeclaim)' % $._config, - label='PersistentVolumeClaim', - refresh='time', - ) - ) - .addRow( - row.new() - .addPanel(sizeGraph) - .addPanel(sizeGauge) - ) - .addRow( - row.new() - .addPanel(inodesGraph) - .addPanel(inodeGauge) - ), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/pods.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/pods.libsonnet deleted file mode 100644 index 4aaeada0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/pods.libsonnet +++ /dev/null @@ -1,191 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local annotation = grafana.annotation; -local dashboard = grafana.dashboard; -local graphPanel = grafana.graphPanel; -local prometheus = grafana.prometheus; -local promgrafonnet = import '../lib/promgrafonnet/promgrafonnet.libsonnet'; -local row = grafana.row; -local singlestat = grafana.singlestat; -local template = grafana.template; -local numbersinglestat = promgrafonnet.numbersinglestat; - -{ - grafanaDashboards+:: { - 'pods.json': - local memoryRow = row.new() - .addPanel( - graphPanel.new( - 'Memory Usage', - datasource='$datasource', - min=0, - span=12, - format='bytes', - legend_rightSide=true, - legend_alignAsTable=true, - legend_current=true, - legend_avg=true, - ) - .addTarget(prometheus.target( - 'sum by(container) (container_memory_usage_bytes{%(cadvisorSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container=~"$container", container!="POD"})' % $._config, - legendFormat='Current: {{ container }}', - )) - .addTarget(prometheus.target( - 'sum by(container) (kube_pod_container_resource_requests{%(kubeStateMetricsSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", resource="memory", pod="$pod", container=~"$container"})' % $._config, - legendFormat='Requested: {{ container }}', - )) - .addTarget(prometheus.target( - 'sum by(container) (kube_pod_container_resource_limits{%(kubeStateMetricsSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", resource="memory", pod="$pod", container=~"$container"})' % $._config, - legendFormat='Limit: {{ container }}', - )) - .addTarget(prometheus.target( - 'sum by(container) (container_memory_cache{%(cadvisorSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", pod=~"$pod", container=~"$container", container!="POD"})' % $._config, - legendFormat='Cache: {{ container }}', - )) - ); - - local cpuRow = row.new() - .addPanel( - graphPanel.new( - 'CPU Usage', - datasource='$datasource', - min=0, - span=12, - legend_rightSide=true, - legend_alignAsTable=true, - legend_current=true, - legend_avg=true, - ) - .addTarget(prometheus.target( - 'sum by (container) (irate(container_cpu_usage_seconds_total{%(cadvisorSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", image!="", pod="$pod", container=~"$container", container!="POD"}[4m]))' % $._config, - legendFormat='Current: {{ container }}', - )) - .addTarget(prometheus.target( - 'sum by(container) (kube_pod_container_resource_requests{%(kubeStateMetricsSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", resource="cpu", pod="$pod", container=~"$container"})' % $._config, - legendFormat='Requested: {{ container }}', - )) - .addTarget(prometheus.target( - 'sum by(container) (kube_pod_container_resource_limits{%(kubeStateMetricsSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", resource="cpu", pod="$pod", container=~"$container"})' % $._config, - legendFormat='Limit: {{ container }}', - )) - ); - - local networkRow = row.new() - .addPanel( - graphPanel.new( - 'Network I/O', - datasource='$datasource', - format='bytes', - min=0, - span=12, - legend_rightSide=true, - legend_alignAsTable=true, - legend_current=true, - legend_avg=true, - ) - .addTarget(prometheus.target( - 'sort_desc(sum by (pod) (irate(container_network_receive_bytes_total{%(cadvisorSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}[4m])))' % $._config, - legendFormat='RX: {{ pod }}', - )) - .addTarget(prometheus.target( - 'sort_desc(sum by (pod) (irate(container_network_transmit_bytes_total{%(cadvisorSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}[4m])))' % $._config, - legendFormat='TX: {{ pod }}', - )) - ); - - local restartsRow = row.new() - .addPanel( - graphPanel.new( - 'Total Restarts Per Container', - datasource='$datasource', - format='short', - min=0, - span=12, - legend_rightSide=true, - legend_alignAsTable=true, - legend_current=true, - legend_avg=true, - ) - .addTarget(prometheus.target( - 'max by (container) (kube_pod_container_status_restarts_total{%(kubeStateMetricsSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container=~"$container"})' % $._config, - legendFormat='Restarts: {{ container }}', - )) - ); - - local restartAnnotation = annotation.datasource( - 'Restarts', - '$datasource', - expr='time() == BOOL timestamp(rate(kube_pod_container_status_restarts_total{%(kubeStateMetricsSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}[2m]) > 0)' % $._config, - enable=true, - hide=false, - iconColor='rgba(215, 44, 44, 1)', - tags=['restart'], - type='rows', - builtIn=1, - ); - - dashboard.new( - '%(dashboardNamePrefix)sPods' % $._config.grafanaK8s, - time_from='now-1h', - uid=($._config.grafanaDashboardIDs['pods.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addTemplate( - template.new( - 'cluster', - '$datasource', - 'label_values(kube_pod_info, %(clusterLabel)s)' % $._config, - label='cluster', - refresh='time', - hide=if $._config.showMultiCluster then '' else 'variable', - ) - ) - .addTemplate( - template.new( - 'namespace', - '$datasource', - 'label_values(kube_pod_info{%(clusterLabel)s="$cluster"}, namespace)' % $._config, - label='Namespace', - refresh='time', - ) - ) - .addTemplate( - template.new( - 'pod', - '$datasource', - 'label_values(kube_pod_info{%(clusterLabel)s="$cluster", namespace=~"$namespace"}, pod)' % $._config, - label='Pod', - refresh='time', - ) - ) - .addTemplate( - template.new( - 'container', - '$datasource', - 'label_values(kube_pod_container_info{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}, container)' % $._config, - label='Container', - refresh='time', - includeAll=true, - ) - ) - .addAnnotation(restartAnnotation) - .addRow(memoryRow) - .addRow(cpuRow) - .addRow(networkRow) - .addRow(restartsRow), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/proxy.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/proxy.libsonnet deleted file mode 100644 index 97dd89ba..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/proxy.libsonnet +++ /dev/null @@ -1,190 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local dashboard = grafana.dashboard; -local row = grafana.row; -local prometheus = grafana.prometheus; -local template = grafana.template; -local graphPanel = grafana.graphPanel; -local singlestat = grafana.singlestat; - -{ - grafanaDashboards+:: { - 'proxy.json': - local upCount = - singlestat.new( - 'Up', - datasource='$datasource', - span=2, - valueName='min', - ) - .addTarget(prometheus.target('sum(up{%(kubeProxySelector)s})' % $._config)); - - local rulesSyncRate = - graphPanel.new( - 'Rules Sync Rate', - datasource='$datasource', - span=5, - min=0, - format='ops', - ) - .addTarget(prometheus.target('sum(rate(kubeproxy_sync_proxy_rules_duration_seconds_count{%(kubeProxySelector)s, instance=~"$instance"}[5m]))' % $._config, legendFormat='rate')); - - local rulesSyncLatency = - graphPanel.new( - 'Rule Sync Latency 99th Quantile', - datasource='$datasource', - span=5, - min=0, - format='s', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99,rate(kubeproxy_sync_proxy_rules_duration_seconds_bucket{%(kubeProxySelector)s, instance=~"$instance"}[5m]))' % $._config, legendFormat='{{instance}}')); - - local networkProgrammingRate = - graphPanel.new( - 'Network Programming Rate', - datasource='$datasource', - span=6, - min=0, - format='ops', - ) - .addTarget(prometheus.target('sum(rate(kubeproxy_network_programming_duration_seconds_count{%(kubeProxySelector)s, instance=~"$instance"}[5m]))' % $._config, legendFormat='rate')); - - local networkProgrammingLatency = - graphPanel.new( - 'Network Programming Latency 99th Quantile', - datasource='$datasource', - span=6, - min=0, - format='s', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(kubeproxy_network_programming_duration_seconds_bucket{%(kubeProxySelector)s, instance=~"$instance"}[5m])) by (instance, le))' % $._config, legendFormat='{{instance}}')); - - local rpcRate = - graphPanel.new( - 'Kube API Request Rate', - datasource='$datasource', - span=4, - format='ops', - ) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeProxySelector)s, instance=~"$instance",code=~"2.."}[5m]))' % $._config, legendFormat='2xx')) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeProxySelector)s, instance=~"$instance",code=~"3.."}[5m]))' % $._config, legendFormat='3xx')) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeProxySelector)s, instance=~"$instance",code=~"4.."}[5m]))' % $._config, legendFormat='4xx')) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeProxySelector)s, instance=~"$instance",code=~"5.."}[5m]))' % $._config, legendFormat='5xx')); - - local postRequestLatency = - graphPanel.new( - 'Post Request Latency 99th Quantile', - datasource='$datasource', - span=8, - format='s', - min=0, - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{%(kubeProxySelector)s,instance=~"$instance",verb="POST"}[5m])) by (verb, url, le))' % $._config, legendFormat='{{verb}} {{url}}')); - - local getRequestLatency = - graphPanel.new( - 'Get Request Latency 99th Quantile', - datasource='$datasource', - span=12, - format='s', - min=0, - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{%(kubeProxySelector)s, instance=~"$instance", verb="GET"}[5m])) by (verb, url, le))' % $._config, legendFormat='{{verb}} {{url}}')); - - local memory = - graphPanel.new( - 'Memory', - datasource='$datasource', - span=4, - format='bytes', - ) - .addTarget(prometheus.target('process_resident_memory_bytes{%(kubeProxySelector)s,instance=~"$instance"}' % $._config, legendFormat='{{instance}}')); - - local cpu = - graphPanel.new( - 'CPU usage', - datasource='$datasource', - span=4, - format='short', - min=0, - ) - .addTarget(prometheus.target('rate(process_cpu_seconds_total{%(kubeProxySelector)s,instance=~"$instance"}[5m])' % $._config, legendFormat='{{instance}}')); - - local goroutines = - graphPanel.new( - 'Goroutines', - datasource='$datasource', - span=4, - format='short', - ) - .addTarget(prometheus.target('go_goroutines{%(kubeProxySelector)s,instance=~"$instance"}' % $._config, legendFormat='{{instance}}')); - - - dashboard.new( - '%(dashboardNamePrefix)sProxy' % $._config.grafanaK8s, - time_from='now-1h', - uid=($._config.grafanaDashboardIDs['proxy.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addTemplate( - template.new( - 'instance', - '$datasource', - 'label_values(kubeproxy_network_programming_duration_seconds_bucket{%(kubeProxySelector)s}, instance)' % $._config, - refresh='time', - includeAll=true, - ) - ) - .addRow( - row.new() - .addPanel(upCount) - .addPanel(rulesSyncRate) - .addPanel(rulesSyncLatency) - ).addRow( - row.new() - .addPanel(networkProgrammingRate) - .addPanel(networkProgrammingLatency) - ).addRow( - row.new() - .addPanel(rpcRate) - .addPanel(postRequestLatency) - ).addRow( - row.new() - .addPanel(getRequestLatency) - ).addRow( - row.new() - .addPanel(memory) - .addPanel(cpu) - .addPanel(goroutines) - ), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/resources.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/resources.libsonnet deleted file mode 100644 index 02ff99d2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/resources.libsonnet +++ /dev/null @@ -1,588 +0,0 @@ -local g = import 'grafana-builder/grafana.libsonnet'; - -{ - grafanaDashboards+:: { - 'k8s-resources-cluster.json': - local tableStyles = { - namespace: { - alias: 'Namespace', - link: '%(prefix)s/d/%(uid)s/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell' % { prefix: $._config.grafanaK8s.linkPrefix, uid: std.md5('k8s-resources-namespace.json') }, - linkTooltip: 'Drill down to pods', - }, - 'Value #A': { - alias: 'Pods', - linkTooltip: 'Drill down to pods', - link: '%(prefix)s/d/%(uid)s/k8s-resources-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1' % { prefix: $._config.grafanaK8s.linkPrefix, uid: std.md5('k8s-resources-namespace.json') }, - decimals: 0, - }, - 'Value #B': { - alias: 'Workloads', - linkTooltip: 'Drill down to workloads', - link: '%(prefix)s/d/%(uid)s/k8s-resources-workloads-namespace?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$__cell_1' % { prefix: $._config.grafanaK8s.linkPrefix, uid: std.md5('k8s-resources-workloads-namespace.json') }, - decimals: 0, - }, - }; - - local podWorkloadColumns = [ - 'count(mixin_pod_workload{%(clusterLabel)s="$cluster"}) by (namespace)' % $._config, - 'count(avg(mixin_pod_workload{%(clusterLabel)s="$cluster"}) by (workload, namespace)) by (namespace)' % $._config, - ]; - - g.dashboard( - '%(dashboardNamePrefix)sCompute Resources / Cluster' % $._config.grafanaK8s, - uid=($._config.grafanaDashboardIDs['k8s-resources-cluster.json']), - ).addTemplate('cluster', 'node_cpu_seconds_total', $._config.clusterLabel, hide=if $._config.showMultiCluster then 0 else 2) - .addRow( - (g.row('Headlines') + - { - height: '100px', - showTitle: false, - }) - .addPanel( - g.panel('CPU Utilisation') + - g.statPanel('1 - avg(rate(node_cpu_seconds_total{mode="idle", %(clusterLabel)s="$cluster"}[1m]))' % $._config) - ) - .addPanel( - g.panel('CPU Requests Commitment') + - g.statPanel('sum(kube_pod_container_resource_requests_cpu_cores{%(clusterLabel)s="$cluster"}) / sum(kube_node_status_allocatable_cpu_cores{%(clusterLabel)s="$cluster"})' % $._config) - ) - .addPanel( - g.panel('CPU Limits Commitment') + - g.statPanel('sum(kube_pod_container_resource_limits_cpu_cores{%(clusterLabel)s="$cluster"}) / sum(kube_node_status_allocatable_cpu_cores{%(clusterLabel)s="$cluster"})' % $._config) - ) - .addPanel( - g.panel('Memory Utilisation') + - g.statPanel('1 - sum(:node_memory_MemFreeCachedBuffers_bytes:sum{%(clusterLabel)s="$cluster"}) / sum(kube_node_status_allocatable_memory_bytes{%(clusterLabel)s="$cluster"})' % $._config) - ) - .addPanel( - g.panel('Memory Requests Commitment') + - g.statPanel('sum(kube_pod_container_resource_requests_memory_bytes{%(clusterLabel)s="$cluster"}) / sum(kube_node_status_allocatable_memory_bytes{%(clusterLabel)s="$cluster"})' % $._config) - ) - .addPanel( - g.panel('Memory Limits Commitment') + - g.statPanel('sum(kube_pod_container_resource_limits_memory_bytes{%(clusterLabel)s="$cluster"}) / sum(kube_node_status_allocatable_memory_bytes{%(clusterLabel)s="$cluster"})' % $._config) - ) - ) - .addRow( - g.row('CPU') - .addPanel( - g.panel('CPU Usage') + - g.queryPanel('sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster"}) by (namespace)' % $._config, '{{namespace}}') + - g.stack - ) - ) - .addRow( - g.row('CPU Quota') - .addPanel( - g.panel('CPU Quota') + - g.tablePanel(podWorkloadColumns + [ - 'sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster"}) by (namespace)' % $._config, - 'sum(kube_pod_container_resource_requests_cpu_cores{%(clusterLabel)s="$cluster"}) by (namespace)' % $._config, - 'sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster"}) by (namespace) / sum(kube_pod_container_resource_requests_cpu_cores{%(clusterLabel)s="$cluster"}) by (namespace)' % $._config, - 'sum(kube_pod_container_resource_limits_cpu_cores{%(clusterLabel)s="$cluster"}) by (namespace)' % $._config, - 'sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster"}) by (namespace) / sum(kube_pod_container_resource_limits_cpu_cores{%(clusterLabel)s="$cluster"}) by (namespace)' % $._config, - ], tableStyles { - 'Value #C': { alias: 'CPU Usage' }, - 'Value #D': { alias: 'CPU Requests' }, - 'Value #E': { alias: 'CPU Requests %', unit: 'percentunit' }, - 'Value #F': { alias: 'CPU Limits' }, - 'Value #G': { alias: 'CPU Limits %', unit: 'percentunit' }, - }) - ) - ) - .addRow( - g.row('Memory') - .addPanel( - g.panel('Memory Usage (w/o cache)') + - // Not using container_memory_usage_bytes here because that includes page cache - g.queryPanel('sum(container_memory_rss{%(clusterLabel)s="$cluster", container!=""}) by (namespace)' % $._config, '{{namespace}}') + - g.stack + - { yaxes: g.yaxes('bytes') }, - ) - ) - .addRow( - g.row('Memory Requests') - .addPanel( - g.panel('Requests by Namespace') + - g.tablePanel(podWorkloadColumns + [ - // Not using container_memory_usage_bytes here because that includes page cache - 'sum(container_memory_rss{%(clusterLabel)s="$cluster", container!=""}) by (namespace)' % $._config, - 'sum(kube_pod_container_resource_requests_memory_bytes{%(clusterLabel)s="$cluster"}) by (namespace)' % $._config, - 'sum(container_memory_rss{%(clusterLabel)s="$cluster", container!=""}) by (namespace) / sum(kube_pod_container_resource_requests_memory_bytes{%(clusterLabel)s="$cluster"}) by (namespace)' % $._config, - 'sum(kube_pod_container_resource_limits_memory_bytes{%(clusterLabel)s="$cluster"}) by (namespace)' % $._config, - 'sum(container_memory_rss{%(clusterLabel)s="$cluster", container!=""}) by (namespace) / sum(kube_pod_container_resource_limits_memory_bytes{%(clusterLabel)s="$cluster"}) by (namespace)' % $._config, - ], tableStyles { - 'Value #C': { alias: 'Memory Usage', unit: 'bytes' }, - 'Value #D': { alias: 'Memory Requests', unit: 'bytes' }, - 'Value #E': { alias: 'Memory Requests %', unit: 'percentunit' }, - 'Value #F': { alias: 'Memory Limits', unit: 'bytes' }, - 'Value #G': { alias: 'Memory Limits %', unit: 'percentunit' }, - }) - ) - ) + { tags: $._config.grafanaK8s.dashboardTags }, - - 'k8s-resources-namespace.json': - local tableStyles = { - pod: { - alias: 'Pod', - link: '%(prefix)s/d/%(uid)s/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell' % { prefix: $._config.grafanaK8s.linkPrefix, uid: std.md5('k8s-resources-pod.json') }, - }, - }; - - g.dashboard( - '%(dashboardNamePrefix)sCompute Resources / Namespace (Pods)' % $._config.grafanaK8s, - uid=($._config.grafanaDashboardIDs['k8s-resources-namespace.json']), - ).addTemplate('cluster', 'kube_pod_info', $._config.clusterLabel, hide=if $._config.showMultiCluster then 0 else 2) - .addTemplate('namespace', 'kube_pod_info{%(clusterLabel)s="$cluster"}' % $._config, 'namespace') - .addRow( - g.row('CPU Usage') - .addPanel( - g.panel('CPU Usage') + - g.queryPanel('sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", namespace="$namespace"}) by (pod)' % $._config, '{{pod}}') + - g.stack, - ) - ) - .addRow( - g.row('CPU Quota') - .addPanel( - g.panel('CPU Quota') + - g.tablePanel([ - 'sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", namespace="$namespace"}) by (pod)' % $._config, - 'sum(kube_pod_container_resource_requests_cpu_cores{%(clusterLabel)s="$cluster", namespace="$namespace"}) by (pod)' % $._config, - 'sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", namespace="$namespace"}) by (pod) / sum(kube_pod_container_resource_requests_cpu_cores{%(clusterLabel)s="$cluster", namespace="$namespace"}) by (pod)' % $._config, - 'sum(kube_pod_container_resource_limits_cpu_cores{%(clusterLabel)s="$cluster", namespace="$namespace"}) by (pod)' % $._config, - 'sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", namespace="$namespace"}) by (pod) / sum(kube_pod_container_resource_limits_cpu_cores{%(clusterLabel)s="$cluster", namespace="$namespace"}) by (pod)' % $._config, - ], tableStyles { - 'Value #A': { alias: 'CPU Usage' }, - 'Value #B': { alias: 'CPU Requests' }, - 'Value #C': { alias: 'CPU Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'CPU Limits' }, - 'Value #E': { alias: 'CPU Limits %', unit: 'percentunit' }, - }) - ) - ) - .addRow( - g.row('Memory Usage') - .addPanel( - g.panel('Memory Usage (w/o cache)') + - // Like abov, without page cache - g.queryPanel('sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", container!=""}) by (pod)' % $._config, '{{pod}}') + - g.stack + - { yaxes: g.yaxes('bytes') }, - ) - ) - .addRow( - g.row('Memory Quota') - .addPanel( - g.panel('Memory Quota') + - g.tablePanel([ - 'sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace",container!=""}) by (pod)' % $._config, - 'sum(kube_pod_container_resource_requests_memory_bytes{%(clusterLabel)s="$cluster", namespace="$namespace"}) by (pod)' % $._config, - 'sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace",container!=""}) by (pod) / sum(kube_pod_container_resource_requests_memory_bytes{namespace="$namespace"}) by (pod)' % $._config, - 'sum(kube_pod_container_resource_limits_memory_bytes{%(clusterLabel)s="$cluster", namespace="$namespace"}) by (pod)' % $._config, - 'sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace",container!=""}) by (pod) / sum(kube_pod_container_resource_limits_memory_bytes{namespace="$namespace"}) by (pod)' % $._config, - 'sum(container_memory_rss{%(clusterLabel)s="$cluster", namespace="$namespace",container!=""}) by (pod)' % $._config, - 'sum(container_memory_cache{%(clusterLabel)s="$cluster", namespace="$namespace",container!=""}) by (pod)' % $._config, - 'sum(container_memory_swap{%(clusterLabel)s="$cluster", namespace="$namespace",container!=""}) by (pod)' % $._config, - ], tableStyles { - 'Value #A': { alias: 'Memory Usage', unit: 'bytes' }, - 'Value #B': { alias: 'Memory Requests', unit: 'bytes' }, - 'Value #C': { alias: 'Memory Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'Memory Limits', unit: 'bytes' }, - 'Value #E': { alias: 'Memory Limits %', unit: 'percentunit' }, - 'Value #F': { alias: 'Memory Usage (RSS)', unit: 'bytes' }, - 'Value #G': { alias: 'Memory Usage (Cache)', unit: 'bytes' }, - 'Value #H': { alias: 'Memory Usage (Swap)', unit: 'bytes' }, - }) - ) - ) + { tags: $._config.grafanaK8s.dashboardTags }, - - 'k8s-resources-workloads-namespace.json': - local tableStyles = { - workload: { - alias: 'Workload', - link: '%(prefix)s/d/%(uid)s/k8s-resources-workload?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-workload=$__cell&var-type=$__cell_2' % { prefix: $._config.grafanaK8s.linkPrefix, uid: std.md5('k8s-resources-workload.json') }, - }, - workload_type: { - alias: 'Workload Type', - }, - }; - - local cpuUsageQuery = ||| - sum( - namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", namespace="$namespace"} - * on(namespace,pod) - group_left(workload, workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", namespace="$namespace"} - ) by (workload, workload_type) - ||| % $._config; - - local cpuRequestsQuery = ||| - sum( - kube_pod_container_resource_requests_cpu_cores{%(clusterLabel)s="$cluster", namespace="$namespace"} - * on(namespace,pod) - group_left(workload, workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", namespace="$namespace"} - ) by (workload, workload_type) - ||| % $._config; - - local podCountQuery = 'count(mixin_pod_workload{%(clusterLabel)s="$cluster", namespace="$namespace"}) by (workload, workload_type)' % $._config; - local cpuLimitsQuery = std.strReplace(cpuRequestsQuery, 'requests', 'limits'); - - local memUsageQuery = ||| - sum( - container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", container!=""} - * on(namespace,pod) - group_left(workload, workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", namespace="$namespace"} - ) by (workload, workload_type) - ||| % $._config; - local memRequestsQuery = std.strReplace(cpuRequestsQuery, 'cpu_cores', 'memory_bytes'); - local memLimitsQuery = std.strReplace(cpuLimitsQuery, 'cpu_cores', 'memory_bytes'); - - g.dashboard( - '%(dashboardNamePrefix)sCompute Resources / Namespace (Workloads)' % $._config.grafanaK8s, - uid=($._config.grafanaDashboardIDs['k8s-resources-workloads-namespace.json']), - ).addTemplate('cluster', 'kube_pod_info', $._config.clusterLabel, hide=if $._config.showMultiCluster then 0 else 2) - .addTemplate('namespace', 'kube_pod_info{%(clusterLabel)s="$cluster"}' % $._config, 'namespace') - .addRow( - g.row('CPU Usage') - .addPanel( - g.panel('CPU Usage') + - g.queryPanel(cpuUsageQuery, '{{workload}} - {{workload_type}}') + - g.stack, - ) - ) - .addRow( - g.row('CPU Quota') - .addPanel( - g.panel('CPU Quota') + - g.tablePanel([ - podCountQuery, - cpuUsageQuery, - cpuRequestsQuery, - cpuUsageQuery + '/' + cpuRequestsQuery, - cpuLimitsQuery, - cpuUsageQuery + '/' + cpuLimitsQuery, - ], tableStyles { - 'Value #A': { alias: 'Running Pods', decimals: 0 }, - 'Value #B': { alias: 'CPU Usage' }, - 'Value #C': { alias: 'CPU Requests' }, - 'Value #D': { alias: 'CPU Requests %', unit: 'percentunit' }, - 'Value #E': { alias: 'CPU Limits' }, - 'Value #F': { alias: 'CPU Limits %', unit: 'percentunit' }, - }) - ) - ) - .addRow( - g.row('Memory Usage') - .addPanel( - g.panel('Memory Usage') + - g.queryPanel(memUsageQuery, '{{workload}} - {{workload_type}}') + - g.stack + - { yaxes: g.yaxes('bytes') }, - ) - ) - .addRow( - g.row('Memory Quota') - .addPanel( - g.panel('Memory Quota') + - g.tablePanel([ - podCountQuery, - memUsageQuery, - memRequestsQuery, - memUsageQuery + '/' + memRequestsQuery, - memLimitsQuery, - memUsageQuery + '/' + memLimitsQuery, - ], tableStyles { - 'Value #A': { alias: 'Running Pods', decimals: 0 }, - 'Value #B': { alias: 'Memory Usage', unit: 'bytes' }, - 'Value #C': { alias: 'Memory Requests', unit: 'bytes' }, - 'Value #D': { alias: 'Memory Requests %', unit: 'percentunit' }, - 'Value #E': { alias: 'Memory Limits', unit: 'bytes' }, - 'Value #F': { alias: 'Memory Limits %', unit: 'percentunit' }, - }) - ) - ) + { tags: $._config.grafanaK8s.dashboardTags }, - - 'k8s-resources-workload.json': - local tableStyles = { - pod: { - alias: 'Pod', - link: '%(prefix)s/d/%(uid)s/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell' % { prefix: $._config.grafanaK8s.linkPrefix, uid: std.md5('k8s-resources-pod.json') }, - }, - }; - - local cpuUsageQuery = ||| - sum( - namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", namespace="$namespace"} - * on(namespace,pod) - group_left(workload, workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", namespace="$namespace", workload="$workload", workload_type="$type"} - ) by (pod) - ||| % $._config; - - local cpuRequestsQuery = ||| - sum( - kube_pod_container_resource_requests_cpu_cores{%(clusterLabel)s="$cluster", namespace="$namespace"} - * on(namespace,pod) - group_left(workload, workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", namespace="$namespace", workload="$workload", workload_type="$type"} - ) by (pod) - ||| % $._config; - - local cpuLimitsQuery = std.strReplace(cpuRequestsQuery, 'requests', 'limits'); - - local memUsageQuery = ||| - sum( - container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", container!=""} - * on(namespace,pod) - group_left(workload, workload_type) mixin_pod_workload{%(clusterLabel)s="$cluster", namespace="$namespace", workload="$workload", workload_type="$type"} - ) by (pod) - ||| % $._config; - local memRequestsQuery = std.strReplace(cpuRequestsQuery, 'cpu_cores', 'memory_bytes'); - local memLimitsQuery = std.strReplace(cpuLimitsQuery, 'cpu_cores', 'memory_bytes'); - - g.dashboard( - '%(dashboardNamePrefix)sCompute Resources / Workload' % $._config.grafanaK8s, - uid=($._config.grafanaDashboardIDs['k8s-resources-workload.json']), - ).addTemplate('cluster', 'kube_pod_info', $._config.clusterLabel, hide=if $._config.showMultiCluster then 0 else 2) - .addTemplate('namespace', 'kube_pod_info{%(clusterLabel)s="$cluster"}' % $._config, 'namespace') - .addTemplate('workload', 'mixin_pod_workload{%(clusterLabel)s="$cluster", namespace="$namespace"}' % $._config, 'workload') - .addTemplate('type', 'mixin_pod_workload{%(clusterLabel)s="$cluster", namespace="$namespace", workload="$workload"}' % $._config, 'workload_type') - .addRow( - g.row('CPU Usage') - .addPanel( - g.panel('CPU Usage') + - g.queryPanel(cpuUsageQuery, '{{pod}}') + - g.stack, - ) - ) - .addRow( - g.row('CPU Quota') - .addPanel( - g.panel('CPU Quota') + - g.tablePanel([ - cpuUsageQuery, - cpuRequestsQuery, - cpuUsageQuery + '/' + cpuRequestsQuery, - cpuLimitsQuery, - cpuUsageQuery + '/' + cpuLimitsQuery, - ], tableStyles { - 'Value #A': { alias: 'CPU Usage' }, - 'Value #B': { alias: 'CPU Requests' }, - 'Value #C': { alias: 'CPU Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'CPU Limits' }, - 'Value #E': { alias: 'CPU Limits %', unit: 'percentunit' }, - }) - ) - ) - .addRow( - g.row('Memory Usage') - .addPanel( - g.panel('Memory Usage') + - g.queryPanel(memUsageQuery, '{{pod}}') + - g.stack + - { yaxes: g.yaxes('bytes') }, - ) - ) - .addRow( - g.row('Memory Quota') - .addPanel( - g.panel('Memory Quota') + - g.tablePanel([ - memUsageQuery, - memRequestsQuery, - memUsageQuery + '/' + memRequestsQuery, - memLimitsQuery, - memUsageQuery + '/' + memLimitsQuery, - ], tableStyles { - 'Value #A': { alias: 'Memory Usage', unit: 'bytes' }, - 'Value #B': { alias: 'Memory Requests', unit: 'bytes' }, - 'Value #C': { alias: 'Memory Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'Memory Limits', unit: 'bytes' }, - 'Value #E': { alias: 'Memory Limits %', unit: 'percentunit' }, - }) - ) - ) + { tags: $._config.grafanaK8s.dashboardTags }, - - 'k8s-resources-pod.json': - local tableStyles = { - container: { - alias: 'Container', - }, - }; - - g.dashboard( - '%(dashboardNamePrefix)sCompute Resources / Pod' % $._config.grafanaK8s, - uid=($._config.grafanaDashboardIDs['k8s-resources-pod.json']), - ).addTemplate('cluster', 'kube_pod_info', $._config.clusterLabel, hide=if $._config.showMultiCluster then 0 else 2) - .addTemplate('namespace', 'kube_pod_info{%(clusterLabel)s="$cluster"}' % $._config, 'namespace') - .addTemplate('pod', 'kube_pod_info{%(clusterLabel)s="$cluster", namespace="$namespace"}' % $._config, 'pod') - .addRow( - g.row('CPU Usage') - .addPanel( - g.panel('CPU Usage') + - g.queryPanel('sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{namespace="$namespace", pod="$pod", container!="POD", %(clusterLabel)s="$cluster"}) by (container)' % $._config, '{{container}}') + - g.stack, - ) - ) - .addRow( - g.row('CPU Quota') - .addPanel( - g.panel('CPU Quota') + - g.tablePanel([ - 'sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!="POD"}) by (container)' % $._config, - 'sum(kube_pod_container_resource_requests_cpu_cores{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}) by (container)' % $._config, - 'sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}) by (container) / sum(kube_pod_container_resource_requests_cpu_cores{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}) by (container)' % $._config, - 'sum(kube_pod_container_resource_limits_cpu_cores{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}) by (container)' % $._config, - 'sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}) by (container) / sum(kube_pod_container_resource_limits_cpu_cores{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}) by (container)' % $._config, - ], tableStyles { - 'Value #A': { alias: 'CPU Usage' }, - 'Value #B': { alias: 'CPU Requests' }, - 'Value #C': { alias: 'CPU Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'CPU Limits' }, - 'Value #E': { alias: 'CPU Limits %', unit: 'percentunit' }, - }) - ) - ) - .addRow( - g.row('Memory Usage') - .addPanel( - g.panel('Memory Usage') + - g.queryPanel([ - 'sum(container_memory_rss{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!="POD", container!=""}) by (container)' % $._config, - 'sum(container_memory_cache{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!="POD", container!=""}) by (container)' % $._config, - 'sum(container_memory_swap{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!="POD", container!=""}) by (container)' % $._config, - ], [ - '{{container}} (RSS)', - '{{container}} (Cache)', - '{{container}} (Swap)', - ]) + - g.stack + - { yaxes: g.yaxes('bytes') }, - ) - ) - .addRow( - g.row('Memory Quota') - .addPanel( - g.panel('Memory Quota') + - g.tablePanel([ - 'sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!="POD", container!=""}) by (container)' % $._config, - 'sum(kube_pod_container_resource_requests_memory_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}) by (container)' % $._config, - 'sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod"}) by (container) / sum(kube_pod_container_resource_requests_memory_bytes{namespace="$namespace", pod="$pod"}) by (container)' % $._config, - 'sum(kube_pod_container_resource_limits_memory_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!=""}) by (container)' % $._config, - 'sum(container_memory_working_set_bytes{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container!=""}) by (container) / sum(kube_pod_container_resource_limits_memory_bytes{namespace="$namespace", pod="$pod"}) by (container)' % $._config, - 'sum(container_memory_rss{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container != "", container != "POD"}) by (container)' % $._config, - 'sum(container_memory_cache{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container != "", container != "POD"}) by (container)' % $._config, - 'sum(container_memory_swap{%(clusterLabel)s="$cluster", namespace="$namespace", pod="$pod", container != "", container != "POD"}) by (container)' % $._config, - ], tableStyles { - 'Value #A': { alias: 'Memory Usage', unit: 'bytes' }, - 'Value #B': { alias: 'Memory Requests', unit: 'bytes' }, - 'Value #C': { alias: 'Memory Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'Memory Limits', unit: 'bytes' }, - 'Value #E': { alias: 'Memory Limits %', unit: 'percentunit' }, - 'Value #F': { alias: 'Memory Usage (RSS)', unit: 'bytes' }, - 'Value #G': { alias: 'Memory Usage (Cache)', unit: 'bytes' }, - 'Value #H': { alias: 'Memory Usage (Swap)', unit: 'bytes' }, - }) - ) - ) + { tags: $._config.grafanaK8s.dashboardTags }, - }, -} + { - grafanaDashboards+:: if $._config.showMultiCluster then { - 'k8s-resources-multicluster.json': - local tableStyles = { - [$._config.clusterLabel]: { - alias: 'Cluster', - link: '%(prefix)s/d/%(uid)s/k8s-resources-cluster?var-datasource=$datasource&var-cluster=$__cell' % { prefix: $._config.grafanaK8s.linkPrefix, uid: std.md5('k8s-resources-cluster.json') }, - }, - }; - - g.dashboard( - '%(dashboardNamePrefix)sCompute Resources / Multi-Cluster' % $._config.grafanaK8s, - uid=($._config.grafanaDashboardIDs['k8s-resources-multicluster.json']), - ).addRow( - (g.row('Headlines') + - { - height: '100px', - showTitle: false, - }) - .addPanel( - g.panel('CPU Utilisation') + - g.statPanel('1 - avg(rate(node_cpu_seconds_total{mode="idle"}[1m]))' % $._config) - ) - .addPanel( - g.panel('CPU Requests Commitment') + - g.statPanel('sum(kube_pod_container_resource_requests_cpu_cores) / sum(kube_node_status_allocatable_cpu_cores)' % $._config) - ) - .addPanel( - g.panel('CPU Limits Commitment') + - g.statPanel('sum(kube_pod_container_resource_limits_cpu_cores) / sum(kube_node_status_allocatable_cpu_cores)' % $._config) - ) - .addPanel( - g.panel('Memory Utilisation') + - g.statPanel('1 - sum(:node_memory_MemFreeCachedBuffers_bytes:sum) / sum(kube_node_status_allocatable_memory_bytes)' % $._config) - ) - .addPanel( - g.panel('Memory Requests Commitment') + - g.statPanel('sum(kube_pod_container_resource_requests_memory_bytes) / sum(kube_node_status_allocatable_memory_bytes)' % $._config) - ) - .addPanel( - g.panel('Memory Limits Commitment') + - g.statPanel('sum(kube_pod_container_resource_limits_memory_bytes) / sum(kube_node_status_allocatable_memory_bytes)' % $._config) - ) - ) - .addRow( - g.row('CPU') - .addPanel( - g.panel('CPU Usage') + - g.queryPanel('sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate) by (%(clusterLabel)s)' % $._config, '{{%(clusterLabel)s}}' % $._config) - + { fill: 0, linewidth: 2 }, - ) - ) - .addRow( - g.row('CPU Quota') - .addPanel( - g.panel('CPU Quota') + - g.tablePanel([ - 'sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate) by (%(clusterLabel)s)' % $._config, - 'sum(kube_pod_container_resource_requests_cpu_cores) by (%(clusterLabel)s)' % $._config, - 'sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate) by (%(clusterLabel)s) / sum(kube_pod_container_resource_requests_cpu_cores) by (%(clusterLabel)s)' % $._config, - 'sum(kube_pod_container_resource_limits_cpu_cores) by (%(clusterLabel)s)' % $._config, - 'sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate) by (%(clusterLabel)s) / sum(kube_pod_container_resource_limits_cpu_cores) by (%(clusterLabel)s)' % $._config, - ], tableStyles { - 'Value #A': { alias: 'CPU Usage' }, - 'Value #B': { alias: 'CPU Requests' }, - 'Value #C': { alias: 'CPU Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'CPU Limits' }, - 'Value #E': { alias: 'CPU Limits %', unit: 'percentunit' }, - }) - ) - ) - .addRow( - g.row('Memory') - .addPanel( - g.panel('Memory Usage (w/o cache)') + - // Not using container_memory_usage_bytes here because that includes page cache - g.queryPanel('sum(container_memory_rss{container!=""}) by (%(clusterLabel)s)' % $._config, '{{%(clusterLabel)s}}' % $._config) + - { fill: 0, linewidth: 2, yaxes: g.yaxes('bytes') }, - ) - ) - .addRow( - g.row('Memory Requests') - .addPanel( - g.panel('Requests by Namespace') + - g.tablePanel([ - // Not using container_memory_usage_bytes here because that includes page cache - 'sum(container_memory_rss{container!=""}) by (%(clusterLabel)s)' % $._config, - 'sum(kube_pod_container_resource_requests_memory_bytes) by (%(clusterLabel)s)' % $._config, - 'sum(container_memory_rss{container!=""}) by (%(clusterLabel)s) / sum(kube_pod_container_resource_requests_memory_bytes) by (%(clusterLabel)s)' % $._config, - 'sum(kube_pod_container_resource_limits_memory_bytes) by (%(clusterLabel)s)' % $._config, - 'sum(container_memory_rss{container!=""}) by (%(clusterLabel)s) / sum(kube_pod_container_resource_limits_memory_bytes) by (%(clusterLabel)s)' % $._config, - ], tableStyles { - 'Value #A': { alias: 'Memory Usage', unit: 'bytes' }, - 'Value #B': { alias: 'Memory Requests', unit: 'bytes' }, - 'Value #C': { alias: 'Memory Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'Memory Limits', unit: 'bytes' }, - 'Value #E': { alias: 'Memory Limits %', unit: 'percentunit' }, - }) - ) - ) + { tags: $._config.grafanaK8s.dashboardTags }, - } else {}, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/scheduler.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/scheduler.libsonnet deleted file mode 100644 index 52f61631..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/scheduler.libsonnet +++ /dev/null @@ -1,174 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local dashboard = grafana.dashboard; -local row = grafana.row; -local prometheus = grafana.prometheus; -local template = grafana.template; -local graphPanel = grafana.graphPanel; -local singlestat = grafana.singlestat; - -{ - grafanaDashboards+:: { - 'scheduler.json': - local upCount = - singlestat.new( - 'Up', - datasource='$datasource', - span=2, - valueName='min', - ) - .addTarget(prometheus.target('sum(up{%(kubeSchedulerSelector)s})' % $._config)); - - local schedulingRate = - graphPanel.new( - 'Scheduling Rate', - datasource='$datasource', - span=5, - format='ops', - min=0, - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('sum(rate(scheduler_e2e_scheduling_duration_seconds_count{%(kubeSchedulerSelector)s, instance=~"$instance"}[5m])) by (instance)' % $._config, legendFormat='{{instance}} e2e')) - .addTarget(prometheus.target('sum(rate(scheduler_binding_duration_seconds_count{%(kubeSchedulerSelector)s, instance=~"$instance"}[5m])) by (instance)' % $._config, legendFormat='{{instance}} binding')) - .addTarget(prometheus.target('sum(rate(scheduler_scheduling_algorithm_duration_seconds_count{%(kubeSchedulerSelector)s, instance=~"$instance"}[5m])) by (instance)' % $._config, legendFormat='{{instance}} scheduling algorithm')) - .addTarget(prometheus.target('sum(rate(scheduler_volume_scheduling_duration_seconds_count{%(kubeSchedulerSelector)s, instance=~"$instance"}[5m])) by (instance)' % $._config, legendFormat='{{instance}} volume')); - - - local schedulingLatency = - graphPanel.new( - 'Scheduling latency 99th Quantile', - datasource='$datasource', - span=5, - min=0, - format='s', - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(scheduler_e2e_scheduling_duration_seconds_bucket{%(kubeSchedulerSelector)s,instance=~"$instance"}[5m])) by (instance, le))' % $._config, legendFormat='{{instance}} e2e')) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(scheduler_binding_duration_seconds_bucket{%(kubeSchedulerSelector)s,instance=~"$instance"}[5m])) by (instance, le))' % $._config, legendFormat='{{instance}} binding')) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(scheduler_scheduling_algorithm_duration_seconds_bucket{%(kubeSchedulerSelector)s,instance=~"$instance"}[5m])) by (instance, le))' % $._config, legendFormat='{{instance}} scheduling algorithm')) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(scheduler_volume_scheduling_duration_seconds_bucket{%(kubeSchedulerSelector)s,instance=~"$instance"}[5m])) by (instance, le))' % $._config, legendFormat='{{instance}} volume')); - - local rpcRate = - graphPanel.new( - 'Kube API Request Rate', - datasource='$datasource', - span=4, - format='ops', - min=0, - ) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeSchedulerSelector)s, instance=~"$instance",code=~"2.."}[5m]))' % $._config, legendFormat='2xx')) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeSchedulerSelector)s, instance=~"$instance",code=~"3.."}[5m]))' % $._config, legendFormat='3xx')) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeSchedulerSelector)s, instance=~"$instance",code=~"4.."}[5m]))' % $._config, legendFormat='4xx')) - .addTarget(prometheus.target('sum(rate(rest_client_requests_total{%(kubeSchedulerSelector)s, instance=~"$instance",code=~"5.."}[5m]))' % $._config, legendFormat='5xx')); - - local postRequestLatency = - graphPanel.new( - 'Post Request Latency 99th Quantile', - datasource='$datasource', - span=8, - format='s', - min=0, - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{%(kubeSchedulerSelector)s, instance=~"$instance", verb="POST"}[5m])) by (verb, url, le))' % $._config, legendFormat='{{verb}} {{url}}')); - - local getRequestLatency = - graphPanel.new( - 'Get Request Latency 99th Quantile', - datasource='$datasource', - span=12, - format='s', - min=0, - legend_show='true', - legend_values='true', - legend_current='true', - legend_alignAsTable='true', - legend_rightSide='true', - ) - .addTarget(prometheus.target('histogram_quantile(0.99, sum(rate(rest_client_request_latency_seconds_bucket{%(kubeSchedulerSelector)s, instance=~"$instance", verb="GET"}[5m])) by (verb, url, le))' % $._config, legendFormat='{{verb}} {{url}}')); - - local memory = - graphPanel.new( - 'Memory', - datasource='$datasource', - span=4, - format='bytes', - ) - .addTarget(prometheus.target('process_resident_memory_bytes{%(kubeSchedulerSelector)s, instance=~"$instance"}' % $._config, legendFormat='{{instance}}')); - - local cpu = - graphPanel.new( - 'CPU usage', - datasource='$datasource', - span=4, - format='bytes', - min=0, - ) - .addTarget(prometheus.target('rate(process_cpu_seconds_total{%(kubeSchedulerSelector)s, instance=~"$instance"}[5m])' % $._config, legendFormat='{{instance}}')); - - local goroutines = - graphPanel.new( - 'Goroutines', - datasource='$datasource', - span=4, - format='short', - ) - .addTarget(prometheus.target('go_goroutines{%(kubeSchedulerSelector)s,instance=~"$instance"}' % $._config, legendFormat='{{instance}}')); - - - dashboard.new( - '%(dashboardNamePrefix)sScheduler' % $._config.grafanaK8s, - time_from='now-1h', - uid=($._config.grafanaDashboardIDs['scheduler.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addTemplate( - template.new( - 'instance', - '$datasource', - 'label_values(process_cpu_seconds_total{%(kubeSchedulerSelector)s}, instance)' % $._config, - refresh='time', - includeAll=true, - ) - ) - .addRow( - row.new() - .addPanel(upCount) - .addPanel(schedulingRate) - .addPanel(schedulingLatency) - ).addRow( - row.new() - .addPanel(rpcRate) - .addPanel(postRequestLatency) - ).addRow( - row.new() - .addPanel(getRequestLatency) - ).addRow( - row.new() - .addPanel(memory) - .addPanel(cpu) - .addPanel(goroutines) - ), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/statefulset.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/statefulset.libsonnet deleted file mode 100644 index de22e1a5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/statefulset.libsonnet +++ /dev/null @@ -1,157 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local dashboard = grafana.dashboard; -local graphPanel = grafana.graphPanel; -local prometheus = grafana.prometheus; -local promgrafonnet = import '../lib/promgrafonnet/promgrafonnet.libsonnet'; -local row = grafana.row; -local singlestat = grafana.singlestat; -local template = grafana.template; -local numbersinglestat = promgrafonnet.numbersinglestat; - -{ - grafanaDashboards+:: { - 'statefulset.json': - local cpuStat = - numbersinglestat.new( - 'CPU', - 'sum(rate(container_cpu_usage_seconds_total{%(cadvisorSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", pod=~"$statefulset.*"}[3m]))' % $._config, - ) - .withSpanSize(4) - .withPostfix('cores') - .withSparkline(); - - local memoryStat = - numbersinglestat.new( - 'Memory', - 'sum(container_memory_usage_bytes{%(cadvisorSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", pod=~"$statefulset.*"}) / 1024^3' % $._config, - ) - .withSpanSize(4) - .withPostfix('GB') - .withSparkline(); - - local networkStat = - numbersinglestat.new( - 'Network', - 'sum(rate(container_network_transmit_bytes_total{%(cadvisorSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", pod=~"$statefulset.*"}[3m])) + sum(rate(container_network_receive_bytes_total{%(clusterLabel)s="$cluster", namespace="$namespace",pod=~"$statefulset.*"}[3m]))' % $._config, - ) - .withSpanSize(4) - .withPostfix('Bps') - .withSparkline(); - - local overviewRow = - row.new() - .addPanel(cpuStat) - .addPanel(memoryStat) - .addPanel(networkStat); - - local desiredReplicasStat = numbersinglestat.new( - 'Desired Replicas', - 'max(kube_statefulset_replicas{%(kubeStateMetricsSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", statefulset="$statefulset"}) without (instance, pod)' % $._config, - ); - - local availableReplicasStat = numbersinglestat.new( - 'Replicas of current version', - 'min(kube_statefulset_status_replicas_current{%(kubeStateMetricsSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", statefulset="$statefulset"}) without (instance, pod)' % $._config, - ); - - local observedGenerationStat = numbersinglestat.new( - 'Observed Generation', - 'max(kube_statefulset_status_observed_generation{%(kubeStateMetricsSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace", statefulset="$statefulset"}) without (instance, pod)' % $._config, - ); - - local metadataGenerationStat = numbersinglestat.new( - 'Metadata Generation', - 'max(kube_statefulset_metadata_generation{%(kubeStateMetricsSelector)s, statefulset="$statefulset", %(clusterLabel)s="$cluster", namespace="$namespace"}) without (instance, pod)' % $._config, - ); - - local statsRow = - row.new(height='100px') - .addPanel(desiredReplicasStat) - .addPanel(availableReplicasStat) - .addPanel(observedGenerationStat) - .addPanel(metadataGenerationStat); - - local replicasGraph = - graphPanel.new( - 'Replicas', - datasource='$datasource', - ) - .addTarget(prometheus.target( - 'max(kube_statefulset_replicas{%(kubeStateMetricsSelector)s, statefulset="$statefulset", %(clusterLabel)s="$cluster", namespace="$namespace"}) without (instance, pod)' % $._config, - legendFormat='replicas specified', - )) - .addTarget(prometheus.target( - 'max(kube_statefulset_status_replicas{%(kubeStateMetricsSelector)s, statefulset="$statefulset", %(clusterLabel)s="$cluster", namespace="$namespace"}) without (instance, pod)' % $._config, - legendFormat='replicas created', - )) - .addTarget(prometheus.target( - 'min(kube_statefulset_status_replicas_ready{%(kubeStateMetricsSelector)s, statefulset="$statefulset", %(clusterLabel)s="$cluster", namespace="$namespace"}) without (instance, pod)' % $._config, - legendFormat='ready', - )) - .addTarget(prometheus.target( - 'min(kube_statefulset_status_replicas_current{%(kubeStateMetricsSelector)s, statefulset="$statefulset", %(clusterLabel)s="$cluster", namespace="$namespace"}) without (instance, pod)' % $._config, - legendFormat='replicas of current version', - )) - .addTarget(prometheus.target( - 'min(kube_statefulset_status_replicas_updated{%(kubeStateMetricsSelector)s, statefulset="$statefulset", %(clusterLabel)s="$cluster", namespace="$namespace"}) without (instance, pod)' % $._config, - legendFormat='updated', - )); - - local replicasRow = - row.new() - .addPanel(replicasGraph); - - dashboard.new( - '%(dashboardNamePrefix)sStatefulSets' % $._config.grafanaK8s, - time_from='now-1h', - uid=($._config.grafanaDashboardIDs['statefulset.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addTemplate( - template.new( - 'cluster', - '$datasource', - 'label_values(kube_statefulset_metadata_generation, %s)' % $._config.clusterLabel, - label='cluster', - refresh='time', - hide=if $._config.showMultiCluster then '' else 'variable', - ) - ) - .addTemplate( - template.new( - 'namespace', - '$datasource', - 'label_values(kube_statefulset_metadata_generation{%(kubeStateMetricsSelector)s}, %(clusterLabel)s="$cluster", namespace)' % $._config, - label='Namespace', - refresh='time', - ) - ) - .addTemplate( - template.new( - 'statefulset', - '$datasource', - 'label_values(kube_statefulset_metadata_generation{%(kubeStateMetricsSelector)s, %(clusterLabel)s="$cluster", namespace="$namespace"}, statefulset)' % $._config, - label='Name', - refresh='time', - ) - ) - .addRow(overviewRow) - .addRow(statsRow) - .addRow(replicasRow), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/windows.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/windows.libsonnet deleted file mode 100644 index a0a1b0a7..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/dashboards/windows.libsonnet +++ /dev/null @@ -1,562 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local dashboard = grafana.dashboard; -local row = grafana.row; -local prometheus = grafana.prometheus; -local template = grafana.template; -local graphPanel = grafana.graphPanel; -local promgrafonnet = import '../lib/promgrafonnet/promgrafonnet.libsonnet'; -local numbersinglestat = promgrafonnet.numbersinglestat; -local gauge = promgrafonnet.gauge; -local g = import 'grafana-builder/grafana.libsonnet'; - -{ - grafanaDashboards+:: { - 'k8s-resources-windows-cluster.json': - local tableStyles = { - namespace: { - alias: 'Namespace', - link: '%(prefix)s/d/%(uid)s/k8s-resources-windows-namespace?var-datasource=$datasource&var-namespace=$__cell' % { prefix: $._config.grafanaK8s.linkPrefix, uid: std.md5('k8s-resources-windows-namespace.json') }, - }, - }; - - dashboard.new( - '%(dashboardNamePrefix)sCompute Resources / Cluster(Windows)' % $._config.grafanaK8s, - uid=($._config.grafanaDashboardIDs['k8s-resources-windows-cluster.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addRow( - (g.row('Headlines') + - { - height: '100px', - showTitle: false, - }) - .addPanel( - g.panel('CPU Utilisation') + - g.statPanel('1 - avg(rate(wmi_cpu_time_total{mode="idle"}[1m]))') - ) - .addPanel( - g.panel('CPU Requests Commitment') + - g.statPanel('sum(kube_pod_windows_container_resource_cpu_cores_request) / sum(node:windows_node_num_cpu:sum)') - ) - .addPanel( - g.panel('CPU Limits Commitment') + - g.statPanel('sum(kube_pod_windows_container_resource_cpu_cores_limit) / sum(node:windows_node_num_cpu:sum)') - ) - .addPanel( - g.panel('Memory Utilisation') + - g.statPanel('1 - sum(:windows_node_memory_MemFreeCached_bytes:sum) / sum(:windows_node_memory_MemTotal_bytes:sum)') - ) - .addPanel( - g.panel('Memory Requests Commitment') + - g.statPanel('sum(kube_pod_windows_container_resource_memory_request) / sum(:windows_node_memory_MemTotal_bytes:sum)') - ) - .addPanel( - g.panel('Memory Limits Commitment') + - g.statPanel('sum(kube_pod_windows_container_resource_memory_limit) / sum(:windows_node_memory_MemTotal_bytes:sum)') - ) - ) - .addRow( - g.row('CPU') - .addPanel( - g.panel('CPU Usage') + - g.queryPanel('sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate) by (namespace)', '{{namespace}}') + - g.stack - ) - ) - .addRow( - g.row('CPU Quota') - .addPanel( - g.panel('CPU Quota') + - g.tablePanel([ - 'sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate) by (namespace)', - 'sum(kube_pod_windows_container_resource_cpu_cores_request) by (namespace)', - 'sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate) by (namespace) / sum(kube_pod_windows_container_resource_cpu_cores_request) by (namespace)', - 'sum(kube_pod_windows_container_resource_cpu_cores_limit) by (namespace)', - 'sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate) by (namespace) / sum(kube_pod_windows_container_resource_cpu_cores_limit) by (namespace)', - ], tableStyles { - 'Value #A': { alias: 'CPU Usage' }, - 'Value #B': { alias: 'CPU Requests' }, - 'Value #C': { alias: 'CPU Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'CPU Limits' }, - 'Value #E': { alias: 'CPU Limits %', unit: 'percentunit' }, - }) - ) - ) - .addRow( - g.row('Memory') - .addPanel( - g.panel('Memory Usage (Private Working Set)') + - // Not using container_memory_usage_bytes here because that includes page cache - g.queryPanel('sum(windows_container_private_working_set_usage{}) by (namespace)', '{{namespace}}') + - g.stack + - { yaxes: g.yaxes('decbytes') }, - ) - ) - .addRow( - g.row('Memory Requests') - .addPanel( - g.panel('Requests by Namespace') + - g.tablePanel([ - // Not using container_memory_usage_bytes here because that includes page cache - 'sum(windows_container_private_working_set_usage{}) by (namespace)', - 'sum(kube_pod_windows_container_resource_memory_request) by (namespace)', - 'sum(windows_container_private_working_set_usage{}) by (namespace) / sum(kube_pod_windows_container_resource_memory_request) by (namespace)', - 'sum(kube_pod_windows_container_resource_memory_limit) by (namespace)', - 'sum(windows_container_private_working_set_usage{}) by (namespace) / sum(kube_pod_windows_container_resource_memory_limit) by (namespace)', - ], tableStyles { - 'Value #A': { alias: 'Memory Usage', unit: 'decbytes' }, - 'Value #B': { alias: 'Memory Requests', unit: 'decbytes' }, - 'Value #C': { alias: 'Memory Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'Memory Limits', unit: 'decbytes' }, - 'Value #E': { alias: 'Memory Limits %', unit: 'percentunit' }, - }) - ) - ), - - 'k8s-resources-windows-namespace.json': - local tableStyles = { - pod: { - alias: 'Pod', - link: '%(prefix)s/d/%(uid)s/k8s-resources-windows-pod?var-datasource=$datasource&var-namespace=$namespace&var-pod=$__cell' % { prefix: $._config.grafanaK8s.linkPrefix, uid: std.md5('k8s-resources-windows-pod.json') }, - }, - }; - - dashboard.new( - '%(dashboardNamePrefix)sCompute Resources / Namespace(Windows)' % $._config.grafanaK8s, - uid=($._config.grafanaDashboardIDs['k8s-resources-windows-namespace.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addTemplate( - template.new( - 'namespace', - '$datasource', - 'label_values(windows_container_available, namespace)', - label='Namespace', - refresh='time', - ) - ) - .addRow( - g.row('CPU Usage') - .addPanel( - g.panel('CPU Usage') + - g.queryPanel('sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{namespace="$namespace"}) by (pod)', '{{pod}}') + - g.stack, - ) - ) - .addRow( - g.row('CPU Quota') - .addPanel( - g.panel('CPU Quota') + - g.tablePanel([ - 'sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{namespace="$namespace"}) by (pod)', - 'sum(kube_pod_windows_container_resource_cpu_cores_request{namespace="$namespace"}) by (pod)', - 'sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{namespace="$namespace"}) by (pod) / sum(kube_pod_windows_container_resource_cpu_cores_request{namespace="$namespace"}) by (pod)', - 'sum(kube_pod_windows_container_resource_cpu_cores_limit{namespace="$namespace"}) by (pod)', - 'sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{namespace="$namespace"}) by (pod) / sum(kube_pod_windows_container_resource_cpu_cores_limit{namespace="$namespace"}) by (pod)', - ], tableStyles { - 'Value #A': { alias: 'CPU Usage' }, - 'Value #B': { alias: 'CPU Requests' }, - 'Value #C': { alias: 'CPU Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'CPU Limits' }, - 'Value #E': { alias: 'CPU Limits %', unit: 'percentunit' }, - }) - ) - ) - .addRow( - g.row('Memory Usage') - .addPanel( - g.panel('Memory Usage') + - g.queryPanel('sum(windows_container_private_working_set_usage{namespace="$namespace"}) by (pod)', '{{pod}}') + - g.stack + - { yaxes: g.yaxes('decbytes') }, - ) - ) - .addRow( - g.row('Memory Quota') - .addPanel( - g.panel('Memory Quota') + - g.tablePanel([ - 'sum(windows_container_private_working_set_usage{namespace="$namespace"}) by (pod)', - 'sum(kube_pod_windows_container_resource_memory_request{namespace="$namespace"}) by (pod)', - 'sum(windows_container_private_working_set_usage{namespace="$namespace"}) by (pod) / sum(kube_pod_windows_container_resource_memory_request{namespace="$namespace"}) by (pod)', - 'sum(kube_pod_windows_container_resource_memory_limit{namespace="$namespace"}) by (pod)', - 'sum(windows_container_private_working_set_usage{namespace="$namespace"}) by (pod) / sum(kube_pod_windows_container_resource_memory_limit{namespace="$namespace"}) by (pod)', - ], tableStyles { - 'Value #A': { alias: 'Memory Usage', unit: 'decbytes' }, - 'Value #B': { alias: 'Memory Requests', unit: 'decbytes' }, - 'Value #C': { alias: 'Memory Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'Memory Limits', unit: 'decbytes' }, - 'Value #E': { alias: 'Memory Limits %', unit: 'percentunit' }, - }) - ) - ), - - 'k8s-resources-windows-pod.json': - local tableStyles = { - container: { - alias: 'Container', - }, - }; - - dashboard.new( - '%(dashboardNamePrefix)sCompute Resources / Pod(Windows)' % $._config.grafanaK8s, - uid=($._config.grafanaDashboardIDs['k8s-resources-windows-pod.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addTemplate( - template.new( - 'namespace', - '$datasource', - 'label_values(windows_container_available, namespace)', - label='Namespace', - refresh='time', - ) - ) - .addTemplate( - template.new( - 'pod', - '$datasource', - 'label_values(windows_container_available{namespace="$namespace"}, pod)', - label='Pod', - refresh='time', - ) - ) - .addRow( - g.row('CPU Usage') - .addPanel( - g.panel('CPU Usage') + - g.queryPanel('sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{namespace="$namespace", pod="$pod"}) by (container)', '{{container}}') + - g.stack, - ) - ) - .addRow( - g.row('CPU Quota') - .addPanel( - g.panel('CPU Quota') + - g.tablePanel([ - 'sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{namespace="$namespace", pod="$pod"}) by (container)', - 'sum(kube_pod_windows_container_resource_cpu_cores_request{namespace="$namespace", pod="$pod"}) by (container)', - 'sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{namespace="$namespace", pod="$pod"}) by (container) / sum(kube_pod_windows_container_resource_cpu_cores_request{namespace="$namespace", pod="$pod"}) by (container)', - 'sum(kube_pod_windows_container_resource_cpu_cores_limit{namespace="$namespace", pod="$pod"}) by (container)', - 'sum(namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate{namespace="$namespace", pod="$pod"}) by (container) / sum(kube_pod_windows_container_resource_cpu_cores_limit{namespace="$namespace", pod="$pod"}) by (container)', - ], tableStyles { - 'Value #A': { alias: 'CPU Usage' }, - 'Value #B': { alias: 'CPU Requests' }, - 'Value #C': { alias: 'CPU Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'CPU Limits' }, - 'Value #E': { alias: 'CPU Limits %', unit: 'percentunit' }, - }) - ) - ) - .addRow( - g.row('Memory Usage') - .addPanel( - g.panel('Memory Usage') + - g.queryPanel('sum(windows_container_private_working_set_usage{namespace="$namespace", pod="$pod"}) by (container)', '{{container}}') + - g.stack, - ) - ) - .addRow( - g.row('Memory Quota') - .addPanel( - g.panel('Memory Quota') + - g.tablePanel([ - 'sum(windows_container_private_working_set_usage{namespace="$namespace", pod="$pod"}) by (container)', - 'sum(kube_pod_windows_container_resource_memory_request{namespace="$namespace", pod="$pod"}) by (container)', - 'sum(windows_container_private_working_set_usage{namespace="$namespace", pod="$pod"}) by (container) / sum(kube_pod_windows_container_resource_memory_request{namespace="$namespace", pod="$pod"}) by (container)', - 'sum(kube_pod_windows_container_resource_memory_limit{namespace="$namespace", pod="$pod"}) by (container)', - 'sum(windows_container_private_working_set_usage{namespace="$namespace", pod="$pod"}) by (container) / sum(kube_pod_windows_container_resource_memory_limit{namespace="$namespace", pod="$pod"}) by (container)', - ], tableStyles { - 'Value #A': { alias: 'Memory Usage', unit: 'decbytes' }, - 'Value #B': { alias: 'Memory Requests', unit: 'decbytes' }, - 'Value #C': { alias: 'Memory Requests %', unit: 'percentunit' }, - 'Value #D': { alias: 'Memory Limits', unit: 'decbytes' }, - 'Value #E': { alias: 'Memory Limits %', unit: 'percentunit' }, - }) - ) - ) - .addRow( - g.row('Network I/O') - .addPanel( - graphPanel.new( - 'Network I/O', - datasource='$datasource', - format='bytes', - min=0, - legend_rightSide=true, - legend_alignAsTable=true, - legend_current=true, - legend_avg=true, - ) - .addTarget(prometheus.target( - 'sort_desc(sum by (container) (rate(windows_container_network_receive_bytes_total{namespace="$namespace", pod="$pod"}[1m])))' % $._config, - legendFormat='Received : {{ container }}', - )) - .addTarget(prometheus.target( - 'sort_desc(sum by (container) (rate(windows_container_network_transmit_bytes_total{namespace="$namespace", pod="$pod"}[1m])))' % $._config, - legendFormat='Transmitted : {{ container }}', - )) - ) - ), - - 'k8s-windows-cluster-rsrc-use.json': - local legendLink = '%(prefix)s/d/%(uid)s/k8s-windows-node-rsrc-use' % { prefix: $._config.grafanaK8s.linkPrefix, uid: std.md5('k8s-windows-node-rsrc-use.json') }; - - dashboard.new( - '%(dashboardNamePrefix)sUSE Method / Cluster(Windows)' % $._config.grafanaK8s, - uid=($._config.grafanaDashboardIDs['k8s-windows-cluster-rsrc-use.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addRow( - g.row('CPU') - .addPanel( - g.panel('CPU Utilisation') + - g.queryPanel('node:windows_node_cpu_utilisation:avg1m * node:windows_node_num_cpu:sum / scalar(sum(node:windows_node_num_cpu:sum))', '{{instance}}', legendLink) + - g.stack + - { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, - ) - ) - .addRow( - g.row('Memory') - .addPanel( - g.panel('Memory Utilisation') + - g.queryPanel('node:windows_node_memory_utilisation:ratio', '{{instance}}', legendLink) + - g.stack + - { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, - ) - .addPanel( - g.panel('Memory Saturation (Swap I/O Pages)') + - g.queryPanel('node:windows_node_memory_swap_io_pages:irate', '{{instance}}', legendLink) + - g.stack + - { yaxes: g.yaxes('short') }, - ) - ) - .addRow( - g.row('Disk') - .addPanel( - g.panel('Disk IO Utilisation') + - // Full utilisation would be all disks on each node spending an average of - // 1 sec per second doing I/O, normalize by node count for stacked charts - g.queryPanel('node:windows_node_disk_utilisation:avg_irate / scalar(node:windows_node:sum)', '{{instance}}', legendLink) + - g.stack + - { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, - ) - ) - .addRow( - g.row('Network') - .addPanel( - g.panel('Net Utilisation (Transmitted)') + - g.queryPanel('node:windows_node_net_utilisation:sum_irate', '{{instance}}', legendLink) + - g.stack + - { yaxes: g.yaxes('Bps') }, - ) - .addPanel( - g.panel('Net Saturation (Dropped)') + - g.queryPanel('node:windows_node_net_saturation:sum_irate', '{{instance}}', legendLink) + - g.stack + - { yaxes: g.yaxes('Bps') }, - ) - ) - .addRow( - g.row('Storage') - .addPanel( - g.panel('Disk Capacity') + - g.queryPanel( - ||| - sum by (instance)(node:windows_node_filesystem_usage:) - ||| % $._config, '{{instance}}', legendLink - ) + - g.stack + - { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, - ), - ), - - 'k8s-windows-node-rsrc-use.json': - dashboard.new( - '%(dashboardNamePrefix)sUSE Method / Node(Windows)' % $._config.grafanaK8s, - uid=($._config.grafanaDashboardIDs['k8s-windows-node-rsrc-use.json']), - tags=($._config.grafanaK8s.dashboardTags), - ).addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addTemplate( - template.new( - 'instance', - '$datasource', - 'label_values(wmi_system_system_up_time, instance)', - label='Instance', - refresh='time', - ) - ) - .addRow( - g.row('CPU') - .addPanel( - g.panel('CPU Utilisation') + - g.queryPanel('node:windows_node_cpu_utilisation:avg1m{instance="$instance"}', 'Utilisation') + - { yaxes: g.yaxes('percentunit') }, - ) - .addPanel( - g.panel('CPU Usage Per Core') + - g.queryPanel('sum by (core) (irate(wmi_cpu_time_total{%(wmiExporterSelector)s, mode!="idle", instance="$instance"}[5m]))' % $._config, '{{core}}') + - { yaxes: g.yaxes('percentunit') }, - ) - ) - .addRow( - g.row('Memory') - .addPanel( - g.panel('Memory Utilisation %') + - g.queryPanel('node:windows_node_memory_utilisation:{instance="$instance"}', 'Memory') + - { yaxes: g.yaxes('percentunit') }, - ) - .addPanel( - graphPanel.new('Memory Usage', - datasource='$datasource', - format='bytes',) - .addTarget(prometheus.target( - ||| - max( - wmi_os_visible_memory_bytes{%(wmiExporterSelector)s, instance="$instance"} - - wmi_memory_available_bytes{%(wmiExporterSelector)s, instance="$instance"} - ) - ||| % $._config, legendFormat='memory used' - )) - .addTarget(prometheus.target('max(node:windows_node_memory_totalCached_bytes:sum{%(wmiExporterSelector)s, instance="$instance"})' % $._config, legendFormat='memory cached')) - .addTarget(prometheus.target('max(wmi_memory_available_bytes{%(wmiExporterSelector)s, instance="$instance"})' % $._config, legendFormat='memory free')) - ) - .addPanel( - g.panel('Memory Saturation (Swap I/O) Pages') + - g.queryPanel('node:windows_node_memory_swap_io_pages:irate{instance="$instance"}', 'Swap IO') + - { yaxes: g.yaxes('short') }, - ) - ) - .addRow( - g.row('Disk') - .addPanel( - g.panel('Disk IO Utilisation') + - g.queryPanel('node:windows_node_disk_utilisation:avg_irate{instance="$instance"}', 'Utilisation') + - { yaxes: g.yaxes('percentunit') }, - ) - .addPanel( - graphPanel.new('Disk I/O',) - .addTarget(prometheus.target('max(rate(wmi_logical_disk_read_bytes_total{%(wmiExporterSelector)s, instance="$instance"}[2m]))' % $._config, legendFormat='read')) - .addTarget(prometheus.target('max(rate(wmi_logical_disk_write_bytes_total{%(wmiExporterSelector)s, instance="$instance"}[2m]))' % $._config, legendFormat='written')) - .addTarget(prometheus.target('max(rate(wmi_logical_disk_read_seconds_total{%(wmiExporterSelector)s, instance="$instance"}[2m]) + rate(wmi_logical_disk_write_seconds_total{%(wmiExporterSelector)s, instance="$instance"}[2m]))' % $._config, legendFormat='io time')) + - { - seriesOverrides: [ - { - alias: 'read', - yaxis: 1, - }, - { - alias: 'io time', - yaxis: 2, - }, - ], - yaxes: [ - self.yaxe(format='bytes'), - self.yaxe(format='ms'), - ], - } - ) - ) - .addRow( - g.row('Net') - .addPanel( - g.panel('Net Utilisation (Transmitted)') + - g.queryPanel('node:windows_node_net_utilisation:sum_irate{instance="$instance"}', 'Utilisation') + - { yaxes: g.yaxes('Bps') }, - ) - .addPanel( - g.panel('Net Saturation (Dropped)') + - g.queryPanel('node:windows_node_net_saturation:sum_irate{instance="$instance"}', 'Saturation') + - { yaxes: g.yaxes('Bps') }, - ) - ) - .addRow( - g.row('Disk') - .addPanel( - g.panel('Disk Utilisation') + - g.queryPanel( - ||| - node:windows_node_filesystem_usage:{instance="$instance"} - ||| % $._config, - '{{volume}}', - ) + - { yaxes: g.yaxes('percentunit') }, - ), - ), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/jsonnetfile.json b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/jsonnetfile.json deleted file mode 100644 index 45326aad..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/jsonnetfile.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "dependencies": [ - { - "name": "grafonnet", - "source": { - "git": { - "remote": "https://github.com/grafana/grafonnet-lib", - "subdir": "grafonnet" - } - }, - "version": "master" - }, - { - "name": "grafana-builder", - "source": { - "git": { - "remote": "https://github.com/kausalco/public", - "subdir": "grafana-builder" - } - }, - "version": "master" - } - ] -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/alerts.jsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/alerts.jsonnet deleted file mode 100644 index d396a38c..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/alerts.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.manifestYamlDoc((import '../mixin.libsonnet').prometheusAlerts) diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/dashboards.jsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/dashboards.jsonnet deleted file mode 100644 index dadaebe9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/dashboards.jsonnet +++ /dev/null @@ -1,6 +0,0 @@ -local dashboards = (import '../mixin.libsonnet').grafanaDashboards; - -{ - [name]: dashboards[name] - for name in std.objectFields(dashboards) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/promgrafonnet/gauge.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/promgrafonnet/gauge.libsonnet deleted file mode 100644 index abe7f859..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/promgrafonnet/gauge.libsonnet +++ /dev/null @@ -1,60 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local singlestat = grafana.singlestat; -local prometheus = grafana.prometheus; - -{ - new(title, query):: - singlestat.new( - title, - datasource='$datasource', - span=3, - format='percent', - valueName='current', - colors=[ - 'rgba(245, 54, 54, 0.9)', - 'rgba(237, 129, 40, 0.89)', - 'rgba(50, 172, 45, 0.97)', - ], - thresholds='50, 80', - valueMaps=[ - { - op: '=', - text: 'N/A', - value: 'null', - }, - ], - ) - .addTarget( - prometheus.target( - query - ) - ) + { - gauge: { - maxValue: 100, - minValue: 0, - show: true, - thresholdLabels: false, - thresholdMarkers: true, - }, - withTextNullValue(text):: self { - valueMaps: [ - { - op: '=', - text: text, - value: 'null', - }, - ], - }, - withSpanSize(size):: self { - span: size, - }, - withLowerBeingBetter():: self { - colors: [ - 'rgba(50, 172, 45, 0.97)', - 'rgba(237, 129, 40, 0.89)', - 'rgba(245, 54, 54, 0.9)', - ], - thresholds: '80, 90', - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/promgrafonnet/numbersinglestat.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/promgrafonnet/numbersinglestat.libsonnet deleted file mode 100644 index 771e4bd1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/promgrafonnet/numbersinglestat.libsonnet +++ /dev/null @@ -1,48 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local singlestat = grafana.singlestat; -local prometheus = grafana.prometheus; - -{ - new(title, query):: - singlestat.new( - title, - datasource='$datasource', - span=3, - valueName='current', - valueMaps=[ - { - op: '=', - text: '0', - value: 'null', - }, - ], - ) - .addTarget( - prometheus.target( - query - ) - ) + { - withTextNullValue(text):: self { - valueMaps: [ - { - op: '=', - text: text, - value: 'null', - }, - ], - }, - withSpanSize(size):: self { - span: size, - }, - withPostfix(postfix):: self { - postfix: postfix, - }, - withSparkline():: self { - sparkline: { - show: true, - lineColor: 'rgb(31, 120, 193)', - fillColor: 'rgba(31, 118, 189, 0.18)', - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/promgrafonnet/promgrafonnet.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/promgrafonnet/promgrafonnet.libsonnet deleted file mode 100644 index 013ff42b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/promgrafonnet/promgrafonnet.libsonnet +++ /dev/null @@ -1,5 +0,0 @@ -{ - numbersinglestat:: import 'numbersinglestat.libsonnet', - gauge:: import 'gauge.libsonnet', - percentlinegraph:: import 'percentlinegraph.libsonnet', -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/rules.jsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/rules.jsonnet deleted file mode 100644 index 2d7fa91f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/rules.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.manifestYamlDoc((import '../mixin.libsonnet').prometheusRules) diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/utils.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/utils.libsonnet deleted file mode 100644 index 700ada95..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/lib/utils.libsonnet +++ /dev/null @@ -1,13 +0,0 @@ -{ - mapRuleGroups(f): { - groups: [ - group { - rules: [ - f(rule) - for rule in super.rules - ], - } - for group in super.groups - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/mixin.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/mixin.libsonnet deleted file mode 100644 index b9831f93..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/mixin.libsonnet +++ /dev/null @@ -1,4 +0,0 @@ -(import 'config.libsonnet') + -(import 'alerts/alerts.libsonnet') + -(import 'dashboards/dashboards.libsonnet') + -(import 'rules/rules.libsonnet') diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/rules/rules.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/rules/rules.libsonnet deleted file mode 100644 index c3d6034d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/rules/rules.libsonnet +++ /dev/null @@ -1,173 +0,0 @@ -{ - prometheusRules+:: { - groups+: [ - { - name: 'k8s.rules', - rules: [ - { - record: 'namespace:container_cpu_usage_seconds_total:sum_rate', - expr: ||| - sum(rate(container_cpu_usage_seconds_total{%(cadvisorSelector)s, image!="", container!="POD"}[5m])) by (namespace) - ||| % $._config, - }, - { - // Reduces cardinality of this timeseries by #cores, which makes it - // more useable in dashboards. Also, allows us to do things like - // quantile_over_time(...) which would otherwise not be possible. - record: 'namespace_pod_container:container_cpu_usage_seconds_total:sum_rate', - expr: ||| - sum by (namespace, pod, container) ( - rate(container_cpu_usage_seconds_total{%(cadvisorSelector)s, image!="", container!="POD"}[5m]) - ) - ||| % $._config, - }, - { - record: 'namespace:container_memory_usage_bytes:sum', - expr: ||| - sum(container_memory_usage_bytes{%(cadvisorSelector)s, image!="", container!="POD"}) by (namespace) - ||| % $._config, - }, - { - record: 'namespace:kube_pod_container_resource_requests_memory_bytes:sum', - expr: ||| - sum by (namespace, label_name) ( - sum(kube_pod_container_resource_requests_memory_bytes{%(kubeStateMetricsSelector)s} * on (endpoint, instance, job, namespace, pod, service) group_left(phase) (kube_pod_status_phase{phase=~"^(Pending|Running)$"} == 1)) by (namespace, pod) - * on (namespace, pod) - group_left(label_name) kube_pod_labels{%(kubeStateMetricsSelector)s} - ) - ||| % $._config, - }, - { - record: 'namespace:kube_pod_container_resource_requests_cpu_cores:sum', - expr: ||| - sum by (namespace, label_name) ( - sum(kube_pod_container_resource_requests_cpu_cores{%(kubeStateMetricsSelector)s} * on (endpoint, instance, job, namespace, pod, service) group_left(phase) (kube_pod_status_phase{phase=~"^(Pending|Running)$"} == 1)) by (namespace, pod) - * on (namespace, pod) - group_left(label_name) kube_pod_labels{%(kubeStateMetricsSelector)s} - ) - ||| % $._config, - }, - // workload aggregation for deployments - { - record: 'mixin_pod_workload', - expr: ||| - sum( - label_replace( - label_replace( - kube_pod_owner{%(kubeStateMetricsSelector)s, owner_kind="ReplicaSet"}, - "replicaset", "$1", "owner_name", "(.*)" - ) * on(replicaset, namespace) group_left(owner_name) kube_replicaset_owner{%(kubeStateMetricsSelector)s}, - "workload", "$1", "owner_name", "(.*)" - ) - ) by (namespace, workload, pod) - ||| % $._config, - labels: { - workload_type: 'deployment', - }, - }, - { - record: 'mixin_pod_workload', - expr: ||| - sum( - label_replace( - kube_pod_owner{%(kubeStateMetricsSelector)s, owner_kind="DaemonSet"}, - "workload", "$1", "owner_name", "(.*)" - ) - ) by (namespace, workload, pod) - ||| % $._config, - labels: { - workload_type: 'daemonset', - }, - }, - { - record: 'mixin_pod_workload', - expr: ||| - sum( - label_replace( - kube_pod_owner{%(kubeStateMetricsSelector)s, owner_kind="StatefulSet"}, - "workload", "$1", "owner_name", "(.*)" - ) - ) by (namespace, workload, pod) - ||| % $._config, - labels: { - workload_type: 'statefulset', - }, - }, - ], - }, - { - name: 'kube-scheduler.rules', - rules: [ - { - record: 'cluster_quantile:%s:histogram_quantile' % metric, - expr: ||| - histogram_quantile(%(quantile)s, sum(rate(%(metric)s_bucket{%(kubeSchedulerSelector)s}[5m])) without(instance, %(podLabel)s)) - ||| % ({ quantile: quantile, metric: metric } + $._config), - labels: { - quantile: quantile, - }, - } - for quantile in ['0.99', '0.9', '0.5'] - for metric in [ - 'scheduler_e2e_scheduling_duration_seconds', - 'scheduler_scheduling_algorithm_duration_seconds', - 'scheduler_binding_duration_seconds', - ] - ], - }, - { - name: 'kube-apiserver.rules', - rules: [ - { - record: 'cluster_quantile:apiserver_request_duration_seconds:histogram_quantile', - expr: ||| - histogram_quantile(%(quantile)s, sum(rate(apiserver_request_duration_seconds_bucket{%(kubeApiserverSelector)s}[5m])) without(instance, %(podLabel)s)) - ||| % ({ quantile: quantile } + $._config), - labels: { - quantile: quantile, - }, - } - for quantile in ['0.99', '0.9', '0.5'] - ], - }, - { - name: 'node.rules', - rules: [ - { - // Number of nodes in the cluster - // SINCE 2018-02-08 - record: ':kube_pod_info_node_count:', - expr: 'sum(min(kube_pod_info) by (node))', - }, - { - // This rule results in the tuples (node, namespace, instance) => 1; - // it is used to calculate per-node metrics, given namespace & instance. - record: 'node_namespace_pod:kube_pod_info:', - expr: ||| - max(label_replace(kube_pod_info{%(kubeStateMetricsSelector)s}, "%(podLabel)s", "$1", "pod", "(.*)")) by (node, namespace, %(podLabel)s) - ||| % $._config, - }, - { - // This rule gives the number of CPUs per node. - record: 'node:node_num_cpu:sum', - expr: ||| - count by (node) (sum by (node, cpu) ( - node_cpu_seconds_total{%(nodeExporterSelector)s} - * on (namespace, %(podLabel)s) group_left(node) - node_namespace_pod:kube_pod_info: - )) - ||| % $._config, - }, - // Add separate rules for Free, so we can aggregate across clusters in dashboards. - // TODO: adjust recording rule name to match best practices - { - record: ':node_memory_MemFreeCachedBuffers_bytes:sum', - expr: ||| - sum(node_memory_MemFree_bytes{%(nodeExporterSelector)s} + node_memory_Cached_bytes{%(nodeExporterSelector)s} + node_memory_Buffers_bytes{%(nodeExporterSelector)s}) - ||| % $._config, - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/rules/windows-rules.libsonnet b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/rules/windows-rules.libsonnet deleted file mode 100644 index cf1f6df8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/rules/windows-rules.libsonnet +++ /dev/null @@ -1,252 +0,0 @@ -{ - prometheusRules+:: { - groups+: [ - { - name: 'windows.node.rules', - rules: [ - { - // This rule gives the number of windows nodes - record: 'node:windows_node:sum', - expr: ||| - count ( - wmi_system_system_up_time{%(wmiExporterSelector)s} - ) - ||| % $._config, - }, - { - // This rule gives the number of CPUs per node. - record: 'node:windows_node_num_cpu:sum', - expr: ||| - count by (instance) (sum by (instance, core) ( - wmi_cpu_time_total{%(wmiExporterSelector)s} - )) - ||| % $._config, - }, - { - // CPU utilisation is % CPU is not idle. - record: ':windows_node_cpu_utilisation:avg1m', - expr: ||| - 1 - avg(rate(wmi_cpu_time_total{%(wmiExporterSelector)s,mode="idle"}[1m])) - ||| % $._config, - }, - { - // CPU utilisation is % CPU is not idle. - record: 'node:windows_node_cpu_utilisation:avg1m', - expr: ||| - 1 - avg by (instance) ( - rate(wmi_cpu_time_total{%(wmiExporterSelector)s,mode="idle"}[1m]) - ) - ||| % $._config, - }, - { - record: ':windows_node_memory_utilisation:', - expr: ||| - 1 - - sum(wmi_memory_available_bytes{%(wmiExporterSelector)s}) - / - sum(wmi_os_visible_memory_bytes{%(wmiExporterSelector)s}) - ||| % $._config, - }, - // Add separate rules for Free & Total, so we can aggregate across clusters - // in dashboards. - { - record: ':windows_node_memory_MemFreeCached_bytes:sum', - expr: ||| - sum(wmi_memory_available_bytes{%(wmiExporterSelector)s} + wmi_memory_cache_bytes{%(wmiExporterSelector)s}) - ||| % $._config, - }, - { - record: 'node:windows_node_memory_totalCached_bytes:sum', - expr: ||| - (wmi_memory_cache_bytes{%(wmiExporterSelector)s} + wmi_memory_modified_page_list_bytes{%(wmiExporterSelector)s} + wmi_memory_standby_cache_core_bytes{%(wmiExporterSelector)s} + wmi_memory_standby_cache_normal_priority_bytes{%(wmiExporterSelector)s} + wmi_memory_standby_cache_reserve_bytes{%(wmiExporterSelector)s}) - ||| % $._config, - }, - { - record: ':windows_node_memory_MemTotal_bytes:sum', - expr: ||| - sum(wmi_os_visible_memory_bytes{%(wmiExporterSelector)s}) - ||| % $._config, - }, - { - // Available memory per node - // SINCE 2018-02-08 - record: 'node:windows_node_memory_bytes_available:sum', - expr: ||| - sum by (instance) ( - (wmi_memory_available_bytes{%(wmiExporterSelector)s}) - ) - ||| % $._config, - }, - { - // Total memory per node - record: 'node:windows_node_memory_bytes_total:sum', - expr: ||| - sum by (instance) ( - wmi_os_visible_memory_bytes{%(wmiExporterSelector)s} - ) - ||| % $._config, - }, - { - // Memory utilisation per node, normalized by per-node memory - record: 'node:windows_node_memory_utilisation:ratio', - expr: ||| - (node:windows_node_memory_bytes_total:sum - node:windows_node_memory_bytes_available:sum) - / - scalar(sum(node:windows_node_memory_bytes_total:sum)) - |||, - }, - { - record: 'node:windows_node_memory_utilisation:', - expr: ||| - 1 - (node:windows_node_memory_bytes_available:sum / node:windows_node_memory_bytes_total:sum) - ||| % $._config, - }, - { - record: 'node:windows_node_memory_swap_io_pages:irate', - expr: ||| - irate(wmi_memory_swap_page_operations_total{%(wmiExporterSelector)s}[5m]) - ||| % $._config, - }, - { - // Disk utilisation (ms spent, by rate() it's bound by 1 second) - record: ':windows_node_disk_utilisation:avg_irate', - expr: ||| - avg(irate(wmi_logical_disk_read_seconds_total{%(wmiExporterSelector)s}[1m]) + - irate(wmi_logical_disk_write_seconds_total{%(wmiExporterSelector)s}[1m]) - ) - ||| % $._config, - }, - { - // Disk utilisation (ms spent, by rate() it's bound by 1 second) - record: 'node:windows_node_disk_utilisation:avg_irate', - expr: ||| - avg by (instance) ( - (irate(wmi_logical_disk_read_seconds_total{%(wmiExporterSelector)s}[1m]) + - irate(wmi_logical_disk_write_seconds_total{%(wmiExporterSelector)s}[1m])) - ) - ||| % $._config, - }, - { - record: 'node:windows_node_filesystem_usage:', - expr: ||| - max by (instance,volume)( - (wmi_logical_disk_size_bytes{%(wmiExporterSelector)s} - - wmi_logical_disk_free_bytes{%(wmiExporterSelector)s}) - / wmi_logical_disk_size_bytes{%(wmiExporterSelector)s} - ) - ||| % $._config, - }, - { - record: 'node:windows_node_filesystem_avail:', - expr: ||| - max by (instance, volume) (wmi_logical_disk_free_bytes{%(wmiExporterSelector)s} / wmi_logical_disk_size_bytes{%(wmiExporterSelector)s}) - ||| % $._config, - }, - { - record: ':windows_node_net_utilisation:sum_irate', - expr: ||| - sum(irate(wmi_net_bytes_total{%(wmiExporterSelector)s}[1m])) - ||| % $._config, - }, - { - record: 'node:windows_node_net_utilisation:sum_irate', - expr: ||| - sum by (instance) ( - (irate(wmi_net_bytes_total{%(wmiExporterSelector)s}[1m])) - ) - ||| % $._config, - }, - { - record: ':windows_node_net_saturation:sum_irate', - expr: ||| - sum(irate(wmi_net_packets_received_discarded{%(wmiExporterSelector)s}[1m])) + - sum(irate(wmi_net_packets_outbound_discarded{%(wmiExporterSelector)s}[1m])) - ||| % $._config, - }, - { - record: 'node:windows_node_net_saturation:sum_irate', - expr: ||| - sum by (instance) ( - (irate(wmi_net_packets_received_discarded{%(wmiExporterSelector)s}[1m]) + - irate(wmi_net_packets_outbound_discarded{%(wmiExporterSelector)s}[1m])) - ) - ||| % $._config, - }, - ], - }, - { - name: 'windows.pod.rules', - rules: [ - { - record: 'windows_container_available', - expr: ||| - wmi_container_available{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace) - ||| % $._config, - }, - { - record: 'windows_container_total_runtime', - expr: ||| - wmi_container_cpu_usage_seconds_total{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace) - ||| % $._config, - }, - { - record: 'windows_container_memory_usage', - expr: ||| - wmi_container_memory_usage_commit_bytes{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace) - ||| % $._config, - }, - { - record: 'windows_container_private_working_set_usage', - expr: ||| - wmi_container_memory_usage_private_working_set_bytes{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace) - ||| % $._config, - }, - { - record: 'windows_container_network_receive_bytes_total', - expr: ||| - wmi_container_network_receive_bytes_total{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace) - ||| % $._config, - }, - { - record: 'windows_container_network_transmit_bytes_total', - expr: ||| - wmi_container_network_transmit_bytes_total{%(wmiExporterSelector)s} * on(container_id) group_left(container, pod, namespace) max(kube_pod_container_info{%(kubeStateMetricsSelector)s}) by(container, container_id, pod, namespace) - ||| % $._config, - }, - { - record: 'kube_pod_windows_container_resource_memory_request', - expr: ||| - kube_pod_container_resource_requests_memory_bytes {%(kubeStateMetricsSelector)s} * on(container,pod,namespace) (windows_container_available) - ||| % $._config, - }, - { - record: 'kube_pod_windows_container_resource_memory_limit', - expr: ||| - kube_pod_container_resource_limits_memory_bytes {%(kubeStateMetricsSelector)s} * on(container,pod,namespace) (windows_container_available) - ||| % $._config, - }, - { - record: 'kube_pod_windows_container_resource_cpu_cores_request', - expr: ||| - kube_pod_container_resource_requests_cpu_cores {%(kubeStateMetricsSelector)s} * on(container,pod,namespace) (windows_container_available) - ||| % $._config, - }, - { - record: 'kube_pod_windows_container_resource_cpu_cores_limit', - expr: ||| - kube_pod_container_resource_limits_cpu_cores {%(kubeStateMetricsSelector)s} * on(container,pod,namespace) (windows_container_available) - ||| % $._config, - }, - { - record: 'namespace_pod_container:windows_container_cpu_usage_seconds_total:sum_rate', - expr: ||| - sum by (namespace, pod, container) ( - rate(windows_container_total_runtime{}[5m]) - ) - ||| % $._config, - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/runbook.md b/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/runbook.md deleted file mode 100644 index 1dbd6cbe..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/kubernetes-mixin/runbook.md +++ /dev/null @@ -1,133 +0,0 @@ -# Kubernetes Alert Runbooks - -As Rob Ewaschuk [puts it](https://docs.google.com/document/d/199PqyG3UsyXlwieHaqbGiWVa8eMWi8zzAn0YfcApr8Q/edit#): -> Playbooks (or runbooks) are an important part of an alerting system; it's best to have an entry for each alert or family of alerts that catch a symptom, which can further explain what the alert means and how it might be addressed. - -It is a recommended practice that you add an annotation of "runbook" to every prometheus alert with a link to a clear description of it's meaning and suggested remediation or mitigation. While some problems will require private and custom solutions, most common problems have common solutions. In practice, you'll want to automate many of the procedures (rather than leaving them in a wiki), but even a self-correcting problem should provide an explanation as to what happened and why to observers. - -Matthew Skelton & Rob Thatcher have an excellent [run book template](https://github.com/SkeltonThatcher/run-book-template). This template will help teams to fully consider most aspects of reliably operating most interesting software systems, if only to confirm that "this section definitely does not apply here" - a valuable realization. - -This page collects this repositories alerts and begins the process of describing what they mean and how it might be addressed. Links from alerts to this page are added [automatically](https://github.com/kubernetes-monitoring/kubernetes-mixin/blob/master/alerts/add-runbook-links.libsonnet). - -### Group Name: "kubernetes-absent" -##### Alert Name: "KubeAPIDown" -+ *Message*: `KubeAPI has disappeared from Prometheus target discovery.` -+ *Severity*: critical -##### Alert Name: "KubeControllerManagerDown" -+ *Message*: `KubeControllerManager has disappeared from Prometheus target discovery.` -+ *Severity*: critical -+ *Runbook*: [Link](https://coreos.com/tectonic/docs/latest/troubleshooting/controller-recovery.html#recovering-a-controller-manager) -##### Alert Name: KubeSchedulerDown -+ *Message*: `KubeScheduler has disappeared from Prometheus target discovery` -+ *Severity*: critical -+ *Runbook*: [Link](https://coreos.com/tectonic/docs/latest/troubleshooting/controller-recovery.html#recovering-a-scheduler) -##### Alert Name: KubeletDown -+ *Message*: `Kubelet has disappeared from Prometheus target discovery.` -+ *Severity*: critical -### Group Name: kubernetes-apps -##### Alert Name: KubePodCrashLooping -+ *Message*: `{{ $labels.namespace }}/{{ $labels.pod }} ({{ $labels.container }}) is restarting {{ printf \"%.2f\" $value }} / second` -+ *Severity*: critical -##### Alert Name: "KubePodNotReady" -+ *Message*: `{{ $labels.namespace }}/{{ $labels.pod }} is not ready.` -+ *Severity*: critical -##### Alert Name: "KubeDeploymentGenerationMismatch" -+ *Message*: `Deployment {{ $labels.namespace }}/{{ $labels.deployment }} generation mismatch` -+ *Severity*: critical -##### Alert Name: "KubeDeploymentReplicasMismatch" -+ *Message*: `Deployment {{ $labels.namespace }}/{{ $labels.deployment }} replica mismatch` -+ *Severity*: critical -##### Alert Name: "KubeStatefulSetReplicasMismatch" -+ *Message*: `StatefulSet {{ $labels.namespace }}/{{ $labels.statefulset }} replica mismatch` -+ *Severity*: critical -##### Alert Name: "KubeStatefulSetGenerationMismatch" -+ *Message*: `StatefulSet {{ $labels.namespace }}/{{ $labels.statefulset }} generation mismatch` -+ *Severity*: critical -##### Alert Name: "KubeDaemonSetRolloutStuck" -+ *Message*: `Only {{$value}}% of desired pods scheduled and ready for daemon set {{$labels.namespace}}/{{$labels.daemonset}}` -+ *Severity*: critical -##### Alert Name: "KubeDaemonSetNotScheduled" -+ *Message*: `A number of pods of daemonset {{$labels.namespace}}/{{$labels.daemonset}} are not scheduled.` -+ *Severity*: warning - -##### Alert Name: "KubeDaemonSetMisScheduled" -+ *Message*: `A number of pods of daemonset {{$labels.namespace}}/{{$labels.daemonset}} are running where they are not supposed to run.` -+ *Severity*: warning - -##### Alert Name: "KubeCronJobRunning" -+ *Message*: `CronJob {{ $labels.namespace }}/{{ $labels.cronjob }} is taking more than 1h to complete.` -+ *Severity*: warning -+ *Action*: Check the cronjob using `kubectl describe cronjob ` and look at the pod logs using `kubectl logs ` for further information. - -##### Alert Name: "KubeJobCompletion" -+ *Message*: `Job {{ $labels.namespace }}/{{ $labels.job_name }} is taking more than 1h to complete.` -+ *Severity*: warning -+ *Action*: Check the job using `kubectl describe job ` and look at the pod logs using `kubectl logs ` for further information. - -##### Alert Name: "KubeJobFailed" -+ *Message*: `Job {{ $labels.namespace }}/{{ $labels.job_name }} failed to complete.` -+ *Severity*: warning -+ *Action*: Check the job using `kubectl describe job ` and look at the pod logs using `kubectl logs ` for further information. - -### Group Name: "kubernetes-resources" -##### Alert Name: "KubeCPUOvercommit" -+ *Message*: `Overcommited CPU resource requests on Pods, cannot tolerate node failure.` -+ *Severity*: warning -##### Alert Name: "KubeMemOvercommit" -+ *Message*: `Overcommited Memory resource requests on Pods, cannot tolerate node failure.` -+ *Severity*: warning -##### Alert Name: "KubeCPUOvercommit" -+ *Message*: `Overcommited CPU resource request quota on Namespaces.` -+ *Severity*: warning -##### Alert Name: "KubeMemOvercommit" -+ *Message*: `Overcommited Memory resource request quota on Namespaces.` -+ *Severity*: warning -##### Alert Name: "KubeQuotaExceeded" -+ *Message*: `{{ printf \"%0.0f\" $value }}% usage of {{ $labels.resource }} in namespace {{ $labels.namespace }}.` -+ *Severity*: warning -### Group Name: "kubernetes-storage" -##### Alert Name: "KubePersistentVolumeUsageCritical" -+ *Message*: `The persistent volume claimed by {{ $labels.persistentvolumeclaim }} in namespace {{ $labels.namespace }} has {{ printf \"%0.0f\" $value }}% free.` -+ *Severity*: critical -##### Alert Name: "KubePersistentVolumeFullInFourDays" -+ *Message*: `Based on recent sampling, the persistent volume claimed by {{ $labels.persistentvolumeclaim }} in namespace {{ $labels.namespace }} is expected to fill up within four days.` -+ *Severity*: critical -### Group Name: "kubernetes-system" -##### Alert Name: "KubeNodeNotReady" -+ *Message*: `{{ $labels.node }} has been unready for more than an 15 minutes"` -+ *Severity*: warning -##### Alert Name: "KubeVersionMismatch" -+ *Message*: `There are {{ $value }} different versions of Kubernetes components running.` -+ *Severity*: warning -##### Alert Name: "KubeClientErrors" -+ *Message*: `Kubernetes API server client '{{ $labels.job }}/{{ $labels.instance }}' is experiencing {{ printf \"%0.0f\" $value }}% errors.'` -+ *Severity*: warning -##### Alert Name: "KubeClientErrors" -+ *Message*: `Kubernetes API server client '{{ $labels.job }}/{{ $labels.instance }}' is experiencing {{ printf \"%0.0f\" $value }} errors / sec.'` -+ *Severity*: warning -##### Alert Name: "KubeletTooManyPods" -+ *Message*: `Kubelet {{$labels.instance}} is running {{$value}} pods, close to the limit of 110.` -+ *Severity*: warning -##### Alert Name: "KubeAPILatencyHigh" -+ *Message*: `The API server has a 99th percentile latency of {{ $value }} seconds for {{$labels.verb}} {{$labels.resource}}.` -+ *Severity*: warning -##### Alert Name: "KubeAPILatencyHigh" -+ *Message*: `The API server has a 99th percentile latency of {{ $value }} seconds for {{$labels.verb}} {{$labels.resource}}.` -+ *Severity*: critical -##### Alert Name: "KubeAPIErrorsHigh" -+ *Message*: `API server is erroring for {{ $value }}% of requests.` -+ *Severity*: critical -##### Alert Name: "KubeAPIErrorsHigh" -+ *Message*: `API server is erroring for {{ $value }}% of requests.` -+ *Severity*: warning -##### Alert Name: "KubeClientCertificateExpiration" -+ *Message*: `A client certificate used to authenticate to the apiserver is expiring in less than 7 days.` -+ *Severity*: warning -##### Alert Name: "KubeClientCertificateExpiration" -+ *Message*: `A client certificate used to authenticate to the apiserver is expiring in less than 1 day.` -+ *Severity*: critical - -## Other Kubernetes Runbooks and troubleshooting -+ [Troubleshoot Clusters ](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-cluster/) -+ [Cloud.gov Kubernetes Runbook ](https://cloud.gov/docs/ops/runbook/troubleshooting-kubernetes/) -+ [Recover a Broken Cluster](https://codefresh.io/Kubernetes-Tutorial/recover-broken-kubernetes-cluster/) diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/.gitignore b/sources/kube-prometheus/jsonnet/vendor/node-mixin/.gitignore deleted file mode 100644 index 522b99f0..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -jsonnetfile.lock.json -vendor -*.yaml -dashboards_out diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/Makefile b/sources/kube-prometheus/jsonnet/vendor/node-mixin/Makefile deleted file mode 100644 index 012a4b50..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -JSONNET_FMT := jsonnetfmt -n 2 --max-blank-lines 2 --string-style s --comment-style s - -all: fmt node_alerts.yaml node_rules.yaml dashboards_out lint - -fmt: - find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \ - xargs -n 1 -- $(JSONNET_FMT) -i - -node_alerts.yaml: mixin.libsonnet config.libsonnet $(wildcard alerts/*) - jsonnet -S alerts.jsonnet > $@ - -node_rules.yaml: mixin.libsonnet config.libsonnet $(wildcard rules/*) - jsonnet -S rules.jsonnet > $@ - -dashboards_out: mixin.libsonnet config.libsonnet $(wildcard dashboards/*) - @mkdir -p dashboards_out - jsonnet -J vendor -m dashboards_out dashboards.jsonnet - -lint: node_alerts.yaml node_rules.yaml - find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \ - while read f; do \ - $(JSONNET_FMT) "$$f" | diff -u "$$f" -; \ - done - - promtool check rules node_alerts.yaml node_rules.yaml - -clean: - rm -rf dashboards_out node_alerts.yaml node_rules.yaml diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/README.md b/sources/kube-prometheus/jsonnet/vendor/node-mixin/README.md deleted file mode 100644 index 0432d354..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Node Mixin - -_This is work in progress. We aim for it to become a good role model for alerts -and dashboards eventually, but it is not quite there yet._ - -The Node Mixin is a set of configurable, reusable, and extensible alerts and -dashboards based on the metrics exported by the Node Exporter. The mixin create -recording and alerting rules for Prometheus and suitable dashboard descriptions -for Grafana. - -To use them, you need to have `jsonnet` (v0.13+) and `jb` installed. If you -have a working Go development environment, it's easiest to run the following: -```bash -$ go get github.com/google/go-jsonnet/cmd/jsonnet -$ go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb -``` - -_Note: The make targets `lint` and `fmt` need the `jsonnetfmt` binary, which is -currently not included in the Go implementation of `jsonnet`. For the time -being, you have to install the [C++ version of -jsonnetfmt](https://github.com/google/jsonnet) if you want to use `make lint` -or `make fmt`._ - -Next, install the dependencies by running the following command in this -directory: -```bash -$ jb install -``` - -You can then build the Prometheus rules files `node_alerts.yaml` and -`node_rules.yaml`: -```bash -$ make node_alerts.yaml node_rules.yaml -``` - -You can also build a directory `dashboard_out` with the JSON dashboard files -for Grafana: -```bash -$ make dashboards_out -``` - -Note that some of the generated dashboards require recording rules specified in -the previously generated `node_rules.yaml`. - -For more advanced uses of mixins, see -https://github.com/monitoring-mixins/docs. - diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/alerts.jsonnet b/sources/kube-prometheus/jsonnet/vendor/node-mixin/alerts.jsonnet deleted file mode 100644 index 75e7c1b2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/alerts.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.manifestYamlDoc((import 'mixin.libsonnet').prometheusAlerts) diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/alerts/alerts.libsonnet b/sources/kube-prometheus/jsonnet/vendor/node-mixin/alerts/alerts.libsonnet deleted file mode 100644 index 4423f892..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/alerts/alerts.libsonnet +++ /dev/null @@ -1,191 +0,0 @@ -{ - prometheusAlerts+:: { - groups+: [ - { - name: 'node-exporter', - rules: [ - { - alert: 'NodeFilesystemSpaceFillingUp', - expr: ||| - ( - node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelector)s} < 0.4 - and - predict_linear(node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s}[6h], 24*60*60) < 0 - and - node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s} == 0 - ) - ||| % $._config, - 'for': '1h', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Filesystem is predicted to run out of space within the next 24 hours.', - description: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ printf "%.2f" $value }}% available space left and is filling up.', - }, - }, - { - alert: 'NodeFilesystemSpaceFillingUp', - expr: ||| - ( - node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelector)s} < 0.2 - and - predict_linear(node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s}[6h], 4*60*60) < 0 - and - node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s} == 0 - ) - ||| % $._config, - 'for': '1h', - labels: { - severity: '%(nodeCriticalSeverity)s' % $._config, - }, - annotations: { - summary: 'Filesystem is predicted to run out of space within the next 4 hours.', - description: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ printf "%.2f" $value }}% available space left and is filling up fast.', - }, - }, - { - alert: 'NodeFilesystemAlmostOutOfSpace', - expr: ||| - ( - node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelector)s} * 100 < 5 - and - node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s} == 0 - ) - ||| % $._config, - 'for': '1h', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Filesystem has less than 5% space left.', - description: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ printf "%.2f" $value }}% available space left.', - }, - }, - { - alert: 'NodeFilesystemAlmostOutOfSpace', - expr: ||| - ( - node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelector)s} * 100 < 3 - and - node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s} == 0 - ) - ||| % $._config, - 'for': '1h', - labels: { - severity: '%(nodeCriticalSeverity)s' % $._config, - }, - annotations: { - summary: 'Filesystem has less than 3% space left.', - description: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ printf "%.2f" $value }}% available space left.', - }, - }, - { - alert: 'NodeFilesystemFilesFillingUp', - expr: ||| - ( - node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelector)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelector)s} < 0.4 - and - predict_linear(node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelector)s}[6h], 24*60*60) < 0 - and - node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s} == 0 - ) - ||| % $._config, - 'for': '1h', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Filesystem is predicted to run out of inodes within the next 24 hours.', - description: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ printf "%.2f" $value }}% available inodes left and is filling up.', - }, - }, - { - alert: 'NodeFilesystemFilesFillingUp', - expr: ||| - ( - node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelector)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelector)s} < 0.2 - and - predict_linear(node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelector)s}[6h], 4*60*60) < 0 - and - node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s} == 0 - ) - ||| % $._config, - 'for': '1h', - labels: { - severity: '%(nodeCriticalSeverity)s' % $._config, - }, - annotations: { - summary: 'Filesystem is predicted to run out of inodes within the next 4 hours.', - description: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ printf "%.2f" $value }}% available inodes left and is filling up fast.', - }, - }, - { - alert: 'NodeFilesystemAlmostOutOfFiles', - expr: ||| - ( - node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelector)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelector)s} * 100 < 5 - and - node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s} == 0 - ) - ||| % $._config, - 'for': '1h', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Filesystem has less than 5% inodes left.', - description: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ printf "%.2f" $value }}% available inodes left.', - }, - }, - { - alert: 'NodeFilesystemAlmostOutOfFiles', - expr: ||| - ( - node_filesystem_files_free{%(nodeExporterSelector)s,%(fsSelector)s} / node_filesystem_files{%(nodeExporterSelector)s,%(fsSelector)s} * 100 < 3 - and - node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s} == 0 - ) - ||| % $._config, - 'for': '1h', - labels: { - severity: '%(nodeCriticalSeverity)s' % $._config, - }, - annotations: { - summary: 'Filesystem has less than 3% inodes left.', - description: 'Filesystem on {{ $labels.device }} at {{ $labels.instance }} has only {{ printf "%.2f" $value }}% available inodes left.', - }, - }, - { - alert: 'NodeNetworkReceiveErrs', - expr: ||| - increase(node_network_receive_errs_total[2m]) > 10 - ||| % $._config, - 'for': '1h', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Network interface is reporting many receive errors.', - description: '{{ $labels.instance }} interface {{ $labels.device }} has encountered {{ printf "%.0f" $value }} receive errors in the last two minutes.', - }, - }, - { - alert: 'NodeNetworkTransmitErrs', - expr: ||| - increase(node_network_transmit_errs_total[2m]) > 10 - ||| % $._config, - 'for': '1h', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Network interface is reporting many transmit errors.', - description: '{{ $labels.instance }} interface {{ $labels.device }} has encountered {{ printf "%.0f" $value }} transmit errors in the last two minutes.', - }, - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/config.libsonnet b/sources/kube-prometheus/jsonnet/vendor/node-mixin/config.libsonnet deleted file mode 100644 index b25c3939..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/config.libsonnet +++ /dev/null @@ -1,35 +0,0 @@ -{ - _config+:: { - // Selectors are inserted between {} in Prometheus queries. - - // Select the metrics coming from the node exporter. - nodeExporterSelector: 'job="node"', - - // Select the fstype for filesystem-related queries. If left - // empty, all filesystems are selected. If you have unusual - // filesystem you don't want to include in dashboards and - // alerting, you can exclude them here, e.g. 'fstype!="tmpfs"'. - fsSelector: 'fstype!=""', - - // Select the device for disk-related queries. If left empty, all - // devices are selected. If you have unusual devices you don't - // want to include in dashboards and alerting, you can exclude - // them here, e.g. 'device!="tmpfs"'. - diskDeviceSelector: 'device!=""', - - // Some of the alerts are meant to fire if a critical failure of a - // node is imminent (e.g. the disk is about to run full). In a - // true “cloud native” setup, failures of a single node should be - // tolerated. Hence, even imminent failure of a single node is no - // reason to create a paging alert. However, in practice there are - // still many situations where operators like to get paged in time - // before a node runs out of disk space. nodeCriticalSeverity can - // be set to the desired severity for this kind of alerts. This - // can even be templated to depend on labels of the node, e.g. you - // could make this critical for traditional database masters but - // just a warning for K8s nodes. - nodeCriticalSeverity: 'critical', - - grafana_prefix: '', - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/dashboards.jsonnet b/sources/kube-prometheus/jsonnet/vendor/node-mixin/dashboards.jsonnet deleted file mode 100644 index 9d913ed3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/dashboards.jsonnet +++ /dev/null @@ -1,6 +0,0 @@ -local dashboards = (import 'mixin.libsonnet').grafanaDashboards; - -{ - [name]: dashboards[name] - for name in std.objectFields(dashboards) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/dashboards/dashboards.libsonnet b/sources/kube-prometheus/jsonnet/vendor/node-mixin/dashboards/dashboards.libsonnet deleted file mode 100644 index e6adbd4f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/dashboards/dashboards.libsonnet +++ /dev/null @@ -1,2 +0,0 @@ -(import 'node.libsonnet') + -(import 'use.libsonnet') diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/dashboards/node.libsonnet b/sources/kube-prometheus/jsonnet/vendor/node-mixin/dashboards/node.libsonnet deleted file mode 100644 index 78241ed9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/dashboards/node.libsonnet +++ /dev/null @@ -1,254 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local dashboard = grafana.dashboard; -local row = grafana.row; -local prometheus = grafana.prometheus; -local template = grafana.template; -local graphPanel = grafana.graphPanel; -local promgrafonnet = import 'promgrafonnet/promgrafonnet.libsonnet'; -local gauge = promgrafonnet.gauge; - -{ - grafanaDashboards+:: { - 'nodes.json': - local idleCPU = - graphPanel.new( - 'CPU Usage', - datasource='$datasource', - span=6, - format='percentunit', - max=1, - min=0, - stack=true, - ) - .addTarget(prometheus.target( - ||| - ( - (1 - rate(node_cpu_seconds_total{%(nodeExporterSelector)s, mode="idle", instance="$instance"}[$__interval])) - / ignoring(cpu) group_left - count without (cpu)( node_cpu_seconds_total{%(nodeExporterSelector)s, mode="idle", instance="$instance"}) - ) - ||| % $._config, - legendFormat='{{cpu}}', - intervalFactor=5, - interval='1m', - )); - - local systemLoad = - graphPanel.new( - 'Load Average', - datasource='$datasource', - span=6, - format='short', - min=0, - fill=0, - ) - .addTarget(prometheus.target('node_load1{%(nodeExporterSelector)s, instance="$instance"}' % $._config, legendFormat='1m load average')) - .addTarget(prometheus.target('node_load5{%(nodeExporterSelector)s, instance="$instance"}' % $._config, legendFormat='5m load average')) - .addTarget(prometheus.target('node_load15{%(nodeExporterSelector)s, instance="$instance"}' % $._config, legendFormat='15m load average')) - .addTarget(prometheus.target('count(node_cpu_seconds_total{%(nodeExporterSelector)s, instance="$instance", mode="idle"})' % $._config, legendFormat='logical cores')); - - local memoryGraph = - graphPanel.new( - 'Memory Usage', - datasource='$datasource', - span=9, - format='bytes', - stack=true, - min=0, - ) - .addTarget(prometheus.target( - ||| - ( - node_memory_MemTotal_bytes{%(nodeExporterSelector)s, instance="$instance"} - - - node_memory_MemFree_bytes{%(nodeExporterSelector)s, instance="$instance"} - - - node_memory_Buffers_bytes{%(nodeExporterSelector)s, instance="$instance"} - - - node_memory_Cached_bytes{%(nodeExporterSelector)s, instance="$instance"} - ) - ||| % $._config, legendFormat='memory used' - )) - .addTarget(prometheus.target('node_memory_Buffers_bytes{%(nodeExporterSelector)s, instance="$instance"}' % $._config, legendFormat='memory buffers')) - .addTarget(prometheus.target('node_memory_Cached_bytes{%(nodeExporterSelector)s, instance="$instance"}' % $._config, legendFormat='memory cached')) - .addTarget(prometheus.target('node_memory_MemFree_bytes{%(nodeExporterSelector)s, instance="$instance"}' % $._config, legendFormat='memory free')); - - // TODO: It would be nicer to have a gauge that gets a 0-1 range and displays it as a percentage 0%-100%. - // This needs to be added upstream in the promgrafonnet library and then changed here. - local memoryGauge = gauge.new( - 'Memory Usage', - ||| - 100 - - ( - node_memory_MemAvailable_bytes{%(nodeExporterSelector)s, instance="$instance"} - / - node_memory_MemTotal_bytes{%(nodeExporterSelector)s, instance="$instance"} - * 100 - ) - ||| % $._config, - ).withLowerBeingBetter(); - - local diskIO = - graphPanel.new( - 'Disk I/O', - datasource='$datasource', - span=6, - min=0, - fill=0, - ) - // TODO: Does it make sense to have those three in the same panel? - .addTarget(prometheus.target( - 'rate(node_disk_read_bytes_total{%(nodeExporterSelector)s, instance="$instance", %(diskDeviceSelector)s}[$__interval])' % $._config, - legendFormat='{{device}} read', - interval='1m', - )) - .addTarget(prometheus.target( - 'rate(node_disk_written_bytes_total{%(nodeExporterSelector)s, instance="$instance", %(diskDeviceSelector)s}[$__interval])' % $._config, - legendFormat='{{device}} written', - interval='1m', - )) - .addTarget(prometheus.target( - 'rate(node_disk_io_time_seconds_total{%(nodeExporterSelector)s, instance="$instance", %(diskDeviceSelector)s}[$__interval])' % $._config, - legendFormat='{{device}} io time', - interval='1m', - )) + - { - seriesOverrides: [ - { - alias: '/ read| written/', - yaxis: 1, - }, - { - alias: '/ io time/', - yaxis: 2, - }, - ], - yaxes: [ - self.yaxe(format='bytes'), - self.yaxe(format='s'), - ], - }; - - // TODO: Somehow partition this by device while excluding read-only devices. - local diskSpaceUsage = - graphPanel.new( - 'Disk Space Usage', - datasource='$datasource', - span=6, - format='bytes', - min=0, - fill=1, - stack=true, - ) - .addTarget(prometheus.target( - ||| - sum( - max by (device) ( - node_filesystem_size_bytes{%(nodeExporterSelector)s, instance="$instance", %(fsSelector)s} - - - node_filesystem_avail_bytes{%(nodeExporterSelector)s, instance="$instance", %(fsSelector)s} - ) - ) - ||| % $._config, - legendFormat='used', - )) - .addTarget(prometheus.target( - ||| - sum( - max by (device) ( - node_filesystem_avail_bytes{%(nodeExporterSelector)s, instance="$instance", %(fsSelector)s} - ) - ) - ||| % $._config, - legendFormat='available', - )) + - { - seriesOverrides: [ - { - alias: 'used', - color: '#E0B400', - }, - { - alias: 'available', - color: '#73BF69', - }, - ], - }; - - local networkReceived = - graphPanel.new( - 'Network Received', - datasource='$datasource', - span=6, - format='bytes', - min=0, - fill=0, - ) - .addTarget(prometheus.target( - 'rate(node_network_receive_bytes_total{%(nodeExporterSelector)s, instance="$instance", device!="lo"}[$__interval])' % $._config, - legendFormat='{{device}}', - interval='1m', - )); - - local networkTransmitted = - graphPanel.new( - 'Network Transmitted', - datasource='$datasource', - span=6, - format='bytes', - min=0, - fill=0, - ) - .addTarget(prometheus.target( - 'rate(node_network_transmit_bytes_total{%(nodeExporterSelector)s, instance="$instance", device!="lo"}[$__interval])' % $._config, - legendFormat='{{device}}', - interval='1m', - )); - - dashboard.new('Nodes', time_from='now-1h') - .addTemplate( - { - current: { - text: 'Prometheus', - value: 'Prometheus', - }, - hide: 0, - label: null, - name: 'datasource', - options: [], - query: 'prometheus', - refresh: 1, - regex: '', - type: 'datasource', - }, - ) - .addTemplate( - template.new( - 'instance', - '$datasource', - 'label_values(node_exporter_build_info{%(nodeExporterSelector)s}, instance)' % $._config, - refresh='time', - ) - ) - .addRow( - row.new() - .addPanel(idleCPU) - .addPanel(systemLoad) - ) - .addRow( - row.new() - .addPanel(memoryGraph) - .addPanel(memoryGauge) - ) - .addRow( - row.new() - .addPanel(diskIO) - .addPanel(diskSpaceUsage) - ) - .addRow( - row.new() - .addPanel(networkReceived) - .addPanel(networkTransmitted) - ), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/dashboards/use.libsonnet b/sources/kube-prometheus/jsonnet/vendor/node-mixin/dashboards/use.libsonnet deleted file mode 100644 index 8463ab95..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/dashboards/use.libsonnet +++ /dev/null @@ -1,295 +0,0 @@ -local g = import 'grafana-builder/grafana.libsonnet'; - -{ - grafanaDashboards+:: { - 'node-cluster-rsrc-use.json': - local legendLink = '%s/dashboard/file/node-rsrc-use.json' % $._config.grafana_prefix; - - g.dashboard('USE Method / Cluster') - .addRow( - g.row('CPU') - .addPanel( - g.panel('CPU Utilisation') + - g.queryPanel(||| - ( - instance:node_cpu_utilisation:rate1m{%(nodeExporterSelector)s} - * - instance:node_num_cpu:sum{%(nodeExporterSelector)s} - / ignoring (instance) group_left - sum without (instance) (instance:node_num_cpu:sum{%(nodeExporterSelector)s}) - ) - ||| % $._config, '{{instance}}', legendLink) + - g.stack + - { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, - ) - .addPanel( - // TODO: Is this a useful panel? At least there should be some explanation how load - // average relates to the "CPU saturation" in the title. - g.panel('CPU Saturation (load1 per CPU)') + - g.queryPanel(||| - ( - instance:node_load1_per_cpu:ratio{%(nodeExporterSelector)s} - / ignoring (instance) group_left - count without (instance) (instance:node_load1_per_cpu:ratio{%(nodeExporterSelector)s}) - ) - ||| % $._config, '{{instance}}', legendLink) + - g.stack + - // TODO: Does `max: 1` make sense? The stack can go over 1 in high-load scenarios. - { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, - ) - ) - .addRow( - g.row('Memory') - .addPanel( - g.panel('Memory Utilisation') + - g.queryPanel(||| - ( - instance:node_memory_utilisation:ratio{%(nodeExporterSelector)s} - / ignoring (instance) group_left - count without (instance) (instance:node_memory_utilisation:ratio{%(nodeExporterSelector)s}) - ) - ||| % $._config, '{{instance}}', legendLink) + - g.stack + - { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, - ) - .addPanel( - g.panel('Memory Saturation (Swapped Pages)') + - g.queryPanel('instance:node_memory_swap_io_pages:rate1m{%(nodeExporterSelector)s}' % $._config, '{{instance}}', legendLink) + - g.stack + - { yaxes: g.yaxes('rps') }, - ) - ) - .addRow( - g.row('Network') - .addPanel( - g.panel('Net Utilisation (Bytes Receive/Transmit)') + - g.queryPanel( - [ - 'instance:node_network_receive_bytes_excluding_lo:rate1m{%(nodeExporterSelector)s}' % $._config, - 'instance:node_network_transmit_bytes_excluding_lo:rate1m{%(nodeExporterSelector)s}' % $._config, - ], - ['{{instance}} Receive', '{{instance}} Transmit'], - legendLink, - ) + - g.stack + - { - yaxes: g.yaxes({ format: 'Bps', min: null }), - seriesOverrides: [ - { - alias: '/ Receive/', - stack: 'A', - }, - { - alias: '/ Transmit/', - stack: 'B', - transform: 'negative-Y', - }, - ], - }, - ) - .addPanel( - g.panel('Net Saturation (Drops Receive/Transmit)') + - g.queryPanel( - [ - 'instance:node_network_receive_drop_excluding_lo:rate1m{%(nodeExporterSelector)s}' % $._config, - 'instance:node_network_transmit_drop_excluding_lo:rate1m{%(nodeExporterSelector)s}' % $._config, - ], - ['{{instance}} Receive', '{{instance}} Transmit'], - legendLink, - ) + - g.stack + - { - yaxes: g.yaxes({ format: 'rps', min: null }), - seriesOverrides: [ - { - alias: '/ Receive/', - stack: 'A', - }, - { - alias: '/ Transmit/', - stack: 'B', - transform: 'negative-Y', - }, - ], - }, - ) - ) - .addRow( - g.row('Disk IO') - .addPanel( - g.panel('Disk IO Utilisation') + - // Full utilisation would be all disks on each node spending an average of - // 1 second per second doing I/O, normalize by metric cardinality for stacked charts. - // TODO: Does the partition by device make sense? Using the most utilized device per - // instance might make more sense. - g.queryPanel(||| - ( - instance_device:node_disk_io_time_seconds:rate1m{%(nodeExporterSelector)s} - / ignoring (instance, device) group_left - count without (instance, device) (instance_device:node_disk_io_time_seconds:rate1m{%(nodeExporterSelector)s}) - ) - ||| % $._config, '{{instance}} {{device}}', legendLink) + - g.stack + - { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, - ) - .addPanel( - g.panel('Disk IO Saturation') + - g.queryPanel(||| - ( - instance_device:node_disk_io_time_weighted_seconds:rate1m{%(nodeExporterSelector)s} - / ignoring (instance, device) group_left - count without (instance, device) (instance_device:node_disk_io_time_weighted_seconds:rate1m{%(nodeExporterSelector)s}) - ) - ||| % $._config, '{{instance}} {{device}}', legendLink) + - g.stack + - { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, - ) - ) - .addRow( - g.row('Disk Space') - .addPanel( - g.panel('Disk Space Utilisation') + - g.queryPanel(||| - ( - sum without (device) ( - max without (fstype, mountpoint) ( - node_filesystem_size_bytes{%(nodeExporterSelector)s, %(fsSelector)s} - node_filesystem_avail_bytes{%(nodeExporterSelector)s, %(fsSelector)s} - ) - ) - / ignoring (instance) group_left - sum without (instance, device) ( - max without (fstype, mountpoint) ( - node_filesystem_size_bytes{%(nodeExporterSelector)s, %(fsSelector)s} - ) - ) - ) - ||| % $._config, '{{instance}}', legendLink) + - g.stack + - { yaxes: g.yaxes({ format: 'percentunit', max: 1 }) }, - ), - ), - - 'node-rsrc-use.json': - g.dashboard('USE Method / Node') - .addTemplate('instance', 'up{%(nodeExporterSelector)s}' % $._config, 'instance') - .addRow( - g.row('CPU') - .addPanel( - g.panel('CPU Utilisation') + - g.queryPanel('instance:node_cpu_utilisation:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, 'Utilisation') + - { - yaxes: g.yaxes('percentunit'), - legend+: { show: false }, - }, - ) - .addPanel( - // TODO: Is this a useful panel? At least there should be some explanation how load - // average relates to the "CPU saturation" in the title. - g.panel('CPU Saturation (Load1 per CPU)') + - g.queryPanel('instance:node_load1_per_cpu:ratio{%(nodeExporterSelector)s, instance="$instance"}' % $._config, 'Saturation') + - { - yaxes: g.yaxes('percentunit'), - legend+: { show: false }, - }, - ) - ) - .addRow( - g.row('Memory') - .addPanel( - g.panel('Memory Utilisation') + - g.queryPanel('instance:node_memory_utilisation:ratio{%(nodeExporterSelector)s, %(nodeExporterSelector)s, instance="$instance"}' % $._config, 'Memory') + - { yaxes: g.yaxes('percentunit') }, - ) - .addPanel( - g.panel('Memory Saturation (pages swapped per second)') + - g.queryPanel('instance:node_memory_swap_io_pages:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, 'Swap IO') + - { - yaxes: g.yaxes('short'), - legend+: { show: false }, - }, - ) - ) - .addRow( - g.row('Net') - .addPanel( - g.panel('Net Utilisation (Bytes Receive/Transmit)') + - g.queryPanel( - [ - 'instance:node_network_receive_bytes_excluding_lo:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, - 'instance:node_network_transmit_bytes_excluding_lo:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, - ], - ['Receive', 'Transmit'], - ) + - { - yaxes: g.yaxes({ format: 'Bps', min: null }), - seriesOverrides: [ - { - alias: '/Receive/', - stack: 'A', - }, - { - alias: '/Transmit/', - stack: 'B', - transform: 'negative-Y', - }, - ], - }, - ) - .addPanel( - g.panel('Net Saturation (Drops Receive/Transmit)') + - g.queryPanel( - [ - 'instance:node_network_receive_drop_excluding_lo:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, - 'instance:node_network_transmit_drop_excluding_lo:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, - ], - ['Receive drops', 'Transmit drops'], - ) + - { - yaxes: g.yaxes({ format: 'rps', min: null }), - seriesOverrides: [ - { - alias: '/Receive/', - stack: 'A', - }, - { - alias: '/Transmit/', - stack: 'B', - transform: 'negative-Y', - }, - ], - }, - ) - ) - .addRow( - g.row('Disk IO') - .addPanel( - g.panel('Disk IO Utilisation') + - g.queryPanel('instance_device:node_disk_io_time_seconds:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, '{{device}}') + - { yaxes: g.yaxes('percentunit') }, - ) - .addPanel( - g.panel('Disk IO Saturation') + - g.queryPanel('instance_device:node_disk_io_time_weighted_seconds:rate1m{%(nodeExporterSelector)s, instance="$instance"}' % $._config, '{{device}}') + - { yaxes: g.yaxes('percentunit') }, - ) - ) - .addRow( - g.row('Disk Space') - .addPanel( - g.panel('Disk Space Utilisation') + - g.queryPanel(||| - 1 - - ( - max without (mountpoint, fstype) (node_filesystem_avail_bytes{%(nodeExporterSelector)s, %(fsSelector)s, instance="$instance"}) - / - max without (mountpoint, fstype) (node_filesystem_size_bytes{%(nodeExporterSelector)s, %(fsSelector)s, instance="$instance"}) - ) - ||| % $._config, '{{device}}') + - { - yaxes: g.yaxes('percentunit'), - legend+: { show: false }, - }, - ), - ), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/jsonnetfile.json b/sources/kube-prometheus/jsonnet/vendor/node-mixin/jsonnetfile.json deleted file mode 100644 index dc92880d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/jsonnetfile.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "dependencies": [ - { - "name": "grafonnet", - "source": { - "git": { - "remote": "https://github.com/grafana/grafonnet-lib", - "subdir": "grafonnet" - } - }, - "version": "master" - }, - { - "name": "grafana-builder", - "source": { - "git": { - "remote": "https://github.com/grafana/jsonnet-libs", - "subdir": "grafana-builder" - } - }, - "version": "master" - }, - { - "name": "promgrafonnet", - "source": { - "git": { - "remote": "https://github.com/kubernetes-monitoring/kubernetes-mixin", - "subdir": "lib/promgrafonnet" - } - }, - "version": "master" - } - ] -} diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/mixin.libsonnet b/sources/kube-prometheus/jsonnet/vendor/node-mixin/mixin.libsonnet deleted file mode 100644 index b9831f93..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/mixin.libsonnet +++ /dev/null @@ -1,4 +0,0 @@ -(import 'config.libsonnet') + -(import 'alerts/alerts.libsonnet') + -(import 'dashboards/dashboards.libsonnet') + -(import 'rules/rules.libsonnet') diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/rules.jsonnet b/sources/kube-prometheus/jsonnet/vendor/node-mixin/rules.jsonnet deleted file mode 100644 index dbe13f41..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/rules.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.manifestYamlDoc((import 'mixin.libsonnet').prometheusRules) diff --git a/sources/kube-prometheus/jsonnet/vendor/node-mixin/rules/rules.libsonnet b/sources/kube-prometheus/jsonnet/vendor/node-mixin/rules/rules.libsonnet deleted file mode 100644 index 85f7618d..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/node-mixin/rules/rules.libsonnet +++ /dev/null @@ -1,113 +0,0 @@ -{ - prometheusRules+:: { - groups+: [ - { - name: 'node-exporter.rules', - rules: [ - { - // This rule gives the number of CPUs per node. - record: 'instance:node_num_cpu:sum', - expr: ||| - count without (cpu) ( - count without (mode) ( - node_cpu_seconds_total{%(nodeExporterSelector)s} - ) - ) - ||| % $._config, - }, - { - // CPU utilisation is % CPU is not idle. - record: 'instance:node_cpu_utilisation:rate1m', - expr: ||| - 1 - avg without (cpu, mode) ( - rate(node_cpu_seconds_total{%(nodeExporterSelector)s, mode="idle"}[1m]) - ) - ||| % $._config, - }, - { - // This is CPU saturation: 1min avg run queue length / number of CPUs. - // Can go over 1. - // TODO: There are situation where a run queue >1/core is just normal and fine. - // We need to clarify how to read this metric and if its usage is helpful at all. - record: 'instance:node_load1_per_cpu:ratio', - expr: ||| - ( - node_load1{%(nodeExporterSelector)s} - / - instance:node_num_cpu:sum{%(nodeExporterSelector)s} - ) - ||| % $._config, - }, - { - // Memory utilisation (ratio of used memory per instance). - record: 'instance:node_memory_utilisation:ratio', - expr: ||| - 1 - ( - node_memory_MemAvailable_bytes{%(nodeExporterSelector)s} - / - node_memory_MemTotal_bytes{%(nodeExporterSelector)s} - ) - ||| % $._config, - }, - { - record: 'instance:node_memory_swap_io_pages:rate1m', - expr: ||| - ( - rate(node_vmstat_pgpgin{%(nodeExporterSelector)s}[1m]) - + - rate(node_vmstat_pgpgout{%(nodeExporterSelector)s}[1m]) - ) - ||| % $._config, - }, - { - // Disk utilisation (seconds spent, 1 second rate). - record: 'instance_device:node_disk_io_time_seconds:rate1m', - expr: ||| - rate(node_disk_io_time_seconds_total{%(nodeExporterSelector)s, %(diskDeviceSelector)s}[1m]) - ||| % $._config, - }, - { - // Disk saturation (weighted seconds spent, 1 second rate). - record: 'instance_device:node_disk_io_time_weighted_seconds:rate1m', - expr: ||| - rate(node_disk_io_time_weighted_seconds_total{%(nodeExporterSelector)s, %(diskDeviceSelector)s}[1m]) - ||| % $._config, - }, - { - record: 'instance:node_network_receive_bytes_excluding_lo:rate1m', - expr: ||| - sum without (device) ( - rate(node_network_receive_bytes_total{%(nodeExporterSelector)s, device!="lo"}[1m]) - ) - ||| % $._config, - }, - { - record: 'instance:node_network_transmit_bytes_excluding_lo:rate1m', - expr: ||| - sum without (device) ( - rate(node_network_transmit_bytes_total{%(nodeExporterSelector)s, device!="lo"}[1m]) - ) - ||| % $._config, - }, - // TODO: Find out if those drops ever happen on modern switched networks. - { - record: 'instance:node_network_receive_drop_excluding_lo:rate1m', - expr: ||| - sum without (device) ( - rate(node_network_receive_drop_total{%(nodeExporterSelector)s, device!="lo"}[1m]) - ) - ||| % $._config, - }, - { - record: 'instance:node_network_transmit_drop_excluding_lo:rate1m', - expr: ||| - sum without (device) ( - rate(node_network_transmit_drop_total{%(nodeExporterSelector)s, device!="lo"}[1m]) - ) - ||| % $._config, - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/.gitignore b/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/.gitignore deleted file mode 100644 index 80243dae..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -vendor/ -jsonnetfile.lock.json diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/alertmanager-crd.libsonnet b/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/alertmanager-crd.libsonnet deleted file mode 100644 index 8a004d0f..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/alertmanager-crd.libsonnet +++ /dev/null @@ -1 +0,0 @@ -{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"creationTimestamp":null,"name":"alertmanagers.monitoring.coreos.com"},"spec":{"group":"monitoring.coreos.com","names":{"kind":"Alertmanager","plural":"alertmanagers"},"scope":"Namespaced","validation":{"openAPIV3Schema":{"properties":{"apiVersion":{"description":"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/api-conventions.md#resources","type":"string"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"spec":{"description":"AlertmanagerSpec is a specification of the desired behavior of the Alertmanager cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status","properties":{"additionalPeers":{"description":"AdditionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster.","items":{"type":"string"},"type":"array"},"affinity":{"description":"Affinity is a group of affinity scheduling rules.","properties":{"nodeAffinity":{"description":"Node affinity is a group of node affinity scheduling rules.","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"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.","items":{"description":"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).","properties":{"preference":{"description":"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.","properties":{"matchExpressions":{"description":"A list of node selector requirements by node's labels.","items":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to.","type":"string"},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.","type":"string"},"values":{"description":"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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchFields":{"description":"A list of node selector requirements by node's fields.","items":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to.","type":"string"},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.","type":"string"},"values":{"description":"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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"}},"type":"object"},"weight":{"description":"Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.","format":"int32","type":"integer"}},"required":["weight","preference"],"type":"object"},"type":"array"},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"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.","properties":{"nodeSelectorTerms":{"description":"Required. A list of node selector terms. The terms are ORed.","items":{"description":"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.","properties":{"matchExpressions":{"description":"A list of node selector requirements by node's labels.","items":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to.","type":"string"},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.","type":"string"},"values":{"description":"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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchFields":{"description":"A list of node selector requirements by node's fields.","items":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to.","type":"string"},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.","type":"string"},"values":{"description":"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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"}},"type":"object"},"type":"array"}},"required":["nodeSelectorTerms"],"type":"object"}},"type":"object"},"podAffinity":{"description":"Pod affinity is a group of inter pod affinity scheduling rules.","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"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.","items":{"description":"The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)","properties":{"podAffinityTerm":{"description":"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 \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running","properties":{"labelSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"namespaces":{"description":"namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"","items":{"type":"string"},"type":"array"},"topologyKey":{"description":"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.","type":"string"}},"required":["topologyKey"],"type":"object"},"weight":{"description":"weight associated with matching the corresponding podAffinityTerm, in the range 1-100.","format":"int32","type":"integer"}},"required":["weight","podAffinityTerm"],"type":"object"},"type":"array"},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"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.","items":{"description":"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 \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running","properties":{"labelSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"namespaces":{"description":"namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"","items":{"type":"string"},"type":"array"},"topologyKey":{"description":"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.","type":"string"}},"required":["topologyKey"],"type":"object"},"type":"array"}},"type":"object"},"podAntiAffinity":{"description":"Pod anti affinity is a group of inter pod anti affinity scheduling rules.","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"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.","items":{"description":"The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)","properties":{"podAffinityTerm":{"description":"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 \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running","properties":{"labelSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"namespaces":{"description":"namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"","items":{"type":"string"},"type":"array"},"topologyKey":{"description":"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.","type":"string"}},"required":["topologyKey"],"type":"object"},"weight":{"description":"weight associated with matching the corresponding podAffinityTerm, in the range 1-100.","format":"int32","type":"integer"}},"required":["weight","podAffinityTerm"],"type":"object"},"type":"array"},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"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.","items":{"description":"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 \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running","properties":{"labelSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"namespaces":{"description":"namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"","items":{"type":"string"},"type":"array"},"topologyKey":{"description":"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.","type":"string"}},"required":["topologyKey"],"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"baseImage":{"description":"Base image that is used to deploy pods, without tag.","type":"string"},"configMaps":{"description":"ConfigMaps is a list of ConfigMaps in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. The ConfigMaps are mounted into /etc/alertmanager/configmaps/\u003cconfigmap-name\u003e.","items":{"type":"string"},"type":"array"},"containers":{"description":"Containers allows injecting additional containers. This is meant to allow adding an authentication proxy to an Alertmanager pod.","items":{"description":"A single application container that you want to run within a pod.","properties":{"args":{"description":"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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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","items":{"type":"string"},"type":"array"},"command":{"description":"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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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","items":{"type":"string"},"type":"array"},"env":{"description":"List of environment variables to set in the container. Cannot be updated.","items":{"description":"EnvVar represents an environment variable present in a Container.","properties":{"name":{"description":"Name of the environment variable. Must be a C_IDENTIFIER.","type":"string"},"value":{"description":"Variable references $(VAR_NAME) are expanded using the previous 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".","type":"string"},"valueFrom":{"description":"EnvVarSource represents a source for the value of an EnvVar.","properties":{"configMapKeyRef":{"description":"Selects a key from a ConfigMap.","properties":{"key":{"description":"The key to select.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"fieldRef":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string"}},"required":["fieldPath"],"type":"object"},"resourceFieldRef":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"},"secretKeyRef":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"}},"required":["name"],"type":"object"},"type":"array"},"envFrom":{"description":"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.","items":{"description":"EnvFromSource represents the source of a set of ConfigMaps","properties":{"configMapRef":{"description":"ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap must be defined","type":"boolean"}},"type":"object"},"prefix":{"description":"An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.","type":"string"},"secretRef":{"description":"SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret must be defined","type":"boolean"}},"type":"object"}},"type":"object"},"type":"array"},"image":{"description":"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.","type":"string"},"imagePullPolicy":{"description":"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","type":"string"},"lifecycle":{"description":"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.","properties":{"postStart":{"description":"Handler defines a specific action that should be taken","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"}},"type":"object"},"preStop":{"description":"Handler defines a specific action that should be taken","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"}},"type":"object"}},"type":"object"},"livenessProbe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","format":"int32","type":"integer"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"initialDelaySeconds":{"description":"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","format":"int32","type":"integer"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","format":"int32","type":"integer"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"},"timeoutSeconds":{"description":"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","format":"int32","type":"integer"}},"type":"object"},"name":{"description":"Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.","type":"string"},"ports":{"description":"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.","items":{"description":"ContainerPort represents a network port in a single container.","properties":{"containerPort":{"description":"Number of port to expose on the pod's IP address. This must be a valid port number, 0 \u003c x \u003c 65536.","format":"int32","type":"integer"},"hostIP":{"description":"What host IP to bind the external port to.","type":"string"},"hostPort":{"description":"Number of port to expose on the host. If specified, this must be a valid port number, 0 \u003c x \u003c 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.","format":"int32","type":"integer"},"name":{"description":"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.","type":"string"},"protocol":{"description":"Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".","type":"string"}},"required":["containerPort"],"type":"object"},"type":"array"},"readinessProbe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","format":"int32","type":"integer"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"initialDelaySeconds":{"description":"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","format":"int32","type":"integer"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","format":"int32","type":"integer"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"},"timeoutSeconds":{"description":"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","format":"int32","type":"integer"}},"type":"object"},"resources":{"description":"ResourceRequirements describes the compute resource requirements.","properties":{"limits":{"description":"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","type":"object"},"requests":{"description":"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-compute-resources-container/","type":"object"}},"type":"object"},"securityContext":{"description":"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.","properties":{"allowPrivilegeEscalation":{"description":"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","type":"boolean"},"capabilities":{"description":"Adds and removes POSIX capabilities from running containers.","properties":{"add":{"description":"Added capabilities","items":{"type":"string"},"type":"array"},"drop":{"description":"Removed capabilities","items":{"type":"string"},"type":"array"}},"type":"object"},"privileged":{"description":"Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.","type":"boolean"},"procMount":{"description":"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.","type":"string"},"readOnlyRootFilesystem":{"description":"Whether this container has a read-only root filesystem. Default is false.","type":"boolean"},"runAsGroup":{"description":"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.","format":"int64","type":"integer"},"runAsNonRoot":{"description":"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.","type":"boolean"},"runAsUser":{"description":"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.","format":"int64","type":"integer"},"seLinuxOptions":{"description":"SELinuxOptions are the labels to be applied to the container","properties":{"level":{"description":"Level is SELinux level label that applies to the container.","type":"string"},"role":{"description":"Role is a SELinux role label that applies to the container.","type":"string"},"type":{"description":"Type is a SELinux type label that applies to the container.","type":"string"},"user":{"description":"User is a SELinux user label that applies to the container.","type":"string"}},"type":"object"},"windowsOptions":{"description":"WindowsSecurityContextOptions contain Windows-specific options and credentials.","properties":{"gmsaCredentialSpec":{"description":"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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.","type":"string"},"gmsaCredentialSpecName":{"description":"GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.","type":"string"}},"type":"object"}},"type":"object"},"stdin":{"description":"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.","type":"boolean"},"stdinOnce":{"description":"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","type":"boolean"},"terminationMessagePath":{"description":"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.","type":"string"},"terminationMessagePolicy":{"description":"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.","type":"string"},"tty":{"description":"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.","type":"boolean"},"volumeDevices":{"description":"volumeDevices is the list of block devices to be used by the container. This is a beta feature.","items":{"description":"volumeDevice describes a mapping of a raw block device within a container.","properties":{"devicePath":{"description":"devicePath is the path inside of the container that the device will be mapped to.","type":"string"},"name":{"description":"name must match the name of a persistentVolumeClaim in the pod","type":"string"}},"required":["name","devicePath"],"type":"object"},"type":"array"},"volumeMounts":{"description":"Pod volumes to mount into the container's filesystem. Cannot be updated.","items":{"description":"VolumeMount describes a mounting of a Volume within a container.","properties":{"mountPath":{"description":"Path within the container at which the volume should be mounted. Must not contain ':'.","type":"string"},"mountPropagation":{"description":"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.","type":"string"},"name":{"description":"This must match the Name of a Volume.","type":"string"},"readOnly":{"description":"Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.","type":"boolean"},"subPath":{"description":"Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).","type":"string"},"subPathExpr":{"description":"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. This field is beta in 1.15.","type":"string"}},"required":["name","mountPath"],"type":"object"},"type":"array"},"workingDir":{"description":"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.","type":"string"}},"required":["name"],"type":"object"},"type":"array"},"externalUrl":{"description":"The external URL the Alertmanager instances will be available under. This is necessary to generate correct URLs. This is necessary if Alertmanager is not served from root of a DNS name.","type":"string"},"image":{"description":"Image if specified has precedence over baseImage, tag and sha combinations. Specifying the version is still necessary to ensure the Prometheus Operator knows what version of Alertmanager is being configured.","type":"string"},"imagePullSecrets":{"description":"An optional list of references to secrets in the same namespace to use for pulling prometheus and alertmanager images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod","items":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"type":"array"},"initContainers":{"description":"InitContainers allows adding initContainers to the pod definition. Those can be used to e.g. fetch secrets for injection into the Alertmanager configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ Using initContainers for any use case other then secret fetching is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.","items":{"description":"A single application container that you want to run within a pod.","properties":{"args":{"description":"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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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","items":{"type":"string"},"type":"array"},"command":{"description":"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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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","items":{"type":"string"},"type":"array"},"env":{"description":"List of environment variables to set in the container. Cannot be updated.","items":{"description":"EnvVar represents an environment variable present in a Container.","properties":{"name":{"description":"Name of the environment variable. Must be a C_IDENTIFIER.","type":"string"},"value":{"description":"Variable references $(VAR_NAME) are expanded using the previous 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".","type":"string"},"valueFrom":{"description":"EnvVarSource represents a source for the value of an EnvVar.","properties":{"configMapKeyRef":{"description":"Selects a key from a ConfigMap.","properties":{"key":{"description":"The key to select.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"fieldRef":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string"}},"required":["fieldPath"],"type":"object"},"resourceFieldRef":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"},"secretKeyRef":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"}},"required":["name"],"type":"object"},"type":"array"},"envFrom":{"description":"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.","items":{"description":"EnvFromSource represents the source of a set of ConfigMaps","properties":{"configMapRef":{"description":"ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap must be defined","type":"boolean"}},"type":"object"},"prefix":{"description":"An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.","type":"string"},"secretRef":{"description":"SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret must be defined","type":"boolean"}},"type":"object"}},"type":"object"},"type":"array"},"image":{"description":"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.","type":"string"},"imagePullPolicy":{"description":"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","type":"string"},"lifecycle":{"description":"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.","properties":{"postStart":{"description":"Handler defines a specific action that should be taken","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"}},"type":"object"},"preStop":{"description":"Handler defines a specific action that should be taken","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"}},"type":"object"}},"type":"object"},"livenessProbe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","format":"int32","type":"integer"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"initialDelaySeconds":{"description":"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","format":"int32","type":"integer"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","format":"int32","type":"integer"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"},"timeoutSeconds":{"description":"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","format":"int32","type":"integer"}},"type":"object"},"name":{"description":"Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.","type":"string"},"ports":{"description":"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.","items":{"description":"ContainerPort represents a network port in a single container.","properties":{"containerPort":{"description":"Number of port to expose on the pod's IP address. This must be a valid port number, 0 \u003c x \u003c 65536.","format":"int32","type":"integer"},"hostIP":{"description":"What host IP to bind the external port to.","type":"string"},"hostPort":{"description":"Number of port to expose on the host. If specified, this must be a valid port number, 0 \u003c x \u003c 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.","format":"int32","type":"integer"},"name":{"description":"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.","type":"string"},"protocol":{"description":"Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".","type":"string"}},"required":["containerPort"],"type":"object"},"type":"array"},"readinessProbe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","format":"int32","type":"integer"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"initialDelaySeconds":{"description":"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","format":"int32","type":"integer"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","format":"int32","type":"integer"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"},"timeoutSeconds":{"description":"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","format":"int32","type":"integer"}},"type":"object"},"resources":{"description":"ResourceRequirements describes the compute resource requirements.","properties":{"limits":{"description":"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","type":"object"},"requests":{"description":"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-compute-resources-container/","type":"object"}},"type":"object"},"securityContext":{"description":"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.","properties":{"allowPrivilegeEscalation":{"description":"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","type":"boolean"},"capabilities":{"description":"Adds and removes POSIX capabilities from running containers.","properties":{"add":{"description":"Added capabilities","items":{"type":"string"},"type":"array"},"drop":{"description":"Removed capabilities","items":{"type":"string"},"type":"array"}},"type":"object"},"privileged":{"description":"Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.","type":"boolean"},"procMount":{"description":"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.","type":"string"},"readOnlyRootFilesystem":{"description":"Whether this container has a read-only root filesystem. Default is false.","type":"boolean"},"runAsGroup":{"description":"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.","format":"int64","type":"integer"},"runAsNonRoot":{"description":"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.","type":"boolean"},"runAsUser":{"description":"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.","format":"int64","type":"integer"},"seLinuxOptions":{"description":"SELinuxOptions are the labels to be applied to the container","properties":{"level":{"description":"Level is SELinux level label that applies to the container.","type":"string"},"role":{"description":"Role is a SELinux role label that applies to the container.","type":"string"},"type":{"description":"Type is a SELinux type label that applies to the container.","type":"string"},"user":{"description":"User is a SELinux user label that applies to the container.","type":"string"}},"type":"object"},"windowsOptions":{"description":"WindowsSecurityContextOptions contain Windows-specific options and credentials.","properties":{"gmsaCredentialSpec":{"description":"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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.","type":"string"},"gmsaCredentialSpecName":{"description":"GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.","type":"string"}},"type":"object"}},"type":"object"},"stdin":{"description":"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.","type":"boolean"},"stdinOnce":{"description":"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","type":"boolean"},"terminationMessagePath":{"description":"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.","type":"string"},"terminationMessagePolicy":{"description":"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.","type":"string"},"tty":{"description":"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.","type":"boolean"},"volumeDevices":{"description":"volumeDevices is the list of block devices to be used by the container. This is a beta feature.","items":{"description":"volumeDevice describes a mapping of a raw block device within a container.","properties":{"devicePath":{"description":"devicePath is the path inside of the container that the device will be mapped to.","type":"string"},"name":{"description":"name must match the name of a persistentVolumeClaim in the pod","type":"string"}},"required":["name","devicePath"],"type":"object"},"type":"array"},"volumeMounts":{"description":"Pod volumes to mount into the container's filesystem. Cannot be updated.","items":{"description":"VolumeMount describes a mounting of a Volume within a container.","properties":{"mountPath":{"description":"Path within the container at which the volume should be mounted. Must not contain ':'.","type":"string"},"mountPropagation":{"description":"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.","type":"string"},"name":{"description":"This must match the Name of a Volume.","type":"string"},"readOnly":{"description":"Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.","type":"boolean"},"subPath":{"description":"Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).","type":"string"},"subPathExpr":{"description":"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. This field is beta in 1.15.","type":"string"}},"required":["name","mountPath"],"type":"object"},"type":"array"},"workingDir":{"description":"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.","type":"string"}},"required":["name"],"type":"object"},"type":"array"},"listenLocal":{"description":"ListenLocal makes the Alertmanager server listen on loopback, so that it does not bind against the Pod IP. Note this is only for the Alertmanager UI, not the gossip communication.","type":"boolean"},"logFormat":{"description":"Log format for Alertmanager to be configured with.","type":"string"},"logLevel":{"description":"Log level for Alertmanager to be configured with.","type":"string"},"nodeSelector":{"description":"Define which Nodes the Pods are scheduled on.","type":"object"},"paused":{"description":"If set to true all actions on the underlaying managed objects are not goint to be performed, except for delete actions.","type":"boolean"},"podMetadata":{"description":"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.","properties":{"annotations":{"description":"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","type":"object"},"clusterName":{"description":"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.","type":"string"},"creationTimestamp":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"deletionGracePeriodSeconds":{"description":"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.","format":"int64","type":"integer"},"deletionTimestamp":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"finalizers":{"description":"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.","items":{"type":"string"},"type":"array"},"generateName":{"description":"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.\n\nIf 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).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency","type":"string"},"generation":{"description":"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.","format":"int64","type":"integer"},"initializers":{"description":"Initializers tracks the progress of initialization.","properties":{"pending":{"description":"Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.","items":{"description":"Initializer is information about an initializer that has not yet completed.","properties":{"name":{"description":"name of the process that is responsible for initializing this object.","type":"string"}},"required":["name"],"type":"object"},"type":"array"},"result":{"description":"Status is a return value for calls that don't return other objects.","properties":{"apiVersion":{"description":"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/api-conventions.md#resources","type":"string"},"code":{"description":"Suggested HTTP return code for this status, 0 if not set.","format":"int32","type":"integer"},"details":{"description":"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.","properties":{"causes":{"description":"The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.","items":{"description":"StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.","properties":{"field":{"description":"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.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"","type":"string"},"message":{"description":"A human-readable description of the cause of the error. This field may be presented as-is to a reader.","type":"string"},"reason":{"description":"A machine-readable description of the cause of the error. If this value is empty there is no information available.","type":"string"}},"type":"object"},"type":"array"},"group":{"description":"The group attribute of the resource associated with the status StatusReason.","type":"string"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"name":{"description":"The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).","type":"string"},"retryAfterSeconds":{"description":"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.","format":"int32","type":"integer"},"uid":{"description":"UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"type":"object"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"message":{"description":"A human-readable description of the status of this operation.","type":"string"},"metadata":{"description":"ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.","properties":{"continue":{"description":"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.","type":"string"},"remainingItemCount":{"description":"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.\n\nThis field is alpha and can be changed or removed without notice.","format":"int64","type":"integer"},"resourceVersion":{"description":"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/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"selfLink is a URL representing this object. Populated by the system. Read-only.","type":"string"}},"type":"object"},"reason":{"description":"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.","type":"string"},"status":{"description":"Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status","type":"string"}},"type":"object"}},"required":["pending"],"type":"object"},"labels":{"description":"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","type":"object"},"managedFields":{"description":"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.\n\nThis field is alpha and can be changed or removed without notice.","items":{"description":"ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.","properties":{"apiVersion":{"description":"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.","type":"string"},"fields":{"description":"Fields stores a set of fields in a data structure like a Trie. To understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff","type":"object"},"manager":{"description":"Manager is an identifier of the workflow managing these fields.","type":"string"},"operation":{"description":"Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.","type":"string"},"time":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"name":{"description":"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","type":"string"},"namespace":{"description":"Namespace defines the space within 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.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces","type":"string"},"ownerReferences":{"description":"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.","items":{"description":"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.","properties":{"apiVersion":{"description":"API version of the referent.","type":"string"},"blockOwnerDeletion":{"description":"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.","type":"boolean"},"controller":{"description":"If true, this reference points to the managing controller.","type":"boolean"},"kind":{"description":"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds","type":"string"},"name":{"description":"Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names","type":"string"},"uid":{"description":"UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"required":["apiVersion","kind","name","uid"],"type":"object"},"type":"array"},"resourceVersion":{"description":"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.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"SelfLink is a URL representing this object. Populated by the system. Read-only.","type":"string"},"uid":{"description":"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.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"type":"object"},"portName":{"description":"Port name used for the pods and governing service. This defaults to web","type":"string"},"priorityClassName":{"description":"Priority class assigned to the Pods","type":"string"},"replicas":{"description":"Size is the expected size of the alertmanager cluster. The controller will eventually make the size of the running cluster equal to the expected size.","format":"int32","type":"integer"},"resources":{"description":"ResourceRequirements describes the compute resource requirements.","properties":{"limits":{"description":"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","type":"object"},"requests":{"description":"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-compute-resources-container/","type":"object"}},"type":"object"},"retention":{"description":"Time duration Alertmanager shall retain data for. Default is '120h', and must match the regular expression `[0-9]+(ms|s|m|h)` (milliseconds seconds minutes hours).","type":"string"},"routePrefix":{"description":"The route prefix Alertmanager registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with `kubectl proxy`.","type":"string"},"secrets":{"description":"Secrets is a list of Secrets in the same namespace as the Alertmanager object, which shall be mounted into the Alertmanager Pods. The Secrets are mounted into /etc/alertmanager/secrets/\u003csecret-name\u003e.","items":{"type":"string"},"type":"array"},"securityContext":{"description":"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.","properties":{"fsGroup":{"description":"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:\n\n1. 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----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.","format":"int64","type":"integer"},"runAsGroup":{"description":"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.","format":"int64","type":"integer"},"runAsNonRoot":{"description":"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.","type":"boolean"},"runAsUser":{"description":"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.","format":"int64","type":"integer"},"seLinuxOptions":{"description":"SELinuxOptions are the labels to be applied to the container","properties":{"level":{"description":"Level is SELinux level label that applies to the container.","type":"string"},"role":{"description":"Role is a SELinux role label that applies to the container.","type":"string"},"type":{"description":"Type is a SELinux type label that applies to the container.","type":"string"},"user":{"description":"User is a SELinux user label that applies to the container.","type":"string"}},"type":"object"},"supplementalGroups":{"description":"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.","items":{"format":"int64","type":"integer"},"type":"array"},"sysctls":{"description":"Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.","items":{"description":"Sysctl defines a kernel parameter to be set","properties":{"name":{"description":"Name of a property to set","type":"string"},"value":{"description":"Value of a property to set","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"windowsOptions":{"description":"WindowsSecurityContextOptions contain Windows-specific options and credentials.","properties":{"gmsaCredentialSpec":{"description":"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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.","type":"string"},"gmsaCredentialSpecName":{"description":"GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.","type":"string"}},"type":"object"}},"type":"object"},"serviceAccountName":{"description":"ServiceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.","type":"string"},"sha":{"description":"SHA of Alertmanager container image to be deployed. Defaults to the value of `version`. Similar to a tag, but the SHA explicitly deploys an immutable container image. Version and Tag are ignored if SHA is set.","type":"string"},"storage":{"description":"StorageSpec defines the configured storage for a group Prometheus servers. If neither `emptyDir` nor `volumeClaimTemplate` is specified, then by default an [EmptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) will be used.","properties":{"emptyDir":{"description":"Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.","properties":{"medium":{"description":"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","type":"string"},"sizeLimit":{}},"type":"object"},"volumeClaimTemplate":{"description":"PersistentVolumeClaim is a user's request for and claim to a persistent volume","properties":{"apiVersion":{"description":"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/api-conventions.md#resources","type":"string"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"metadata":{"description":"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.","properties":{"annotations":{"description":"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","type":"object"},"clusterName":{"description":"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.","type":"string"},"creationTimestamp":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"deletionGracePeriodSeconds":{"description":"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.","format":"int64","type":"integer"},"deletionTimestamp":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"finalizers":{"description":"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.","items":{"type":"string"},"type":"array"},"generateName":{"description":"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.\n\nIf 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).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency","type":"string"},"generation":{"description":"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.","format":"int64","type":"integer"},"initializers":{"description":"Initializers tracks the progress of initialization.","properties":{"pending":{"description":"Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.","items":{"description":"Initializer is information about an initializer that has not yet completed.","properties":{"name":{"description":"name of the process that is responsible for initializing this object.","type":"string"}},"required":["name"],"type":"object"},"type":"array"},"result":{"description":"Status is a return value for calls that don't return other objects.","properties":{"apiVersion":{"description":"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/api-conventions.md#resources","type":"string"},"code":{"description":"Suggested HTTP return code for this status, 0 if not set.","format":"int32","type":"integer"},"details":{"description":"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.","properties":{"causes":{"description":"The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.","items":{"description":"StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.","properties":{"field":{"description":"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.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"","type":"string"},"message":{"description":"A human-readable description of the cause of the error. This field may be presented as-is to a reader.","type":"string"},"reason":{"description":"A machine-readable description of the cause of the error. If this value is empty there is no information available.","type":"string"}},"type":"object"},"type":"array"},"group":{"description":"The group attribute of the resource associated with the status StatusReason.","type":"string"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"name":{"description":"The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).","type":"string"},"retryAfterSeconds":{"description":"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.","format":"int32","type":"integer"},"uid":{"description":"UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"type":"object"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"message":{"description":"A human-readable description of the status of this operation.","type":"string"},"metadata":{"description":"ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.","properties":{"continue":{"description":"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.","type":"string"},"remainingItemCount":{"description":"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.\n\nThis field is alpha and can be changed or removed without notice.","format":"int64","type":"integer"},"resourceVersion":{"description":"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/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"selfLink is a URL representing this object. Populated by the system. Read-only.","type":"string"}},"type":"object"},"reason":{"description":"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.","type":"string"},"status":{"description":"Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status","type":"string"}},"type":"object"}},"required":["pending"],"type":"object"},"labels":{"description":"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","type":"object"},"managedFields":{"description":"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.\n\nThis field is alpha and can be changed or removed without notice.","items":{"description":"ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.","properties":{"apiVersion":{"description":"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.","type":"string"},"fields":{"description":"Fields stores a set of fields in a data structure like a Trie. To understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff","type":"object"},"manager":{"description":"Manager is an identifier of the workflow managing these fields.","type":"string"},"operation":{"description":"Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.","type":"string"},"time":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"name":{"description":"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","type":"string"},"namespace":{"description":"Namespace defines the space within 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.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces","type":"string"},"ownerReferences":{"description":"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.","items":{"description":"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.","properties":{"apiVersion":{"description":"API version of the referent.","type":"string"},"blockOwnerDeletion":{"description":"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.","type":"boolean"},"controller":{"description":"If true, this reference points to the managing controller.","type":"boolean"},"kind":{"description":"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds","type":"string"},"name":{"description":"Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names","type":"string"},"uid":{"description":"UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"required":["apiVersion","kind","name","uid"],"type":"object"},"type":"array"},"resourceVersion":{"description":"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.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"SelfLink is a URL representing this object. Populated by the system. Read-only.","type":"string"},"uid":{"description":"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.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"type":"object"},"spec":{"description":"PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes","properties":{"accessModes":{"description":"AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1","items":{"type":"string"},"type":"array"},"dataSource":{"description":"TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.","properties":{"apiGroup":{"description":"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.","type":"string"},"kind":{"description":"Kind is the type of resource being referenced","type":"string"},"name":{"description":"Name is the name of resource being referenced","type":"string"}},"required":["kind","name"],"type":"object"},"resources":{"description":"ResourceRequirements describes the compute resource requirements.","properties":{"limits":{"description":"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","type":"object"},"requests":{"description":"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-compute-resources-container/","type":"object"}},"type":"object"},"selector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"storageClassName":{"description":"Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1","type":"string"},"volumeMode":{"description":"volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature.","type":"string"},"volumeName":{"description":"VolumeName is the binding reference to the PersistentVolume backing this claim.","type":"string"}},"type":"object"},"status":{"description":"PersistentVolumeClaimStatus is the current status of a persistent volume claim.","properties":{"accessModes":{"description":"AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1","items":{"type":"string"},"type":"array"},"capacity":{"description":"Represents the actual resources of the underlying volume.","type":"object"},"conditions":{"description":"Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.","items":{"description":"PersistentVolumeClaimCondition contails details about state of pvc","properties":{"lastProbeTime":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"lastTransitionTime":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"message":{"description":"Human-readable message indicating details about last transition.","type":"string"},"reason":{"description":"Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.","type":"string"},"status":{"type":"string"},"type":{"type":"string"}},"required":["type","status"],"type":"object"},"type":"array"},"phase":{"description":"Phase represents the current phase of PersistentVolumeClaim.","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"tag":{"description":"Tag of Alertmanager container image to be deployed. Defaults to the value of `version`. Version is ignored if Tag is set.","type":"string"},"tolerations":{"description":"If specified, the pod's tolerations.","items":{"description":"The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.","properties":{"effect":{"description":"Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.","type":"string"},"key":{"description":"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.","type":"string"},"operator":{"description":"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.","type":"string"},"tolerationSeconds":{"description":"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.","format":"int64","type":"integer"},"value":{"description":"Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.","type":"string"}},"type":"object"},"type":"array"},"version":{"description":"Version the cluster should be on.","type":"string"},"volumeMounts":{"description":"VolumeMounts allows configuration of additional VolumeMounts on the output StatefulSet definition. VolumeMounts specified will be appended to other VolumeMounts in the alertmanager container, that are generated as a result of StorageSpec objects.","items":{"description":"VolumeMount describes a mounting of a Volume within a container.","properties":{"mountPath":{"description":"Path within the container at which the volume should be mounted. Must not contain ':'.","type":"string"},"mountPropagation":{"description":"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.","type":"string"},"name":{"description":"This must match the Name of a Volume.","type":"string"},"readOnly":{"description":"Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.","type":"boolean"},"subPath":{"description":"Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).","type":"string"},"subPathExpr":{"description":"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. This field is beta in 1.15.","type":"string"}},"required":["name","mountPath"],"type":"object"},"type":"array"},"volumes":{"description":"Volumes allows configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.","items":{"description":"Volume represents a named volume in a pod that may be accessed by any container in the pod.","properties":{"awsElasticBlockStore":{"description":"Represents a Persistent Disk resource in AWS.\n\nAn 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.","properties":{"fsType":{"description":"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","type":"string"},"partition":{"description":"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).","format":"int32","type":"integer"},"readOnly":{"description":"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","type":"boolean"},"volumeID":{"description":"Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore","type":"string"}},"required":["volumeID"],"type":"object"},"azureDisk":{"description":"AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.","properties":{"cachingMode":{"description":"Host Caching mode: None, Read Only, Read Write.","type":"string"},"diskName":{"description":"The Name of the data disk in the blob storage","type":"string"},"diskURI":{"description":"The URI the data disk in the blob storage","type":"string"},"fsType":{"description":"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.","type":"string"},"kind":{"description":"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","type":"string"},"readOnly":{"description":"Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"}},"required":["diskName","diskURI"],"type":"object"},"azureFile":{"description":"AzureFile represents an Azure File Service mount on the host and bind mount to the pod.","properties":{"readOnly":{"description":"Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretName":{"description":"the name of secret that contains Azure Storage Account Name and Key","type":"string"},"shareName":{"description":"Share Name","type":"string"}},"required":["secretName","shareName"],"type":"object"},"cephfs":{"description":"Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.","properties":{"monitors":{"description":"Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it","items":{"type":"string"},"type":"array"},"path":{"description":"Optional: Used as the mounted root, rather than the full Ceph tree, default is /","type":"string"},"readOnly":{"description":"Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it","type":"boolean"},"secretFile":{"description":"Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it","type":"string"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"user":{"description":"Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it","type":"string"}},"required":["monitors"],"type":"object"},"cinder":{"description":"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.","properties":{"fsType":{"description":"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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md","type":"string"},"readOnly":{"description":"Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md","type":"boolean"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"volumeID":{"description":"volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md","type":"string"}},"required":["volumeID"],"type":"object"},"configMap":{"description":"Adapts a ConfigMap into a volume.\n\nThe 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.","properties":{"defaultMode":{"description":"Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"items":{"description":"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":{"description":"Maps a string key to a path within a volume.","properties":{"key":{"description":"The key to project.","type":"string"},"mode":{"description":"Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"path":{"description":"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 '..'.","type":"string"}},"required":["key","path"],"type":"object"},"type":"array"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its keys must be defined","type":"boolean"}},"type":"object"},"csi":{"description":"Represents a source location of a volume to mount, managed by an external CSI driver","properties":{"driver":{"description":"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.","type":"string"},"fsType":{"description":"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.","type":"string"},"nodePublishSecretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"readOnly":{"description":"Specifies a read-only configuration for the volume. Defaults to false (read/write).","type":"boolean"},"volumeAttributes":{"description":"VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.","type":"object"}},"required":["driver"],"type":"object"},"downwardAPI":{"description":"DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.","properties":{"defaultMode":{"description":"Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"items":{"description":"Items is a list of downward API volume file","items":{"description":"DownwardAPIVolumeFile represents information to create the file containing the pod field","properties":{"fieldRef":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string"}},"required":["fieldPath"],"type":"object"},"mode":{"description":"Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"path":{"description":"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 '..'","type":"string"},"resourceFieldRef":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"}},"required":["path"],"type":"object"},"type":"array"}},"type":"object"},"emptyDir":{"description":"Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.","properties":{"medium":{"description":"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","type":"string"},"sizeLimit":{}},"type":"object"},"fc":{"description":"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.","properties":{"fsType":{"description":"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.","type":"string"},"lun":{"description":"Optional: FC target lun number","format":"int32","type":"integer"},"readOnly":{"description":"Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"targetWWNs":{"description":"Optional: FC target worldwide names (WWNs)","items":{"type":"string"},"type":"array"},"wwids":{"description":"Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.","items":{"type":"string"},"type":"array"}},"type":"object"},"flexVolume":{"description":"FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.","properties":{"driver":{"description":"Driver is the name of the driver to use for this volume.","type":"string"},"fsType":{"description":"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.","type":"string"},"options":{"description":"Optional: Extra command options if any.","type":"object"},"readOnly":{"description":"Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"}},"required":["driver"],"type":"object"},"flocker":{"description":"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.","properties":{"datasetName":{"description":"Name of the dataset stored as metadata -\u003e name on the dataset for Flocker should be considered as deprecated","type":"string"},"datasetUUID":{"description":"UUID of the dataset. This is unique identifier of a Flocker dataset","type":"string"}},"type":"object"},"gcePersistentDisk":{"description":"Represents a Persistent Disk resource in Google Compute Engine.\n\nA 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.","properties":{"fsType":{"description":"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","type":"string"},"partition":{"description":"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","format":"int32","type":"integer"},"pdName":{"description":"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","type":"string"},"readOnly":{"description":"ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk","type":"boolean"}},"required":["pdName"],"type":"object"},"gitRepo":{"description":"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.\n\nDEPRECATED: 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.","properties":{"directory":{"description":"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.","type":"string"},"repository":{"description":"Repository URL","type":"string"},"revision":{"description":"Commit hash for the specified revision.","type":"string"}},"required":["repository"],"type":"object"},"glusterfs":{"description":"Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.","properties":{"endpoints":{"description":"EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod","type":"string"},"path":{"description":"Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod","type":"string"},"readOnly":{"description":"ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod","type":"boolean"}},"required":["endpoints","path"],"type":"object"},"hostPath":{"description":"Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.","properties":{"path":{"description":"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","type":"string"},"type":{"description":"Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath","type":"string"}},"required":["path"],"type":"object"},"iscsi":{"description":"Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.","properties":{"chapAuthDiscovery":{"description":"whether support iSCSI Discovery CHAP authentication","type":"boolean"},"chapAuthSession":{"description":"whether support iSCSI Session CHAP authentication","type":"boolean"},"fsType":{"description":"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","type":"string"},"initiatorName":{"description":"Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface \u003ctarget portal\u003e:\u003cvolume name\u003e will be created for the connection.","type":"string"},"iqn":{"description":"Target iSCSI Qualified Name.","type":"string"},"iscsiInterface":{"description":"iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).","type":"string"},"lun":{"description":"iSCSI Target Lun number.","format":"int32","type":"integer"},"portals":{"description":"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).","items":{"type":"string"},"type":"array"},"readOnly":{"description":"ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.","type":"boolean"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"targetPortal":{"description":"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).","type":"string"}},"required":["targetPortal","iqn","lun"],"type":"object"},"name":{"description":"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","type":"string"},"nfs":{"description":"Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.","properties":{"path":{"description":"Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"string"},"readOnly":{"description":"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","type":"boolean"},"server":{"description":"Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"string"}},"required":["server","path"],"type":"object"},"persistentVolumeClaim":{"description":"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).","properties":{"claimName":{"description":"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","type":"string"},"readOnly":{"description":"Will force the ReadOnly setting in VolumeMounts. Default false.","type":"boolean"}},"required":["claimName"],"type":"object"},"photonPersistentDisk":{"description":"Represents a Photon Controller persistent disk resource.","properties":{"fsType":{"description":"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.","type":"string"},"pdID":{"description":"ID that identifies Photon Controller persistent disk","type":"string"}},"required":["pdID"],"type":"object"},"portworxVolume":{"description":"PortworxVolumeSource represents a Portworx volume resource.","properties":{"fsType":{"description":"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.","type":"string"},"readOnly":{"description":"Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"volumeID":{"description":"VolumeID uniquely identifies a Portworx volume","type":"string"}},"required":["volumeID"],"type":"object"},"projected":{"description":"Represents a projected volume source","properties":{"defaultMode":{"description":"Mode bits to use on created files by default. Must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"sources":{"description":"list of volume projections","items":{"description":"Projection that may be projected along with other supported volume types","properties":{"configMap":{"description":"Adapts a ConfigMap into a projected volume.\n\nThe 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.","properties":{"items":{"description":"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":{"description":"Maps a string key to a path within a volume.","properties":{"key":{"description":"The key to project.","type":"string"},"mode":{"description":"Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"path":{"description":"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 '..'.","type":"string"}},"required":["key","path"],"type":"object"},"type":"array"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its keys must be defined","type":"boolean"}},"type":"object"},"downwardAPI":{"description":"Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.","properties":{"items":{"description":"Items is a list of DownwardAPIVolume file","items":{"description":"DownwardAPIVolumeFile represents information to create the file containing the pod field","properties":{"fieldRef":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string"}},"required":["fieldPath"],"type":"object"},"mode":{"description":"Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"path":{"description":"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 '..'","type":"string"},"resourceFieldRef":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"}},"required":["path"],"type":"object"},"type":"array"}},"type":"object"},"secret":{"description":"Adapts a secret into a projected volume.\n\nThe 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.","properties":{"items":{"description":"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":{"description":"Maps a string key to a path within a volume.","properties":{"key":{"description":"The key to project.","type":"string"},"mode":{"description":"Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"path":{"description":"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 '..'.","type":"string"}},"required":["key","path"],"type":"object"},"type":"array"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"type":"object"},"serviceAccountToken":{"description":"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).","properties":{"audience":{"description":"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.","type":"string"},"expirationSeconds":{"description":"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.","format":"int64","type":"integer"},"path":{"description":"Path is the path relative to the mount point of the file to project the token into.","type":"string"}},"required":["path"],"type":"object"}},"type":"object"},"type":"array"}},"required":["sources"],"type":"object"},"quobyte":{"description":"Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.","properties":{"group":{"description":"Group to map volume access to Default is no group","type":"string"},"readOnly":{"description":"ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.","type":"boolean"},"registry":{"description":"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","type":"string"},"tenant":{"description":"Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin","type":"string"},"user":{"description":"User to map volume access to Defaults to serivceaccount user","type":"string"},"volume":{"description":"Volume is a string that references an already created Quobyte volume by name.","type":"string"}},"required":["registry","volume"],"type":"object"},"rbd":{"description":"Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.","properties":{"fsType":{"description":"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","type":"string"},"image":{"description":"The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it","type":"string"},"keyring":{"description":"Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it","type":"string"},"monitors":{"description":"A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it","items":{"type":"string"},"type":"array"},"pool":{"description":"The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it","type":"string"},"readOnly":{"description":"ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it","type":"boolean"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"user":{"description":"The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it","type":"string"}},"required":["monitors","image"],"type":"object"},"scaleIO":{"description":"ScaleIOVolumeSource represents a persistent ScaleIO volume","properties":{"fsType":{"description":"Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".","type":"string"},"gateway":{"description":"The host address of the ScaleIO API Gateway.","type":"string"},"protectionDomain":{"description":"The name of the ScaleIO Protection Domain for the configured storage.","type":"string"},"readOnly":{"description":"Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"sslEnabled":{"description":"Flag to enable/disable SSL communication with Gateway, default false","type":"boolean"},"storageMode":{"description":"Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.","type":"string"},"storagePool":{"description":"The ScaleIO Storage Pool associated with the protection domain.","type":"string"},"system":{"description":"The name of the storage system as configured in ScaleIO.","type":"string"},"volumeName":{"description":"The name of a volume already created in the ScaleIO system that is associated with this volume source.","type":"string"}},"required":["gateway","system","secretRef"],"type":"object"},"secret":{"description":"Adapts a Secret into a volume.\n\nThe 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.","properties":{"defaultMode":{"description":"Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"items":{"description":"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":{"description":"Maps a string key to a path within a volume.","properties":{"key":{"description":"The key to project.","type":"string"},"mode":{"description":"Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"path":{"description":"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 '..'.","type":"string"}},"required":["key","path"],"type":"object"},"type":"array"},"optional":{"description":"Specify whether the Secret or its keys must be defined","type":"boolean"},"secretName":{"description":"Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret","type":"string"}},"type":"object"},"storageos":{"description":"Represents a StorageOS persistent volume resource.","properties":{"fsType":{"description":"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.","type":"string"},"readOnly":{"description":"Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"volumeName":{"description":"VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.","type":"string"},"volumeNamespace":{"description":"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.","type":"string"}},"type":"object"},"vsphereVolume":{"description":"Represents a vSphere volume resource.","properties":{"fsType":{"description":"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.","type":"string"},"storagePolicyID":{"description":"Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.","type":"string"},"storagePolicyName":{"description":"Storage Policy Based Management (SPBM) profile name.","type":"string"},"volumePath":{"description":"Path that identifies vSphere volume vmdk","type":"string"}},"required":["volumePath"],"type":"object"}},"required":["name"],"type":"object"},"type":"array"}},"type":"object"},"status":{"description":"AlertmanagerStatus is the most recent observed status of the Alertmanager cluster. Read-only. Not included when requesting from the apiserver, only from the Prometheus Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status","properties":{"availableReplicas":{"description":"Total number of available pods (ready for at least minReadySeconds) targeted by this Alertmanager cluster.","format":"int32","type":"integer"},"paused":{"description":"Represents whether any actions on the underlaying managed objects are being performed. Only delete actions will be performed.","type":"boolean"},"replicas":{"description":"Total number of non-terminated pods targeted by this Alertmanager cluster (their labels match the selector).","format":"int32","type":"integer"},"unavailableReplicas":{"description":"Total number of unavailable pods targeted by this Alertmanager cluster.","format":"int32","type":"integer"},"updatedReplicas":{"description":"Total number of non-terminated pods targeted by this Alertmanager cluster that have the desired version spec.","format":"int32","type":"integer"}},"required":["paused","replicas","updatedReplicas","availableReplicas","unavailableReplicas"],"type":"object"}},"type":"object"}},"version":"v1"}} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/jsonnetfile.json b/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/jsonnetfile.json deleted file mode 100644 index c5b89fc2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/jsonnetfile.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "dependencies": [ - { - "name": "ksonnet", - "source": { - "git": { - "remote": "https://github.com/ksonnet/ksonnet-lib", - "subdir": "" - } - }, - "version": "master" - } - ] -} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/podmonitor-crd.libsonnet b/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/podmonitor-crd.libsonnet deleted file mode 100644 index 0bd70547..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/podmonitor-crd.libsonnet +++ /dev/null @@ -1 +0,0 @@ -{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"creationTimestamp":null,"name":"podmonitors.monitoring.coreos.com"},"spec":{"group":"monitoring.coreos.com","names":{"kind":"PodMonitor","plural":"podmonitors"},"scope":"Namespaced","validation":{"openAPIV3Schema":{"properties":{"apiVersion":{"description":"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/api-conventions.md#resources","type":"string"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"spec":{"description":"PodMonitorSpec contains specification parameters for a PodMonitor.","properties":{"jobLabel":{"description":"The label to use to retrieve the job name from.","type":"string"},"namespaceSelector":{"description":"NamespaceSelector is a selector for selecting either all namespaces or a list of namespaces.","properties":{"any":{"description":"Boolean describing whether all namespaces are selected in contrast to a list restricting them.","type":"boolean"},"matchNames":{"description":"List of namespace names.","items":{"type":"string"},"type":"array"}},"type":"object"},"podMetricsEndpoints":{"description":"A list of endpoints allowed as part of this PodMonitor.","items":{"description":"PodMetricsEndpoint defines a scrapeable endpoint of a Kubernetes Pod serving Prometheus metrics.","properties":{"honorLabels":{"description":"HonorLabels chooses the metric's labels on collisions with target labels.","type":"boolean"},"interval":{"description":"Interval at which metrics should be scraped","type":"string"},"metricRelabelings":{"description":"MetricRelabelConfigs to apply to samples before ingestion.","items":{"description":"RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `\u003cmetric_relabel_configs\u003e`-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs","properties":{"action":{"description":"Action to perform based on regex matching. Default is 'replace'","type":"string"},"modulus":{"description":"Modulus to take of the hash of the source label values.","format":"int64","type":"integer"},"regex":{"description":"Regular expression against which the extracted value is matched. defailt is '(.*)'","type":"string"},"replacement":{"description":"Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'","type":"string"},"separator":{"description":"Separator placed between concatenated source label values. default is ';'.","type":"string"},"sourceLabels":{"description":"The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.","items":{"type":"string"},"type":"array"},"targetLabel":{"description":"Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.","type":"string"}},"type":"object"},"type":"array"},"params":{"description":"Optional HTTP URL parameters","type":"object"},"path":{"description":"HTTP path to scrape for metrics.","type":"string"},"port":{"description":"Name of the port this endpoint refers to. Mutually exclusive with targetPort.","type":"string"},"proxyUrl":{"description":"ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.","type":"string"},"relabelings":{"description":"RelabelConfigs to apply to samples before ingestion. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config","items":{"description":"RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `\u003cmetric_relabel_configs\u003e`-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs","properties":{"action":{"description":"Action to perform based on regex matching. Default is 'replace'","type":"string"},"modulus":{"description":"Modulus to take of the hash of the source label values.","format":"int64","type":"integer"},"regex":{"description":"Regular expression against which the extracted value is matched. defailt is '(.*)'","type":"string"},"replacement":{"description":"Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'","type":"string"},"separator":{"description":"Separator placed between concatenated source label values. default is ';'.","type":"string"},"sourceLabels":{"description":"The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.","items":{"type":"string"},"type":"array"},"targetLabel":{"description":"Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.","type":"string"}},"type":"object"},"type":"array"},"scheme":{"description":"HTTP scheme to use for scraping.","type":"string"},"scrapeTimeout":{"description":"Timeout after which the scrape is ended","type":"string"},"targetPort":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"type":"object"},"type":"array"},"podTargetLabels":{"description":"PodTargetLabels transfers labels on the Kubernetes Pod onto the target.","items":{"type":"string"},"type":"array"},"sampleLimit":{"description":"SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.","format":"int64","type":"integer"},"selector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"}},"required":["podMetricsEndpoints","selector"],"type":"object"}},"type":"object"}},"version":"v1"}} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/prometheus-crd.libsonnet b/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/prometheus-crd.libsonnet deleted file mode 100644 index cfe280b8..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/prometheus-crd.libsonnet +++ /dev/null @@ -1 +0,0 @@ -{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"creationTimestamp":null,"name":"prometheuses.monitoring.coreos.com"},"spec":{"group":"monitoring.coreos.com","names":{"kind":"Prometheus","plural":"prometheuses"},"scope":"Namespaced","validation":{"openAPIV3Schema":{"properties":{"apiVersion":{"description":"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/api-conventions.md#resources","type":"string"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"spec":{"description":"PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status","properties":{"additionalAlertManagerConfigs":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"additionalAlertRelabelConfigs":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"additionalScrapeConfigs":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"affinity":{"description":"Affinity is a group of affinity scheduling rules.","properties":{"nodeAffinity":{"description":"Node affinity is a group of node affinity scheduling rules.","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"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.","items":{"description":"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).","properties":{"preference":{"description":"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.","properties":{"matchExpressions":{"description":"A list of node selector requirements by node's labels.","items":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to.","type":"string"},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.","type":"string"},"values":{"description":"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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchFields":{"description":"A list of node selector requirements by node's fields.","items":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to.","type":"string"},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.","type":"string"},"values":{"description":"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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"}},"type":"object"},"weight":{"description":"Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.","format":"int32","type":"integer"}},"required":["weight","preference"],"type":"object"},"type":"array"},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"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.","properties":{"nodeSelectorTerms":{"description":"Required. A list of node selector terms. The terms are ORed.","items":{"description":"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.","properties":{"matchExpressions":{"description":"A list of node selector requirements by node's labels.","items":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to.","type":"string"},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.","type":"string"},"values":{"description":"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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchFields":{"description":"A list of node selector requirements by node's fields.","items":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to.","type":"string"},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.","type":"string"},"values":{"description":"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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"}},"type":"object"},"type":"array"}},"required":["nodeSelectorTerms"],"type":"object"}},"type":"object"},"podAffinity":{"description":"Pod affinity is a group of inter pod affinity scheduling rules.","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"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.","items":{"description":"The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)","properties":{"podAffinityTerm":{"description":"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 \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running","properties":{"labelSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"namespaces":{"description":"namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"","items":{"type":"string"},"type":"array"},"topologyKey":{"description":"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.","type":"string"}},"required":["topologyKey"],"type":"object"},"weight":{"description":"weight associated with matching the corresponding podAffinityTerm, in the range 1-100.","format":"int32","type":"integer"}},"required":["weight","podAffinityTerm"],"type":"object"},"type":"array"},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"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.","items":{"description":"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 \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running","properties":{"labelSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"namespaces":{"description":"namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"","items":{"type":"string"},"type":"array"},"topologyKey":{"description":"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.","type":"string"}},"required":["topologyKey"],"type":"object"},"type":"array"}},"type":"object"},"podAntiAffinity":{"description":"Pod anti affinity is a group of inter pod anti affinity scheduling rules.","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"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.","items":{"description":"The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)","properties":{"podAffinityTerm":{"description":"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 \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running","properties":{"labelSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"namespaces":{"description":"namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"","items":{"type":"string"},"type":"array"},"topologyKey":{"description":"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.","type":"string"}},"required":["topologyKey"],"type":"object"},"weight":{"description":"weight associated with matching the corresponding podAffinityTerm, in the range 1-100.","format":"int32","type":"integer"}},"required":["weight","podAffinityTerm"],"type":"object"},"type":"array"},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"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.","items":{"description":"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 \u003ctopologyKey\u003e matches that of any node on which a pod of the set of pods is running","properties":{"labelSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"namespaces":{"description":"namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"","items":{"type":"string"},"type":"array"},"topologyKey":{"description":"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.","type":"string"}},"required":["topologyKey"],"type":"object"},"type":"array"}},"type":"object"}},"type":"object"},"alerting":{"description":"AlertingSpec defines parameters for alerting configuration of Prometheus servers.","properties":{"alertmanagers":{"description":"AlertmanagerEndpoints Prometheus should fire alerts against.","items":{"description":"AlertmanagerEndpoints defines a selection of a single Endpoints object containing alertmanager IPs to fire alerts against.","properties":{"bearerTokenFile":{"description":"BearerTokenFile to read from filesystem to use when authenticating to Alertmanager.","type":"string"},"name":{"description":"Name of Endpoints object in Namespace.","type":"string"},"namespace":{"description":"Namespace of Endpoints object.","type":"string"},"pathPrefix":{"description":"Prefix for the HTTP path alerts are pushed to.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use when firing alerts.","type":"string"},"tlsConfig":{"description":"TLSConfig specifies TLS configuration parameters.","properties":{"caFile":{"description":"The CA cert to use for the targets.","type":"string"},"certFile":{"description":"The client cert file for the targets.","type":"string"},"insecureSkipVerify":{"description":"Disable target certificate validation.","type":"boolean"},"keyFile":{"description":"The client key file for the targets.","type":"string"},"serverName":{"description":"Used to verify the hostname for the targets.","type":"string"}},"type":"object"}},"required":["namespace","name","port"],"type":"object"},"type":"array"}},"required":["alertmanagers"],"type":"object"},"apiserverConfig":{"description":"APIServerConfig defines a host and auth methods to access apiserver. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config","properties":{"basicAuth":{"description":"BasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints","properties":{"password":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"username":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"bearerToken":{"description":"Bearer token for accessing apiserver.","type":"string"},"bearerTokenFile":{"description":"File to read bearer token for accessing apiserver.","type":"string"},"host":{"description":"Host of apiserver. A valid string consisting of a hostname or IP followed by an optional port number","type":"string"},"tlsConfig":{"description":"TLSConfig specifies TLS configuration parameters.","properties":{"caFile":{"description":"The CA cert to use for the targets.","type":"string"},"certFile":{"description":"The client cert file for the targets.","type":"string"},"insecureSkipVerify":{"description":"Disable target certificate validation.","type":"boolean"},"keyFile":{"description":"The client key file for the targets.","type":"string"},"serverName":{"description":"Used to verify the hostname for the targets.","type":"string"}},"type":"object"}},"required":["host"],"type":"object"},"baseImage":{"description":"Base image to use for a Prometheus deployment.","type":"string"},"configMaps":{"description":"ConfigMaps is a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. The ConfigMaps are mounted into /etc/prometheus/configmaps/\u003cconfigmap-name\u003e.","items":{"type":"string"},"type":"array"},"containers":{"description":"Containers allows injecting additional containers or modifying operator generated containers. This can be used to allow adding an authentication proxy to a Prometheus pod or to change the behavior of an operator generated container. Containers described here modify an operator generated container if they share the same name and modifications are done via a strategic merge patch. The current container names are: `prometheus`, `prometheus-config-reloader`, `rules-configmap-reloader`, and `thanos-sidecar`. Overriding containers is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.","items":{"description":"A single application container that you want to run within a pod.","properties":{"args":{"description":"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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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","items":{"type":"string"},"type":"array"},"command":{"description":"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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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","items":{"type":"string"},"type":"array"},"env":{"description":"List of environment variables to set in the container. Cannot be updated.","items":{"description":"EnvVar represents an environment variable present in a Container.","properties":{"name":{"description":"Name of the environment variable. Must be a C_IDENTIFIER.","type":"string"},"value":{"description":"Variable references $(VAR_NAME) are expanded using the previous 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".","type":"string"},"valueFrom":{"description":"EnvVarSource represents a source for the value of an EnvVar.","properties":{"configMapKeyRef":{"description":"Selects a key from a ConfigMap.","properties":{"key":{"description":"The key to select.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"fieldRef":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string"}},"required":["fieldPath"],"type":"object"},"resourceFieldRef":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"},"secretKeyRef":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"}},"required":["name"],"type":"object"},"type":"array"},"envFrom":{"description":"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.","items":{"description":"EnvFromSource represents the source of a set of ConfigMaps","properties":{"configMapRef":{"description":"ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap must be defined","type":"boolean"}},"type":"object"},"prefix":{"description":"An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.","type":"string"},"secretRef":{"description":"SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret must be defined","type":"boolean"}},"type":"object"}},"type":"object"},"type":"array"},"image":{"description":"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.","type":"string"},"imagePullPolicy":{"description":"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","type":"string"},"lifecycle":{"description":"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.","properties":{"postStart":{"description":"Handler defines a specific action that should be taken","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"}},"type":"object"},"preStop":{"description":"Handler defines a specific action that should be taken","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"}},"type":"object"}},"type":"object"},"livenessProbe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","format":"int32","type":"integer"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"initialDelaySeconds":{"description":"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","format":"int32","type":"integer"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","format":"int32","type":"integer"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"},"timeoutSeconds":{"description":"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","format":"int32","type":"integer"}},"type":"object"},"name":{"description":"Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.","type":"string"},"ports":{"description":"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.","items":{"description":"ContainerPort represents a network port in a single container.","properties":{"containerPort":{"description":"Number of port to expose on the pod's IP address. This must be a valid port number, 0 \u003c x \u003c 65536.","format":"int32","type":"integer"},"hostIP":{"description":"What host IP to bind the external port to.","type":"string"},"hostPort":{"description":"Number of port to expose on the host. If specified, this must be a valid port number, 0 \u003c x \u003c 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.","format":"int32","type":"integer"},"name":{"description":"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.","type":"string"},"protocol":{"description":"Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".","type":"string"}},"required":["containerPort"],"type":"object"},"type":"array"},"readinessProbe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","format":"int32","type":"integer"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"initialDelaySeconds":{"description":"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","format":"int32","type":"integer"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","format":"int32","type":"integer"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"},"timeoutSeconds":{"description":"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","format":"int32","type":"integer"}},"type":"object"},"resources":{"description":"ResourceRequirements describes the compute resource requirements.","properties":{"limits":{"description":"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","type":"object"},"requests":{"description":"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-compute-resources-container/","type":"object"}},"type":"object"},"securityContext":{"description":"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.","properties":{"allowPrivilegeEscalation":{"description":"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","type":"boolean"},"capabilities":{"description":"Adds and removes POSIX capabilities from running containers.","properties":{"add":{"description":"Added capabilities","items":{"type":"string"},"type":"array"},"drop":{"description":"Removed capabilities","items":{"type":"string"},"type":"array"}},"type":"object"},"privileged":{"description":"Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.","type":"boolean"},"procMount":{"description":"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.","type":"string"},"readOnlyRootFilesystem":{"description":"Whether this container has a read-only root filesystem. Default is false.","type":"boolean"},"runAsGroup":{"description":"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.","format":"int64","type":"integer"},"runAsNonRoot":{"description":"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.","type":"boolean"},"runAsUser":{"description":"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.","format":"int64","type":"integer"},"seLinuxOptions":{"description":"SELinuxOptions are the labels to be applied to the container","properties":{"level":{"description":"Level is SELinux level label that applies to the container.","type":"string"},"role":{"description":"Role is a SELinux role label that applies to the container.","type":"string"},"type":{"description":"Type is a SELinux type label that applies to the container.","type":"string"},"user":{"description":"User is a SELinux user label that applies to the container.","type":"string"}},"type":"object"},"windowsOptions":{"description":"WindowsSecurityContextOptions contain Windows-specific options and credentials.","properties":{"gmsaCredentialSpec":{"description":"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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.","type":"string"},"gmsaCredentialSpecName":{"description":"GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.","type":"string"}},"type":"object"}},"type":"object"},"stdin":{"description":"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.","type":"boolean"},"stdinOnce":{"description":"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","type":"boolean"},"terminationMessagePath":{"description":"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.","type":"string"},"terminationMessagePolicy":{"description":"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.","type":"string"},"tty":{"description":"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.","type":"boolean"},"volumeDevices":{"description":"volumeDevices is the list of block devices to be used by the container. This is a beta feature.","items":{"description":"volumeDevice describes a mapping of a raw block device within a container.","properties":{"devicePath":{"description":"devicePath is the path inside of the container that the device will be mapped to.","type":"string"},"name":{"description":"name must match the name of a persistentVolumeClaim in the pod","type":"string"}},"required":["name","devicePath"],"type":"object"},"type":"array"},"volumeMounts":{"description":"Pod volumes to mount into the container's filesystem. Cannot be updated.","items":{"description":"VolumeMount describes a mounting of a Volume within a container.","properties":{"mountPath":{"description":"Path within the container at which the volume should be mounted. Must not contain ':'.","type":"string"},"mountPropagation":{"description":"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.","type":"string"},"name":{"description":"This must match the Name of a Volume.","type":"string"},"readOnly":{"description":"Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.","type":"boolean"},"subPath":{"description":"Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).","type":"string"},"subPathExpr":{"description":"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. This field is beta in 1.15.","type":"string"}},"required":["name","mountPath"],"type":"object"},"type":"array"},"workingDir":{"description":"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.","type":"string"}},"required":["name"],"type":"object"},"type":"array"},"enableAdminAPI":{"description":"Enable access to prometheus web admin API. Defaults to the value of `false`. WARNING: Enabling the admin APIs enables mutating endpoints, to delete data, shutdown Prometheus, and more. Enabling this should be done with care and the user is advised to add additional authentication authorization via a proxy to ensure only clients authorized to perform these actions can do so. For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis","type":"boolean"},"evaluationInterval":{"description":"Interval between consecutive evaluations.","type":"string"},"externalLabels":{"description":"The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager).","type":"object"},"externalUrl":{"description":"The external URL the Prometheus instances will be available under. This is necessary to generate correct URLs. This is necessary if Prometheus is not served from root of a DNS name.","type":"string"},"image":{"description":"Image if specified has precedence over baseImage, tag and sha combinations. Specifying the version is still necessary to ensure the Prometheus Operator knows what version of Prometheus is being configured.","type":"string"},"imagePullSecrets":{"description":"An optional list of references to secrets in the same namespace to use for pulling prometheus and alertmanager images from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod","items":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"type":"array"},"initContainers":{"description":"InitContainers allows adding initContainers to the pod definition. Those can be used to e.g. fetch secrets for injection into the Prometheus configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ Using initContainers for any use case other then secret fetching is entirely outside the scope of what the maintainers will support and by doing so, you accept that this behaviour may break at any time without notice.","items":{"description":"A single application container that you want to run within a pod.","properties":{"args":{"description":"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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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","items":{"type":"string"},"type":"array"},"command":{"description":"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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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","items":{"type":"string"},"type":"array"},"env":{"description":"List of environment variables to set in the container. Cannot be updated.","items":{"description":"EnvVar represents an environment variable present in a Container.","properties":{"name":{"description":"Name of the environment variable. Must be a C_IDENTIFIER.","type":"string"},"value":{"description":"Variable references $(VAR_NAME) are expanded using the previous 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".","type":"string"},"valueFrom":{"description":"EnvVarSource represents a source for the value of an EnvVar.","properties":{"configMapKeyRef":{"description":"Selects a key from a ConfigMap.","properties":{"key":{"description":"The key to select.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"fieldRef":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string"}},"required":["fieldPath"],"type":"object"},"resourceFieldRef":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"},"secretKeyRef":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"}},"required":["name"],"type":"object"},"type":"array"},"envFrom":{"description":"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.","items":{"description":"EnvFromSource represents the source of a set of ConfigMaps","properties":{"configMapRef":{"description":"ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap must be defined","type":"boolean"}},"type":"object"},"prefix":{"description":"An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.","type":"string"},"secretRef":{"description":"SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret must be defined","type":"boolean"}},"type":"object"}},"type":"object"},"type":"array"},"image":{"description":"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.","type":"string"},"imagePullPolicy":{"description":"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","type":"string"},"lifecycle":{"description":"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.","properties":{"postStart":{"description":"Handler defines a specific action that should be taken","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"}},"type":"object"},"preStop":{"description":"Handler defines a specific action that should be taken","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"}},"type":"object"}},"type":"object"},"livenessProbe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","format":"int32","type":"integer"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"initialDelaySeconds":{"description":"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","format":"int32","type":"integer"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","format":"int32","type":"integer"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"},"timeoutSeconds":{"description":"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","format":"int32","type":"integer"}},"type":"object"},"name":{"description":"Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.","type":"string"},"ports":{"description":"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.","items":{"description":"ContainerPort represents a network port in a single container.","properties":{"containerPort":{"description":"Number of port to expose on the pod's IP address. This must be a valid port number, 0 \u003c x \u003c 65536.","format":"int32","type":"integer"},"hostIP":{"description":"What host IP to bind the external port to.","type":"string"},"hostPort":{"description":"Number of port to expose on the host. If specified, this must be a valid port number, 0 \u003c x \u003c 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.","format":"int32","type":"integer"},"name":{"description":"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.","type":"string"},"protocol":{"description":"Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".","type":"string"}},"required":["containerPort"],"type":"object"},"type":"array"},"readinessProbe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"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.","items":{"type":"string"},"type":"array"}},"type":"object"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","format":"int32","type":"integer"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"initialDelaySeconds":{"description":"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","format":"int32","type":"integer"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","format":"int32","type":"integer"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"required":["port"],"type":"object"},"timeoutSeconds":{"description":"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","format":"int32","type":"integer"}},"type":"object"},"resources":{"description":"ResourceRequirements describes the compute resource requirements.","properties":{"limits":{"description":"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","type":"object"},"requests":{"description":"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-compute-resources-container/","type":"object"}},"type":"object"},"securityContext":{"description":"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.","properties":{"allowPrivilegeEscalation":{"description":"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","type":"boolean"},"capabilities":{"description":"Adds and removes POSIX capabilities from running containers.","properties":{"add":{"description":"Added capabilities","items":{"type":"string"},"type":"array"},"drop":{"description":"Removed capabilities","items":{"type":"string"},"type":"array"}},"type":"object"},"privileged":{"description":"Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.","type":"boolean"},"procMount":{"description":"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.","type":"string"},"readOnlyRootFilesystem":{"description":"Whether this container has a read-only root filesystem. Default is false.","type":"boolean"},"runAsGroup":{"description":"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.","format":"int64","type":"integer"},"runAsNonRoot":{"description":"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.","type":"boolean"},"runAsUser":{"description":"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.","format":"int64","type":"integer"},"seLinuxOptions":{"description":"SELinuxOptions are the labels to be applied to the container","properties":{"level":{"description":"Level is SELinux level label that applies to the container.","type":"string"},"role":{"description":"Role is a SELinux role label that applies to the container.","type":"string"},"type":{"description":"Type is a SELinux type label that applies to the container.","type":"string"},"user":{"description":"User is a SELinux user label that applies to the container.","type":"string"}},"type":"object"},"windowsOptions":{"description":"WindowsSecurityContextOptions contain Windows-specific options and credentials.","properties":{"gmsaCredentialSpec":{"description":"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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.","type":"string"},"gmsaCredentialSpecName":{"description":"GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.","type":"string"}},"type":"object"}},"type":"object"},"stdin":{"description":"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.","type":"boolean"},"stdinOnce":{"description":"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","type":"boolean"},"terminationMessagePath":{"description":"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.","type":"string"},"terminationMessagePolicy":{"description":"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.","type":"string"},"tty":{"description":"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.","type":"boolean"},"volumeDevices":{"description":"volumeDevices is the list of block devices to be used by the container. This is a beta feature.","items":{"description":"volumeDevice describes a mapping of a raw block device within a container.","properties":{"devicePath":{"description":"devicePath is the path inside of the container that the device will be mapped to.","type":"string"},"name":{"description":"name must match the name of a persistentVolumeClaim in the pod","type":"string"}},"required":["name","devicePath"],"type":"object"},"type":"array"},"volumeMounts":{"description":"Pod volumes to mount into the container's filesystem. Cannot be updated.","items":{"description":"VolumeMount describes a mounting of a Volume within a container.","properties":{"mountPath":{"description":"Path within the container at which the volume should be mounted. Must not contain ':'.","type":"string"},"mountPropagation":{"description":"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.","type":"string"},"name":{"description":"This must match the Name of a Volume.","type":"string"},"readOnly":{"description":"Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.","type":"boolean"},"subPath":{"description":"Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).","type":"string"},"subPathExpr":{"description":"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. This field is beta in 1.15.","type":"string"}},"required":["name","mountPath"],"type":"object"},"type":"array"},"workingDir":{"description":"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.","type":"string"}},"required":["name"],"type":"object"},"type":"array"},"listenLocal":{"description":"ListenLocal makes the Prometheus server listen on loopback, so that it does not bind against the Pod IP.","type":"boolean"},"logFormat":{"description":"Log format for Prometheus to be configured with.","type":"string"},"logLevel":{"description":"Log level for Prometheus to be configured with.","type":"string"},"nodeSelector":{"description":"Define which Nodes the Pods are scheduled on.","type":"object"},"paused":{"description":"When a Prometheus deployment is paused, no actions except for deletion will be performed on the underlying objects.","type":"boolean"},"podMetadata":{"description":"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.","properties":{"annotations":{"description":"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","type":"object"},"clusterName":{"description":"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.","type":"string"},"creationTimestamp":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"deletionGracePeriodSeconds":{"description":"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.","format":"int64","type":"integer"},"deletionTimestamp":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"finalizers":{"description":"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.","items":{"type":"string"},"type":"array"},"generateName":{"description":"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.\n\nIf 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).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency","type":"string"},"generation":{"description":"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.","format":"int64","type":"integer"},"initializers":{"description":"Initializers tracks the progress of initialization.","properties":{"pending":{"description":"Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.","items":{"description":"Initializer is information about an initializer that has not yet completed.","properties":{"name":{"description":"name of the process that is responsible for initializing this object.","type":"string"}},"required":["name"],"type":"object"},"type":"array"},"result":{"description":"Status is a return value for calls that don't return other objects.","properties":{"apiVersion":{"description":"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/api-conventions.md#resources","type":"string"},"code":{"description":"Suggested HTTP return code for this status, 0 if not set.","format":"int32","type":"integer"},"details":{"description":"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.","properties":{"causes":{"description":"The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.","items":{"description":"StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.","properties":{"field":{"description":"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.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"","type":"string"},"message":{"description":"A human-readable description of the cause of the error. This field may be presented as-is to a reader.","type":"string"},"reason":{"description":"A machine-readable description of the cause of the error. If this value is empty there is no information available.","type":"string"}},"type":"object"},"type":"array"},"group":{"description":"The group attribute of the resource associated with the status StatusReason.","type":"string"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"name":{"description":"The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).","type":"string"},"retryAfterSeconds":{"description":"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.","format":"int32","type":"integer"},"uid":{"description":"UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"type":"object"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"message":{"description":"A human-readable description of the status of this operation.","type":"string"},"metadata":{"description":"ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.","properties":{"continue":{"description":"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.","type":"string"},"remainingItemCount":{"description":"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.\n\nThis field is alpha and can be changed or removed without notice.","format":"int64","type":"integer"},"resourceVersion":{"description":"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/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"selfLink is a URL representing this object. Populated by the system. Read-only.","type":"string"}},"type":"object"},"reason":{"description":"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.","type":"string"},"status":{"description":"Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status","type":"string"}},"type":"object"}},"required":["pending"],"type":"object"},"labels":{"description":"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","type":"object"},"managedFields":{"description":"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.\n\nThis field is alpha and can be changed or removed without notice.","items":{"description":"ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.","properties":{"apiVersion":{"description":"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.","type":"string"},"fields":{"description":"Fields stores a set of fields in a data structure like a Trie. To understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff","type":"object"},"manager":{"description":"Manager is an identifier of the workflow managing these fields.","type":"string"},"operation":{"description":"Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.","type":"string"},"time":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"name":{"description":"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","type":"string"},"namespace":{"description":"Namespace defines the space within 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.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces","type":"string"},"ownerReferences":{"description":"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.","items":{"description":"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.","properties":{"apiVersion":{"description":"API version of the referent.","type":"string"},"blockOwnerDeletion":{"description":"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.","type":"boolean"},"controller":{"description":"If true, this reference points to the managing controller.","type":"boolean"},"kind":{"description":"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds","type":"string"},"name":{"description":"Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names","type":"string"},"uid":{"description":"UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"required":["apiVersion","kind","name","uid"],"type":"object"},"type":"array"},"resourceVersion":{"description":"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.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"SelfLink is a URL representing this object. Populated by the system. Read-only.","type":"string"},"uid":{"description":"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.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"type":"object"},"podMonitorNamespaceSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"podMonitorSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"portName":{"description":"Port name used for the pods and governing service. This defaults to web","type":"string"},"priorityClassName":{"description":"Priority class assigned to the Pods","type":"string"},"prometheusExternalLabelName":{"description":"Name of Prometheus external label used to denote Prometheus instance name. Defaults to the value of `prometheus`. External label will _not_ be added when value is set to empty string (`\"\"`).","type":"string"},"query":{"description":"QuerySpec defines the query command line flags when starting Prometheus.","properties":{"lookbackDelta":{"description":"The delta difference allowed for retrieving metrics during expression evaluations.","type":"string"},"maxConcurrency":{"description":"Number of concurrent queries that can be run at once.","format":"int32","type":"integer"},"maxSamples":{"description":"Maximum number of samples a single query can load into memory. Note that queries will fail if they would load more samples than this into memory, so this also limits the number of samples a query can return.","format":"int32","type":"integer"},"timeout":{"description":"Maximum time a query may take before being aborted.","type":"string"}},"type":"object"},"remoteRead":{"description":"If specified, the remote_read spec. This is an experimental feature, it may change in any upcoming release in a breaking way.","items":{"description":"RemoteReadSpec defines the remote_read configuration for prometheus.","properties":{"basicAuth":{"description":"BasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints","properties":{"password":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"username":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"bearerToken":{"description":"bearer token for remote read.","type":"string"},"bearerTokenFile":{"description":"File to read bearer token for remote read.","type":"string"},"proxyUrl":{"description":"Optional ProxyURL","type":"string"},"readRecent":{"description":"Whether reads should be made for queries for time ranges that the local storage should have complete data for.","type":"boolean"},"remoteTimeout":{"description":"Timeout for requests to the remote read endpoint.","type":"string"},"requiredMatchers":{"description":"An optional list of equality matchers which have to be present in a selector to query the remote read endpoint.","type":"object"},"tlsConfig":{"description":"TLSConfig specifies TLS configuration parameters.","properties":{"caFile":{"description":"The CA cert to use for the targets.","type":"string"},"certFile":{"description":"The client cert file for the targets.","type":"string"},"insecureSkipVerify":{"description":"Disable target certificate validation.","type":"boolean"},"keyFile":{"description":"The client key file for the targets.","type":"string"},"serverName":{"description":"Used to verify the hostname for the targets.","type":"string"}},"type":"object"},"url":{"description":"The URL of the endpoint to send samples to.","type":"string"}},"required":["url"],"type":"object"},"type":"array"},"remoteWrite":{"description":"If specified, the remote_write spec. This is an experimental feature, it may change in any upcoming release in a breaking way.","items":{"description":"RemoteWriteSpec defines the remote_write configuration for prometheus.","properties":{"basicAuth":{"description":"BasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints","properties":{"password":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"username":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"bearerToken":{"description":"File to read bearer token for remote write.","type":"string"},"bearerTokenFile":{"description":"File to read bearer token for remote write.","type":"string"},"proxyUrl":{"description":"Optional ProxyURL","type":"string"},"queueConfig":{"description":"QueueConfig allows the tuning of remote_write queue_config parameters. This object is referenced in the RemoteWriteSpec object.","properties":{"batchSendDeadline":{"description":"BatchSendDeadline is the maximum time a sample will wait in buffer.","type":"string"},"capacity":{"description":"Capacity is the number of samples to buffer per shard before we start dropping them.","format":"int32","type":"integer"},"maxBackoff":{"description":"MaxBackoff is the maximum retry delay.","type":"string"},"maxRetries":{"description":"MaxRetries is the maximum number of times to retry a batch on recoverable errors.","format":"int32","type":"integer"},"maxSamplesPerSend":{"description":"MaxSamplesPerSend is the maximum number of samples per send.","format":"int32","type":"integer"},"maxShards":{"description":"MaxShards is the maximum number of shards, i.e. amount of concurrency.","format":"int32","type":"integer"},"minBackoff":{"description":"MinBackoff is the initial retry delay. Gets doubled for every retry.","type":"string"},"minShards":{"description":"MinShards is the minimum number of shards, i.e. amount of concurrency.","format":"int32","type":"integer"}},"type":"object"},"remoteTimeout":{"description":"Timeout for requests to the remote write endpoint.","type":"string"},"tlsConfig":{"description":"TLSConfig specifies TLS configuration parameters.","properties":{"caFile":{"description":"The CA cert to use for the targets.","type":"string"},"certFile":{"description":"The client cert file for the targets.","type":"string"},"insecureSkipVerify":{"description":"Disable target certificate validation.","type":"boolean"},"keyFile":{"description":"The client key file for the targets.","type":"string"},"serverName":{"description":"Used to verify the hostname for the targets.","type":"string"}},"type":"object"},"url":{"description":"The URL of the endpoint to send samples to.","type":"string"},"writeRelabelConfigs":{"description":"The list of remote write relabel configurations.","items":{"description":"RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `\u003cmetric_relabel_configs\u003e`-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs","properties":{"action":{"description":"Action to perform based on regex matching. Default is 'replace'","type":"string"},"modulus":{"description":"Modulus to take of the hash of the source label values.","format":"int64","type":"integer"},"regex":{"description":"Regular expression against which the extracted value is matched. defailt is '(.*)'","type":"string"},"replacement":{"description":"Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'","type":"string"},"separator":{"description":"Separator placed between concatenated source label values. default is ';'.","type":"string"},"sourceLabels":{"description":"The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.","items":{"type":"string"},"type":"array"},"targetLabel":{"description":"Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.","type":"string"}},"type":"object"},"type":"array"}},"required":["url"],"type":"object"},"type":"array"},"replicaExternalLabelName":{"description":"Name of Prometheus external label used to denote replica name. Defaults to the value of `prometheus_replica`. External label will _not_ be added when value is set to empty string (`\"\"`).","type":"string"},"replicas":{"description":"Number of instances to deploy for a Prometheus deployment.","format":"int32","type":"integer"},"resources":{"description":"ResourceRequirements describes the compute resource requirements.","properties":{"limits":{"description":"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","type":"object"},"requests":{"description":"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-compute-resources-container/","type":"object"}},"type":"object"},"retention":{"description":"Time duration Prometheus shall retain data for. Default is '24h', and must match the regular expression `[0-9]+(ms|s|m|h|d|w|y)` (milliseconds seconds minutes hours days weeks years).","type":"string"},"retentionSize":{"description":"Maximum amount of disk space used by blocks.","type":"string"},"routePrefix":{"description":"The route prefix Prometheus registers HTTP handlers for. This is useful, if using ExternalURL and a proxy is rewriting HTTP routes of a request, and the actual ExternalURL is still true, but the server serves requests under a different route prefix. For example for use with `kubectl proxy`.","type":"string"},"ruleNamespaceSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"ruleSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"rules":{"description":"/--rules.*/ command-line arguments","properties":{"alert":{"description":"/--rules.alert.*/ command-line arguments","properties":{"forGracePeriod":{"description":"Minimum duration between alert and restored 'for' state. This is maintained only for alerts with configured 'for' time greater than grace period.","type":"string"},"forOutageTolerance":{"description":"Max time to tolerate prometheus outage for restoring 'for' state of alert.","type":"string"},"resendDelay":{"description":"Minimum amount of time to wait before resending an alert to Alertmanager.","type":"string"}},"type":"object"}},"type":"object"},"scrapeInterval":{"description":"Interval between consecutive scrapes.","type":"string"},"secrets":{"description":"Secrets is a list of Secrets in the same namespace as the Prometheus object, which shall be mounted into the Prometheus Pods. The Secrets are mounted into /etc/prometheus/secrets/\u003csecret-name\u003e.","items":{"type":"string"},"type":"array"},"securityContext":{"description":"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.","properties":{"fsGroup":{"description":"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:\n\n1. 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----\n\nIf unset, the Kubelet will not modify the ownership and permissions of any volume.","format":"int64","type":"integer"},"runAsGroup":{"description":"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.","format":"int64","type":"integer"},"runAsNonRoot":{"description":"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.","type":"boolean"},"runAsUser":{"description":"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.","format":"int64","type":"integer"},"seLinuxOptions":{"description":"SELinuxOptions are the labels to be applied to the container","properties":{"level":{"description":"Level is SELinux level label that applies to the container.","type":"string"},"role":{"description":"Role is a SELinux role label that applies to the container.","type":"string"},"type":{"description":"Type is a SELinux type label that applies to the container.","type":"string"},"user":{"description":"User is a SELinux user label that applies to the container.","type":"string"}},"type":"object"},"supplementalGroups":{"description":"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.","items":{"format":"int64","type":"integer"},"type":"array"},"sysctls":{"description":"Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.","items":{"description":"Sysctl defines a kernel parameter to be set","properties":{"name":{"description":"Name of a property to set","type":"string"},"value":{"description":"Value of a property to set","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"windowsOptions":{"description":"WindowsSecurityContextOptions contain Windows-specific options and credentials.","properties":{"gmsaCredentialSpec":{"description":"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. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.","type":"string"},"gmsaCredentialSpecName":{"description":"GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag.","type":"string"}},"type":"object"}},"type":"object"},"serviceAccountName":{"description":"ServiceAccountName is the name of the ServiceAccount to use to run the Prometheus Pods.","type":"string"},"serviceMonitorNamespaceSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"serviceMonitorSelector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"sha":{"description":"SHA of Prometheus container image to be deployed. Defaults to the value of `version`. Similar to a tag, but the SHA explicitly deploys an immutable container image. Version and Tag are ignored if SHA is set.","type":"string"},"storage":{"description":"StorageSpec defines the configured storage for a group Prometheus servers. If neither `emptyDir` nor `volumeClaimTemplate` is specified, then by default an [EmptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) will be used.","properties":{"emptyDir":{"description":"Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.","properties":{"medium":{"description":"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","type":"string"},"sizeLimit":{}},"type":"object"},"volumeClaimTemplate":{"description":"PersistentVolumeClaim is a user's request for and claim to a persistent volume","properties":{"apiVersion":{"description":"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/api-conventions.md#resources","type":"string"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"metadata":{"description":"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.","properties":{"annotations":{"description":"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","type":"object"},"clusterName":{"description":"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.","type":"string"},"creationTimestamp":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"deletionGracePeriodSeconds":{"description":"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.","format":"int64","type":"integer"},"deletionTimestamp":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"finalizers":{"description":"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.","items":{"type":"string"},"type":"array"},"generateName":{"description":"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.\n\nIf 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).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency","type":"string"},"generation":{"description":"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.","format":"int64","type":"integer"},"initializers":{"description":"Initializers tracks the progress of initialization.","properties":{"pending":{"description":"Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.","items":{"description":"Initializer is information about an initializer that has not yet completed.","properties":{"name":{"description":"name of the process that is responsible for initializing this object.","type":"string"}},"required":["name"],"type":"object"},"type":"array"},"result":{"description":"Status is a return value for calls that don't return other objects.","properties":{"apiVersion":{"description":"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/api-conventions.md#resources","type":"string"},"code":{"description":"Suggested HTTP return code for this status, 0 if not set.","format":"int32","type":"integer"},"details":{"description":"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.","properties":{"causes":{"description":"The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.","items":{"description":"StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.","properties":{"field":{"description":"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.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"","type":"string"},"message":{"description":"A human-readable description of the cause of the error. This field may be presented as-is to a reader.","type":"string"},"reason":{"description":"A machine-readable description of the cause of the error. If this value is empty there is no information available.","type":"string"}},"type":"object"},"type":"array"},"group":{"description":"The group attribute of the resource associated with the status StatusReason.","type":"string"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"name":{"description":"The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).","type":"string"},"retryAfterSeconds":{"description":"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.","format":"int32","type":"integer"},"uid":{"description":"UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"type":"object"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"message":{"description":"A human-readable description of the status of this operation.","type":"string"},"metadata":{"description":"ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.","properties":{"continue":{"description":"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.","type":"string"},"remainingItemCount":{"description":"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.\n\nThis field is alpha and can be changed or removed without notice.","format":"int64","type":"integer"},"resourceVersion":{"description":"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/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"selfLink is a URL representing this object. Populated by the system. Read-only.","type":"string"}},"type":"object"},"reason":{"description":"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.","type":"string"},"status":{"description":"Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status","type":"string"}},"type":"object"}},"required":["pending"],"type":"object"},"labels":{"description":"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","type":"object"},"managedFields":{"description":"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.\n\nThis field is alpha and can be changed or removed without notice.","items":{"description":"ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.","properties":{"apiVersion":{"description":"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.","type":"string"},"fields":{"description":"Fields stores a set of fields in a data structure like a Trie. To understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff","type":"object"},"manager":{"description":"Manager is an identifier of the workflow managing these fields.","type":"string"},"operation":{"description":"Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.","type":"string"},"time":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"name":{"description":"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","type":"string"},"namespace":{"description":"Namespace defines the space within 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.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces","type":"string"},"ownerReferences":{"description":"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.","items":{"description":"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.","properties":{"apiVersion":{"description":"API version of the referent.","type":"string"},"blockOwnerDeletion":{"description":"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.","type":"boolean"},"controller":{"description":"If true, this reference points to the managing controller.","type":"boolean"},"kind":{"description":"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds","type":"string"},"name":{"description":"Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names","type":"string"},"uid":{"description":"UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"required":["apiVersion","kind","name","uid"],"type":"object"},"type":"array"},"resourceVersion":{"description":"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.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"SelfLink is a URL representing this object. Populated by the system. Read-only.","type":"string"},"uid":{"description":"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.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"type":"object"},"spec":{"description":"PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes","properties":{"accessModes":{"description":"AccessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1","items":{"type":"string"},"type":"array"},"dataSource":{"description":"TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.","properties":{"apiGroup":{"description":"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.","type":"string"},"kind":{"description":"Kind is the type of resource being referenced","type":"string"},"name":{"description":"Name is the name of resource being referenced","type":"string"}},"required":["kind","name"],"type":"object"},"resources":{"description":"ResourceRequirements describes the compute resource requirements.","properties":{"limits":{"description":"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","type":"object"},"requests":{"description":"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-compute-resources-container/","type":"object"}},"type":"object"},"selector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"storageClassName":{"description":"Name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1","type":"string"},"volumeMode":{"description":"volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. This is a beta feature.","type":"string"},"volumeName":{"description":"VolumeName is the binding reference to the PersistentVolume backing this claim.","type":"string"}},"type":"object"},"status":{"description":"PersistentVolumeClaimStatus is the current status of a persistent volume claim.","properties":{"accessModes":{"description":"AccessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1","items":{"type":"string"},"type":"array"},"capacity":{"description":"Represents the actual resources of the underlying volume.","type":"object"},"conditions":{"description":"Current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to 'ResizeStarted'.","items":{"description":"PersistentVolumeClaimCondition contails details about state of pvc","properties":{"lastProbeTime":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"lastTransitionTime":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"message":{"description":"Human-readable message indicating details about last transition.","type":"string"},"reason":{"description":"Unique, this should be a short, machine understandable string that gives the reason for condition's last transition. If it reports \"ResizeStarted\" that means the underlying persistent volume is being resized.","type":"string"},"status":{"type":"string"},"type":{"type":"string"}},"required":["type","status"],"type":"object"},"type":"array"},"phase":{"description":"Phase represents the current phase of PersistentVolumeClaim.","type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"tag":{"description":"Tag of Prometheus container image to be deployed. Defaults to the value of `version`. Version is ignored if Tag is set.","type":"string"},"thanos":{"description":"ThanosSpec defines parameters for a Prometheus server within a Thanos deployment.","properties":{"baseImage":{"description":"Thanos base image if other than default.","type":"string"},"image":{"description":"Image if specified has precedence over baseImage, tag and sha combinations. Specifying the version is still necessary to ensure the Prometheus Operator knows what version of Thanos is being configured.","type":"string"},"objectStorageConfig":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"resources":{"description":"ResourceRequirements describes the compute resource requirements.","properties":{"limits":{"description":"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/","type":"object"},"requests":{"description":"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-compute-resources-container/","type":"object"}},"type":"object"},"sha":{"description":"SHA of Thanos container image to be deployed. Defaults to the value of `version`. Similar to a tag, but the SHA explicitly deploys an immutable container image. Version and Tag are ignored if SHA is set.","type":"string"},"tag":{"description":"Tag of Thanos sidecar container image to be deployed. Defaults to the value of `version`. Version is ignored if Tag is set.","type":"string"},"version":{"description":"Version describes the version of Thanos to use.","type":"string"}},"type":"object"},"tolerations":{"description":"If specified, the pod's tolerations.","items":{"description":"The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.","properties":{"effect":{"description":"Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.","type":"string"},"key":{"description":"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.","type":"string"},"operator":{"description":"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.","type":"string"},"tolerationSeconds":{"description":"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.","format":"int64","type":"integer"},"value":{"description":"Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.","type":"string"}},"type":"object"},"type":"array"},"version":{"description":"Version of Prometheus to be deployed.","type":"string"},"volumes":{"description":"Volumes allows configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended to other volumes that are generated as a result of StorageSpec objects.","items":{"description":"Volume represents a named volume in a pod that may be accessed by any container in the pod.","properties":{"awsElasticBlockStore":{"description":"Represents a Persistent Disk resource in AWS.\n\nAn 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.","properties":{"fsType":{"description":"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","type":"string"},"partition":{"description":"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).","format":"int32","type":"integer"},"readOnly":{"description":"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","type":"boolean"},"volumeID":{"description":"Unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore","type":"string"}},"required":["volumeID"],"type":"object"},"azureDisk":{"description":"AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.","properties":{"cachingMode":{"description":"Host Caching mode: None, Read Only, Read Write.","type":"string"},"diskName":{"description":"The Name of the data disk in the blob storage","type":"string"},"diskURI":{"description":"The URI the data disk in the blob storage","type":"string"},"fsType":{"description":"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.","type":"string"},"kind":{"description":"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","type":"string"},"readOnly":{"description":"Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"}},"required":["diskName","diskURI"],"type":"object"},"azureFile":{"description":"AzureFile represents an Azure File Service mount on the host and bind mount to the pod.","properties":{"readOnly":{"description":"Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretName":{"description":"the name of secret that contains Azure Storage Account Name and Key","type":"string"},"shareName":{"description":"Share Name","type":"string"}},"required":["secretName","shareName"],"type":"object"},"cephfs":{"description":"Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.","properties":{"monitors":{"description":"Required: Monitors is a collection of Ceph monitors More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it","items":{"type":"string"},"type":"array"},"path":{"description":"Optional: Used as the mounted root, rather than the full Ceph tree, default is /","type":"string"},"readOnly":{"description":"Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it","type":"boolean"},"secretFile":{"description":"Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it","type":"string"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"user":{"description":"Optional: User is the rados user name, default is admin More info: https://releases.k8s.io/HEAD/examples/volumes/cephfs/README.md#how-to-use-it","type":"string"}},"required":["monitors"],"type":"object"},"cinder":{"description":"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.","properties":{"fsType":{"description":"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://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md","type":"string"},"readOnly":{"description":"Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md","type":"boolean"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"volumeID":{"description":"volume id used to identify the volume in cinder More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md","type":"string"}},"required":["volumeID"],"type":"object"},"configMap":{"description":"Adapts a ConfigMap into a volume.\n\nThe 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.","properties":{"defaultMode":{"description":"Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"items":{"description":"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":{"description":"Maps a string key to a path within a volume.","properties":{"key":{"description":"The key to project.","type":"string"},"mode":{"description":"Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"path":{"description":"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 '..'.","type":"string"}},"required":["key","path"],"type":"object"},"type":"array"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its keys must be defined","type":"boolean"}},"type":"object"},"csi":{"description":"Represents a source location of a volume to mount, managed by an external CSI driver","properties":{"driver":{"description":"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.","type":"string"},"fsType":{"description":"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.","type":"string"},"nodePublishSecretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"readOnly":{"description":"Specifies a read-only configuration for the volume. Defaults to false (read/write).","type":"boolean"},"volumeAttributes":{"description":"VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values.","type":"object"}},"required":["driver"],"type":"object"},"downwardAPI":{"description":"DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.","properties":{"defaultMode":{"description":"Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"items":{"description":"Items is a list of downward API volume file","items":{"description":"DownwardAPIVolumeFile represents information to create the file containing the pod field","properties":{"fieldRef":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string"}},"required":["fieldPath"],"type":"object"},"mode":{"description":"Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"path":{"description":"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 '..'","type":"string"},"resourceFieldRef":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"}},"required":["path"],"type":"object"},"type":"array"}},"type":"object"},"emptyDir":{"description":"Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.","properties":{"medium":{"description":"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","type":"string"},"sizeLimit":{}},"type":"object"},"fc":{"description":"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.","properties":{"fsType":{"description":"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.","type":"string"},"lun":{"description":"Optional: FC target lun number","format":"int32","type":"integer"},"readOnly":{"description":"Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"targetWWNs":{"description":"Optional: FC target worldwide names (WWNs)","items":{"type":"string"},"type":"array"},"wwids":{"description":"Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.","items":{"type":"string"},"type":"array"}},"type":"object"},"flexVolume":{"description":"FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.","properties":{"driver":{"description":"Driver is the name of the driver to use for this volume.","type":"string"},"fsType":{"description":"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.","type":"string"},"options":{"description":"Optional: Extra command options if any.","type":"object"},"readOnly":{"description":"Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"}},"required":["driver"],"type":"object"},"flocker":{"description":"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.","properties":{"datasetName":{"description":"Name of the dataset stored as metadata -\u003e name on the dataset for Flocker should be considered as deprecated","type":"string"},"datasetUUID":{"description":"UUID of the dataset. This is unique identifier of a Flocker dataset","type":"string"}},"type":"object"},"gcePersistentDisk":{"description":"Represents a Persistent Disk resource in Google Compute Engine.\n\nA 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.","properties":{"fsType":{"description":"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","type":"string"},"partition":{"description":"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","format":"int32","type":"integer"},"pdName":{"description":"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","type":"string"},"readOnly":{"description":"ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk","type":"boolean"}},"required":["pdName"],"type":"object"},"gitRepo":{"description":"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.\n\nDEPRECATED: 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.","properties":{"directory":{"description":"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.","type":"string"},"repository":{"description":"Repository URL","type":"string"},"revision":{"description":"Commit hash for the specified revision.","type":"string"}},"required":["repository"],"type":"object"},"glusterfs":{"description":"Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.","properties":{"endpoints":{"description":"EndpointsName is the endpoint name that details Glusterfs topology. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod","type":"string"},"path":{"description":"Path is the Glusterfs volume path. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod","type":"string"},"readOnly":{"description":"ReadOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md#create-a-pod","type":"boolean"}},"required":["endpoints","path"],"type":"object"},"hostPath":{"description":"Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.","properties":{"path":{"description":"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","type":"string"},"type":{"description":"Type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath","type":"string"}},"required":["path"],"type":"object"},"iscsi":{"description":"Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.","properties":{"chapAuthDiscovery":{"description":"whether support iSCSI Discovery CHAP authentication","type":"boolean"},"chapAuthSession":{"description":"whether support iSCSI Session CHAP authentication","type":"boolean"},"fsType":{"description":"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","type":"string"},"initiatorName":{"description":"Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface \u003ctarget portal\u003e:\u003cvolume name\u003e will be created for the connection.","type":"string"},"iqn":{"description":"Target iSCSI Qualified Name.","type":"string"},"iscsiInterface":{"description":"iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp).","type":"string"},"lun":{"description":"iSCSI Target Lun number.","format":"int32","type":"integer"},"portals":{"description":"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).","items":{"type":"string"},"type":"array"},"readOnly":{"description":"ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.","type":"boolean"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"targetPortal":{"description":"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).","type":"string"}},"required":["targetPortal","iqn","lun"],"type":"object"},"name":{"description":"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","type":"string"},"nfs":{"description":"Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.","properties":{"path":{"description":"Path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"string"},"readOnly":{"description":"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","type":"boolean"},"server":{"description":"Server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"string"}},"required":["server","path"],"type":"object"},"persistentVolumeClaim":{"description":"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).","properties":{"claimName":{"description":"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","type":"string"},"readOnly":{"description":"Will force the ReadOnly setting in VolumeMounts. Default false.","type":"boolean"}},"required":["claimName"],"type":"object"},"photonPersistentDisk":{"description":"Represents a Photon Controller persistent disk resource.","properties":{"fsType":{"description":"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.","type":"string"},"pdID":{"description":"ID that identifies Photon Controller persistent disk","type":"string"}},"required":["pdID"],"type":"object"},"portworxVolume":{"description":"PortworxVolumeSource represents a Portworx volume resource.","properties":{"fsType":{"description":"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.","type":"string"},"readOnly":{"description":"Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"volumeID":{"description":"VolumeID uniquely identifies a Portworx volume","type":"string"}},"required":["volumeID"],"type":"object"},"projected":{"description":"Represents a projected volume source","properties":{"defaultMode":{"description":"Mode bits to use on created files by default. Must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"sources":{"description":"list of volume projections","items":{"description":"Projection that may be projected along with other supported volume types","properties":{"configMap":{"description":"Adapts a ConfigMap into a projected volume.\n\nThe 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.","properties":{"items":{"description":"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":{"description":"Maps a string key to a path within a volume.","properties":{"key":{"description":"The key to project.","type":"string"},"mode":{"description":"Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"path":{"description":"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 '..'.","type":"string"}},"required":["key","path"],"type":"object"},"type":"array"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its keys must be defined","type":"boolean"}},"type":"object"},"downwardAPI":{"description":"Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.","properties":{"items":{"description":"Items is a list of DownwardAPIVolume file","items":{"description":"DownwardAPIVolumeFile represents information to create the file containing the pod field","properties":{"fieldRef":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string"}},"required":["fieldPath"],"type":"object"},"mode":{"description":"Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"path":{"description":"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 '..'","type":"string"},"resourceFieldRef":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"}},"required":["path"],"type":"object"},"type":"array"}},"type":"object"},"secret":{"description":"Adapts a secret into a projected volume.\n\nThe 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.","properties":{"items":{"description":"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":{"description":"Maps a string key to a path within a volume.","properties":{"key":{"description":"The key to project.","type":"string"},"mode":{"description":"Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"path":{"description":"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 '..'.","type":"string"}},"required":["key","path"],"type":"object"},"type":"array"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"type":"object"},"serviceAccountToken":{"description":"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).","properties":{"audience":{"description":"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.","type":"string"},"expirationSeconds":{"description":"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.","format":"int64","type":"integer"},"path":{"description":"Path is the path relative to the mount point of the file to project the token into.","type":"string"}},"required":["path"],"type":"object"}},"type":"object"},"type":"array"}},"required":["sources"],"type":"object"},"quobyte":{"description":"Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.","properties":{"group":{"description":"Group to map volume access to Default is no group","type":"string"},"readOnly":{"description":"ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.","type":"boolean"},"registry":{"description":"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","type":"string"},"tenant":{"description":"Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin","type":"string"},"user":{"description":"User to map volume access to Defaults to serivceaccount user","type":"string"},"volume":{"description":"Volume is a string that references an already created Quobyte volume by name.","type":"string"}},"required":["registry","volume"],"type":"object"},"rbd":{"description":"Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.","properties":{"fsType":{"description":"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","type":"string"},"image":{"description":"The rados image name. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it","type":"string"},"keyring":{"description":"Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it","type":"string"},"monitors":{"description":"A collection of Ceph monitors. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it","items":{"type":"string"},"type":"array"},"pool":{"description":"The rados pool name. Default is rbd. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it","type":"string"},"readOnly":{"description":"ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it","type":"boolean"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"user":{"description":"The rados user name. Default is admin. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md#how-to-use-it","type":"string"}},"required":["monitors","image"],"type":"object"},"scaleIO":{"description":"ScaleIOVolumeSource represents a persistent ScaleIO volume","properties":{"fsType":{"description":"Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\".","type":"string"},"gateway":{"description":"The host address of the ScaleIO API Gateway.","type":"string"},"protectionDomain":{"description":"The name of the ScaleIO Protection Domain for the configured storage.","type":"string"},"readOnly":{"description":"Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"sslEnabled":{"description":"Flag to enable/disable SSL communication with Gateway, default false","type":"boolean"},"storageMode":{"description":"Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.","type":"string"},"storagePool":{"description":"The ScaleIO Storage Pool associated with the protection domain.","type":"string"},"system":{"description":"The name of the storage system as configured in ScaleIO.","type":"string"},"volumeName":{"description":"The name of a volume already created in the ScaleIO system that is associated with this volume source.","type":"string"}},"required":["gateway","system","secretRef"],"type":"object"},"secret":{"description":"Adapts a Secret into a volume.\n\nThe 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.","properties":{"defaultMode":{"description":"Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"items":{"description":"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":{"description":"Maps a string key to a path within a volume.","properties":{"key":{"description":"The key to project.","type":"string"},"mode":{"description":"Optional: mode bits to use on this file, must be a value between 0 and 0777. 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.","format":"int32","type":"integer"},"path":{"description":"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 '..'.","type":"string"}},"required":["key","path"],"type":"object"},"type":"array"},"optional":{"description":"Specify whether the Secret or its keys must be defined","type":"boolean"},"secretName":{"description":"Name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret","type":"string"}},"type":"object"},"storageos":{"description":"Represents a StorageOS persistent volume resource.","properties":{"fsType":{"description":"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.","type":"string"},"readOnly":{"description":"Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.","type":"boolean"},"secretRef":{"description":"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"}},"type":"object"},"volumeName":{"description":"VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.","type":"string"},"volumeNamespace":{"description":"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.","type":"string"}},"type":"object"},"vsphereVolume":{"description":"Represents a vSphere volume resource.","properties":{"fsType":{"description":"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.","type":"string"},"storagePolicyID":{"description":"Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.","type":"string"},"storagePolicyName":{"description":"Storage Policy Based Management (SPBM) profile name.","type":"string"},"volumePath":{"description":"Path that identifies vSphere volume vmdk","type":"string"}},"required":["volumePath"],"type":"object"}},"required":["name"],"type":"object"},"type":"array"},"walCompression":{"description":"Enable compression of the write-ahead log using Snappy. This flag is only available in versions of Prometheus \u003e= 2.11.0.","type":"boolean"}},"type":"object"},"status":{"description":"PrometheusStatus is the most recent observed status of the Prometheus cluster. Read-only. Not included when requesting from the apiserver, only from the Prometheus Operator API itself. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#spec-and-status","properties":{"availableReplicas":{"description":"Total number of available pods (ready for at least minReadySeconds) targeted by this Prometheus deployment.","format":"int32","type":"integer"},"paused":{"description":"Represents whether any actions on the underlaying managed objects are being performed. Only delete actions will be performed.","type":"boolean"},"replicas":{"description":"Total number of non-terminated pods targeted by this Prometheus deployment (their labels match the selector).","format":"int32","type":"integer"},"unavailableReplicas":{"description":"Total number of unavailable pods targeted by this Prometheus deployment.","format":"int32","type":"integer"},"updatedReplicas":{"description":"Total number of non-terminated pods targeted by this Prometheus deployment that have the desired version spec.","format":"int32","type":"integer"}},"required":["paused","replicas","updatedReplicas","availableReplicas","unavailableReplicas"],"type":"object"}},"type":"object"}},"version":"v1"}} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/prometheus-operator.libsonnet b/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/prometheus-operator.libsonnet deleted file mode 100644 index d0f06f01..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/prometheus-operator.libsonnet +++ /dev/null @@ -1,195 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; - -{ - _config+:: { - namespace: 'default', - - prometheusOperator+:: { - deploymentSelectorLabels: { - 'app.kubernetes.io/name': 'prometheus-operator', - 'app.kubernetes.io/component': 'controller', - }, - commonLabels: - $._config.prometheusOperator.deploymentSelectorLabels + - { 'app.kubernetes.io/version': $._config.versions.prometheusOperator, }, - }, - - versions+:: { - prometheusOperator: 'v0.33.0', - prometheusConfigReloader: self.prometheusOperator, - configmapReloader: 'v0.0.1', - }, - - imageRepos+:: { - prometheusOperator: 'quay.io/coreos/prometheus-operator', - configmapReloader: 'quay.io/coreos/configmap-reload', - prometheusConfigReloader: 'quay.io/coreos/prometheus-config-reloader', - }, - }, - - prometheusOperator+:: { - // Prefixing with 0 to ensure these manifests are listed and therefore created first. - '0alertmanagerCustomResourceDefinition': import 'alertmanager-crd.libsonnet', - '0prometheusCustomResourceDefinition': import 'prometheus-crd.libsonnet', - '0servicemonitorCustomResourceDefinition': import 'servicemonitor-crd.libsonnet', - '0podmonitorCustomResourceDefinition': import 'podmonitor-crd.libsonnet', - '0prometheusruleCustomResourceDefinition': import 'prometheusrule-crd.libsonnet', - - clusterRoleBinding: - local clusterRoleBinding = k.rbac.v1.clusterRoleBinding; - - clusterRoleBinding.new() + - clusterRoleBinding.mixin.metadata.withLabels($._config.prometheusOperator.commonLabels) + - clusterRoleBinding.mixin.metadata.withName('prometheus-operator') + - clusterRoleBinding.mixin.roleRef.withApiGroup('rbac.authorization.k8s.io') + - clusterRoleBinding.mixin.roleRef.withName('prometheus-operator') + - clusterRoleBinding.mixin.roleRef.mixinInstance({ kind: 'ClusterRole' }) + - clusterRoleBinding.withSubjects([{ kind: 'ServiceAccount', name: 'prometheus-operator', namespace: $._config.namespace }]), - - clusterRole: - local clusterRole = k.rbac.v1.clusterRole; - local policyRule = clusterRole.rulesType; - - local apiExtensionsRule = policyRule.new() + - policyRule.withApiGroups(['apiextensions.k8s.io']) + - policyRule.withResources([ - 'customresourcedefinitions', - ]) + - policyRule.withVerbs(['*']); - - local monitoringRule = policyRule.new() + - policyRule.withApiGroups(['monitoring.coreos.com']) + - policyRule.withResources([ - 'alertmanagers', - 'prometheuses', - 'prometheuses/finalizers', - 'alertmanagers/finalizers', - 'servicemonitors', - 'podmonitors', - 'prometheusrules', - ]) + - policyRule.withVerbs(['*']); - - local appsRule = policyRule.new() + - policyRule.withApiGroups(['apps']) + - policyRule.withResources([ - 'statefulsets', - ]) + - policyRule.withVerbs(['*']); - - local coreRule = policyRule.new() + - policyRule.withApiGroups(['']) + - policyRule.withResources([ - 'configmaps', - 'secrets', - ]) + - policyRule.withVerbs(['*']); - - local podRule = policyRule.new() + - policyRule.withApiGroups(['']) + - policyRule.withResources([ - 'pods', - ]) + - policyRule.withVerbs(['list', 'delete']); - - local routingRule = policyRule.new() + - policyRule.withApiGroups(['']) + - policyRule.withResources([ - 'services', - 'services/finalizers', - 'endpoints', - ]) + - policyRule.withVerbs(['get', 'create', 'update', 'delete']); - - local nodeRule = policyRule.new() + - policyRule.withApiGroups(['']) + - policyRule.withResources([ - 'nodes', - ]) + - policyRule.withVerbs(['list', 'watch']); - - local namespaceRule = policyRule.new() + - policyRule.withApiGroups(['']) + - policyRule.withResources([ - 'namespaces', - ]) + - policyRule.withVerbs(['get', 'list', 'watch']); - - local rules = [apiExtensionsRule, monitoringRule, appsRule, coreRule, podRule, routingRule, nodeRule, namespaceRule]; - - clusterRole.new() + - clusterRole.mixin.metadata.withLabels($._config.prometheusOperator.commonLabels) + - clusterRole.mixin.metadata.withName('prometheus-operator') + - clusterRole.withRules(rules), - - deployment: - local deployment = k.apps.v1.deployment; - local container = k.apps.v1.deployment.mixin.spec.template.spec.containersType; - local containerPort = container.portsType; - - local targetPort = 8080; - - local operatorContainer = - container.new('prometheus-operator', $._config.imageRepos.prometheusOperator + ':' + $._config.versions.prometheusOperator) + - container.withPorts(containerPort.newNamed(targetPort, 'http')) + - container.withArgs([ - '--kubelet-service=kube-system/kubelet', - // Prometheus Operator is run with a read-only root file system. By - // default glog saves logfiles to /tmp. Make it log to stderr instead. - '--logtostderr=true', - '--config-reloader-image=' + $._config.imageRepos.configmapReloader + ':' + $._config.versions.configmapReloader, - '--prometheus-config-reloader=' + $._config.imageRepos.prometheusConfigReloader + ':' + $._config.versions.prometheusConfigReloader, - ]) + - container.mixin.securityContext.withAllowPrivilegeEscalation(false) + - container.mixin.resources.withRequests({ cpu: '100m', memory: '100Mi' }) + - container.mixin.resources.withLimits({ cpu: '200m', memory: '200Mi' }); - - deployment.new('prometheus-operator', 1, operatorContainer, $._config.prometheusOperator.commonLabels) + - deployment.mixin.metadata.withNamespace($._config.namespace) + - deployment.mixin.metadata.withLabels($._config.prometheusOperator.commonLabels) + - deployment.mixin.spec.selector.withMatchLabels($._config.prometheusOperator.deploymentSelectorLabels) + - deployment.mixin.spec.template.spec.withNodeSelector({ 'beta.kubernetes.io/os': 'linux' }) + - deployment.mixin.spec.template.spec.securityContext.withRunAsNonRoot(true) + - deployment.mixin.spec.template.spec.securityContext.withRunAsUser(65534) + - deployment.mixin.spec.template.spec.withServiceAccountName('prometheus-operator'), - - serviceAccount: - local serviceAccount = k.core.v1.serviceAccount; - - serviceAccount.new('prometheus-operator') + - serviceAccount.mixin.metadata.withLabels($._config.prometheusOperator.commonLabels) + - serviceAccount.mixin.metadata.withNamespace($._config.namespace), - - service: - local service = k.core.v1.service; - local servicePort = k.core.v1.service.mixin.spec.portsType; - - local poServicePort = servicePort.newNamed('http', 8080, 'http'); - - service.new('prometheus-operator', $.prometheusOperator.deployment.spec.selector.matchLabels, [poServicePort]) + - service.mixin.metadata.withLabels($._config.prometheusOperator.commonLabels) + - service.mixin.metadata.withNamespace($._config.namespace) + - service.mixin.spec.withClusterIp('None'), - serviceMonitor: - { - apiVersion: 'monitoring.coreos.com/v1', - kind: 'ServiceMonitor', - metadata: { - name: 'prometheus-operator', - namespace: $._config.namespace, - labels: $._config.prometheusOperator.commonLabels, - }, - spec: { - endpoints: [ - { - port: 'http', - honorLabels: true, - }, - ], - selector: { - matchLabels: $._config.prometheusOperator.commonLabels, - }, - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/prometheusrule-crd.libsonnet b/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/prometheusrule-crd.libsonnet deleted file mode 100644 index 6b326184..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/prometheusrule-crd.libsonnet +++ /dev/null @@ -1 +0,0 @@ -{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"creationTimestamp":null,"name":"prometheusrules.monitoring.coreos.com"},"spec":{"group":"monitoring.coreos.com","names":{"kind":"PrometheusRule","plural":"prometheusrules"},"scope":"Namespaced","validation":{"openAPIV3Schema":{"properties":{"apiVersion":{"description":"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/api-conventions.md#resources","type":"string"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"metadata":{"description":"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.","properties":{"annotations":{"description":"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","type":"object"},"clusterName":{"description":"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.","type":"string"},"creationTimestamp":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"deletionGracePeriodSeconds":{"description":"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.","format":"int64","type":"integer"},"deletionTimestamp":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"},"finalizers":{"description":"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.","items":{"type":"string"},"type":"array"},"generateName":{"description":"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.\n\nIf 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).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency","type":"string"},"generation":{"description":"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.","format":"int64","type":"integer"},"initializers":{"description":"Initializers tracks the progress of initialization.","properties":{"pending":{"description":"Pending is a list of initializers that must execute in order before this object is visible. When the last pending initializer is removed, and no failing result is set, the initializers struct will be set to nil and the object is considered as initialized and visible to all clients.","items":{"description":"Initializer is information about an initializer that has not yet completed.","properties":{"name":{"description":"name of the process that is responsible for initializing this object.","type":"string"}},"required":["name"],"type":"object"},"type":"array"},"result":{"description":"Status is a return value for calls that don't return other objects.","properties":{"apiVersion":{"description":"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/api-conventions.md#resources","type":"string"},"code":{"description":"Suggested HTTP return code for this status, 0 if not set.","format":"int32","type":"integer"},"details":{"description":"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.","properties":{"causes":{"description":"The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.","items":{"description":"StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.","properties":{"field":{"description":"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.\n\nExamples:\n \"name\" - the field \"name\" on the current resource\n \"items[0].name\" - the field \"name\" on the first array entry in \"items\"","type":"string"},"message":{"description":"A human-readable description of the cause of the error. This field may be presented as-is to a reader.","type":"string"},"reason":{"description":"A machine-readable description of the cause of the error. If this value is empty there is no information available.","type":"string"}},"type":"object"},"type":"array"},"group":{"description":"The group attribute of the resource associated with the status StatusReason.","type":"string"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"name":{"description":"The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).","type":"string"},"retryAfterSeconds":{"description":"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.","format":"int32","type":"integer"},"uid":{"description":"UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"type":"object"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"message":{"description":"A human-readable description of the status of this operation.","type":"string"},"metadata":{"description":"ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.","properties":{"continue":{"description":"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.","type":"string"},"remainingItemCount":{"description":"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.\n\nThis field is alpha and can be changed or removed without notice.","format":"int64","type":"integer"},"resourceVersion":{"description":"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/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"selfLink is a URL representing this object. Populated by the system. Read-only.","type":"string"}},"type":"object"},"reason":{"description":"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.","type":"string"},"status":{"description":"Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status","type":"string"}},"type":"object"}},"required":["pending"],"type":"object"},"labels":{"description":"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","type":"object"},"managedFields":{"description":"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.\n\nThis field is alpha and can be changed or removed without notice.","items":{"description":"ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.","properties":{"apiVersion":{"description":"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.","type":"string"},"fields":{"description":"Fields stores a set of fields in a data structure like a Trie. To understand how this is used, see: https://github.com/kubernetes-sigs/structured-merge-diff","type":"object"},"manager":{"description":"Manager is an identifier of the workflow managing these fields.","type":"string"},"operation":{"description":"Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.","type":"string"},"time":{"description":"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.","format":"date-time","type":"string"}},"type":"object"},"type":"array"},"name":{"description":"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","type":"string"},"namespace":{"description":"Namespace defines the space within 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.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces","type":"string"},"ownerReferences":{"description":"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.","items":{"description":"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.","properties":{"apiVersion":{"description":"API version of the referent.","type":"string"},"blockOwnerDeletion":{"description":"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.","type":"boolean"},"controller":{"description":"If true, this reference points to the managing controller.","type":"boolean"},"kind":{"description":"Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds","type":"string"},"name":{"description":"Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names","type":"string"},"uid":{"description":"UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"required":["apiVersion","kind","name","uid"],"type":"object"},"type":"array"},"resourceVersion":{"description":"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.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency","type":"string"},"selfLink":{"description":"SelfLink is a URL representing this object. Populated by the system. Read-only.","type":"string"},"uid":{"description":"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.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids","type":"string"}},"type":"object"},"spec":{"description":"PrometheusRuleSpec contains specification parameters for a Rule.","properties":{"groups":{"description":"Content of Prometheus rule file","items":{"description":"RuleGroup is a list of sequentially evaluated recording and alerting rules.","properties":{"interval":{"type":"string"},"name":{"type":"string"},"rules":{"items":{"description":"Rule describes an alerting or recording rule.","properties":{"alert":{"type":"string"},"annotations":{"type":"object"},"expr":{"anyOf":[{"type":"string"},{"type":"integer"}]},"for":{"type":"string"},"labels":{"type":"object"},"record":{"type":"string"}},"required":["expr"],"type":"object"},"type":"array"}},"required":["name","rules"],"type":"object"},"type":"array"}},"type":"object"}},"type":"object"}},"version":"v1"}} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/servicemonitor-crd.libsonnet b/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/servicemonitor-crd.libsonnet deleted file mode 100644 index 20a7ece5..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus-operator/servicemonitor-crd.libsonnet +++ /dev/null @@ -1 +0,0 @@ -{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"creationTimestamp":null,"name":"servicemonitors.monitoring.coreos.com"},"spec":{"group":"monitoring.coreos.com","names":{"kind":"ServiceMonitor","plural":"servicemonitors"},"scope":"Namespaced","validation":{"openAPIV3Schema":{"properties":{"apiVersion":{"description":"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/api-conventions.md#resources","type":"string"},"kind":{"description":"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/api-conventions.md#types-kinds","type":"string"},"spec":{"description":"ServiceMonitorSpec contains specification parameters for a ServiceMonitor.","properties":{"endpoints":{"description":"A list of endpoints allowed as part of this ServiceMonitor.","items":{"description":"Endpoint defines a scrapeable endpoint serving Prometheus metrics.","properties":{"basicAuth":{"description":"BasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints","properties":{"password":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"username":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"},"bearerTokenFile":{"description":"File to read bearer token for scraping targets.","type":"string"},"honorLabels":{"description":"HonorLabels chooses the metric's labels on collisions with target labels.","type":"boolean"},"interval":{"description":"Interval at which metrics should be scraped","type":"string"},"metricRelabelings":{"description":"MetricRelabelConfigs to apply to samples before ingestion.","items":{"description":"RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `\u003cmetric_relabel_configs\u003e`-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs","properties":{"action":{"description":"Action to perform based on regex matching. Default is 'replace'","type":"string"},"modulus":{"description":"Modulus to take of the hash of the source label values.","format":"int64","type":"integer"},"regex":{"description":"Regular expression against which the extracted value is matched. defailt is '(.*)'","type":"string"},"replacement":{"description":"Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'","type":"string"},"separator":{"description":"Separator placed between concatenated source label values. default is ';'.","type":"string"},"sourceLabels":{"description":"The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.","items":{"type":"string"},"type":"array"},"targetLabel":{"description":"Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.","type":"string"}},"type":"object"},"type":"array"},"params":{"description":"Optional HTTP URL parameters","type":"object"},"path":{"description":"HTTP path to scrape for metrics.","type":"string"},"port":{"description":"Name of the service port this endpoint refers to. Mutually exclusive with targetPort.","type":"string"},"proxyUrl":{"description":"ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.","type":"string"},"relabelings":{"description":"RelabelConfigs to apply to samples before scraping. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config","items":{"description":"RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `\u003cmetric_relabel_configs\u003e`-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs","properties":{"action":{"description":"Action to perform based on regex matching. Default is 'replace'","type":"string"},"modulus":{"description":"Modulus to take of the hash of the source label values.","format":"int64","type":"integer"},"regex":{"description":"Regular expression against which the extracted value is matched. defailt is '(.*)'","type":"string"},"replacement":{"description":"Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'","type":"string"},"separator":{"description":"Separator placed between concatenated source label values. default is ';'.","type":"string"},"sourceLabels":{"description":"The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.","items":{"type":"string"},"type":"array"},"targetLabel":{"description":"Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.","type":"string"}},"type":"object"},"type":"array"},"scheme":{"description":"HTTP scheme to use for scraping.","type":"string"},"scrapeTimeout":{"description":"Timeout after which the scrape is ended","type":"string"},"targetPort":{"anyOf":[{"type":"string"},{"type":"integer"}]},"tlsConfig":{"description":"TLSConfig specifies TLS configuration parameters.","properties":{"caFile":{"description":"The CA cert to use for the targets.","type":"string"},"certFile":{"description":"The client cert file for the targets.","type":"string"},"insecureSkipVerify":{"description":"Disable target certificate validation.","type":"boolean"},"keyFile":{"description":"The client key file for the targets.","type":"string"},"serverName":{"description":"Used to verify the hostname for the targets.","type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"jobLabel":{"description":"The label to use to retrieve the job name from.","type":"string"},"namespaceSelector":{"description":"NamespaceSelector is a selector for selecting either all namespaces or a list of namespaces.","properties":{"any":{"description":"Boolean describing whether all namespaces are selected in contrast to a list restricting them.","type":"boolean"},"matchNames":{"description":"List of namespace names.","items":{"type":"string"},"type":"array"}},"type":"object"},"podTargetLabels":{"description":"PodTargetLabels transfers labels on the Kubernetes Pod onto the target.","items":{"type":"string"},"type":"array"},"sampleLimit":{"description":"SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.","format":"int64","type":"integer"},"selector":{"description":"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.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, 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.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"description":"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.","type":"object"}},"type":"object"},"targetLabels":{"description":"TargetLabels transfers labels on the Kubernetes Service onto the target.","items":{"type":"string"},"type":"array"}},"required":["endpoints","selector"],"type":"object"}},"type":"object"}},"version":"v1"}} \ No newline at end of file diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus/.gitignore b/sources/kube-prometheus/jsonnet/vendor/prometheus/.gitignore deleted file mode 100644 index b23a75c9..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.yaml -dashboards_out -vendor -jsonnetfile.lock.json diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus/Makefile b/sources/kube-prometheus/jsonnet/vendor/prometheus/Makefile deleted file mode 100644 index 9ade5aa2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -JSONNET_FMT := jsonnetfmt -n 2 --max-blank-lines 2 --string-style s --comment-style s - -all: fmt prometheus_alerts.yaml dashboards_out lint - -fmt: - find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \ - xargs -n 1 -- $(JSONNET_FMT) -i - -prometheus_alerts.yaml: mixin.libsonnet config.libsonnet alerts.libsonnet - jsonnet -S alerts.jsonnet > $@ - -dashboards_out: mixin.libsonnet config.libsonnet dashboards.libsonnet - @mkdir -p dashboards_out - jsonnet -J vendor -m dashboards_out dashboards.jsonnet - -lint: prometheus_alerts.yaml - find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \ - while read f; do \ - $(JSONNET_FMT) "$$f" | diff -u "$$f" -; \ - done - - promtool check rules prometheus_alerts.yaml - -clean: - rm -rf dashboards_out prometheus_alerts.yaml diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus/README.md b/sources/kube-prometheus/jsonnet/vendor/prometheus/README.md deleted file mode 100644 index c44e70ca..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# Prometheus Mixin - -_This is work in progress. We aim for it to become a good role model for alerts -and dashboards eventually, but it is not quite there yet._ - -The Prometheus Mixin is a set of configurable, reusable, and extensible alerts -and dashboards for Prometheus. - -To use them, you need to have `jsonnet` (v0.13+) and `jb` installed. If you -have a working Go development environment, it's easiest to run the following: -```bash -$ go get github.com/google/go-jsonnet/cmd/jsonnet -$ go get github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb -``` - -_Note: The make targets `lint` and `fmt` need the `jsonnetfmt` binary, which is -currently not included in the Go implementation of `jsonnet`. For the time -being, you have to install the [C++ version of -jsonnetfmt](https://github.com/google/jsonnet) if you want to use `make lint` -or `make fmt`._ - -Next, install the dependencies by running the following command in this -directory: -```bash -$ jb install -``` - -You can then build a `prometheus_alerts.yaml` with the alerts and a directory -`dashboards_out` with the Grafana dashboard JSON files: -```bash -$ make prometheus_alerts.yaml -$ make dashboards_out -``` - -For more advanced uses of mixins, see https://github.com/monitoring-mixins/docs. - diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus/alerts.jsonnet b/sources/kube-prometheus/jsonnet/vendor/prometheus/alerts.jsonnet deleted file mode 100644 index 75e7c1b2..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus/alerts.jsonnet +++ /dev/null @@ -1 +0,0 @@ -std.manifestYamlDoc((import 'mixin.libsonnet').prometheusAlerts) diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus/alerts.libsonnet b/sources/kube-prometheus/jsonnet/vendor/prometheus/alerts.libsonnet deleted file mode 100644 index 8fe9dc1e..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus/alerts.libsonnet +++ /dev/null @@ -1,266 +0,0 @@ -{ - prometheusAlerts+:: { - groups+: [ - { - name: 'prometheus', - rules: [ - { - alert: 'PrometheusBadConfig', - expr: ||| - # Without max_over_time, failed scrapes could create false negatives, see - # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. - max_over_time(prometheus_config_last_reload_successful{%(prometheusSelector)s}[5m]) == 0 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'critical', - }, - annotations: { - summary: 'Failed Prometheus configuration reload.', - description: 'Prometheus %(prometheusName)s has failed to reload its configuration.' % $._config, - }, - }, - { - alert: 'PrometheusNotificationQueueRunningFull', - expr: ||| - # Without min_over_time, failed scrapes could create false negatives, see - # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. - ( - predict_linear(prometheus_notifications_queue_length{%(prometheusSelector)s}[5m], 60 * 30) - > - min_over_time(prometheus_notifications_queue_capacity{%(prometheusSelector)s}[5m]) - ) - ||| % $._config, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Prometheus alert notification queue predicted to run full in less than 30m.', - description: 'Alert notification queue of Prometheus %(prometheusName)s is running full.' % $._config, - }, - }, - { - alert: 'PrometheusErrorSendingAlertsToSomeAlertmanagers', - expr: ||| - ( - rate(prometheus_notifications_errors_total{%(prometheusSelector)s}[5m]) - / - rate(prometheus_notifications_sent_total{%(prometheusSelector)s}[5m]) - ) - * 100 - > 1 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Prometheus has encountered more than 1% errors sending alerts to a specific Alertmanager.', - description: '{{ printf "%%.1f" $value }}%% errors while sending alerts from Prometheus %(prometheusName)s to Alertmanager {{$labels.alertmanager}}.' % $._config, - }, - }, - { - alert: 'PrometheusErrorSendingAlertsToAnyAlertmanager', - expr: ||| - min without(alertmanager) ( - rate(prometheus_notifications_errors_total{%(prometheusSelector)s}[5m]) - / - rate(prometheus_notifications_sent_total{%(prometheusSelector)s}[5m]) - ) - * 100 - > 3 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'critical', - }, - annotations: { - summary: 'Prometheus encounters more than 3% errors sending alerts to any Alertmanager.', - description: '{{ printf "%%.1f" $value }}%% minimum errors while sending alerts from Prometheus %(prometheusName)s to any Alertmanager.' % $._config, - }, - }, - { - alert: 'PrometheusNotConnectedToAlertmanagers', - expr: ||| - # Without max_over_time, failed scrapes could create false negatives, see - # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. - max_over_time(prometheus_notifications_alertmanagers_discovered{%(prometheusSelector)s}[5m]) < 1 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Prometheus is not connected to any Alertmanagers.', - description: 'Prometheus %(prometheusName)s is not connected to any Alertmanagers.' % $._config, - }, - }, - { - alert: 'PrometheusTSDBReloadsFailing', - expr: ||| - increase(prometheus_tsdb_reloads_failures_total{%(prometheusSelector)s}[3h]) > 0 - ||| % $._config, - 'for': '4h', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Prometheus has issues reloading blocks from disk.', - description: 'Prometheus %(prometheusName)s has detected {{$value | humanize}} reload failures over the last 3h.' % $._config, - }, - }, - { - alert: 'PrometheusTSDBCompactionsFailing', - expr: ||| - increase(prometheus_tsdb_compactions_failed_total{%(prometheusSelector)s}[3h]) > 0 - ||| % $._config, - 'for': '4h', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Prometheus has issues compacting blocks.', - description: 'Prometheus %(prometheusName)s has detected {{$value | humanize}} compaction failures over the last 3h.' % $._config, - }, - }, - { - alert: 'PrometheusNotIngestingSamples', - expr: ||| - rate(prometheus_tsdb_head_samples_appended_total{%(prometheusSelector)s}[5m]) <= 0 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Prometheus is not ingesting samples.', - description: 'Prometheus %(prometheusName)s is not ingesting samples.' % $._config, - }, - }, - { - alert: 'PrometheusDuplicateTimestamps', - expr: ||| - rate(prometheus_target_scrapes_sample_duplicate_timestamp_total{%(prometheusSelector)s}[5m]) > 0 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Prometheus is dropping samples with duplicate timestamps.', - description: 'Prometheus %(prometheusName)s is dropping {{$value | humanize}} samples/s with different values but duplicated timestamp.' % $._config, - }, - }, - { - alert: 'PrometheusOutOfOrderTimestamps', - expr: ||| - rate(prometheus_target_scrapes_sample_out_of_order_total{%(prometheusSelector)s}[5m]) > 0 - ||| % $._config, - 'for': '10m', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Prometheus drops samples with out-of-order timestamps.', - description: 'Prometheus %(prometheusName)s is dropping {{$value | humanize}} samples/s with timestamps arriving out of order.' % $._config, - }, - }, - { - alert: 'PrometheusRemoteStorageFailures', - expr: ||| - ( - rate(prometheus_remote_storage_failed_samples_total{%(prometheusSelector)s}[5m]) - / - ( - rate(prometheus_remote_storage_failed_samples_total{%(prometheusSelector)s}[5m]) - + - rate(prometheus_remote_storage_succeeded_samples_total{%(prometheusSelector)s}[5m]) - ) - ) - * 100 - > 1 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'critical', - }, - annotations: { - summary: 'Prometheus fails to send samples to remote storage.', - description: 'Prometheus %(prometheusName)s failed to send {{ printf "%%.1f" $value }}%% of the samples to queue {{$labels.queue}}.' % $._config, - }, - }, - { - alert: 'PrometheusRemoteWriteBehind', - expr: ||| - # Without max_over_time, failed scrapes could create false negatives, see - # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. - ( - max_over_time(prometheus_remote_storage_highest_timestamp_in_seconds{%(prometheusSelector)s}[5m]) - - on(job, instance) group_right - max_over_time(prometheus_remote_storage_queue_highest_sent_timestamp_seconds{%(prometheusSelector)s}[5m]) - ) - > 120 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'critical', - }, - annotations: { - summary: 'Prometheus remote write is behind.', - description: 'Prometheus %(prometheusName)s remote write is {{ printf "%%.1f" $value }}s behind for queue {{$labels.queue}}.' % $._config, - }, - }, - { - alert: 'PrometheusRemoteWriteDesiredShards', - expr: ||| - # Without max_over_time, failed scrapes could create false negatives, see - # https://www.robustperception.io/alerting-on-gauges-in-prometheus-2-0 for details. - ( - max_over_time(prometheus_remote_storage_shards_desired{%(prometheusSelector)s}[5m]) - > on(job, instance) group_right - max_over_time(prometheus_remote_storage_shards_max{%(prometheusSelector)s}[5m]) - ) - ||| % $._config, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Prometheus remote write desired shards calculation wants to run more than configured max shards.', - description: 'Prometheus %(prometheusName)s remote write desired shards calculation wants to run {{ printf $value }} shards, which is more than the max of {{ printf `prometheus_remote_storage_shards_max{instance="%%s",%(prometheusSelector)s}` $labels.instance | query | first | value }}.' % $._config, - }, - }, - { - alert: 'PrometheusRuleFailures', - expr: ||| - increase(prometheus_rule_evaluation_failures_total{%(prometheusSelector)s}[5m]) > 0 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'critical', - }, - annotations: { - summary: 'Prometheus is failing rule evaluations.', - description: 'Prometheus %(prometheusName)s has failed to evaluate {{ printf "%%.0f" $value }} rules in the last 5m.' % $._config, - }, - }, - { - alert: 'PrometheusMissingRuleEvaluations', - expr: ||| - increase(prometheus_rule_group_iterations_missed_total{%(prometheusSelector)s}[5m]) > 0 - ||| % $._config, - 'for': '15m', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Prometheus is missing rule evaluations due to slow rule group evaluation.', - description: 'Prometheus %(prometheusName)s has missed {{ printf "%%.0f" $value }} rule group evaluations in the last 5m.' % $._config, - }, - }, - ], - }, - ], - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus/config.libsonnet b/sources/kube-prometheus/jsonnet/vendor/prometheus/config.libsonnet deleted file mode 100644 index 27614289..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus/config.libsonnet +++ /dev/null @@ -1,16 +0,0 @@ -{ - _config+:: { - // prometheusSelector is inserted as part of the label selector in - // PromQL queries to identify metrics collected from Prometheus - // servers. - prometheusSelector: 'job="prometheus"', - - // prometheusName is inserted into annotations to name the Prometheus - // instance affected by the alert. - prometheusName: '{{$labels.instance}}', - // If you run Prometheus on Kubernetes with the Prometheus - // Operator, you can make use of the configured target labels for - // nicer naming: - // prometheusNameTemplate: '{{$labels.namespace}}/{{$labels.pod}}' - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus/dashboards.jsonnet b/sources/kube-prometheus/jsonnet/vendor/prometheus/dashboards.jsonnet deleted file mode 100644 index 9d913ed3..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus/dashboards.jsonnet +++ /dev/null @@ -1,6 +0,0 @@ -local dashboards = (import 'mixin.libsonnet').grafanaDashboards; - -{ - [name]: dashboards[name] - for name in std.objectFields(dashboards) -} diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus/dashboards.libsonnet b/sources/kube-prometheus/jsonnet/vendor/prometheus/dashboards.libsonnet deleted file mode 100644 index 9251a33b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus/dashboards.libsonnet +++ /dev/null @@ -1,148 +0,0 @@ -local g = import 'grafana-builder/grafana.libsonnet'; - -{ - grafanaDashboards+:: { - 'prometheus.json': - g.dashboard('Prometheus') - .addMultiTemplate('job', 'prometheus_build_info', 'job') - .addMultiTemplate('instance', 'prometheus_build_info', 'instance') - .addRow( - g.row('Prometheus Stats') - .addPanel( - g.panel('Prometheus Stats') + - g.tablePanel([ - 'count by (job, instance, version) (prometheus_build_info{job=~"$job", instance=~"$instance"})', - 'max by (job, instance) (time() - process_start_time_seconds{job=~"$job", instance=~"$instance"})', - ], { - job: { alias: 'Job' }, - instance: { alias: 'Instance' }, - version: { alias: 'Version' }, - 'Value #A': { alias: 'Count', type: 'hidden' }, - 'Value #B': { alias: 'Uptime' }, - }) - ) - ) - .addRow( - g.row('Discovery') - .addPanel( - g.panel('Target Sync') + - g.queryPanel('sum(rate(prometheus_target_sync_length_seconds_sum{job=~"$job",instance=~"$instance"}[5m])) by (scrape_job) * 1e3', '{{scrape_job}}') + - { yaxes: g.yaxes('ms') } - ) - .addPanel( - g.panel('Targets') + - g.queryPanel('sum(prometheus_sd_discovered_targets{job=~"$job",instance=~"$instance"})', 'Targets') + - g.stack - ) - ) - .addRow( - g.row('Retrieval') - .addPanel( - g.panel('Average Scrape Interval Duration') + - g.queryPanel('rate(prometheus_target_interval_length_seconds_sum{job=~"$job",instance=~"$instance"}[5m]) / rate(prometheus_target_interval_length_seconds_count{job=~"$job",instance=~"$instance"}[5m]) * 1e3', '{{interval}} configured') + - { yaxes: g.yaxes('ms') } - ) - .addPanel( - g.panel('Scrape failures') + - g.queryPanel([ - 'sum by (job) (rate(prometheus_target_scrapes_exceeded_sample_limit_total[1m]))', - 'sum by (job) (rate(prometheus_target_scrapes_sample_duplicate_timestamp_total[1m]))', - 'sum by (job) (rate(prometheus_target_scrapes_sample_out_of_bounds_total[1m]))', - 'sum by (job) (rate(prometheus_target_scrapes_sample_out_of_order_total[1m]))', - ], [ - 'exceeded sample limit: {{job}}', - 'duplicate timestamp: {{job}}', - 'out of bounds: {{job}}', - 'out of order: {{job}}', - ]) + - g.stack - ) - .addPanel( - g.panel('Appended Samples') + - g.queryPanel('rate(prometheus_tsdb_head_samples_appended_total{job=~"$job",instance=~"$instance"}[5m])', '{{job}} {{instance}}') + - g.stack - ) - ) - .addRow( - g.row('Storage') - .addPanel( - g.panel('Head Series') + - g.queryPanel('prometheus_tsdb_head_series{job=~"$job",instance=~"$instance"}', '{{job}} {{instance}} head series') + - g.stack - ) - .addPanel( - g.panel('Head Chunks') + - g.queryPanel('prometheus_tsdb_head_chunks{job=~"$job",instance=~"$instance"}', '{{job}} {{instance}} head chunks') + - g.stack - ) - ) - .addRow( - g.row('Query') - .addPanel( - g.panel('Query Rate') + - g.queryPanel('rate(prometheus_engine_query_duration_seconds_count{job=~"$job",instance=~"$instance",slice="inner_eval"}[5m])', '{{job}} {{instance}}') + - g.stack, - ) - .addPanel( - g.panel('Stage Duration') + - g.queryPanel('max by (slice) (prometheus_engine_query_duration_seconds{quantile="0.9",job=~"$job",instance=~"$instance"}) * 1e3', '{{slice}}') + - { yaxes: g.yaxes('ms') } + - g.stack, - ) - ), - // Remote write specific dashboard. - 'prometheus-remote-write.json': - g.dashboard('Prometheus Remote Write') - .addMultiTemplate('instance', 'prometheus_build_info', 'instance') - .addMultiTemplate('cluster', 'kube_pod_container_info{image=~".*prometheus.*"}', 'cluster') - .addRow( - g.row('Timestamps') - .addPanel( - g.panel('Highest Timestamp In vs. Highest Timestamp Sent') + - g.queryPanel('prometheus_remote_storage_highest_timestamp_in_seconds{cluster=~"$cluster", instance=~"$instance"} - ignoring(queue) group_right(instance) prometheus_remote_storage_queue_highest_sent_timestamp_seconds{cluster=~"$cluster", instance=~"$instance"}', '{{cluster}}:{{instance}}-{{queue}}') + - { yaxes: g.yaxes('s') } - ) - .addPanel( - g.panel('Rate[5m]') + - g.queryPanel('rate(prometheus_remote_storage_highest_timestamp_in_seconds{cluster=~"$cluster", instance=~"$instance"}[5m]) - ignoring (queue) group_right(instance) rate(prometheus_remote_storage_queue_highest_sent_timestamp_seconds{cluster=~"$cluster", instance=~"$instance"}[5m])', '{{cluster}}:{{instance}}-{{queue}}') - ) - ) - .addRow( - g.row('Samples') - .addPanel( - g.panel('Rate, in vs. succeeded or dropped [5m]') + - g.queryPanel('rate(prometheus_remote_storage_samples_in_total{cluster=~"$cluster", instance=~"$instance"}[5m])- ignoring(queue) group_right(instance) rate(prometheus_remote_storage_succeeded_samples_total{cluster=~"$cluster", instance=~"$instance"}[5m]) - rate(prometheus_remote_storage_dropped_samples_total{cluster=~"$cluster", instance=~"$instance"}[5m])', '{{cluster}}:{{instance}}-{{queue}}') - ) - ) - .addRow( - g.row('Shards') - .addPanel( - g.panel('Num. Shards') + - g.queryPanel('prometheus_remote_storage_shards{cluster=~"$cluster", instance=~"$instance"}', '{{cluster}}:{{instance}}-{{queue}}') - ) - .addPanel( - g.panel('Capacity') + - g.queryPanel('prometheus_remote_storage_shard_capacity{cluster=~"$cluster", instance=~"$instance"}', '{{cluster}}:{{instance}}-{{queue}}') - ) - ) - .addRow( - g.row('Misc Rates.') - .addPanel( - g.panel('Dropped Samples') + - g.queryPanel('rate(prometheus_remote_storage_dropped_samples_total{cluster=~"$cluster", instance=~"$instance"}[5m])', '{{cluster}}:{{instance}}-{{queue}}') - ) - .addPanel( - g.panel('Failed Samples') + - g.queryPanel('rate(prometheus_remote_storage_failed_samples_total{cluster=~"$cluster", instance=~"$instance"}[5m])', '{{cluster}}:{{instance}}-{{queue}}') - ) - .addPanel( - g.panel('Retried Samples') + - g.queryPanel('rate(prometheus_remote_storage_retried_samples_total{cluster=~"$cluster", instance=~"$instance"}[5m])', '{{cluster}}:{{instance}}-{{queue}}') - ) - .addPanel( - g.panel('Enqueue Retries') + - g.queryPanel('rate(prometheus_remote_storage_enqueue_retries_total{cluster=~"$cluster", instance=~"$instance"}[5m])', '{{cluster}}:{{instance}}-{{queue}}') - ) - ), - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus/jsonnetfile.json b/sources/kube-prometheus/jsonnet/vendor/prometheus/jsonnetfile.json deleted file mode 100644 index b5d0ad34..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus/jsonnetfile.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "dependencies": [ - { - "name": "grafana-builder", - "source": { - "git": { - "remote": "https://github.com/grafana/jsonnet-libs", - "subdir": "grafana-builder" - } - }, - "version": "master" - } - ] -} diff --git a/sources/kube-prometheus/jsonnet/vendor/prometheus/mixin.libsonnet b/sources/kube-prometheus/jsonnet/vendor/prometheus/mixin.libsonnet deleted file mode 100644 index 3c983a30..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/prometheus/mixin.libsonnet +++ /dev/null @@ -1,3 +0,0 @@ -(import 'config.libsonnet') + -(import 'dashboards.libsonnet') + -(import 'alerts.libsonnet') diff --git a/sources/kube-prometheus/jsonnet/vendor/promgrafonnet/gauge.libsonnet b/sources/kube-prometheus/jsonnet/vendor/promgrafonnet/gauge.libsonnet deleted file mode 100644 index abe7f859..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/promgrafonnet/gauge.libsonnet +++ /dev/null @@ -1,60 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local singlestat = grafana.singlestat; -local prometheus = grafana.prometheus; - -{ - new(title, query):: - singlestat.new( - title, - datasource='$datasource', - span=3, - format='percent', - valueName='current', - colors=[ - 'rgba(245, 54, 54, 0.9)', - 'rgba(237, 129, 40, 0.89)', - 'rgba(50, 172, 45, 0.97)', - ], - thresholds='50, 80', - valueMaps=[ - { - op: '=', - text: 'N/A', - value: 'null', - }, - ], - ) - .addTarget( - prometheus.target( - query - ) - ) + { - gauge: { - maxValue: 100, - minValue: 0, - show: true, - thresholdLabels: false, - thresholdMarkers: true, - }, - withTextNullValue(text):: self { - valueMaps: [ - { - op: '=', - text: text, - value: 'null', - }, - ], - }, - withSpanSize(size):: self { - span: size, - }, - withLowerBeingBetter():: self { - colors: [ - 'rgba(50, 172, 45, 0.97)', - 'rgba(237, 129, 40, 0.89)', - 'rgba(245, 54, 54, 0.9)', - ], - thresholds: '80, 90', - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/promgrafonnet/numbersinglestat.libsonnet b/sources/kube-prometheus/jsonnet/vendor/promgrafonnet/numbersinglestat.libsonnet deleted file mode 100644 index 771e4bd1..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/promgrafonnet/numbersinglestat.libsonnet +++ /dev/null @@ -1,48 +0,0 @@ -local grafana = import 'grafonnet/grafana.libsonnet'; -local singlestat = grafana.singlestat; -local prometheus = grafana.prometheus; - -{ - new(title, query):: - singlestat.new( - title, - datasource='$datasource', - span=3, - valueName='current', - valueMaps=[ - { - op: '=', - text: '0', - value: 'null', - }, - ], - ) - .addTarget( - prometheus.target( - query - ) - ) + { - withTextNullValue(text):: self { - valueMaps: [ - { - op: '=', - text: text, - value: 'null', - }, - ], - }, - withSpanSize(size):: self { - span: size, - }, - withPostfix(postfix):: self { - postfix: postfix, - }, - withSparkline():: self { - sparkline: { - show: true, - lineColor: 'rgb(31, 120, 193)', - fillColor: 'rgba(31, 118, 189, 0.18)', - }, - }, - }, -} diff --git a/sources/kube-prometheus/jsonnet/vendor/promgrafonnet/promgrafonnet.libsonnet b/sources/kube-prometheus/jsonnet/vendor/promgrafonnet/promgrafonnet.libsonnet deleted file mode 100644 index 013ff42b..00000000 --- a/sources/kube-prometheus/jsonnet/vendor/promgrafonnet/promgrafonnet.libsonnet +++ /dev/null @@ -1,5 +0,0 @@ -{ - numbersinglestat:: import 'numbersinglestat.libsonnet', - gauge:: import 'gauge.libsonnet', - percentlinegraph:: import 'percentlinegraph.libsonnet', -} diff --git a/sources/kube-prometheus/main.jsonnet b/sources/kube-prometheus/main.jsonnet deleted file mode 100644 index eee42c83..00000000 --- a/sources/kube-prometheus/main.jsonnet +++ /dev/null @@ -1,78 +0,0 @@ -local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet'; -local secret = k.core.v1.secret; -local pvc = k.core.v1.persistentVolumeClaim; - -local kp = - (import 'kube-prometheus/kube-prometheus.libsonnet') + - (import 'kube-prometheus/kube-prometheus-kubeadm.libsonnet') + - (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') + - (import 'blackbox-exporter.libsonnet') + - (import 'ingresses.libsonnet') + - (import 'config.libsonnet') + - { - _config+:: { - // namespace: 'kube-prometheus', - // domain: 'grafana.codeformuenster.org', - // retentionSize: '19G', - - imageRepos+: { - blackboxExporter: 'prom/blackbox-exporter', - }, - // versions+: { - // blackboxExporter: 'v0.15.1', - // // kubeStateMetrics: 'v1.7.2', - // grafana: 'v6.4.0-beta1', - // }, - - grafana+:: { - config+: { - sections+: { - server+: { - root_url: 'https://' + $._config.grafanaDomain + '/', - }, - }, - }, - }, - // prometheus+:: { - // // additional namespaces to watch - // namespaces+: ['ingress-nginx', 'cert-manager', 'openebs'], - // }, - }, - - // grafana: {}, - - prometheus+:: { - prometheus+: { - spec+: { - // retention: '60d', - // if exists ? - retentionSize: $._config.retentionSize, - additionalScrapeConfigs: { - name: 'additional-scrape-configs', - key: 'prometheus-additional.yaml', - }, - storage: { - volumeClaimTemplate: - pvc.new() + - pvc.mixin.spec.withAccessModes('ReadWriteOnce') + - pvc.mixin.spec.resources.withRequests({ storage: '20Gi' }), - }, - }, - }, - additionalScrapeConfigs+: - secret.new('additional-scrape-configs', { - 'prometheus-additional.yaml': std.base64(importstr 'prometheus-additional.yaml') }) + - secret.mixin.metadata.withNamespace($._config.namespace), - }, - }; - -[ kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus) ] + -[ kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator) ] + -[ kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter) ] + -[ kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) ] + -[ kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics) ] + -[ kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) ] + -[ kp.prometheus[name] for name in std.objectFields(kp.prometheus) ] + -[ kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter) ] + -[ kp.grafana[name] for name in std.objectFields(kp.grafana) ] + -[ kp.ingresses[name] for name in std.objectFields(kp.ingresses) ] \ No newline at end of file diff --git a/sources/kube-prometheus/prometheus-additional.yaml b/sources/kube-prometheus/prometheus-additional.yaml deleted file mode 100644 index 1b65998e..00000000 --- a/sources/kube-prometheus/prometheus-additional.yaml +++ /dev/null @@ -1,52 +0,0 @@ -- job_name: 'blackbox' - metrics_path: /probe - scrape_interval: 1m - static_configs: - - targets: # targets to be tested by the blackbox exporter - - https://crashes.codeformuenster.org - - https://fathom.codeformuenster.org - - https://keycloak.codeformuenster.org - - https://grafana.codeformuenster.org - - https://traffics.codeformuenster.org - - https://editor-data-helpers-verkehrsunfaelle.codeformuenster.org - - https://kinto-verkehrsunfaelle.codeformuenster.org - relabel_configs: - - source_labels: [__address__] # set param 'target' to the original target - regex: (.*) - target_label: __param_target - replacement: ${1} - - source_labels: [__param_target] # set label 'instance' to it as well - regex: (.*) - target_label: instance - replacement: ${1} - - source_labels: [] # set __address__ to the blackbox exporter - regex: .* - target_label: __address__ - replacement: blackbox-exporter:9115 - - # # blackbox-exporter - # # from gerald - # - # - job_name: 'blackbox' - # metrics_path: /probe - # params: - # module: [http_2xx] # Look for a HTTP 200 response. - # static_configs: - # - targets: - # - http://codeformuenster.org - # - https://mein-ms.de - # - https://www.mein-ms.de - # - https://elasticsearch.codeformuenster.org - # - https://elasticsearch.codeformuenster.org/_search - # - https://traffics.codeformuenster.org - # relabel_configs: - # - source_labels: [__address__] - # target_label: __param_target - # - source_labels: [__param_target] - # target_label: instance - # - target_label: __address__ - # replacement: blackbox-exporter:9115 # Blackbox exporter. - - -# ICMP Pings with the Blackbox exporter -# https://www.robustperception.io/icmp-pings-with-the-blackbox-exporter diff --git a/sources/kube-router/README.md b/sources/kube-router/README.md deleted file mode 100644 index 70c1328f..00000000 --- a/sources/kube-router/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# kube-router - -```bash -# build manifests to verify -kustomize build . - -# apply to cluster -kubectl apply -k . -``` - -Maybe apply https://github.com/codeformuenster/kustomized/blob/master/kube-router/kube-proxy-cleanup.yaml, see https://github.com/cloudnativelabs/kube-router/blob/master/docs/kubeadm.md \ No newline at end of file diff --git a/sources/kube-router/kube-proxy-cleanup.yaml b/sources/kube-router/kube-proxy-cleanup.yaml deleted file mode 100644 index bcb669f1..00000000 --- a/sources/kube-router/kube-proxy-cleanup.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# docker run --privileged -v /lib/modules:/lib/modules --net=host k8s.gcr.io/kube-proxy-amd64:v1.15.0 kube-proxy --cleanup - -apiVersion: extensions/v1beta1 -kind: DaemonSet -metadata: - labels: - k8s-app: kube-proxy-cleanup - tier: node - name: kube-proxy-cleanup - namespace: kube-system -spec: - template: - metadata: - labels: - k8s-app: kube-proxy-cleanup - tier: node - annotations: - scheduler.alpha.kubernetes.io/critical-pod: '' - spec: - containers: - - name: kube-proxy-cleanup - # image: k8s.gcr.io/kube-proxy:v1.14.1 - image: k8s.gcr.io/kube-proxy:v1.15.0 - command: ["kube-proxy", "--cleanup"] - resources: - requests: - cpu: 250m - memory: 250Mi - securityContext: - privileged: true - volumeMounts: - - name: lib-modules - mountPath: /lib/modules - # readOnly: true - hostNetwork: true - tolerations: - - key: CriticalAddonsOnly - operator: Exists - - effect: NoSchedule - key: node-role.kubernetes.io/master - operator: Exists - - effect: NoSchedule - key: node.kubernetes.io/not-ready - operator: Exists - volumes: - - name: lib-modules - hostPath: - path: /lib/modules diff --git a/sources/kube-router/kustomization.yaml b/sources/kube-router/kustomization.yaml deleted file mode 100644 index 21b75332..00000000 --- a/sources/kube-router/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -bases: -- github.com/codeformuenster/kustomized//kube-router?ref=3b6ce99 diff --git a/sources/loki/README.md b/sources/loki/README.md deleted file mode 100644 index 469958e9..00000000 --- a/sources/loki/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# loki - -```bash -jsonnet --yaml-stream --jpath ./jsonnet/vendor ./main.jsonnet \ - > manifests-temp.json - -kubectl apply -f ./manifests-temp.json - -``` - - - ---- - -https://github.com/grafana/loki/tree/master/production/helm - - -```bash -# fetch -rm -r ./helm/loki ; mkdir -p ./helm/loki -helm fetch \ - --repo https://grafana.github.io/loki/charts \ - --untar \ - --untardir ./helm \ - loki-stack - -# create base for kustomize -rm -r ./base/loki ; mkdir -p ./base/loki - -helm template \ - --name loki \ - --namespace loki \ - --values ./helm/values.yaml \ - --output-dir ./base \ - ./helm/loki-stack - - -# run kustomize -rm -r ../../manifests/loki ; mkdir -p ../../manifests/loki -kubectl kustomize ./overlay > ../../manifests/loki/kustomized.yaml - -kubectl create namespace loki -kubectl apply -f ../../manifests/loki - -# after config changes for promtail maybe run -kubectl -n loki delete pods -l app=promtail -``` - -In Grafana add Datasource Loki with `http://loki.loki:3100` - -Also see https://github.com/grafana/loki/blob/master/docs/logcli.md - - -## Also - -- https://grafana.com/blog/2019/01/02/closer-look-at-grafanas-user-interface-for-loki/ -- https://github.com/grafana/loki/tree/master/fluentd/fluent-plugin-grafana-loki -- Add Jaeger for tracing \ No newline at end of file diff --git a/sources/loki/base/kustomization.yaml b/sources/loki/base/kustomization.yaml deleted file mode 100644 index 4959ca48..00000000 --- a/sources/loki/base/kustomization.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: loki -# commonLabels: -# app.kubernetes.io/part-of: loki - -resources: -- ./loki-stack/charts/loki/templates/podsecuritypolicy.yaml -- ./loki-stack/charts/loki/templates/role.yaml -- ./loki-stack/charts/loki/templates/rolebinding.yaml -- ./loki-stack/charts/loki/templates/secret.yaml -- ./loki-stack/charts/loki/templates/service-headless.yaml -- ./loki-stack/charts/loki/templates/service.yaml -- ./loki-stack/charts/loki/templates/serviceaccount.yaml -- ./loki-stack/charts/loki/templates/statefulset.yaml - -- ./loki-stack/charts/promtail/templates/clusterrole.yaml -- ./loki-stack/charts/promtail/templates/clusterrolebinding.yaml -- ./loki-stack/charts/promtail/templates/configmap.yaml -- ./loki-stack/charts/promtail/templates/daemonset.yaml -- ./loki-stack/charts/promtail/templates/podsecuritypolicy.yaml -- ./loki-stack/charts/promtail/templates/serviceaccount.yaml -- ./loki-stack/charts/promtail/templates/role.yaml -- ./loki-stack/charts/promtail/templates/rolebinding.yaml - -patchesStrategicMerge: -- ./loki-patches.yaml \ No newline at end of file diff --git a/sources/loki/base/loki-patches.yaml b/sources/loki/base/loki-patches.yaml deleted file mode 100644 index 4b662252..00000000 --- a/sources/loki/base/loki-patches.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: loki -spec: - volumeClaimTemplates: [] \ No newline at end of file diff --git a/sources/loki/base/loki-stack/charts/loki/templates/podsecuritypolicy.yaml b/sources/loki/base/loki-stack/charts/loki/templates/podsecuritypolicy.yaml deleted file mode 100644 index 845b71eb..00000000 --- a/sources/loki/base/loki-stack/charts/loki/templates/podsecuritypolicy.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -# Source: loki-stack/charts/loki/templates/podsecuritypolicy.yaml - -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: loki - labels: - app: loki - chart: loki-0.10.0 - heritage: Tiller - release: loki -spec: - privileged: false - allowPrivilegeEscalation: false - volumes: - - 'configMap' - - 'emptyDir' - - 'persistentVolumeClaim' - - 'secret' - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'MustRunAsNonRoot' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - readOnlyRootFilesystem: true - requiredDropCapabilities: - - ALL - diff --git a/sources/loki/base/loki-stack/charts/loki/templates/role.yaml b/sources/loki/base/loki-stack/charts/loki/templates/role.yaml deleted file mode 100644 index 316759b8..00000000 --- a/sources/loki/base/loki-stack/charts/loki/templates/role.yaml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# Source: loki-stack/charts/loki/templates/role.yaml - -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: loki - labels: - app: loki - chart: loki-0.10.0 - heritage: Tiller - release: loki -rules: -- apiGroups: ['extensions'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: [loki] - diff --git a/sources/loki/base/loki-stack/charts/loki/templates/rolebinding.yaml b/sources/loki/base/loki-stack/charts/loki/templates/rolebinding.yaml deleted file mode 100644 index 9ed4ae6a..00000000 --- a/sources/loki/base/loki-stack/charts/loki/templates/rolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# Source: loki-stack/charts/loki/templates/rolebinding.yaml - -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: loki - labels: - app: loki - chart: loki-0.10.0 - heritage: Tiller - release: loki -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: loki -subjects: -- kind: ServiceAccount - name: loki - diff --git a/sources/loki/base/loki-stack/charts/loki/templates/secret.yaml b/sources/loki/base/loki-stack/charts/loki/templates/secret.yaml deleted file mode 100644 index f7de6ba7..00000000 --- a/sources/loki/base/loki-stack/charts/loki/templates/secret.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: loki-stack/charts/loki/templates/secret.yaml -apiVersion: v1 -kind: Secret -metadata: - name: loki - labels: - app: loki - chart: loki-0.10.0 - release: loki - heritage: Tiller -data: - loki.yaml: YXV0aF9lbmFibGVkOiBmYWxzZQpjaHVua19zdG9yZV9jb25maWc6CiAgbWF4X2xvb2tfYmFja19wZXJpb2Q6IDAKaW5nZXN0ZXI6CiAgY2h1bmtfYmxvY2tfc2l6ZTogMjYyMTQ0CiAgY2h1bmtfaWRsZV9wZXJpb2Q6IDE1bQogIGxpZmVjeWNsZXI6CiAgICByaW5nOgogICAgICBrdnN0b3JlOgogICAgICAgIHN0b3JlOiBpbm1lbW9yeQogICAgICByZXBsaWNhdGlvbl9mYWN0b3I6IDEKbGltaXRzX2NvbmZpZzoKICBlbmZvcmNlX21ldHJpY19uYW1lOiBmYWxzZQogIHJlamVjdF9vbGRfc2FtcGxlczogdHJ1ZQogIHJlamVjdF9vbGRfc2FtcGxlc19tYXhfYWdlOiAxNjhoCnNjaGVtYV9jb25maWc6CiAgY29uZmlnczoKICAtIGZyb206IDIwMTgtMDQtMTUKICAgIGluZGV4OgogICAgICBwZXJpb2Q6IDE2OGgKICAgICAgcHJlZml4OiBpbmRleF8KICAgIG9iamVjdF9zdG9yZTogZmlsZXN5c3RlbQogICAgc2NoZW1hOiB2OQogICAgc3RvcmU6IGJvbHRkYgpzZXJ2ZXI6CiAgaHR0cF9saXN0ZW5fcG9ydDogMzEwMApzdG9yYWdlX2NvbmZpZzoKICBib2x0ZGI6CiAgICBkaXJlY3Rvcnk6IC9kYXRhL2xva2kvaW5kZXgKICBmaWxlc3lzdGVtOgogICAgZGlyZWN0b3J5OiAvZGF0YS9sb2tpL2NodW5rcwp0YWJsZV9tYW5hZ2VyOgogIHJldGVudGlvbl9kZWxldGVzX2VuYWJsZWQ6IGZhbHNlCiAgcmV0ZW50aW9uX3BlcmlvZDogMAo= diff --git a/sources/loki/base/loki-stack/charts/loki/templates/service-headless.yaml b/sources/loki/base/loki-stack/charts/loki/templates/service-headless.yaml deleted file mode 100644 index 9d7c7070..00000000 --- a/sources/loki/base/loki-stack/charts/loki/templates/service-headless.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# Source: loki-stack/charts/loki/templates/service-headless.yaml -apiVersion: v1 -kind: Service -metadata: - name: loki-headless - labels: - app: loki - chart: loki-0.10.0 - release: loki - heritage: Tiller -spec: - clusterIP: None - ports: - - port: 3100 - protocol: TCP - name: http-metrics - targetPort: http-metrics - selector: - app: loki - release: loki diff --git a/sources/loki/base/loki-stack/charts/loki/templates/service.yaml b/sources/loki/base/loki-stack/charts/loki/templates/service.yaml deleted file mode 100644 index e95017d1..00000000 --- a/sources/loki/base/loki-stack/charts/loki/templates/service.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -# Source: loki-stack/charts/loki/templates/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: loki - labels: - app: loki - chart: loki-0.10.0 - release: loki - heritage: Tiller - annotations: - {} - -spec: - type: ClusterIP - ports: - - port: 3100 - protocol: TCP - name: http-metrics - targetPort: http-metrics - selector: - app: loki - release: loki diff --git a/sources/loki/base/loki-stack/charts/loki/templates/serviceaccount.yaml b/sources/loki/base/loki-stack/charts/loki/templates/serviceaccount.yaml deleted file mode 100644 index 4e32a79a..00000000 --- a/sources/loki/base/loki-stack/charts/loki/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: loki-stack/charts/loki/templates/serviceaccount.yaml - -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app: loki - chart: loki-0.10.0 - heritage: Tiller - release: loki - name: loki - diff --git a/sources/loki/base/loki-stack/charts/loki/templates/statefulset.yaml b/sources/loki/base/loki-stack/charts/loki/templates/statefulset.yaml deleted file mode 100644 index b5f64060..00000000 --- a/sources/loki/base/loki-stack/charts/loki/templates/statefulset.yaml +++ /dev/null @@ -1,95 +0,0 @@ ---- -# Source: loki-stack/charts/loki/templates/statefulset.yaml -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: loki - labels: - app: loki - chart: loki-0.10.0 - release: loki - heritage: Tiller - annotations: - {} - -spec: - podManagementPolicy: OrderedReady - replicas: 1 - selector: - matchLabels: - app: loki - release: loki - serviceName: loki-headless - updateStrategy: - type: RollingUpdate - - template: - metadata: - labels: - app: loki - name: loki - release: loki - annotations: - checksum/config: 6c4839a928e70a9d7ec5ae52e8e1e087dc9a85a5a05ff26b0b890b8f0af48caf - prometheus.io/port: http-metrics - prometheus.io/scrape: "true" - - spec: - serviceAccountName: loki - securityContext: - fsGroup: 10001 - runAsGroup: 10001 - runAsNonRoot: true - runAsUser: 10001 - - containers: - - name: loki - image: "grafana/loki:v0.1.0" - imagePullPolicy: IfNotPresent - args: - - "-config.file=/etc/loki/loki.yaml" - volumeMounts: - - name: config - mountPath: /etc/loki - - name: storage - mountPath: "/data" - subPath: - ports: - - name: http-metrics - containerPort: 3100 - protocol: TCP - livenessProbe: - httpGet: - path: /ready - port: http-metrics - initialDelaySeconds: 45 - - readinessProbe: - httpGet: - path: /ready - port: http-metrics - initialDelaySeconds: 45 - - resources: - {} - - securityContext: - readOnlyRootFilesystem: true - env: - nodeSelector: - {} - - affinity: - {} - - tolerations: - [] - - terminationGracePeriodSeconds: 30 - volumes: - - name: config - secret: - secretName: loki - - name: storage - emptyDir: {} - diff --git a/sources/loki/base/loki-stack/charts/promtail/templates/clusterrole.yaml b/sources/loki/base/loki-stack/charts/promtail/templates/clusterrole.yaml deleted file mode 100644 index 244ed278..00000000 --- a/sources/loki/base/loki-stack/charts/promtail/templates/clusterrole.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# Source: loki-stack/charts/promtail/templates/clusterrole.yaml - -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - labels: - app: promtail - chart: promtail-0.8.1 - release: loki - heritage: Tiller - name: loki-promtail-clusterrole -rules: -- apiGroups: [""] # "" indicates the core API group - resources: - - nodes - - nodes/proxy - - services - - endpoints - - pods - verbs: ["get", "watch", "list"] diff --git a/sources/loki/base/loki-stack/charts/promtail/templates/clusterrolebinding.yaml b/sources/loki/base/loki-stack/charts/promtail/templates/clusterrolebinding.yaml deleted file mode 100644 index fad1b8ce..00000000 --- a/sources/loki/base/loki-stack/charts/promtail/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# Source: loki-stack/charts/promtail/templates/clusterrolebinding.yaml - -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: loki-promtail-clusterrolebinding - labels: - app: promtail - chart: promtail-0.8.1 - release: loki - heritage: Tiller -subjects: - - kind: ServiceAccount - name: loki-promtail - namespace: loki -roleRef: - kind: ClusterRole - name: loki-promtail-clusterrole - apiGroup: rbac.authorization.k8s.io diff --git a/sources/loki/base/loki-stack/charts/promtail/templates/configmap.yaml b/sources/loki/base/loki-stack/charts/promtail/templates/configmap.yaml deleted file mode 100644 index 248974e7..00000000 --- a/sources/loki/base/loki-stack/charts/promtail/templates/configmap.yaml +++ /dev/null @@ -1,281 +0,0 @@ ---- -# Source: loki-stack/charts/promtail/templates/configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: loki-promtail - labels: - app: promtail - chart: promtail-0.8.1 - release: loki - heritage: Tiller -data: - promtail.yaml: | - client: - backoff_config: - maxbackoff: 5s - maxretries: 5 - minbackoff: 100ms - batchsize: 102400 - batchwait: 1s - external_labels: {} - timeout: 10s - positions: - filename: /run/promtail/positions.yaml - server: - http_listen_port: 3101 - target_config: - sync_period: 10s - - scrape_configs: - - job_name: kubernetes-pods-name - pipeline_stages: - - docker: {} - - kubernetes_sd_configs: - - role: pod - relabel_configs: - - source_labels: - - __meta_kubernetes_pod_label_name - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_uid - - __meta_kubernetes_pod_container_name - target_label: __path__ - - job_name: kubernetes-pods-app - pipeline_stages: - - docker: {} - - kubernetes_sd_configs: - - role: pod - relabel_configs: - - action: drop - regex: .+ - source_labels: - - __meta_kubernetes_pod_label_name - - source_labels: - - __meta_kubernetes_pod_label_app - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_uid - - __meta_kubernetes_pod_container_name - target_label: __path__ - - job_name: kubernetes-pods-direct-controllers - pipeline_stages: - - docker: {} - - kubernetes_sd_configs: - - role: pod - relabel_configs: - - action: drop - regex: .+ - separator: '' - source_labels: - - __meta_kubernetes_pod_label_name - - __meta_kubernetes_pod_label_app - - action: drop - regex: ^([0-9a-z-.]+)(-[0-9a-f]{8,10})$ - source_labels: - - __meta_kubernetes_pod_controller_name - - source_labels: - - __meta_kubernetes_pod_controller_name - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_uid - - __meta_kubernetes_pod_container_name - target_label: __path__ - - job_name: kubernetes-pods-indirect-controller - pipeline_stages: - - docker: {} - - kubernetes_sd_configs: - - role: pod - relabel_configs: - - action: drop - regex: .+ - separator: '' - source_labels: - - __meta_kubernetes_pod_label_name - - __meta_kubernetes_pod_label_app - - action: keep - regex: ^([0-9a-z-.]+)(-[0-9a-f]{8,10})$ - source_labels: - - __meta_kubernetes_pod_controller_name - - action: replace - regex: ^([0-9a-z-.]+)(-[0-9a-f]{8,10})$ - source_labels: - - __meta_kubernetes_pod_controller_name - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_uid - - __meta_kubernetes_pod_container_name - target_label: __path__ - - job_name: kubernetes-pods-static - pipeline_stages: - - docker: {} - - kubernetes_sd_configs: - - role: pod - relabel_configs: - - action: drop - regex: ^$ - source_labels: - - __meta_kubernetes_pod_annotation_kubernetes_io_config_mirror - - action: replace - source_labels: - - __meta_kubernetes_pod_label_component - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_annotation_kubernetes_io_config_mirror - - __meta_kubernetes_pod_container_name - target_label: __path__ diff --git a/sources/loki/base/loki-stack/charts/promtail/templates/daemonset.yaml b/sources/loki/base/loki-stack/charts/promtail/templates/daemonset.yaml deleted file mode 100644 index 7ede0d69..00000000 --- a/sources/loki/base/loki-stack/charts/promtail/templates/daemonset.yaml +++ /dev/null @@ -1,103 +0,0 @@ ---- -# Source: loki-stack/charts/promtail/templates/daemonset.yaml -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: loki-promtail - labels: - app: promtail - chart: promtail-0.8.1 - release: loki - heritage: Tiller - annotations: - {} - -spec: - selector: - matchLabels: - app: promtail - release: loki - updateStrategy: - type: RollingUpdate - template: - metadata: - labels: - app: promtail - release: loki - annotations: - checksum/config: 9fcce10088976d3285adc263029a9239dd68d8e56b1ada78771b4d643ccf46cc - prometheus.io/port: http-metrics - prometheus.io/scrape: "true" - - spec: - serviceAccountName: loki-promtail - containers: - - name: promtail - image: "grafana/promtail:v0.1.0" - imagePullPolicy: IfNotPresent - args: - - "-config.file=/etc/promtail/promtail.yaml" - - "-client.url=http://loki:3100/api/prom/push" - volumeMounts: - - name: config - mountPath: /etc/promtail - - name: run - mountPath: /run/promtail - - mountPath: /var/lib/docker/containers - name: docker - readOnly: true - - mountPath: /var/log/pods - name: pods - readOnly: true - - env: - - name: HOSTNAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - ports: - - containerPort: 3101 - name: http-metrics - securityContext: - readOnlyRootFilesystem: true - runAsGroup: 0 - runAsUser: 0 - - readinessProbe: - failureThreshold: 5 - httpGet: - path: /ready - port: http-metrics - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 - - resources: - {} - - nodeSelector: - {} - - affinity: - {} - - tolerations: - - effect: NoSchedule - key: node-role.kubernetes.io/master - - volumes: - - name: config - configMap: - name: loki-promtail - - name: run - hostPath: - path: /run/promtail - - hostPath: - path: /var/lib/docker/containers - name: docker - - hostPath: - path: /var/log/pods - name: pods - - diff --git a/sources/loki/base/loki-stack/charts/promtail/templates/podsecuritypolicy.yaml b/sources/loki/base/loki-stack/charts/promtail/templates/podsecuritypolicy.yaml deleted file mode 100644 index f4ca14ed..00000000 --- a/sources/loki/base/loki-stack/charts/promtail/templates/podsecuritypolicy.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -# Source: loki-stack/charts/promtail/templates/podsecuritypolicy.yaml - -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: loki-promtail - labels: - app: promtail - chart: promtail-0.8.1 - heritage: Tiller - release: loki -spec: - privileged: false - allowPrivilegeEscalation: false - volumes: - - 'secret' - - 'configMap' - - 'hostPath' - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'RunAsAny' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'RunAsAny' - fsGroup: - rule: 'RunAsAny' - readOnlyRootFilesystem: true - requiredDropCapabilities: - - ALL diff --git a/sources/loki/base/loki-stack/charts/promtail/templates/role.yaml b/sources/loki/base/loki-stack/charts/promtail/templates/role.yaml deleted file mode 100644 index 9f14d4b0..00000000 --- a/sources/loki/base/loki-stack/charts/promtail/templates/role.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# Source: loki-stack/charts/promtail/templates/role.yaml - -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: loki-promtail - labels: - app: promtail - chart: promtail-0.8.1 - heritage: Tiller - release: loki -rules: -- apiGroups: ['extensions'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: [loki-promtail] diff --git a/sources/loki/base/loki-stack/charts/promtail/templates/rolebinding.yaml b/sources/loki/base/loki-stack/charts/promtail/templates/rolebinding.yaml deleted file mode 100644 index aabe9c68..00000000 --- a/sources/loki/base/loki-stack/charts/promtail/templates/rolebinding.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# Source: loki-stack/charts/promtail/templates/rolebinding.yaml - -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: loki-promtail - labels: - app: promtail - chart: promtail-0.8.1 - heritage: Tiller - release: loki -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: loki-promtail -subjects: -- kind: ServiceAccount - name: loki-promtail - diff --git a/sources/loki/base/loki-stack/charts/promtail/templates/serviceaccount.yaml b/sources/loki/base/loki-stack/charts/promtail/templates/serviceaccount.yaml deleted file mode 100644 index 6d1380d1..00000000 --- a/sources/loki/base/loki-stack/charts/promtail/templates/serviceaccount.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: loki-stack/charts/promtail/templates/serviceaccount.yaml - -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app: promtail - chart: promtail-0.8.1 - heritage: Tiller - release: loki - name: loki-promtail - diff --git a/sources/loki/base/loki-stack/templates/tests/loki-test-configmap.yaml b/sources/loki/base/loki-stack/templates/tests/loki-test-configmap.yaml deleted file mode 100644 index 422b6970..00000000 --- a/sources/loki/base/loki-stack/templates/tests/loki-test-configmap.yaml +++ /dev/null @@ -1,44 +0,0 @@ ---- -# Source: loki-stack/templates/tests/loki-test-configmap.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: loki-loki-stack-test - labels: - app: loki-stack - chart: loki-stack-0.11.1 - release: loki - heritage: Tiller -data: - test.sh: | - #!/usr/bin/env bash - - LOKI_URI="http://${LOKI_SERVICE}:${LOKI_PORT}" - - function setup() { - apk add -u curl jq - until (curl -s ${LOKI_URI}/api/prom/label/app/values | jq -e '.values[] | select(. == "loki")'); do - sleep 1 - done - } - - @test "Has labels" { - curl -s ${LOKI_URI}/api/prom/label | \ - jq -e '.values[] | select(. == "app")' - } - - @test "Query log entry" { - curl -sG ${LOKI_URI}/api/prom/query?limit=10 --data-urlencode 'query={app="loki"}' | \ - jq -e '.streams[].entries | length >= 1' - } - - @test "Push log entry" { - local timestamp=$(date -Iseconds -u | sed 's/UTC/.000000000+00:00/') - local data=$(jq -n --arg timestamp "${timestamp}" '{"streams": [{"labels": "{app=\"loki-test\"}", "entries": [{"ts": $timestamp, "line": "foobar"}]}]}') - - curl -s -X POST -H "Content-Type: application/json" ${LOKI_URI}/api/prom/push -d "${data}" - - curl -sG ${LOKI_URI}/api/prom/query?limit=1 --data-urlencode 'query={app="loki-test"}' | \ - jq -e '.streams[].entries[].line == "foobar"' - } - diff --git a/sources/loki/base/loki-stack/templates/tests/loki-test-pod.yaml b/sources/loki/base/loki-stack/templates/tests/loki-test-pod.yaml deleted file mode 100644 index 8a6f9243..00000000 --- a/sources/loki/base/loki-stack/templates/tests/loki-test-pod.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -# Source: loki-stack/templates/tests/loki-test-pod.yaml -apiVersion: v1 -kind: Pod -metadata: - annotations: - "helm.sh/hook": test-success - labels: - app: loki-stack - chart: loki-stack-0.11.1 - release: loki - heritage: Tiller - name: loki-loki-stack-test -spec: - containers: - - name: test - image: bats/bats:v1.1.0 - args: - - /var/lib/loki/test.sh - env: - - name: LOKI_SERVICE - value: loki - - name: LOKI_PORT - value: "3100" - volumeMounts: - - name: tests - mountPath: /var/lib/loki - restartPolicy: Never - volumes: - - name: tests - configMap: - name: loki-loki-stack-test diff --git a/sources/loki/helm/loki-only_values.yaml b/sources/loki/helm/loki-only_values.yaml deleted file mode 100644 index c6725a5f..00000000 --- a/sources/loki/helm/loki-only_values.yaml +++ /dev/null @@ -1,166 +0,0 @@ -## Affinity for pod assignment -## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -affinity: {} -# podAntiAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# - labelSelector: -# matchExpressions: -# - key: app -# operator: In -# values: -# - loki -# topologyKey: "kubernetes.io/hostname" - -## StatefulSet annotations -annotations: {} - -# enable tracing for debug, need install jaeger and specify right jaeger_agent_host -tracing: - jaegerAgentHost: - -config: - auth_enabled: false - ingester: - chunk_idle_period: 15m - chunk_block_size: 262144 - lifecycler: - ring: - kvstore: - store: inmemory - replication_factor: 1 - - ## Different ring configs can be used. E.g. Consul - # ring: - # store: consul - # replication_factor: 1 - # consul: - # host: "consul:8500" - # prefix: "" - # httpclienttimeout: "20s" - # consistentreads: true - limits_config: - enforce_metric_name: false - reject_old_samples: true - reject_old_samples_max_age: 168h - schema_config: - configs: - - from: 2018-04-15 - store: boltdb - object_store: filesystem - schema: v9 - index: - prefix: index_ - period: 168h - server: - http_listen_port: 3100 - storage_config: - boltdb: - directory: /data/loki/index - filesystem: - directory: /data/loki/chunks - chunk_store_config: - max_look_back_period: 0 - table_manager: - retention_deletes_enabled: false - retention_period: 0 - -image: - repository: grafana/loki - tag: v0.1.0 - pullPolicy: IfNotPresent - -## Additional Loki container arguments, e.g. log level (debug, info, warn, error) -extraArgs: {} - # log.level: debug - -livenessProbe: - httpGet: - path: /ready - port: http-metrics - initialDelaySeconds: 45 - -## Enable persistence using Persistent Volume Claims -networkPolicy: - enabled: false - -## ref: https://kubernetes.io/docs/user-guide/node-selection/ -nodeSelector: {} - -## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ -## If you set enabled as "True", you need : -## - create a pv which above 10Gi and has same namespace with loki -## - keep storageClassName same with below setting -persistence: - enabled: false - accessModes: - - ReadWriteOnce - size: 10Gi - storageClassName: default - annotations: {} - # subPath: "" - # existingClaim: - -## Pod Labels -podLabels: {} - -## Pod Annotations -podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "http-metrics" - -podManagementPolicy: OrderedReady - -## Assign a PriorityClassName to pods if set -# priorityClassName: - -rbac: - create: true - pspEnabled: true - -readinessProbe: - httpGet: - path: /ready - port: http-metrics - initialDelaySeconds: 45 - -replicas: 1 - -resources: {} -# limits: -# cpu: 200m -# memory: 256Mi -# requests: -# cpu: 100m -# memory: 128Mi - -securityContext: - fsGroup: 10001 - runAsGroup: 10001 - runAsNonRoot: true - runAsUser: 10001 - -service: - type: ClusterIP - nodePort: - port: 3100 - annotations: {} - labels: {} - -serviceAccount: - create: true - name: - -terminationGracePeriodSeconds: 30 - -## Tolerations for pod assignment -## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -tolerations: [] - -# The values to set in the PodDisruptionBudget spec -# If not set then a PodDisruptionBudget will not be created -podDisruptionBudget: {} -# minAvailable: 1 -# maxUnavailable: 1 - -updateStrategy: - type: RollingUpdate diff --git a/sources/loki/helm/loki-stack/.helmignore b/sources/loki/helm/loki-stack/.helmignore deleted file mode 100644 index 50af0317..00000000 --- a/sources/loki/helm/loki-stack/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/sources/loki/helm/loki-stack/Chart.yaml b/sources/loki/helm/loki-stack/Chart.yaml deleted file mode 100644 index c5c06f14..00000000 --- a/sources/loki/helm/loki-stack/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -appVersion: 0.0.1 -description: 'Loki: like Prometheus, but for logs.' -engine: gotpl -home: https://grafana.com/loki -icon: https://github.com/grafana/loki/raw/master/docs/logo.png -kubeVersion: ^1.10.0-0 -maintainers: -- email: lokiproject@googlegroups.com - name: Loki Maintainers -name: loki-stack -sources: -- https://github.com/grafana/loki -version: 0.11.1 diff --git a/sources/loki/helm/loki-stack/charts/grafana/.helmignore b/sources/loki/helm/loki-stack/charts/grafana/.helmignore deleted file mode 100644 index 7c04072e..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -OWNERS diff --git a/sources/loki/helm/loki-stack/charts/grafana/Chart.yaml b/sources/loki/helm/loki-stack/charts/grafana/Chart.yaml deleted file mode 100644 index 67c179ee..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -appVersion: 6.2.3 -description: The leading tool for querying and visualizing time series and metrics. -engine: gotpl -home: https://grafana.net -icon: https://raw.githubusercontent.com/grafana/grafana/master/public/img/logo_transparent_400x.png -kubeVersion: ^1.8.0-0 -maintainers: -- email: zanhsieh@gmail.com - name: zanhsieh -- email: rluckie@cisco.com - name: rtluckie -- email: maorfr@gmail.com - name: maorfr -name: grafana -sources: -- https://github.com/grafana/grafana -version: 3.4.3 diff --git a/sources/loki/helm/loki-stack/charts/grafana/README.md b/sources/loki/helm/loki-stack/charts/grafana/README.md deleted file mode 100644 index 113d52f6..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/README.md +++ /dev/null @@ -1,256 +0,0 @@ -# Grafana Helm Chart - -* Installs the web dashboarding system [Grafana](http://grafana.org/) - -## TL;DR; - -```console -$ helm install stable/grafana -``` - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```console -$ helm install --name my-release stable/grafana -``` - -## Uninstalling the Chart - -To uninstall/delete the my-release deployment: - -```console -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - - -## Configuration - -| Parameter | Description | Default | -|-------------------------------------------|-----------------------------------------------|---------------------------------------------------------| -| `replicas` | Number of nodes | `1` | -| `deploymentStrategy` | Deployment strategy | `RollingUpdate` | -| `livenessProbe` | Liveness Probe settings | `{ "httpGet": { "path": "/api/health", "port": 3000 } "initialDelaySeconds": 60, "timeoutSeconds": 30, "failureThreshold": 10 }` | -| `readinessProbe` | Rediness Probe settings | `{ "httpGet": { "path": "/api/health", "port": 3000 } }`| -| `securityContext` | Deployment securityContext | `{"runAsUser": 472, "fsGroup": 472}` | -| `priorityClassName` | Name of Priority Class to assign pods | `nil` | -| `image.repository` | Image repository | `grafana/grafana` | -| `image.tag` | Image tag. (`Must be >= 5.0.0`) | `6.2.3` | -| `image.pullPolicy` | Image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Image pull secrets | `{}` | -| `service.type` | Kubernetes service type | `ClusterIP` | -| `service.port` | Kubernetes port where service is exposed | `80` | -| `service.targetPort` | internal service is port | `3000` | -| `service.annotations` | Service annotations | `{}` | -| `service.labels` | Custom labels | `{}` | -| `ingress.enabled` | Enables Ingress | `false` | -| `ingress.annotations` | Ingress annotations | `{}` | -| `ingress.labels` | Custom labels | `{}` | -| `ingress.path` | Ingress accepted path | `/` | -| `ingress.hosts` | Ingress accepted hostnames | `[]` | -| `ingress.tls` | Ingress TLS configuration | `[]` | -| `resources` | CPU/Memory resource requests/limits | `{}` | -| `nodeSelector` | Node labels for pod assignment | `{}` | -| `tolerations` | Toleration labels for pod assignment | `[]` | -| `affinity` | Affinity settings for pod assignment | `{}` | -| `extraInitContainers` | Init containers to add to the grafana pod | `{}` | -| `extraContainers` | Sidecar containers to add to the grafana pod | `{}` | -| `schedulerName` | Name of the k8s scheduler (other than default) | `nil` | -| `persistence.enabled` | Use persistent volume to store data | `false` | -| `persistence.size` | Size of persistent volume claim | `10Gi` | -| `persistence.existingClaim` | Use an existing PVC to persist data | `nil` | -| `persistence.storageClassName` | Type of persistent volume claim | `nil` | -| `persistence.accessModes` | Persistence access modes | `[ReadWriteOnce]` | -| `persistence.subPath` | Mount a sub dir of the persistent volume | `nil` | -| `initChownData.enabled` | If false, don't reset data ownership at startup | true | -| `initChownData.image.repository` | init-chown-data container image repository | `busybox` | -| `initChownData.image.tag` | init-chown-data container image tag | `latest` | -| `initChownData.image.pullPolicy` | init-chown-data container image pull policy | `IfNotPresent` | -| `initChownData.resources` | init-chown-data pod resource requests & limits | `{}` | -| `schedulerName` | Alternate scheduler name | `nil` | -| `env` | Extra environment variables passed to pods | `{}` | -| `envFromSecret` | Name of a Kubenretes secret (must be manually created in the same namespace) containing values to be added to the environment | `""` | -| `extraSecretMounts` | Additional grafana server secret mounts | `[]` | -| `extraVolumeMounts` | Additional grafana server volume mounts | `[]` | -| `extraConfigmapMounts` | Additional grafana server configMap volume mounts | `[]` | -| `extraEmptyDirMounts` | Additional grafana server emptyDir volume mounts | `[]` | -| `plugins` | Plugins to be loaded along with Grafana | `[]` | -| `datasources` | Configure grafana datasources (passed through tpl) | `{}` | -| `notifiers` | Configure grafana notifiers | `{}` | -| `dashboardProviders` | Configure grafana dashboard providers | `{}` | -| `dashboards` | Dashboards to import | `{}` | -| `dashboardsConfigMaps` | ConfigMaps reference that contains dashboards | `{}` | -| `grafana.ini` | Grafana's primary configuration | `{}` | -| `ldap.existingSecret` | The name of an existing secret containing the `ldap.toml` file, this must have the key `ldap-toml`. | `""` | -| `ldap.config ` | Grafana's LDAP configuration | `""` | -| `annotations` | Deployment annotations | `{}` | -| `podAnnotations` | Pod annotations | `{}` | -| `sidecar.image` | Sidecar image | `kiwigrid/k8s-sidecar:0.0.16` | -| `sidecar.imagePullPolicy` | Sidecar image pull policy | `IfNotPresent` | -| `sidecar.resources` | Sidecar resources | `{}` | -| `sidecar.dashboards.enabled` | Enabled the cluster wide search for dashboards and adds/updates/deletes them in grafana | `false` | -| `sidecar.skipTlsVerify` | Set to true to skip tls verification for kube api calls | `nil` | -| `sidecar.dashboards.label` | Label that config maps with dashboards should have to be added | `grafana_dashboard` | -| `sidecar.dashboards.folder` | Folder in the pod that should hold the collected dashboards (unless `sidecar.dashboards.defaultFolderName` is set). This path will be mounted. | `/tmp/dashboards` | -| `sidecar.dashboards.defaultFolderName` | The default folder name, it will create a subfolder under the `sidecar.dashboards.folder` and put dashboards in there instead | `nil` | -| `sidecar.dashboards.searchNamespace` | If specified, the sidecar will search for dashboard config-maps inside this namespace. Otherwise the namespace in which the sidecar is running will be used. It's also possible to specify ALL to search in all namespaces | `nil` | -| `sidecar.datasources.enabled` | Enabled the cluster wide search for datasources and adds/updates/deletes them in grafana |`false` | -| `sidecar.datasources.label` | Label that config maps with datasources should have to be added | `grafana_datasource` | -| `sidecar.datasources.searchNamespace` | If specified, the sidecar will search for datasources config-maps inside this namespace. Otherwise the namespace in which the sidecar is running will be used. It's also possible to specify ALL to search in all namespaces | `nil` | -| `smtp.existingSecret` | The name of an existing secret containing the SMTP credentials. | `""` | -| `smtp.userKey` | The key in the existing SMTP secret containing the username. | `"user"` | -| `smtp.passwordKey` | The key in the existing SMTP secret containing the password. | `"password"` | -| `admin.existingSecret` | The name of an existing secret containing the admin credentials. | `""` | -| `admin.userKey` | The key in the existing admin secret containing the username. | `"admin-user"` | -| `admin.passwordKey` | The key in the existing admin secret containing the password. | `"admin-password"` | -| `serviceAccount.create` | Create service account | `true` | -| `serviceAccount.name` | Service account name to use, when empty will be set to created account if `serviceAccount.create` is set else to `default` | `` | -| `serviceAccount.nameTest` | Service account name to use for test, when empty will be set to created account if `serviceAccount.create` is set else to `default` | `` | -| `rbac.create` | Create and use RBAC resources | `true` | -| `rbac.namespaced` | Creates Role and Rolebinding instead of the default ClusterRole and ClusteRoleBindings for the grafana instance | `false` | -| `rbac.pspEnabled` | Create PodSecurityPolicy (with `rbac.create`, grant roles permissions as well) | `true` | -| `rbac.pspUseAppArmor` | Enforce AppArmor in created PodSecurityPolicy (requires `rbac.pspEnabled`) | `true` | -| `command` | Define command to be executed by grafana container at startup | `nil` | -| `testFramework.image` | `test-framework` image repository. | `dduportal/bats` | -| `testFramework.tag` | `test-framework` image tag. | `0.4.0` | - - -### Example of extraVolumeMounts - -```yaml -- extraVolumeMounts: - - name: plugins - mountPath: /var/lib/grafana/plugins - subPath: configs/grafana/plugins - existingClaim: existing-grafana-claim - readOnly: false -``` - -## Import dashboards - -There are a few methods to import dashboards to Grafana. Below are some examples and explanations as to how to use each method: - -```yaml -dashboards: - default: - some-dashboard: - json: | - { - "annotations": - - ... - # Complete json file here - ... - - "title": "Some Dashboard", - "uid": "abcd1234", - "version": 1 - } - custom-dashboard: - # This is a path to a file inside the dashboards directory inside the chart directory - file: dashboards/custom-dashboard.json - prometheus-stats: - # Ref: https://grafana.com/dashboards/2 - gnetId: 2 - revision: 2 - datasource: Prometheus - local-dashboard: - url: https://raw.githubusercontent.com/user/repository/master/dashboards/dashboard.json -``` - -## BASE64 dashboards - -Dashboards could be storaged in a server that does not return JSON directly and instead of it returns a Base64 encoded file (e.g. Gerrit) -A new parameter has been added to the url use case so if you specify a b64content value equals to true after the url entry a Base64 decoding is applied before save the file to disk. -If this entry is not set or is equals to false not decoding is applied to the file before saving it to disk. - -### Gerrit use case: -Gerrit API for download files has the following schema: https://yourgerritserver/a/{project-name}/branches/{branch-id}/files/{file-id}/content where {project-name} and -{file-id} usualy has '/' in their values and so they MUST be replaced by %2F so if project-name is user/repo, branch-id is master and file-id is equals to dir1/dir2/dashboard -the url value is https://yourgerritserver/a/user%2Frepo/branches/master/files/dir1%2Fdir2%2Fdashboard/content - -## Sidecar for dashboards - -If the parameter `sidecar.dashboards.enabled` is set, a sidecar container is deployed in the grafana pod. This container watches all config maps in the cluster and filters out the ones with a label as defined in `sidecar.dashboards.label`. The files defined in those configmaps are written to a folder and accessed by grafana. Changes to the configmaps are monitored and the imported dashboards are deleted/updated. A recommendation is to use one configmap per dashboard, as an reduction of multiple dashboards inside one configmap is currently not properly mirrored in grafana. -Example dashboard config: -``` -apiVersion: v1 -kind: ConfigMap -metadata: - name: sample-grafana-dashboard - labels: - grafana_dashboard: 1 -data: - k8s-dashboard.json: |- - [...] -``` - -## Sidecar for datasources - -If the parameter `sidecar.datasources.enabled` is set, an init container is deployed in the grafana pod. This container lists all config maps in the cluster and filters out the ones with a label as defined in `sidecar.datasources.label`. The files defined in those configmaps are written to a folder and accessed by grafana on startup. Using these yaml files, the data sources in grafana can be imported. The configmaps must be created before `helm install` so that the datasources init container can list the configmaps. - -Example datasource config adapted from [Grafana](http://docs.grafana.org/administration/provisioning/#example-datasource-config-file): -``` -apiVersion: v1 -kind: ConfigMap -metadata: - name: sample-grafana-datasource - labels: - grafana_datasource: 1 -data: - datasource.yaml: |- - # config file version - apiVersion: 1 - - # list of datasources that should be deleted from the database - deleteDatasources: - - name: Graphite - orgId: 1 - - # list of datasources to insert/update depending - # whats available in the database - datasources: - # name of the datasource. Required - - name: Graphite - # datasource type. Required - type: graphite - # access mode. proxy or direct (Server or Browser in the UI). Required - access: proxy - # org id. will default to orgId 1 if not specified - orgId: 1 - # url - url: http://localhost:8080 - # database password, if used - password: - # database user, if used - user: - # database name, if used - database: - # enable/disable basic auth - basicAuth: - # basic auth username - basicAuthUser: - # basic auth password - basicAuthPassword: - # enable/disable with credentials headers - withCredentials: - # mark as default datasource. Max one per org - isDefault: - # fields that will be converted to json and stored in json_data - jsonData: - graphiteVersion: "1.1" - tlsAuth: true - tlsAuthWithCACert: true - # json object of data that will be encrypted. - secureJsonData: - tlsCACert: "..." - tlsClientCert: "..." - tlsClientKey: "..." - version: 1 - # allow users to edit datasources from the UI. - editable: false - -``` diff --git a/sources/loki/helm/loki-stack/charts/grafana/dashboards/custom-dashboard.json b/sources/loki/helm/loki-stack/charts/grafana/dashboards/custom-dashboard.json deleted file mode 100644 index 9e26dfee..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/dashboards/custom-dashboard.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/NOTES.txt b/sources/loki/helm/loki-stack/charts/grafana/templates/NOTES.txt deleted file mode 100644 index 1193aa05..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/NOTES.txt +++ /dev/null @@ -1,37 +0,0 @@ -1. Get your '{{ .Values.adminUser }}' user password by running: - - kubectl get secret --namespace {{ .Release.Namespace }} {{ template "grafana.fullname" . }} -o jsonpath="{.data.admin-password}" | base64 --decode ; echo - -2. The Grafana server can be accessed via port {{ .Values.service.port }} on the following DNS name from within your cluster: - - {{ template "grafana.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local -{{ if .Values.ingress.enabled }} - From outside the cluster, the server URL(s) are: -{{- range .Values.ingress.hosts }} - http://{{ . }} -{{- end }} -{{ else }} - Get the Grafana URL to visit by running these commands in the same shell: -{{ if contains "NodePort" .Values.service.type -}} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "grafana.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{ else if contains "LoadBalancer" .Values.service.type -}} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "grafana.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "grafana.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - http://$SERVICE_IP:{{ .Values.service.port -}} -{{ else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "grafana.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 3000 -{{- end }} -{{- end }} - -3. Login with the password from step 1 and the username: {{ .Values.adminUser }} - -{{- if not .Values.persistence.enabled }} -################################################################################# -###### WARNING: Persistence is disabled!!! You will lose your data when ##### -###### the Grafana pod is terminated. ##### -################################################################################# -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/_helpers.tpl b/sources/loki/helm/loki-stack/charts/grafana/templates/_helpers.tpl deleted file mode 100644 index f6880cdf..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/_helpers.tpl +++ /dev/null @@ -1,51 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "grafana.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "grafana.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "grafana.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account -*/}} -{{- define "grafana.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "grafana.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{- define "grafana.serviceAccountNameTest" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (print (include "grafana.fullname" .) "-test") .Values.serviceAccount.nameTest }} -{{- else -}} - {{ default "default" .Values.serviceAccount.nameTest }} -{{- end -}} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/clusterrole.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/clusterrole.yaml deleted file mode 100644 index ccfc7237..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/clusterrole.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if and .Values.rbac.create (not .Values.rbac.namespaced) }} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} - name: {{ template "grafana.fullname" . }}-clusterrole -{{- if or .Values.sidecar.dashboards.enabled .Values.sidecar.datasources.enabled }} -rules: -- apiGroups: [""] # "" indicates the core API group - resources: ["configmaps"] - verbs: ["get", "watch", "list"] -{{- else }} -rules: [] -{{- end}} -{{- end}} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/clusterrolebinding.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/clusterrolebinding.yaml deleted file mode 100644 index 0ffe9ff2..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if and .Values.rbac.create (not .Values.rbac.namespaced) }} -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "grafana.fullname" . }}-clusterrolebinding - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -subjects: - - kind: ServiceAccount - name: {{ template "grafana.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: {{ template "grafana.fullname" . }}-clusterrole - apiGroup: rbac.authorization.k8s.io -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/configmap-dashboard-provider.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/configmap-dashboard-provider.yaml deleted file mode 100644 index e129dcba..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/configmap-dashboard-provider.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.sidecar.dashboards.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} - name: {{ template "grafana.fullname" . }}-config-dashboards - namespace: {{ .Release.Namespace }} -data: - provider.yaml: |- - apiVersion: 1 - providers: - - name: 'default' - orgId: 1 - folder: '' - type: file - disableDeletion: false - options: - path: {{ .Values.sidecar.dashboards.folder }}{{- with .Values.sidecar.dashboards.defaultFolderName }}/{{ . }}{{- end }} -{{- end}} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/configmap.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/configmap.yaml deleted file mode 100644 index d24d0c8d..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/configmap.yaml +++ /dev/null @@ -1,72 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "grafana.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: -{{- if .Values.plugins }} - plugins: {{ join "," .Values.plugins }} -{{- end }} - grafana.ini: | -{{- range $key, $value := index .Values "grafana.ini" }} - [{{ $key }}] - {{- range $elem, $elemVal := $value }} - {{ $elem }} = {{ $elemVal }} - {{- end }} -{{- end }} - -{{- if .Values.datasources }} -{{ $root := . }} - {{- range $key, $value := .Values.datasources }} - {{ $key }}: | -{{ tpl (toYaml $value | indent 4) $root }} - {{- end -}} -{{- end -}} - -{{- if .Values.notifiers }} - {{- range $key, $value := .Values.notifiers }} - {{ $key }}: | -{{ toYaml $value | indent 4 }} - {{- end -}} -{{- end -}} - -{{- if .Values.dashboardProviders }} - {{- range $key, $value := .Values.dashboardProviders }} - {{ $key }}: | -{{ toYaml $value | indent 4 }} - {{- end -}} -{{- end -}} - -{{- if .Values.dashboards }} - download_dashboards.sh: | - #!/usr/bin/env sh - set -euf - {{- if .Values.dashboardProviders }} - {{- range $key, $value := .Values.dashboardProviders }} - {{- range $value.providers }} - mkdir -p {{ .options.path }} - {{- end }} - {{- end }} - {{- end }} - - {{- range $provider, $dashboards := .Values.dashboards }} - {{- range $key, $value := $dashboards }} - {{- if (or (hasKey $value "gnetId") (hasKey $value "url")) }} - curl -sk \ - --connect-timeout 60 \ - --max-time 60 \ - {{- if not $value.b64content }} - -H "Accept: application/json" \ - -H "Content-Type: application/json;charset=UTF-8" \ - {{- end }} - {{- if $value.url -}}{{ $value.url }}{{- else -}} https://grafana.com/api/dashboards/{{ $value.gnetId }}/revisions/{{- if $value.revision -}}{{ $value.revision }}{{- else -}}1{{- end -}}/download{{- end -}}{{ if $value.datasource }}| sed 's|\"datasource\":[^,]*|\"datasource\": \"{{ $value.datasource }}\"|g'{{ end }}{{- if $value.b64content -}} | base64 -d {{- end -}} \ - > /var/lib/grafana/dashboards/{{ $provider }}/{{ $key }}.json - {{- end -}} - {{- end }} - {{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/dashboards-json-configmap.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/dashboards-json-configmap.yaml deleted file mode 100644 index 408283fe..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/dashboards-json-configmap.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if .Values.dashboards }} -{{ $files := .Files }} -{{- range $provider, $dashboards := .Values.dashboards }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "grafana.fullname" $ }}-dashboards-{{ $provider }} - namespace: {{ $.Release.Namespace }} - labels: - app: {{ template "grafana.name" $ }} - chart: {{ template "grafana.chart" $ }} - release: {{ $.Release.Name }} - heritage: {{ $.Release.Service }} - dashboard-provider: {{ $provider }} -data: -{{- range $key, $value := $dashboards }} -{{- if (or (hasKey $value "json") (hasKey $value "file")) }} -{{ print $key | indent 2 }}.json: -{{- if hasKey $value "json" }} - |- -{{ $value.json | indent 6 }} -{{- end }} -{{- if hasKey $value "file" }} -{{ toYaml ( $files.Get $value.file ) | indent 4}} -{{- end }} -{{- end }} -{{- end }} -{{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/deployment.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/deployment.yaml deleted file mode 100644 index be18aaac..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/deployment.yaml +++ /dev/null @@ -1,382 +0,0 @@ -apiVersion: apps/v1beta2 -kind: Deployment -metadata: - name: {{ template "grafana.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- with .Values.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -spec: - replicas: {{ .Values.replicas }} - selector: - matchLabels: - app: {{ template "grafana.name" . }} - release: {{ .Release.Name }} - strategy: - type: {{ .Values.deploymentStrategy }} - {{- if ne .Values.deploymentStrategy "RollingUpdate" }} - rollingUpdate: null - {{- end }} - template: - metadata: - labels: - app: {{ template "grafana.name" . }} - release: {{ .Release.Name }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - checksum/dashboards-json-config: {{ include (print $.Template.BasePath "/dashboards-json-configmap.yaml") . | sha256sum }} - checksum/sc-dashboard-provider-config: {{ include (print $.Template.BasePath "/configmap-dashboard-provider.yaml") . | sha256sum }} -{{- if not .Values.admin.existingSecret }} - checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} -{{- end }} -{{- with .Values.podAnnotations }} -{{ toYaml . | indent 8 }} -{{- end }} - spec: - {{- if .Values.schedulerName }} - schedulerName: "{{ .Values.schedulerName }}" - {{- end }} - serviceAccountName: {{ template "grafana.serviceAccountName" . }} -{{- if .Values.schedulerName }} - schedulerName: "{{ .Values.schedulerName }}" -{{- end }} -{{- if .Values.securityContext }} - securityContext: -{{ toYaml .Values.securityContext | indent 8 }} -{{- end }} -{{- if .Values.priorityClassName }} - priorityClassName: {{ .Values.priorityClassName }} -{{- end }} -{{- if ( or .Values.persistence.enabled .Values.dashboards .Values.sidecar.datasources.enabled .Values.extraInitContainers) }} - initContainers: -{{- end }} -{{- if ( and .Values.persistence.enabled .Values.initChownData.enabled ) }} - - name: init-chown-data - image: "{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}" - imagePullPolicy: {{ .Values.initChownData.image.pullPolicy }} - securityContext: - runAsUser: 0 - command: ["chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.runAsUser }}", "/var/lib/grafana"] - resources: -{{ toYaml .Values.initChownData.resources | indent 12 }} - volumeMounts: - - name: storage - mountPath: "/var/lib/grafana" -{{- if .Values.persistence.subPath }} - subPath: {{ .Values.persistence.subPath }} -{{- end }} -{{- end }} -{{- if .Values.dashboards }} - - name: download-dashboards - image: "{{ .Values.downloadDashboardsImage.repository }}:{{ .Values.downloadDashboardsImage.tag }}" - imagePullPolicy: {{ .Values.downloadDashboardsImage.pullPolicy }} - command: ["sh", "/etc/grafana/download_dashboards.sh"] - volumeMounts: - - name: config - mountPath: "/etc/grafana/download_dashboards.sh" - subPath: download_dashboards.sh - - name: storage - mountPath: "/var/lib/grafana" -{{- if .Values.persistence.subPath }} - subPath: {{ .Values.persistence.subPath }} -{{- end }} - {{- range .Values.extraSecretMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - readOnly: {{ .readOnly }} - {{- end }} -{{- end }} -{{- if .Values.sidecar.datasources.enabled }} - - name: {{ template "grafana.name" . }}-sc-datasources - image: "{{ .Values.sidecar.image }}" - imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} - env: - - name: METHOD - value: LIST - - name: LABEL - value: "{{ .Values.sidecar.datasources.label }}" - - name: FOLDER - value: "/etc/grafana/provisioning/datasources" - {{- if .Values.sidecar.datasources.searchNamespace }} - - name: NAMESPACE - value: "{{ .Values.sidecar.datasources.searchNamespace }}" - {{- end }} - {{- if .Values.sidecar.skipTlsVerify }} - - name: SKIP_TLS_VERIFY - value: "{{ .Values.sidecar.skipTlsVerify }}" - {{- end }} - resources: -{{ toYaml .Values.sidecar.resources | indent 12 }} - volumeMounts: - - name: sc-datasources-volume - mountPath: "/etc/grafana/provisioning/datasources" -{{- end}} -{{- if .Values.extraInitContainers }} -{{ toYaml .Values.extraInitContainers | indent 8 }} -{{- end }} - {{- if .Values.image.pullSecrets }} - imagePullSecrets: - {{- range .Values.image.pullSecrets }} - - name: {{ . }} - {{- end}} - {{- end }} - containers: -{{- if .Values.sidecar.dashboards.enabled }} - - name: {{ template "grafana.name" . }}-sc-dashboard - image: "{{ .Values.sidecar.image }}" - imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }} - env: - - name: LABEL - value: "{{ .Values.sidecar.dashboards.label }}" - - name: FOLDER - value: "{{ .Values.sidecar.dashboards.folder }}{{- with .Values.sidecar.dashboards.defaultFolderName }}/{{ . }}{{- end }}" - {{- if .Values.sidecar.dashboards.searchNamespace }} - - name: NAMESPACE - value: "{{ .Values.sidecar.dashboards.searchNamespace }}" - {{- end }} - {{- if .Values.sidecar.skipTlsVerify }} - - name: SKIP_TLS_VERIFY - value: "{{ .Values.sidecar.skipTlsVerify }}" - {{- end }} - resources: -{{ toYaml .Values.sidecar.resources | indent 12 }} - volumeMounts: - - name: sc-dashboard-volume - mountPath: {{ .Values.sidecar.dashboards.folder | quote }} -{{- end}} - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- if .Values.command }} - command: - {{- range .Values.command }} - - {{ . }} - {{- end }} - {{- end}} - volumeMounts: - - name: config - mountPath: "/etc/grafana/grafana.ini" - subPath: grafana.ini - {{- if not .Values.admin.existingSecret }} - - name: ldap - mountPath: "/etc/grafana/ldap.toml" - subPath: ldap.toml - {{- end }} - {{- range .Values.extraConfigmapMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - readOnly: {{ .readOnly }} - {{- end }} - - name: storage - mountPath: "/var/lib/grafana" -{{- if .Values.persistence.subPath }} - subPath: {{ .Values.persistence.subPath }} -{{- end }} -{{- if .Values.dashboards }} - {{- range $provider, $dashboards := .Values.dashboards }} - {{- range $key, $value := $dashboards }} - {{- if (or (hasKey $value "json") (hasKey $value "file")) }} - - name: dashboards-{{ $provider }} - mountPath: "/var/lib/grafana/dashboards/{{ $provider }}/{{ $key }}.json" - subPath: "{{ $key }}.json" - {{- end }} - {{- end }} - {{- end }} -{{- end -}} -{{- if .Values.dashboardsConfigMaps }} - {{- range keys .Values.dashboardsConfigMaps }} - - name: dashboards-{{ . }} - mountPath: "/var/lib/grafana/dashboards/{{ . }}" - {{- end }} -{{- end }} -{{- if .Values.datasources }} - - name: config - mountPath: "/etc/grafana/provisioning/datasources/datasources.yaml" - subPath: datasources.yaml -{{- end }} -{{- if .Values.notifiers }} - - name: config - mountPath: "/etc/grafana/provisioning/notifiers/notifiers.yaml" - subPath: notifiers.yaml -{{- end }} -{{- if .Values.dashboardProviders }} - - name: config - mountPath: "/etc/grafana/provisioning/dashboards/dashboardproviders.yaml" - subPath: dashboardproviders.yaml -{{- end }} -{{- if .Values.sidecar.dashboards.enabled }} - - name: sc-dashboard-volume - mountPath: {{ .Values.sidecar.dashboards.folder | quote }} -{{- if not .Values.dashboardProviders }} - - name: sc-dashboard-provider - mountPath: "/etc/grafana/provisioning/dashboards/sc-dashboardproviders.yaml" - subPath: provider.yaml -{{- end}} -{{- end}} -{{- if .Values.sidecar.datasources.enabled }} - - name: sc-datasources-volume - mountPath: "/etc/grafana/provisioning/datasources" -{{- end}} - {{- range .Values.extraSecretMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.extraVolumeMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath | default "" }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.extraEmptyDirMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - {{- end }} - ports: - - name: service - containerPort: {{ .Values.service.port }} - protocol: TCP - - name: grafana - containerPort: 3000 - protocol: TCP - env: - {{- if not .Values.env.GF_SECURITY_ADMIN_USER }} - - name: GF_SECURITY_ADMIN_USER - valueFrom: - secretKeyRef: - name: {{ .Values.admin.existingSecret | default (include "grafana.fullname" .) }} - key: {{ .Values.admin.userKey | default "admin-user" }} - {{- end }} - {{- if not .Values.env.GF_SECURITY_ADMIN_PASSWORD }} - - name: GF_SECURITY_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.admin.existingSecret | default (include "grafana.fullname" .) }} - key: {{ .Values.admin.passwordKey | default "admin-password" }} - {{- end }} - {{- if .Values.plugins }} - - name: GF_INSTALL_PLUGINS - valueFrom: - configMapKeyRef: - name: {{ template "grafana.fullname" . }} - key: plugins - {{- end }} - {{- if .Values.smtp.existingSecret }} - - name: GF_SMTP_USER - valueFrom: - secretKeyRef: - name: {{ .Values.smtp.existingSecret }} - key: {{ .Values.smtp.userKey | default "user" }} - - name: GF_SMTP_PASSWORD - valueFrom: - secretKeyRef: - name: {{ .Values.smtp.existingSecret }} - key: {{ .Values.smtp.passwordKey | default "password" }} - {{- end }} -{{- range $key, $value := .Values.env }} - - name: "{{ $key }}" - value: "{{ $value }}" -{{- end }} - {{- if .Values.envFromSecret }} - envFrom: - - secretRef: - name: {{ .Values.envFromSecret }} - {{- end }} - livenessProbe: -{{ toYaml .Values.livenessProbe | indent 12 }} - readinessProbe: -{{ toYaml .Values.readinessProbe | indent 12 }} - resources: -{{ toYaml .Values.resources | indent 12 }} -{{- if .Values.extraContainers }} -{{ toYaml .Values.extraContainers | indent 8}} -{{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} - volumes: - - name: config - configMap: - name: {{ template "grafana.fullname" . }} - {{- range .Values.extraConfigmapMounts }} - - name: {{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - {{- if .Values.dashboards }} - {{- range keys .Values.dashboards }} - - name: dashboards-{{ . }} - configMap: - name: {{ template "grafana.fullname" $ }}-dashboards-{{ . }} - {{- end }} - {{- end }} - {{- if .Values.dashboardsConfigMaps }} - {{ $root := . }} - {{- range $provider, $name := .Values.dashboardsConfigMaps }} - - name: dashboards-{{ $provider }} - configMap: - name: {{ tpl $name $root }} - {{- end }} - {{- end }} - {{- if not .Values.admin.existingSecret }} - - name: ldap - secret: - {{- if .Values.ldap.existingSecret }} - secretName: {{ .Values.ldap.existingSecret }} - {{- else }} - secretName: {{ template "grafana.fullname" . }} - {{- end }} - items: - - key: ldap-toml - path: ldap.toml - {{- end }} - - name: storage - {{- if .Values.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim | default (include "grafana.fullname" .) }} - {{- else }} - emptyDir: {} - {{- end -}} - {{- if .Values.sidecar.dashboards.enabled }} - - name: sc-dashboard-volume - emptyDir: {} - {{- if not .Values.dashboardProviders }} - - name: sc-dashboard-provider - configMap: - name: {{ template "grafana.fullname" . }}-config-dashboards - {{- end -}} - {{- end }} - {{- if .Values.sidecar.datasources.enabled }} - - name: sc-datasources-volume - emptyDir: {} - {{- end -}} - {{- range .Values.extraSecretMounts }} - - name: {{ .name }} - secret: - secretName: {{ .secretName }} - defaultMode: {{ .defaultMode }} - {{- end }} - {{- range .Values.extraVolumeMounts }} - - name: {{ .name }} - persistentVolumeClaim: - claimName: {{ .existingClaim }} - {{- end }} - {{- range .Values.extraEmptyDirMounts }} - - name: {{ .name }} - emptyDir: {} - {{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/ingress.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/ingress.yaml deleted file mode 100644 index 13e581da..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/ingress.yaml +++ /dev/null @@ -1,43 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "grafana.fullname" . -}} -{{- $servicePort := .Values.service.port -}} -{{- $ingressPath := .Values.ingress.path -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: {{ $fullName }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- if .Values.ingress.labels }} -{{ toYaml .Values.ingress.labels | indent 4 }} -{{- end }} -{{- with .Values.ingress.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -spec: -{{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} -{{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ . }} - http: - paths: - - path: {{ $ingressPath }} - backend: - serviceName: {{ $fullName }} - servicePort: {{ $servicePort }} - {{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/podsecuritypolicy.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/podsecuritypolicy.yaml deleted file mode 100644 index c779aa94..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/podsecuritypolicy.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- if .Values.rbac.pspEnabled }} -apiVersion: extensions/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "grafana.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - annotations: - seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default' - seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - {{- if .Values.rbac.pspUseAppArmor }} - apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default' - apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - {{- end }} -spec: - privileged: false - allowPrivilegeEscalation: false - requiredDropCapabilities: - # Default set from Docker, without DAC_OVERRIDE or CHOWN - - FOWNER - - FSETID - - KILL - - SETGID - - SETUID - - SETPCAP - - NET_BIND_SERVICE - - NET_RAW - - SYS_CHROOT - - MKNOD - - AUDIT_WRITE - - SETFCAP - volumes: - - 'configMap' - - 'emptyDir' - - 'projected' - - 'secret' - - 'downwardAPI' - - 'persistentVolumeClaim' - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'RunAsAny' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'RunAsAny' - fsGroup: - rule: 'RunAsAny' - readOnlyRootFilesystem: false -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/pvc.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/pvc.yaml deleted file mode 100644 index 067753f5..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/pvc.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{ template "grafana.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- with .Values.persistence.annotations }} - annotations: -{{ toYaml . | indent 4 }} - {{- end }} -spec: - accessModes: - {{- range .Values.persistence.accessModes }} - - {{ . | quote }} - {{- end }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} - storageClassName: {{ .Values.persistence.storageClassName }} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/role.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/role.yaml deleted file mode 100644 index 9b31de23..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/role.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: {{ template "grafana.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -{{- with .Values.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -{{- if or .Values.rbac.pspEnabled (and .Values.rbac.namespaced (or .Values.sidecar.dashboards.enabled .Values.sidecar.datasources.enabled)) }} -rules: -{{- if .Values.rbac.pspEnabled }} -- apiGroups: ['extensions'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: [{{ template "grafana.fullname" . }}] -{{- end }} -{{- if and .Values.rbac.namespaced (or .Values.sidecar.dashboards.enabled .Values.sidecar.datasources.enabled) }} -- apiGroups: [""] # "" indicates the core API group - resources: ["configmaps"] - verbs: ["get", "watch", "list"] -{{- end }} -{{- else }} -rules: [] -{{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/rolebinding.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/rolebinding.yaml deleted file mode 100644 index 680be285..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/rolebinding.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: RoleBinding -metadata: - name: {{ template "grafana.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -{{- with .Values.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "grafana.fullname" . }} -subjects: -- kind: ServiceAccount - name: {{ template "grafana.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -{{- if .Values.rbac.namespaced }} -roleRef: - kind: Role - name: {{ template "grafana.fullname" . }} - apiGroup: rbac.authorization.k8s.io -{{- end }} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/secret.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/secret.yaml deleted file mode 100644 index 4f02fa3b..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/secret.yaml +++ /dev/null @@ -1,23 +0,0 @@ -{{- if not .Values.admin.existingSecret }} -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "grafana.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -type: Opaque -data: - admin-user: {{ .Values.adminUser | b64enc | quote }} - {{- if .Values.adminPassword }} - admin-password: {{ .Values.adminPassword | b64enc | quote }} - {{- else }} - admin-password: {{ randAlphaNum 40 | b64enc | quote }} - {{- end }} - {{- if not .Values.ldap.existingSecret }} - ldap-toml: {{ .Values.ldap.config | b64enc | quote }} - {{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/service.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/service.yaml deleted file mode 100644 index 71e8c833..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/service.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "grafana.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - app: {{ template "grafana.name" . }} - chart: {{ template "grafana.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -{{- if .Values.service.labels }} -{{ toYaml .Values.service.labels | indent 4 }} -{{- end }} -{{- with .Values.service.annotations }} - annotations: -{{ toYaml . | indent 4 }} -{{- end }} -spec: -{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }} - type: ClusterIP - {{- if .Values.service.clusterIP }} - clusterIP: {{ .Values.service.clusterIP }} - {{end}} -{{- else if eq .Values.service.type "LoadBalancer" }} - type: {{ .Values.service.type }} - {{- if .Values.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.service.loadBalancerIP }} - {{- end }} - {{- if .Values.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: -{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }} - {{- end -}} -{{- else }} - type: {{ .Values.service.type }} -{{- end }} -{{- if .Values.service.externalIPs }} - externalIPs: -{{ toYaml .Values.service.externalIPs | indent 4 }} -{{- end }} - ports: - - name: service - port: {{ .Values.service.port }} - protocol: TCP - targetPort: {{ .Values.service.targetPort }} -{{ if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} - nodePort: {{.Values.service.nodePort}} -{{ end }} - selector: - app: {{ template "grafana.name" . }} - release: {{ .Release.Name }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/serviceaccount.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/serviceaccount.yaml deleted file mode 100644 index 7c2a5986..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app: {{ template "grafana.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - name: {{ template "grafana.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-configmap.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-configmap.yaml deleted file mode 100644 index da800b04..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-configmap.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "grafana.fullname" . }}-test - labels: - app: {{ template "grafana.fullname" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - heritage: "{{ .Release.Service }}" - release: "{{ .Release.Name }}" -data: - run.sh: |- - @test "Test Health" { - url="http://{{ template "grafana.fullname" . }}/api/health" - - code=$(curl -s -o /dev/null -I -w "%{http_code}" $url) - [ "$code" == "200" ] - } diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-podsecuritypolicy.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-podsecuritypolicy.yaml deleted file mode 100644 index 1e807158..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-podsecuritypolicy.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- if .Values.rbac.pspEnabled }} -apiVersion: extensions/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "grafana.fullname" . }}-test - labels: - app: {{ template "grafana.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - allowPrivilegeEscalation: true - privileged: false - hostNetwork: false - hostIPC: false - hostPID: false - fsGroup: - rule: RunAsAny - seLinux: - rule: RunAsAny - supplementalGroups: - rule: RunAsAny - runAsUser: - rule: RunAsAny - volumes: - - configMap - - downwardAPI - - emptyDir - - projected - - secret -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-role.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-role.yaml deleted file mode 100644 index e950046d..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-role.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.rbac.pspEnabled -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "grafana.fullname" . }}-test - labels: - app: {{ template "grafana.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -rules: -- apiGroups: ['policy'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: [{{ template "grafana.fullname" . }}-test] -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-rolebinding.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-rolebinding.yaml deleted file mode 100644 index b558d7f2..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.rbac.pspEnabled -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ template "grafana.fullname" . }}-test - labels: - app: {{ template "grafana.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "grafana.fullname" . }}-test -subjects: -- kind: ServiceAccount - name: {{ template "grafana.serviceAccountNameTest" . }} - namespace: {{ .Release.Namespace }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-serviceaccount.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-serviceaccount.yaml deleted file mode 100644 index 5ecc9dfc..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test-serviceaccount.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app: {{ template "grafana.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - name: {{ template "grafana.serviceAccountNameTest" . }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test.yaml b/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test.yaml deleted file mode 100644 index ad6a5dbc..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/templates/tests/test.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: {{ template "grafana.fullname" . }}-test - labels: - app: {{ template "grafana.fullname" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - heritage: "{{ .Release.Service }}" - release: "{{ .Release.Name }}" - annotations: - "helm.sh/hook": test-success -spec: - serviceAccountName: {{ template "grafana.serviceAccountNameTest" . }} - initContainers: - - name: test-framework - image: "{{ .Values.testFramework.image}}:{{ .Values.testFramework.tag }}" - command: - - "bash" - - "-c" - - | - set -ex - # copy bats to tools dir - cp -R /usr/local/libexec/ /tools/bats/ - volumeMounts: - - mountPath: /tools - name: tools - {{- if .Values.image.pullSecrets }} - imagePullSecrets: - {{- range .Values.image.pullSecrets }} - - name: {{ . }} - {{- end}} - {{- end }} - containers: - - name: {{ .Release.Name }}-test - image: "{{ .Values.testFramework.image}}:{{ .Values.testFramework.tag }}" - command: ["/tools/bats/bats", "-t", "/tests/run.sh"] - volumeMounts: - - mountPath: /tests - name: tests - readOnly: true - - mountPath: /tools - name: tools - volumes: - - name: tests - configMap: - name: {{ template "grafana.fullname" . }}-test - - name: tools - emptyDir: {} - restartPolicy: Never diff --git a/sources/loki/helm/loki-stack/charts/grafana/values.yaml b/sources/loki/helm/loki-stack/charts/grafana/values.yaml deleted file mode 100644 index 13cbdc16..00000000 --- a/sources/loki/helm/loki-stack/charts/grafana/values.yaml +++ /dev/null @@ -1,408 +0,0 @@ -rbac: - create: true - pspEnabled: true - pspUseAppArmor: true - namespaced: false -serviceAccount: - create: true - name: - nameTest: - -replicas: 1 - -deploymentStrategy: RollingUpdate - -readinessProbe: - httpGet: - path: /api/health - port: 3000 - -livenessProbe: - httpGet: - path: /api/health - port: 3000 - initialDelaySeconds: 60 - timeoutSeconds: 30 - failureThreshold: 10 - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: "default-scheduler" - -image: - repository: grafana/grafana - tag: 6.2.3 - pullPolicy: IfNotPresent - - ## Optionally specify an array of imagePullSecrets. - ## Secrets must be manually created in the namespace. - ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - ## - # pullSecrets: - # - myRegistrKeySecretName - -testFramework: - image: "dduportal/bats" - tag: "0.4.0" - -securityContext: - runAsUser: 472 - fsGroup: 472 - - -extraConfigmapMounts: [] - # - name: certs-configmap - # mountPath: /etc/grafana/ssl/ - # configMap: certs-configmap - # readOnly: true - - -extraEmptyDirMounts: [] - # - name: provisioning-notifiers - # mountPath: /etc/grafana/provisioning/notifiers - - -## Assign a PriorityClassName to pods if set -# priorityClassName: - -downloadDashboardsImage: - repository: appropriate/curl - tag: latest - pullPolicy: IfNotPresent - -## Pod Annotations -# podAnnotations: {} - -## Deployment annotations -# annotations: {} - -## Expose the grafana service to be accessed from outside the cluster (LoadBalancer service). -## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it. -## ref: http://kubernetes.io/docs/user-guide/services/ -## -service: - type: ClusterIP - port: 80 - targetPort: 3000 - # targetPort: 4181 To be used with a proxy extraContainer - annotations: {} - labels: {} - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - labels: {} - path: / - hosts: - - chart-example.local - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} -# limits: -# cpu: 100m -# memory: 128Mi -# requests: -# cpu: 100m -# memory: 128Mi - -## Node labels for pod assignment -## ref: https://kubernetes.io/docs/user-guide/node-selection/ -# -nodeSelector: {} - -## Tolerations for pod assignment -## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -## -tolerations: [] - -## Affinity for pod assignment -## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -## -affinity: {} - -extraInitContainers: [] - -## Enable an Specify container in extraContainers. This is meant to allow adding an authentication proxy to a grafana pod -extraContainers: | -# - name: proxy -# image: quay.io/gambol99/keycloak-proxy:latest -# args: -# - -provider=github -# - -client-id= -# - -client-secret= -# - -github-org= -# - -email-domain=* -# - -cookie-secret= -# - -http-address=http://0.0.0.0:4181 -# - -upstream-url=http://127.0.0.1:3000 -# ports: -# - name: proxy-web -# containerPort: 4181 - -## Enable persistence using Persistent Volume Claims -## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ -## -persistence: - enabled: false - # storageClassName: default - accessModes: - - ReadWriteOnce - size: 10Gi - # annotations: {} - # subPath: "" - # existingClaim: - -initChownData: - ## If false, data ownership will not be reset at startup - ## This allows the prometheus-server to be run with an arbitrary user - ## - enabled: true - - ## initChownData container image - ## - image: - repository: busybox - tag: "1.30" - pullPolicy: IfNotPresent - - ## initChownData resource requests and limits - ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - - -# Administrator credentials when not using an existing secret (see below) -adminUser: admin -# adminPassword: strongpassword - -# Use an existing secret for the admin user. -admin: - existingSecret: "" - userKey: admin-user - passwordKey: admin-password - -## Define command to be executed at startup by grafana container -## Needed if using `vault-env` to manage secrets (ref: https://banzaicloud.com/blog/inject-secrets-into-pods-vault/) -## Default is "run.sh" as defined in grafana's Dockerfile -# command: -# - "sh" -# - "/run.sh" - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Extra environment variables that will be pass onto deployment pods -env: {} - -## The name of a secret in the same kubernetes namespace which contain values to be added to the environment -## This can be useful for auth tokens, etc -envFromSecret: "" - -## Additional grafana server secret mounts -# Defines additional mounts with secrets. Secrets must be manually created in the namespace. -extraSecretMounts: [] - # - name: secret-files - # mountPath: /etc/secrets - # secretName: grafana-secret-files - # readOnly: true - -## Additional grafana server volume mounts -# Defines additional volume mounts. -extraVolumeMounts: [] - # - name: extra-volume - # mountPath: /mnt/volume - # readOnly: true - # existingClaim: volume-claim - -## Pass the plugins you want installed as a list. -## -plugins: [] - # - digrich-bubblechart-panel - # - grafana-clock-panel - -## Configure grafana datasources -## ref: http://docs.grafana.org/administration/provisioning/#datasources -## -datasources: {} -# datasources.yaml: -# apiVersion: 1 -# datasources: -# - name: Prometheus -# type: prometheus -# url: http://prometheus-prometheus-server -# access: proxy -# isDefault: true - -## Configure notifiers -## ref: http://docs.grafana.org/administration/provisioning/#alert-notification-channels -## -notifiers: {} -# notifiers.yaml: -# notifiers: -# - name: email-notifier -# type: email -# uid: email1 -# # either: -# org_id: 1 -# # or -# org_name: Main Org. -# is_default: true -# settings: -# addresses: an_email_address@example.com -# delete_notifiers: - -## Configure grafana dashboard providers -## ref: http://docs.grafana.org/administration/provisioning/#dashboards -## -## `path` must be /var/lib/grafana/dashboards/ -## -dashboardProviders: {} -# dashboardproviders.yaml: -# apiVersion: 1 -# providers: -# - name: 'default' -# orgId: 1 -# folder: '' -# type: file -# disableDeletion: false -# editable: true -# options: -# path: /var/lib/grafana/dashboards/default - -## Configure grafana dashboard to import -## NOTE: To use dashboards you must also enable/configure dashboardProviders -## ref: https://grafana.com/dashboards -## -## dashboards per provider, use provider name as key. -## -dashboards: {} - # default: - # some-dashboard: - # json: | - # $RAW_JSON - # custom-dashboard: - # file: dashboards/custom-dashboard.json - # prometheus-stats: - # gnetId: 2 - # revision: 2 - # datasource: Prometheus - # local-dashboard: - # url: https://example.com/repository/test.json - # local-dashboard-base64: - # url: https://example.com/repository/test-b64.json - # b64content: true - -## Reference to external ConfigMap per provider. Use provider name as key and ConfiMap name as value. -## A provider dashboards must be defined either by external ConfigMaps or in values.yaml, not in both. -## ConfigMap data example: -## -## data: -## example-dashboard.json: | -## RAW_JSON -## -dashboardsConfigMaps: {} -# default: "" - -## Grafana's primary configuration -## NOTE: values in map will be converted to ini format -## ref: http://docs.grafana.org/installation/configuration/ -## -grafana.ini: - paths: - data: /var/lib/grafana/data - logs: /var/log/grafana - plugins: /var/lib/grafana/plugins - provisioning: /etc/grafana/provisioning - analytics: - check_for_updates: true - log: - mode: console - grafana_net: - url: https://grafana.net -## LDAP Authentication can be enabled with the following values on grafana.ini -## NOTE: Grafana will fail to start if the value for ldap.toml is invalid - # auth.ldap: - # enabled: true - # allow_sign_up: true - # config_file: /etc/grafana/ldap.toml - -## Grafana's LDAP configuration -## Templated by the template in _helpers.tpl -## NOTE: To enable the grafana.ini must be configured with auth.ldap.enabled -## ref: http://docs.grafana.org/installation/configuration/#auth-ldap -## ref: http://docs.grafana.org/installation/ldap/#configuration -ldap: - # `existingSecret` is a reference to an existing secret containing the ldap configuration - # for Grafana in a key `ldap-toml`. - existingSecret: "" - # `config` is the content of `ldap.toml` that will be stored in the created secret - config: "" - # config: |- - # verbose_logging = true - - # [[servers]] - # host = "my-ldap-server" - # port = 636 - # use_ssl = true - # start_tls = false - # ssl_skip_verify = false - # bind_dn = "uid=%s,ou=users,dc=myorg,dc=com" - -## Grafana's SMTP configuration -## NOTE: To enable, grafana.ini must be configured with smtp.enabled -## ref: http://docs.grafana.org/installation/configuration/#smtp -smtp: - # `existingSecret` is a reference to an existing secret containing the smtp configuration - # for Grafana. - existingSecret: "" - userKey: "user" - passwordKey: "password" - -## Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders -## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards -sidecar: - image: kiwigrid/k8s-sidecar:0.0.16 - imagePullPolicy: IfNotPresent - resources: {} -# limits: -# cpu: 100m -# memory: 100Mi -# requests: -# cpu: 50m -# memory: 50Mi - # skipTlsVerify Set to true to skip tls verification for kube api calls - # skipTlsVerify: true - dashboards: - enabled: false - # label that the configmaps with dashboards are marked with - label: grafana_dashboard - # folder in the pod that should hold the collected dashboards (unless `defaultFolderName` is set) - folder: /tmp/dashboards - # The default folder name, it will create a subfolder under the `folder` and put dashboards in there instead - defaultFolderName: null - # If specified, the sidecar will search for dashboard config-maps inside this namespace. - # Otherwise the namespace in which the sidecar is running will be used. - # It's also possible to specify ALL to search in all namespaces - searchNamespace: null - datasources: - enabled: false - # label that the configmaps with datasources are marked with - label: grafana_datasource - # If specified, the sidecar will search for datasource config-maps inside this namespace. - # Otherwise the namespace in which the sidecar is running will be used. - # It's also possible to specify ALL to search in all namespaces - searchNamespace: null diff --git a/sources/loki/helm/loki-stack/charts/loki/.helmignore b/sources/loki/helm/loki-stack/charts/loki/.helmignore deleted file mode 100644 index 50af0317..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/sources/loki/helm/loki-stack/charts/loki/Chart.yaml b/sources/loki/helm/loki-stack/charts/loki/Chart.yaml deleted file mode 100644 index fc5fc2a8..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -appVersion: 0.0.1 -description: 'Loki: like Prometheus, but for logs.' -engine: gotpl -home: https://grafana.com/loki -icon: https://github.com/grafana/loki/raw/master/docs/logo.png -kubeVersion: ^1.10.0-0 -maintainers: -- email: lokiproject@googlegroups.com - name: Loki Maintainers -name: loki -sources: -- https://github.com/grafana/loki -version: 0.10.0 diff --git a/sources/loki/helm/loki-stack/charts/loki/templates/NOTES.txt b/sources/loki/helm/loki-stack/charts/loki/templates/NOTES.txt deleted file mode 100644 index abe023a7..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Verify the application is working by running these commands: - kubectl --namespace {{ .Release.Namespace }} port-forward service/{{ include "loki.fullname" . }} {{ .Values.service.port }} - curl http://127.0.0.1:{{ .Values.service.port }}/api/prom/label diff --git a/sources/loki/helm/loki-stack/charts/loki/templates/_helpers.tpl b/sources/loki/helm/loki-stack/charts/loki/templates/_helpers.tpl deleted file mode 100644 index 2e333aae..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/templates/_helpers.tpl +++ /dev/null @@ -1,43 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "loki.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "loki.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "loki.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account -*/}} -{{- define "loki.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "loki.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/loki/templates/networkpolicy.yaml b/sources/loki/helm/loki-stack/charts/loki/templates/networkpolicy.yaml deleted file mode 100644 index 5becbcdb..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/templates/networkpolicy.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.networkPolicy.enabled }} -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: {{ template "loki.fullname" . }} - labels: - app: {{ template "loki.name" . }} - chart: {{ template "loki.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - podSelector: - matchLabels: - name: {{ template "loki.fullname" . }} - app: {{ template "loki.name" . }} - release: {{ .Release.Name }} - ingress: - - from: - - podSelector: - matchLabels: - app: {{ template "promtail.name" . }} - release: {{ .Release.Name }} - - ports: - - port: {{ .Values.service.port }} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/loki/templates/pdb.yaml b/sources/loki/helm/loki-stack/charts/loki/templates/pdb.yaml deleted file mode 100644 index 27093f5d..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/templates/pdb.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.podDisruptionBudget -}} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ template "loki.fullname" . }} - labels: - app: {{ template "loki.name" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - chart: {{ template "loki.chart" . }} -spec: - selector: - matchLabels: - app: {{ template "loki.name" . }} -{{ toYaml .Values.podDisruptionBudget | indent 2 }} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/loki/templates/podsecuritypolicy.yaml b/sources/loki/helm/loki-stack/charts/loki/templates/podsecuritypolicy.yaml deleted file mode 100644 index 9968b484..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/templates/podsecuritypolicy.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.rbac.pspEnabled }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "loki.fullname" . }} - labels: - app: {{ template "loki.name" . }} - chart: {{ template "loki.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - privileged: false - allowPrivilegeEscalation: false - volumes: - - 'configMap' - - 'emptyDir' - - 'persistentVolumeClaim' - - 'secret' - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'MustRunAsNonRoot' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - - min: 1 - max: 65535 - readOnlyRootFilesystem: true - requiredDropCapabilities: - - ALL -{{- end }} - diff --git a/sources/loki/helm/loki-stack/charts/loki/templates/role.yaml b/sources/loki/helm/loki-stack/charts/loki/templates/role.yaml deleted file mode 100644 index 756c42b5..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/templates/role.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "loki.fullname" . }} - labels: - app: {{ template "loki.name" . }} - chart: {{ template "loki.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -{{- if .Values.rbac.pspEnabled }} -rules: -- apiGroups: ['extensions'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: [{{ template "loki.fullname" . }}] -{{- end }} -{{- end }} - diff --git a/sources/loki/helm/loki-stack/charts/loki/templates/rolebinding.yaml b/sources/loki/helm/loki-stack/charts/loki/templates/rolebinding.yaml deleted file mode 100644 index de1990b7..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/templates/rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ template "loki.fullname" . }} - labels: - app: {{ template "loki.name" . }} - chart: {{ template "loki.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "loki.fullname" . }} -subjects: -- kind: ServiceAccount - name: {{ template "loki.serviceAccountName" . }} -{{- end }} - diff --git a/sources/loki/helm/loki-stack/charts/loki/templates/secret.yaml b/sources/loki/helm/loki-stack/charts/loki/templates/secret.yaml deleted file mode 100644 index 95b16fad..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/templates/secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ template "loki.fullname" . }} - labels: - app: {{ template "loki.name" . }} - chart: {{ template "loki.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - loki.yaml: {{ tpl (toYaml .Values.config) . | b64enc}} diff --git a/sources/loki/helm/loki-stack/charts/loki/templates/service-headless.yaml b/sources/loki/helm/loki-stack/charts/loki/templates/service-headless.yaml deleted file mode 100644 index dbc127b3..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/templates/service-headless.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "loki.fullname" . }}-headless - labels: - app: {{ template "loki.name" . }} - chart: {{ template "loki.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - clusterIP: None - ports: - - port: {{ .Values.service.port }} - protocol: TCP - name: http-metrics - targetPort: http-metrics - selector: - app: {{ template "loki.name" . }} - release: {{ .Release.Name }} diff --git a/sources/loki/helm/loki-stack/charts/loki/templates/service.yaml b/sources/loki/helm/loki-stack/charts/loki/templates/service.yaml deleted file mode 100644 index 9a8c1da5..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/templates/service.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "loki.fullname" . }} - labels: - app: {{ template "loki.name" . }} - chart: {{ template "loki.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- with .Values.service.labels }} - {{- toYaml . | nindent 4 }} - {{- end }} - annotations: - {{- toYaml .Values.service.annotations | nindent 4 }} -spec: - type: {{ .Values.service.type }} -{{- if (and (eq .Values.service.type "ClusterIP") (not (empty .Values.service.clusterIP))) }} - clusterIP: {{ .Values.service.clusterIP }} -{{- end }} - ports: - - port: {{ .Values.service.port }} - protocol: TCP - name: http-metrics - targetPort: http-metrics -{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} - nodePort: {{ .Values.service.nodePort }} -{{- end }} - selector: - app: {{ template "loki.name" . }} - release: {{ .Release.Name }} diff --git a/sources/loki/helm/loki-stack/charts/loki/templates/serviceaccount.yaml b/sources/loki/helm/loki-stack/charts/loki/templates/serviceaccount.yaml deleted file mode 100644 index f223f0a1..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app: {{ template "loki.name" . }} - chart: {{ template "loki.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - name: {{ template "loki.serviceAccountName" . }} -{{- end }} - diff --git a/sources/loki/helm/loki-stack/charts/loki/templates/statefulset.yaml b/sources/loki/helm/loki-stack/charts/loki/templates/statefulset.yaml deleted file mode 100644 index a1813b13..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/templates/statefulset.yaml +++ /dev/null @@ -1,107 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ template "loki.fullname" . }} - labels: - app: {{ template "loki.name" . }} - chart: {{ template "loki.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - annotations: - {{- toYaml .Values.annotations | nindent 4 }} -spec: - podManagementPolicy: {{ .Values.podManagementPolicy }} - replicas: {{ .Values.replicas }} - selector: - matchLabels: - app: {{ template "loki.name" . }} - release: {{ .Release.Name }} - serviceName: {{ template "loki.fullname" . }}-headless - updateStrategy: - {{- toYaml .Values.updateStrategy | nindent 4 }} - template: - metadata: - labels: - app: {{ template "loki.name" . }} - name: {{ template "loki.name" . }} - release: {{ .Release.Name }} - {{- with .Values.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- with .Values.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ template "loki.serviceAccountName" . }} - {{- if .Values.priorityClassName }} - priorityClassName: {{ .Values.priorityClassName }} - {{- end }} - securityContext: - {{- toYaml .Values.securityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - args: - - "-config.file=/etc/loki/loki.yaml" - {{- range $key, $value := .Values.extraArgs }} - - "-{{ $key }}={{ $value }}" - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/loki - - name: storage - mountPath: "/data" - subPath: {{ .Values.persistence.subPath }} - ports: - - name: http-metrics - containerPort: {{ .Values.config.server.http_listen_port }} - protocol: TCP - livenessProbe: - {{- toYaml .Values.livenessProbe | nindent 12 }} - readinessProbe: - {{- toYaml .Values.readinessProbe | nindent 12 }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - securityContext: - readOnlyRootFilesystem: true - env: - {{- if .Values.tracing.jaegerAgentHost }} - - name: JAEGER_AGENT_HOST - value: "{{ .Values.tracing.jaegerAgentHost }}" - {{- end }} - nodeSelector: - {{- toYaml .Values.nodeSelector | nindent 8 }} - affinity: - {{- toYaml .Values.affinity | nindent 8 }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} - volumes: - - name: config - secret: - secretName: {{ template "loki.fullname" . }} - {{- if not .Values.persistence.enabled }} - - name: storage - emptyDir: {} - {{- else if .Values.persistence.existingClaim }} - - name: storage - persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim }} - {{- else }} - volumeClaimTemplates: - - metadata: - name: storage - annotations: - {{- toYaml .Values.persistence.annotations | nindent 8 }} - spec: - accessModes: - {{- toYaml .Values.persistence.accessModes | nindent 8 }} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} - storageClassName: {{ .Values.persistence.storageClassName }} - {{- end }} - diff --git a/sources/loki/helm/loki-stack/charts/loki/values.yaml b/sources/loki/helm/loki-stack/charts/loki/values.yaml deleted file mode 100644 index c6725a5f..00000000 --- a/sources/loki/helm/loki-stack/charts/loki/values.yaml +++ /dev/null @@ -1,166 +0,0 @@ -## Affinity for pod assignment -## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -affinity: {} -# podAntiAffinity: -# requiredDuringSchedulingIgnoredDuringExecution: -# - labelSelector: -# matchExpressions: -# - key: app -# operator: In -# values: -# - loki -# topologyKey: "kubernetes.io/hostname" - -## StatefulSet annotations -annotations: {} - -# enable tracing for debug, need install jaeger and specify right jaeger_agent_host -tracing: - jaegerAgentHost: - -config: - auth_enabled: false - ingester: - chunk_idle_period: 15m - chunk_block_size: 262144 - lifecycler: - ring: - kvstore: - store: inmemory - replication_factor: 1 - - ## Different ring configs can be used. E.g. Consul - # ring: - # store: consul - # replication_factor: 1 - # consul: - # host: "consul:8500" - # prefix: "" - # httpclienttimeout: "20s" - # consistentreads: true - limits_config: - enforce_metric_name: false - reject_old_samples: true - reject_old_samples_max_age: 168h - schema_config: - configs: - - from: 2018-04-15 - store: boltdb - object_store: filesystem - schema: v9 - index: - prefix: index_ - period: 168h - server: - http_listen_port: 3100 - storage_config: - boltdb: - directory: /data/loki/index - filesystem: - directory: /data/loki/chunks - chunk_store_config: - max_look_back_period: 0 - table_manager: - retention_deletes_enabled: false - retention_period: 0 - -image: - repository: grafana/loki - tag: v0.1.0 - pullPolicy: IfNotPresent - -## Additional Loki container arguments, e.g. log level (debug, info, warn, error) -extraArgs: {} - # log.level: debug - -livenessProbe: - httpGet: - path: /ready - port: http-metrics - initialDelaySeconds: 45 - -## Enable persistence using Persistent Volume Claims -networkPolicy: - enabled: false - -## ref: https://kubernetes.io/docs/user-guide/node-selection/ -nodeSelector: {} - -## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ -## If you set enabled as "True", you need : -## - create a pv which above 10Gi and has same namespace with loki -## - keep storageClassName same with below setting -persistence: - enabled: false - accessModes: - - ReadWriteOnce - size: 10Gi - storageClassName: default - annotations: {} - # subPath: "" - # existingClaim: - -## Pod Labels -podLabels: {} - -## Pod Annotations -podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "http-metrics" - -podManagementPolicy: OrderedReady - -## Assign a PriorityClassName to pods if set -# priorityClassName: - -rbac: - create: true - pspEnabled: true - -readinessProbe: - httpGet: - path: /ready - port: http-metrics - initialDelaySeconds: 45 - -replicas: 1 - -resources: {} -# limits: -# cpu: 200m -# memory: 256Mi -# requests: -# cpu: 100m -# memory: 128Mi - -securityContext: - fsGroup: 10001 - runAsGroup: 10001 - runAsNonRoot: true - runAsUser: 10001 - -service: - type: ClusterIP - nodePort: - port: 3100 - annotations: {} - labels: {} - -serviceAccount: - create: true - name: - -terminationGracePeriodSeconds: 30 - -## Tolerations for pod assignment -## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -tolerations: [] - -# The values to set in the PodDisruptionBudget spec -# If not set then a PodDisruptionBudget will not be created -podDisruptionBudget: {} -# minAvailable: 1 -# maxUnavailable: 1 - -updateStrategy: - type: RollingUpdate diff --git a/sources/loki/helm/loki-stack/charts/prometheus/.helmignore b/sources/loki/helm/loki-stack/charts/prometheus/.helmignore deleted file mode 100644 index 825c0077..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj - -OWNERS diff --git a/sources/loki/helm/loki-stack/charts/prometheus/Chart.yaml b/sources/loki/helm/loki-stack/charts/prometheus/Chart.yaml deleted file mode 100644 index 44cab856..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/Chart.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -appVersion: 2.9.2 -description: Prometheus is a monitoring system and time series database. -engine: gotpl -home: https://prometheus.io/ -icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png -maintainers: -- email: mgoodness@gmail.com - name: mgoodness -- email: gianrubio@gmail.com - name: gianrubio -name: prometheus -sources: -- https://github.com/prometheus/alertmanager -- https://github.com/prometheus/prometheus -- https://github.com/prometheus/pushgateway -- https://github.com/prometheus/node_exporter -- https://github.com/kubernetes/kube-state-metrics -tillerVersion: '>=2.8.0' -version: 8.11.6 diff --git a/sources/loki/helm/loki-stack/charts/prometheus/README.md b/sources/loki/helm/loki-stack/charts/prometheus/README.md deleted file mode 100644 index ee71b546..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/README.md +++ /dev/null @@ -1,383 +0,0 @@ -# Prometheus - -[Prometheus](https://prometheus.io/), a [Cloud Native Computing Foundation](https://cncf.io/) project, is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true. - -## TL;DR; - -```console -$ helm install stable/prometheus -``` - -## Introduction - -This chart bootstraps a [Prometheus](https://prometheus.io/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. - -## Prerequisites - -- Kubernetes 1.3+ with Beta APIs enabled - -## Installing the Chart - -To install the chart with the release name `my-release`: - -```console -$ helm install --name my-release stable/prometheus -``` - -The command deploys Prometheus on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. - -> **Tip**: List all releases using `helm list` - -## Uninstalling the Chart - -To uninstall/delete the `my-release` deployment: - -```console -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Prometheus 2.x - -Prometheus version 2.x has made changes to alertmanager, storage and recording rules. Check out the migration guide [here](https://prometheus.io/docs/prometheus/2.0/migration/) - -Users of this chart will need to update their alerting rules to the new format before they can upgrade. - -## Upgrading from previous chart versions. - -As of version 5.0, this chart uses Prometheus 2.x. This version of prometheus introduces a new data format and is not compatible with prometheus 1.x. It is recommended to install this as a new release, as updating existing releases will not work. See the [prometheus docs](https://prometheus.io/docs/prometheus/latest/migration/#storage) for instructions on retaining your old data. - -### Example migration - -Assuming you have an existing release of the prometheus chart, named `prometheus-old`. In order to update to prometheus 2.x while keeping your old data do the following: - -1. Update the `prometheus-old` release. Disable scraping on every component besides the prometheus server, similar to the configuration below: - - ``` - alertmanager: - enabled: false - alertmanagerFiles: - alertmanager.yml: "" - kubeStateMetrics: - enabled: false - nodeExporter: - enabled: false - pushgateway: - enabled: false - server: - extraArgs: - storage.local.retention: 720h - serverFiles: - alerts: "" - prometheus.yml: "" - rules: "" - ``` - -1. Deploy a new release of the chart with version 5.0+ using prometheus 2.x. In the values.yaml set the scrape config as usual, and also add the `prometheus-old` instance as a remote-read target. - - ``` - prometheus.yml: - ... - remote_read: - - url: http://prometheus-old/api/v1/read - ... - ``` - - Old data will be available when you query the new prometheus instance. - -## Configuration - -The following table lists the configurable parameters of the Prometheus chart and their default values. - -Parameter | Description | Default ---------- | ----------- | ------- -`alertmanager.enabled` | If true, create alertmanager | `true` -`alertmanager.name` | alertmanager container name | `alertmanager` -`alertmanager.image.repository` | alertmanager container image repository | `prom/alertmanager` -`alertmanager.image.tag` | alertmanager container image tag | `v0.17.0` -`alertmanager.image.pullPolicy` | alertmanager container image pull policy | `IfNotPresent` -`alertmanager.prefixURL` | The prefix slug at which the server can be accessed | `` -`alertmanager.baseURL` | The external url at which the server can be accessed | `/` -`alertmanager.extraArgs` | Additional alertmanager container arguments | `{}` -`alertmanager.configMapOverrideName` | Prometheus alertmanager ConfigMap override where full-name is `{{.Release.Name}}-{{.Values.alertmanager.configMapOverrideName}}` and setting this value will prevent the default alertmanager ConfigMap from being generated | `""` -`alertmanager.configFromSecret` | The name of a secret in the same kubernetes namespace which contains the Alertmanager config, setting this value will prevent the default alertmanager ConfigMap from being generated | `""` -`alertmanager.configFileName` | The configuration file name to be loaded to alertmanager. Must match the key within configuration loaded from ConfigMap/Secret. | `alertmanager.yml` -`alertmanager.ingress.enabled` | If true, alertmanager Ingress will be created | `false` -`alertmanager.ingress.annotations` | alertmanager Ingress annotations | `{}` -`alertmanager.ingress.extraLabels` | alertmanager Ingress additional labels | `{}` -`alertmanager.ingress.hosts` | alertmanager Ingress hostnames | `[]` -`alertmanager.ingress.tls` | alertmanager Ingress TLS configuration (YAML) | `[]` -`alertmanager.nodeSelector` | node labels for alertmanager pod assignment | `{}` -`alertmanager.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]` -`alertmanager.affinity` | pod affinity | `{}` -`alertmanager.schedulerName` | alertmanager alternate scheduler name | `nil` -`alertmanager.persistentVolume.enabled` | If true, alertmanager will create a Persistent Volume Claim | `true` -`alertmanager.persistentVolume.accessModes` | alertmanager data Persistent Volume access modes | `[ReadWriteOnce]` -`alertmanager.persistentVolume.annotations` | Annotations for alertmanager Persistent Volume Claim | `{}` -`alertmanager.persistentVolume.existingClaim` | alertmanager data Persistent Volume existing claim name | `""` -`alertmanager.persistentVolume.mountPath` | alertmanager data Persistent Volume mount root path | `/data` -`alertmanager.persistentVolume.size` | alertmanager data Persistent Volume size | `2Gi` -`alertmanager.persistentVolume.storageClass` | alertmanager data Persistent Volume Storage Class | `unset` -`alertmanager.persistentVolume.subPath` | Subdirectory of alertmanager data Persistent Volume to mount | `""` -`alertmanager.podAnnotations` | annotations to be added to alertmanager pods | `{}` -`alertmanager.replicaCount` | desired number of alertmanager pods | `1` -`alertmanager.statefulSet.enabled` | If true, use a statefulset instead of a deployment for pod management | `false` -`alertmanager.statefulSet.podManagementPolicy` | podManagementPolicy of alertmanager pods | `OrderedReady` -`alertmanager.statefulSet.headless.annotations` | annotations for alertmanager headless service | `{}` -`alertmanager.statefulSet.headless.labels` | labels for alertmanager headless service | `{}` -`alertmanager.statefulSet.headless.enableMeshPeer` | If true, enable the mesh peer endpoint for the headless service | `{}` -`alertmanager.statefulSet.headless.servicePort` | alertmanager headless service port | `80` -`alertmanager.priorityClassName` | alertmanager priorityClassName | `nil` -`alertmanager.resources` | alertmanager pod resource requests & limits | `{}` -`alertmanager.securityContext` | Custom [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for Alert Manager containers | `{}` -`alertmanager.service.annotations` | annotations for alertmanager service | `{}` -`alertmanager.service.clusterIP` | internal alertmanager cluster service IP | `""` -`alertmanager.service.externalIPs` | alertmanager service external IP addresses | `[]` -`alertmanager.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` -`alertmanager.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` -`alertmanager.service.servicePort` | alertmanager service port | `80` -`alertmanager.service.type` | type of alertmanager service to create | `ClusterIP` -`alertmanagerFiles.alertmanager.yml` | Prometheus alertmanager configuration | example configuration -`configmapReload.name` | configmap-reload container name | `configmap-reload` -`configmapReload.image.repository` | configmap-reload container image repository | `jimmidyson/configmap-reload` -`configmapReload.image.tag` | configmap-reload container image tag | `v0.2.2` -`configmapReload.image.pullPolicy` | configmap-reload container image pull policy | `IfNotPresent` -`configmapReload.extraArgs` | Additional configmap-reload container arguments | `{}` -`configmapReload.extraVolumeDirs` | Additional configmap-reload volume directories | `{}` -`configmapReload.extraConfigmapMounts` | Additional configmap-reload configMap mounts | `[]` -`configmapReload.resources` | configmap-reload pod resource requests & limits | `{}` -`initChownData.enabled` | If false, don't reset data ownership at startup | true -`initChownData.name` | init-chown-data container name | `init-chown-data` -`initChownData.image.repository` | init-chown-data container image repository | `busybox` -`initChownData.image.tag` | init-chown-data container image tag | `latest` -`initChownData.image.pullPolicy` | init-chown-data container image pull policy | `IfNotPresent` -`initChownData.resources` | init-chown-data pod resource requests & limits | `{}` -`kubeStateMetrics.enabled` | If true, create kube-state-metrics | `true` -`kubeStateMetrics.name` | kube-state-metrics container name | `kube-state-metrics` -`kubeStateMetrics.image.repository` | kube-state-metrics container image repository| `quay.io/coreos/kube-state-metrics` -`kubeStateMetrics.image.tag` | kube-state-metrics container image tag | `v1.5.0` -`kubeStateMetrics.image.pullPolicy` | kube-state-metrics container image pull policy | `IfNotPresent` -`kubeStateMetrics.args` | kube-state-metrics container arguments | `{}` -`kubeStateMetrics.nodeSelector` | node labels for kube-state-metrics pod assignment | `{}` -`kubeStateMetrics.podAnnotations` | annotations to be added to kube-state-metrics pods | `{}` -`kubeStateMetrics.deploymentAnnotations` | annotations to be added to kube-state-metrics deployment | `{}` -`kubeStateMetrics.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]` -`kubeStateMetrics.replicaCount` | desired number of kube-state-metrics pods | `1` -`kubeStateMetrics.priorityClassName` | kube-state-metrics priorityClassName | `nil` -`kubeStateMetrics.resources` | kube-state-metrics resource requests and limits (YAML) | `{}` -`kubeStateMetrics.securityContext` | Custom [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for kube-state-metrics containers | `{}` -`kubeStateMetrics.service.annotations` | annotations for kube-state-metrics service | `{prometheus.io/scrape: "true"}` -`kubeStateMetrics.service.clusterIP` | internal kube-state-metrics cluster service IP | `None` -`kubeStateMetrics.service.externalIPs` | kube-state-metrics service external IP addresses | `[]` -`kubeStateMetrics.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` -`kubeStateMetrics.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` -`kubeStateMetrics.service.servicePort` | kube-state-metrics service port | `80` -`kubeStateMetrics.service.type` | type of kube-state-metrics service to create | `ClusterIP` -`nodeExporter.enabled` | If true, create node-exporter | `true` -`nodeExporter.name` | node-exporter container name | `node-exporter` -`nodeExporter.image.repository` | node-exporter container image repository| `prom/node-exporter` -`nodeExporter.image.tag` | node-exporter container image tag | `v0.18.0` -`nodeExporter.image.pullPolicy` | node-exporter container image pull policy | `IfNotPresent` -`nodeExporter.extraArgs` | Additional node-exporter container arguments | `{}` -`nodeExporter.extraHostPathMounts` | Additional node-exporter hostPath mounts | `[]` -`nodeExporter.extraConfigmapMounts` | Additional node-exporter configMap mounts | `[]` -`nodeExporter.hostNetwork` | If true, node-exporter pods share the host network namespace | `true` -`nodeExporter.hostPID` | If true, node-exporter pods share the host PID namespace | `true` -`nodeExporter.nodeSelector` | node labels for node-exporter pod assignment | `{}` -`nodeExporter.podAnnotations` | annotations to be added to node-exporter pods | `{}` -`nodeExporter.pod.labels` | labels to be added to node-exporter pods | `{}` -`nodeExporter.podSecurityPolicy.annotations` | Specify pod annotations in the pod security policy | `{}` | -`nodeExporter.podSecurityPolicy.enabled` | Specify if a Pod Security Policy for node-exporter must be created | `false` -`nodeExporter.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]` -`nodeExporter.priorityClassName` | node-exporter priorityClassName | `nil` -`nodeExporter.resources` | node-exporter resource requests and limits (YAML) | `{}` -`nodeExporter.securityContext` | securityContext for containers in pod | `{}` -`nodeExporter.service.annotations` | annotations for node-exporter service | `{prometheus.io/scrape: "true"}` -`nodeExporter.service.clusterIP` | internal node-exporter cluster service IP | `None` -`nodeExporter.service.externalIPs` | node-exporter service external IP addresses | `[]` -`nodeExporter.service.hostPort` | node-exporter service host port | `9100` -`nodeExporter.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` -`nodeExporter.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` -`nodeExporter.service.servicePort` | node-exporter service port | `9100` -`nodeExporter.service.type` | type of node-exporter service to create | `ClusterIP` -`pushgateway.enabled` | If true, create pushgateway | `true` -`pushgateway.name` | pushgateway container name | `pushgateway` -`pushgateway.image.repository` | pushgateway container image repository | `prom/pushgateway` -`pushgateway.image.tag` | pushgateway container image tag | `v0.6.0` -`pushgateway.image.pullPolicy` | pushgateway container image pull policy | `IfNotPresent` -`pushgateway.extraArgs` | Additional pushgateway container arguments | `{}` -`pushgateway.ingress.enabled` | If true, pushgateway Ingress will be created | `false` -`pushgateway.ingress.annotations` | pushgateway Ingress annotations | `{}` -`pushgateway.ingress.hosts` | pushgateway Ingress hostnames | `[]` -`pushgateway.ingress.tls` | pushgateway Ingress TLS configuration (YAML) | `[]` -`pushgateway.nodeSelector` | node labels for pushgateway pod assignment | `{}` -`pushgateway.podAnnotations` | annotations to be added to pushgateway pods | `{}` -`pushgateway.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]` -`pushgateway.replicaCount` | desired number of pushgateway pods | `1` -`pushgateway.persistentVolume.enabled` | If true, Prometheus pushgateway will create a Persistent Volume Claim | `false` -`pushgateway.persistentVolume.accessModes` | Prometheus pushgateway data Persistent Volume access modes | `[ReadWriteOnce]` -`pushgateway.persistentVolume.annotations` | Prometheus pushgateway data Persistent Volume annotations | `{}` -`pushgateway.persistentVolume.existingClaim` | Prometheus pushgateway data Persistent Volume existing claim name | `""` -`pushgateway.persistentVolume.mountPath` | Prometheus pushgateway data Persistent Volume mount root path | `/data` -`pushgateway.persistentVolume.size` | Prometheus pushgateway data Persistent Volume size | `2Gi` -`pushgateway.persistentVolume.storageClass` | Prometheus server data Persistent Volume Storage Class | `unset` -`pushgateway.persistentVolume.subPath` | Subdirectory of Prometheus server data Persistent Volume to mount | `""` -`pushgateway.priorityClassName` | pushgateway priorityClassName | `nil` -`pushgateway.resources` | pushgateway pod resource requests & limits | `{}` -`pushgateway.service.annotations` | annotations for pushgateway service | `{}` -`pushgateway.service.clusterIP` | internal pushgateway cluster service IP | `""` -`pushgateway.service.externalIPs` | pushgateway service external IP addresses | `[]` -`pushgateway.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` -`pushgateway.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` -`pushgateway.service.servicePort` | pushgateway service port | `9091` -`pushgateway.service.type` | type of pushgateway service to create | `ClusterIP` -`rbac.create` | If true, create & use RBAC resources | `true` -`server.name` | Prometheus server container name | `server` -`server.image.repository` | Prometheus server container image repository | `prom/prometheus` -`server.image.tag` | Prometheus server container image tag | `v2.9.2` -`server.image.pullPolicy` | Prometheus server container image pull policy | `IfNotPresent` -`server.enableAdminApi` | If true, Prometheus administrative HTTP API will be enabled. Please note, that you should take care of administrative API access protection (ingress or some frontend Nginx with auth) before enabling it. | `false` -`server.skipTSDBLock` | If true, Prometheus skip TSDB locking. | `false` -`server.configPath` | Path to a prometheus server config file on the container FS | `/etc/config/prometheus.yml` -`server.global.scrape_interval` | How frequently to scrape targets by default | `1m` -`server.global.scrape_timeout` | How long until a scrape request times out | `10s` -`server.global.evaluation_interval` | How frequently to evaluate rules | `1m` -`server.extraArgs` | Additional Prometheus server container arguments | `{}` -`server.prefixURL` | The prefix slug at which the server can be accessed | `` -`server.baseURL` | The external url at which the server can be accessed | `` -`server.env` | Prometheus server environment variables | `[]` -`server.extraHostPathMounts` | Additional Prometheus server hostPath mounts | `[]` -`server.extraConfigmapMounts` | Additional Prometheus server configMap mounts | `[]` -`server.extraSecretMounts` | Additional Prometheus server Secret mounts | `[]` -`server.extraVolumeMounts` | Additional Prometheus server Volume mounts | `[]` -`server.extraVolumes` | Additional Prometheus server Volumes | `[]` -`server.configMapOverrideName` | Prometheus server ConfigMap override where full-name is `{{.Release.Name}}-{{.Values.server.configMapOverrideName}}` and setting this value will prevent the default server ConfigMap from being generated | `""` -`server.ingress.enabled` | If true, Prometheus server Ingress will be created | `false` -`server.ingress.annotations` | Prometheus server Ingress annotations | `[]` -`server.ingress.extraLabels` | Prometheus server Ingress additional labels | `{}` -`server.ingress.hosts` | Prometheus server Ingress hostnames | `[]` -`server.ingress.tls` | Prometheus server Ingress TLS configuration (YAML) | `[]` -`server.nodeSelector` | node labels for Prometheus server pod assignment | `{}` -`server.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]` -`server.affinity` | pod affinity | `{}` -`server.priorityClassName` | Prometheus server priorityClassName | `nil` -`server.schedulerName` | Prometheus server alternate scheduler name | `nil` -`server.persistentVolume.enabled` | If true, Prometheus server will create a Persistent Volume Claim | `true` -`server.persistentVolume.accessModes` | Prometheus server data Persistent Volume access modes | `[ReadWriteOnce]` -`server.persistentVolume.annotations` | Prometheus server data Persistent Volume annotations | `{}` -`server.persistentVolume.existingClaim` | Prometheus server data Persistent Volume existing claim name | `""` -`server.persistentVolume.mountPath` | Prometheus server data Persistent Volume mount root path | `/data` -`server.persistentVolume.size` | Prometheus server data Persistent Volume size | `8Gi` -`server.persistentVolume.storageClass` | Prometheus server data Persistent Volume Storage Class | `unset` -`server.persistentVolume.subPath` | Subdirectory of Prometheus server data Persistent Volume to mount | `""` -`server.emptyDir.sizeLimit` | emptyDir sizeLimit if a Persistent Volume is not used | `""` -`server.podAnnotations` | annotations to be added to Prometheus server pods | `{}` -`server.deploymentAnnotations` | annotations to be added to Prometheus server deployment | `{}' -`server.replicaCount` | desired number of Prometheus server pods | `1` -`server.statefulSet.enabled` | If true, use a statefulset instead of a deployment for pod management | `false` -`server.statefulSet.annotations` | annotations to be added to Prometheus server stateful set | `{}' -`server.statefulSet.podManagementPolicy` | podManagementPolicy of server pods | `OrderedReady` -`server.statefulSet.headless.annotations` | annotations for Prometheus server headless service | `{}` -`server.statefulSet.headless.labels` | labels for Prometheus server headless service | `{}` -`server.statefulSet.headless.servicePort` | Prometheus server headless service port | `80` -`server.resources` | Prometheus server resource requests and limits | `{}` -`server.securityContext` | Custom [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for server containers | `{}` -`server.service.annotations` | annotations for Prometheus server service | `{}` -`server.service.clusterIP` | internal Prometheus server cluster service IP | `""` -`server.service.externalIPs` | Prometheus server service external IP addresses | `[]` -`server.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` -`server.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]` -`server.service.nodePort` | Port to be used as the service NodePort (ignored if `server.service.type` is not `NodePort`) | `0` -`server.service.servicePort` | Prometheus server service port | `80` -`server.service.type` | type of Prometheus server service to create | `ClusterIP` -`server.sidecarContainers` | array of snippets with your sidecar containers for prometheus server | `""` -`serviceAccounts.alertmanager.create` | If true, create the alertmanager service account | `true` -`serviceAccounts.alertmanager.name` | name of the alertmanager service account to use or create | `{{ prometheus.alertmanager.fullname }}` -`serviceAccounts.kubeStateMetrics.create` | If true, create the kubeStateMetrics service account | `true` -`serviceAccounts.kubeStateMetrics.name` | name of the kubeStateMetrics service account to use or create | `{{ prometheus.kubeStateMetrics.fullname }}` -`serviceAccounts.nodeExporter.create` | If true, create the nodeExporter service account | `true` -`serviceAccounts.nodeExporter.name` | name of the nodeExporter service account to use or create | `{{ prometheus.nodeExporter.fullname }}` -`serviceAccounts.pushgateway.create` | If true, create the pushgateway service account | `true` -`serviceAccounts.pushgateway.name` | name of the pushgateway service account to use or create | `{{ prometheus.pushgateway.fullname }}` -`serviceAccounts.server.create` | If true, create the server service account | `true` -`serviceAccounts.server.name` | name of the server service account to use or create | `{{ prometheus.server.fullname }}` -`server.terminationGracePeriodSeconds` | Prometheus server Pod termination grace period | `300` -`server.retention` | (optional) Prometheus data retention | `"15d"` -`serverFiles.alerts` | Prometheus server alerts configuration | `{}` -`serverFiles.rules` | Prometheus server rules configuration | `{}` -`serverFiles.prometheus.yml` | Prometheus server scrape configuration | example configuration -`extraScrapeConfigs` | Prometheus server additional scrape configuration | "" -`networkPolicy.enabled` | Enable NetworkPolicy | `false` | - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, - -```console -$ helm install stable/prometheus --name my-release \ - --set server.terminationGracePeriodSeconds=360 -``` - -Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example, - -```console -$ helm install stable/prometheus --name my-release -f values.yaml -``` - -> **Tip**: You can use the default [values.yaml](values.yaml) - -### RBAC Configuration -Roles and RoleBindings resources will be created automatically for `server` and `kubeStateMetrics` services. - -To manually setup RBAC you need to set the parameter `rbac.create=false` and specify the service account to be used for each service by setting the parameters: `serviceAccounts.{{ component }}.create` to `false` and `serviceAccounts.{{ component }}.name` to the name of a pre-existing service account. - -> **Tip**: You can refer to the default `*-clusterrole.yaml` and `*-clusterrolebinding.yaml` files in [templates](templates/) to customize your own. - -### ConfigMap Files -AlertManager is configured through [alertmanager.yml](https://prometheus.io/docs/alerting/configuration/). This file (and any others listed in `alertmanagerFiles`) will be mounted into the `alertmanager` pod. - -Prometheus is configured through [prometheus.yml](https://prometheus.io/docs/operating/configuration/). This file (and any others listed in `serverFiles`) will be mounted into the `server` pod. - -### Ingress TLS -If your cluster allows automatic creation/retrieval of TLS certificates (e.g. [kube-lego](https://github.com/jetstack/kube-lego)), please refer to the documentation for that mechanism. - -To manually configure TLS, first create/retrieve a key & certificate pair for the address(es) you wish to protect. Then create a TLS secret in the namespace: - -```console -kubectl create secret tls prometheus-server-tls --cert=path/to/tls.cert --key=path/to/tls.key -``` - -Include the secret's name, along with the desired hostnames, in the alertmanager/server Ingress TLS section of your custom `values.yaml` file: - -```yaml -server: - ingress: - ## If true, Prometheus server Ingress will be created - ## - enabled: true - - ## Prometheus server Ingress hostnames - ## Must be provided if Ingress is enabled - ## - hosts: - - prometheus.domain.com - - ## Prometheus server Ingress TLS configuration - ## Secrets must be manually created in the namespace - ## - tls: - - secretName: prometheus-server-tls - hosts: - - prometheus.domain.com -``` - -### NetworkPolicy - -Enabling Network Policy for Prometheus will secure connections to Alert Manager -and Kube State Metrics by only accepting connections from Prometheus Server. -All inbound connections to Prometheus Server are still allowed. - -To enable network policy for Prometheus, install a networking plugin that -implements the Kubernetes NetworkPolicy spec, and set `networkPolicy.enabled` to true. - -If NetworkPolicy is enabled for Prometheus' scrape targets, you may also need -to manually create a networkpolicy which allows it. diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/NOTES.txt b/sources/loki/helm/loki-stack/charts/prometheus/templates/NOTES.txt deleted file mode 100644 index 289e384e..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/NOTES.txt +++ /dev/null @@ -1,100 +0,0 @@ -The Prometheus server can be accessed via port {{ .Values.server.service.servicePort }} on the following DNS name from within your cluster: -{{ template "prometheus.server.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - -{{ if .Values.server.ingress.enabled -}} -From outside the cluster, the server URL(s) are: -{{- range .Values.server.ingress.hosts }} -http://{{ . }} -{{- end }} -{{- else }} -Get the Prometheus server URL by running these commands in the same shell: -{{- if contains "NodePort" .Values.server.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus.server.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.server.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "prometheus.server.fullname" . }}' - - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus.server.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.server.service.servicePort }} -{{- else if contains "ClusterIP" .Values.server.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus.name" . }},component={{ .Values.server.name }}" -o jsonpath="{.items[0].metadata.name}") - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9090 -{{- end }} -{{- end }} - -{{- if .Values.server.persistentVolume.enabled }} -{{- else }} -################################################################################# -###### WARNING: Persistence is disabled!!! You will lose your data when ##### -###### the Server pod is terminated. ##### -################################################################################# -{{- end }} - -{{ if .Values.alertmanager.enabled }} -The Prometheus alertmanager can be accessed via port {{ .Values.alertmanager.service.servicePort }} on the following DNS name from within your cluster: -{{ template "prometheus.alertmanager.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - -{{ if .Values.alertmanager.ingress.enabled -}} -From outside the cluster, the alertmanager URL(s) are: -{{- range .Values.alertmanager.ingress.hosts }} -http://{{ . }} -{{- end }} -{{- else }} -Get the Alertmanager URL by running these commands in the same shell: -{{- if contains "NodePort" .Values.alertmanager.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus.alertmanager.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.alertmanager.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "prometheus.alertmanager.fullname" . }}' - - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus.alertmanager.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.alertmanager.service.servicePort }} -{{- else if contains "ClusterIP" .Values.alertmanager.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus.name" . }},component={{ .Values.alertmanager.name }}" -o jsonpath="{.items[0].metadata.name}") - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9093 -{{- end }} -{{- end }} - -{{- if .Values.alertmanager.persistentVolume.enabled }} -{{- else }} -################################################################################# -###### WARNING: Persistence is disabled!!! You will lose your data when ##### -###### the AlertManager pod is terminated. ##### -################################################################################# -{{- end }} -{{- end }} - -{{ if .Values.pushgateway.enabled }} -The Prometheus PushGateway can be accessed via port {{ .Values.pushgateway.service.servicePort }} on the following DNS name from within your cluster: -{{ template "prometheus.pushgateway.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - -{{ if .Values.pushgateway.ingress.enabled -}} -From outside the cluster, the pushgateway URL(s) are: -{{- range .Values.pushgateway.ingress.hosts }} -http://{{ . }} -{{- end }} -{{- else }} -Get the PushGateway URL by running these commands in the same shell: -{{- if contains "NodePort" .Values.pushgateway.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus.pushgateway.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.pushgateway.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "prometheus.pushgateway.fullname" . }}' - - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus.pushgateway.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.pushgateway.service.servicePort }} -{{- else if contains "ClusterIP" .Values.pushgateway.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus.name" . }},component={{ .Values.pushgateway.name }}" -o jsonpath="{.items[0].metadata.name}") - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9091 -{{- end }} -{{- end }} -{{- end }} - -For more information on running Prometheus, visit: -https://prometheus.io/ diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/_helpers.tpl b/sources/loki/helm/loki-stack/charts/prometheus/templates/_helpers.tpl deleted file mode 100644 index 231e987b..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/_helpers.tpl +++ /dev/null @@ -1,239 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "prometheus.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create unified labels for prometheus components -*/}} -{{- define "prometheus.common.matchLabels" -}} -app: {{ template "prometheus.name" . }} -release: {{ .Release.Name }} -{{- end -}} - -{{- define "prometheus.common.metaLabels" -}} -chart: {{ .Chart.Name }}-{{ .Chart.Version }} -heritage: {{ .Release.Service }} -{{- end -}} - -{{- define "prometheus.alertmanager.labels" -}} -{{ include "prometheus.alertmanager.matchLabels" . }} -{{ include "prometheus.common.metaLabels" . }} -{{- end -}} - -{{- define "prometheus.alertmanager.matchLabels" -}} -component: {{ .Values.alertmanager.name | quote }} -{{ include "prometheus.common.matchLabels" . }} -{{- end -}} - -{{- define "prometheus.kubeStateMetrics.labels" -}} -{{ include "prometheus.kubeStateMetrics.matchLabels" . }} -{{ include "prometheus.common.metaLabels" . }} -{{- end -}} - -{{- define "prometheus.kubeStateMetrics.matchLabels" -}} -component: {{ .Values.kubeStateMetrics.name | quote }} -{{ include "prometheus.common.matchLabels" . }} -{{- end -}} - -{{- define "prometheus.nodeExporter.labels" -}} -{{ include "prometheus.nodeExporter.matchLabels" . }} -{{ include "prometheus.common.metaLabels" . }} -{{- end -}} - -{{- define "prometheus.nodeExporter.matchLabels" -}} -component: {{ .Values.nodeExporter.name | quote }} -{{ include "prometheus.common.matchLabels" . }} -{{- end -}} - -{{- define "prometheus.pushgateway.labels" -}} -{{ include "prometheus.pushgateway.matchLabels" . }} -{{ include "prometheus.common.metaLabels" . }} -{{- end -}} - -{{- define "prometheus.pushgateway.matchLabels" -}} -component: {{ .Values.pushgateway.name | quote }} -{{ include "prometheus.common.matchLabels" . }} -{{- end -}} - -{{- define "prometheus.server.labels" -}} -{{ include "prometheus.server.matchLabels" . }} -{{ include "prometheus.common.metaLabels" . }} -{{- end -}} - -{{- define "prometheus.server.matchLabels" -}} -component: {{ .Values.server.name | quote }} -{{ include "prometheus.common.matchLabels" . }} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "prometheus.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a fully qualified alertmanager name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} - -{{- define "prometheus.alertmanager.fullname" -}} -{{- if .Values.alertmanager.fullnameOverride -}} -{{- .Values.alertmanager.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.alertmanager.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.alertmanager.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a fully qualified kube-state-metrics name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "prometheus.kubeStateMetrics.fullname" -}} -{{- if .Values.kubeStateMetrics.fullnameOverride -}} -{{- .Values.kubeStateMetrics.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.kubeStateMetrics.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.kubeStateMetrics.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a fully qualified node-exporter name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "prometheus.nodeExporter.fullname" -}} -{{- if .Values.nodeExporter.fullnameOverride -}} -{{- .Values.nodeExporter.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.nodeExporter.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.nodeExporter.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a fully qualified Prometheus server name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "prometheus.server.fullname" -}} -{{- if .Values.server.fullnameOverride -}} -{{- .Values.server.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.server.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.server.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create a fully qualified pushgateway name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "prometheus.pushgateway.fullname" -}} -{{- if .Values.pushgateway.fullnameOverride -}} -{{- .Values.pushgateway.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- printf "%s-%s" .Release.Name .Values.pushgateway.name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.pushgateway.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for networkpolicy. -*/}} -{{- define "prometheus.networkPolicy.apiVersion" -}} -{{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "extensions/v1beta1" -}} -{{- else if semverCompare "^1.7-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "networking.k8s.io/v1" -}} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use for the alertmanager component -*/}} -{{- define "prometheus.serviceAccountName.alertmanager" -}} -{{- if .Values.serviceAccounts.alertmanager.create -}} - {{ default (include "prometheus.alertmanager.fullname" .) .Values.serviceAccounts.alertmanager.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.alertmanager.name }} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use for the kubeStateMetrics component -*/}} -{{- define "prometheus.serviceAccountName.kubeStateMetrics" -}} -{{- if .Values.serviceAccounts.kubeStateMetrics.create -}} - {{ default (include "prometheus.kubeStateMetrics.fullname" .) .Values.serviceAccounts.kubeStateMetrics.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.kubeStateMetrics.name }} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use for the nodeExporter component -*/}} -{{- define "prometheus.serviceAccountName.nodeExporter" -}} -{{- if .Values.serviceAccounts.nodeExporter.create -}} - {{ default (include "prometheus.nodeExporter.fullname" .) .Values.serviceAccounts.nodeExporter.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.nodeExporter.name }} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use for the pushgateway component -*/}} -{{- define "prometheus.serviceAccountName.pushgateway" -}} -{{- if .Values.serviceAccounts.pushgateway.create -}} - {{ default (include "prometheus.pushgateway.fullname" .) .Values.serviceAccounts.pushgateway.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.pushgateway.name }} -{{- end -}} -{{- end -}} - -{{/* -Create the name of the service account to use for the server component -*/}} -{{- define "prometheus.serviceAccountName.server" -}} -{{- if .Values.serviceAccounts.server.create -}} - {{ default (include "prometheus.server.fullname" .) .Values.serviceAccounts.server.name }} -{{- else -}} - {{ default "default" .Values.serviceAccounts.server.name }} -{{- end -}} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-configmap.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-configmap.yaml deleted file mode 100644 index f2d78e2f..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-configmap.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if and .Values.alertmanager.enabled (and (empty .Values.alertmanager.configMapOverrideName) (empty .Values.alertmanager.configFromSecret)) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - name: {{ template "prometheus.alertmanager.fullname" . }} -data: -{{- $root := . -}} -{{- range $key, $value := .Values.alertmanagerFiles }} - {{ $key }}: | -{{ toYaml $value | default "{}" | indent 4 }} -{{- end -}} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-deployment.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-deployment.yaml deleted file mode 100644 index 12a0d571..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-deployment.yaml +++ /dev/null @@ -1,123 +0,0 @@ -{{- if and .Values.alertmanager.enabled (not .Values.alertmanager.statefulSet.enabled) -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - name: {{ template "prometheus.alertmanager.fullname" . }} -spec: - selector: - matchLabels: - {{- include "prometheus.alertmanager.matchLabels" . | nindent 6 }} - replicas: {{ .Values.alertmanager.replicaCount }} - {{- if .Values.server.strategy }} - strategy: -{{ toYaml .Values.server.strategy | indent 4 }} - {{- end }} - template: - metadata: - {{- if .Values.alertmanager.podAnnotations }} - annotations: -{{ toYaml .Values.alertmanager.podAnnotations | indent 8 }} - {{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 8 }} - spec: -{{- if .Values.alertmanager.schedulerName }} - schedulerName: "{{ .Values.alertmanager.schedulerName }}" -{{- end }} - serviceAccountName: {{ template "prometheus.serviceAccountName.alertmanager" . }} -{{- if .Values.alertmanager.priorityClassName }} - priorityClassName: "{{ .Values.alertmanager.priorityClassName }}" -{{- end }} - containers: - - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }} - image: "{{ .Values.alertmanager.image.repository }}:{{ .Values.alertmanager.image.tag }}" - imagePullPolicy: "{{ .Values.alertmanager.image.pullPolicy }}" - env: - {{- range $key, $value := .Values.alertmanager.extraEnv }} - - name: {{ $key }} - value: {{ $value }} - {{- end }} - - name: POD_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.podIP - args: - - --config.file=/etc/config/{{ .Values.alertmanager.configFileName }} - - --storage.path={{ .Values.alertmanager.persistentVolume.mountPath }} - - --cluster.advertise-address=$(POD_IP):6783 - {{- range $key, $value := .Values.alertmanager.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- if .Values.alertmanager.baseURL }} - - --web.external-url={{ .Values.alertmanager.baseURL }} - {{- end }} - - ports: - - containerPort: 9093 - readinessProbe: - httpGet: - path: {{ .Values.alertmanager.prefixURL }}/#/status - port: 9093 - initialDelaySeconds: 30 - timeoutSeconds: 30 - resources: -{{ toYaml .Values.alertmanager.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - - name: storage-volume - mountPath: "{{ .Values.alertmanager.persistentVolume.mountPath }}" - subPath: "{{ .Values.alertmanager.persistentVolume.subPath }}" - - - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }}-{{ .Values.configmapReload.name }} - image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}" - imagePullPolicy: "{{ .Values.configmapReload.image.pullPolicy }}" - args: - - --volume-dir=/etc/config - - --webhook-url=http://127.0.0.1:9093{{ .Values.alertmanager.prefixURL }}/-/reload - resources: -{{ toYaml .Values.configmapReload.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - readOnly: true - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{ toYaml .Values.imagePullSecrets | indent 2 }} - {{- end }} - {{- if .Values.alertmanager.nodeSelector }} - nodeSelector: -{{ toYaml .Values.alertmanager.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.alertmanager.securityContext }} - securityContext: -{{ toYaml .Values.alertmanager.securityContext | indent 8 }} - {{- end }} - {{- if .Values.alertmanager.tolerations }} - tolerations: -{{ toYaml .Values.alertmanager.tolerations | indent 8 }} - {{- end }} - {{- if .Values.alertmanager.affinity }} - affinity: -{{ toYaml .Values.alertmanager.affinity | indent 8 }} - {{- end }} - volumes: - - name: config-volume - {{- if empty .Values.alertmanager.configFromSecret }} - configMap: - name: {{ if .Values.alertmanager.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.alertmanager.configMapOverrideName }}{{- else }}{{ template "prometheus.alertmanager.fullname" . }}{{- end }} - {{- else }} - secret: - secretName: {{ .Values.alertmanager.configFromSecret }} - {{- end }} - - name: storage-volume - {{- if .Values.alertmanager.persistentVolume.enabled }} - persistentVolumeClaim: - claimName: {{ if .Values.alertmanager.persistentVolume.existingClaim }}{{ .Values.alertmanager.persistentVolume.existingClaim }}{{- else }}{{ template "prometheus.alertmanager.fullname" . }}{{- end }} - {{- else }} - emptyDir: {} - {{- end -}} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-ingress.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-ingress.yaml deleted file mode 100644 index a11fef02..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-ingress.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.alertmanager.ingress.enabled -}} -{{- $releaseName := .Release.Name -}} -{{- $serviceName := include "prometheus.alertmanager.fullname" . }} -{{- $servicePort := .Values.alertmanager.service.servicePort -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: -{{- if .Values.alertmanager.ingress.annotations }} - annotations: -{{ toYaml .Values.alertmanager.ingress.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} -{{- range $key, $value := .Values.alertmanager.ingress.extraLabels }} - {{ $key }}: {{ $value }} -{{- end }} - name: {{ template "prometheus.alertmanager.fullname" . }} -spec: - rules: - {{- range .Values.alertmanager.ingress.hosts }} - {{- $url := splitList "/" . }} - - host: {{ first $url }} - http: - paths: - - path: /{{ rest $url | join "/" }} - backend: - serviceName: {{ $serviceName }} - servicePort: {{ $servicePort }} - {{- end -}} -{{- if .Values.alertmanager.ingress.tls }} - tls: -{{ toYaml .Values.alertmanager.ingress.tls | indent 4 }} - {{- end -}} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-networkpolicy.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-networkpolicy.yaml deleted file mode 100644 index 0bcbd27d..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-networkpolicy.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.networkPolicy.enabled -}} -apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }} -kind: NetworkPolicy -metadata: - name: {{ template "prometheus.alertmanager.fullname" . }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} -spec: - podSelector: - matchLabels: - {{- include "prometheus.alertmanager.matchLabels" . | nindent 6 }} - ingress: - - from: - - podSelector: - matchLabels: - {{- include "prometheus.server.matchLabels" . | nindent 12 }} - - ports: - - port: 9093 -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-pvc.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-pvc.yaml deleted file mode 100644 index df676dd6..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-pvc.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if not .Values.alertmanager.statefulSet.enabled -}} -{{- if and .Values.alertmanager.enabled .Values.alertmanager.persistentVolume.enabled -}} -{{- if not .Values.alertmanager.persistentVolume.existingClaim -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - {{- if .Values.alertmanager.persistentVolume.annotations }} - annotations: -{{ toYaml .Values.alertmanager.persistentVolume.annotations | indent 4 }} - {{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - name: {{ template "prometheus.alertmanager.fullname" . }} -spec: - accessModes: -{{ toYaml .Values.alertmanager.persistentVolume.accessModes | indent 4 }} -{{- if .Values.alertmanager.persistentVolume.storageClass }} -{{- if (eq "-" .Values.alertmanager.persistentVolume.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.alertmanager.persistentVolume.storageClass }}" -{{- end }} -{{- end }} - resources: - requests: - storage: "{{ .Values.alertmanager.persistentVolume.size }}" -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-service-headless.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-service-headless.yaml deleted file mode 100644 index 8d619e89..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-service-headless.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.alertmanager.statefulSet.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.alertmanager.statefulSet.headless.annotations }} - annotations: -{{ toYaml .Values.alertmanager.statefulSet.headless.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} -{{- if .Values.alertmanager.statefulSet.headless.labels }} -{{ toYaml .Values.alertmanager.statefulSet.headless.labels | indent 4 }} -{{- end }} - name: {{ template "prometheus.alertmanager.fullname" . }}-headless -spec: - clusterIP: None - ports: - - name: http - port: {{ .Values.alertmanager.statefulSet.headless.servicePort }} - protocol: TCP - targetPort: 9093 -{{- if .Values.alertmanager.statefulSet.headless.enableMeshPeer }} - - name: meshpeer - port: 6783 - protocol: TCP - targetPort: 6783 -{{- end }} - selector: - {{- include "prometheus.alertmanager.matchLabels" . | nindent 4 }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-service.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-service.yaml deleted file mode 100644 index d15b83fd..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-service.yaml +++ /dev/null @@ -1,49 +0,0 @@ -{{- if .Values.alertmanager.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.alertmanager.service.annotations }} - annotations: -{{ toYaml .Values.alertmanager.service.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} -{{- if .Values.alertmanager.service.labels }} -{{ toYaml .Values.alertmanager.service.labels | indent 4 }} -{{- end }} - name: {{ template "prometheus.alertmanager.fullname" . }} -spec: -{{- if .Values.alertmanager.service.clusterIP }} - clusterIP: {{ .Values.alertmanager.service.clusterIP }} -{{- end }} -{{- if .Values.alertmanager.service.externalIPs }} - externalIPs: -{{ toYaml .Values.alertmanager.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.alertmanager.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.alertmanager.service.loadBalancerIP }} -{{- end }} -{{- if .Values.alertmanager.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range $cidr := .Values.alertmanager.service.loadBalancerSourceRanges }} - - {{ $cidr }} - {{- end }} -{{- end }} - ports: - - name: http - port: {{ .Values.alertmanager.service.servicePort }} - protocol: TCP - targetPort: 9093 - {{- if .Values.alertmanager.service.nodePort }} - nodePort: {{ .Values.alertmanager.service.nodePort }} - {{- end }} -{{- if .Values.alertmanager.service.enableMeshPeer }} - - name: meshpeer - port: 6783 - protocol: TCP - targetPort: 6783 -{{- end }} - selector: - {{- include "prometheus.alertmanager.matchLabels" . | nindent 4 }} - type: "{{ .Values.alertmanager.service.type }}" -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-serviceaccount.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-serviceaccount.yaml deleted file mode 100644 index 4ff45589..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-serviceaccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.serviceAccounts.alertmanager.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - name: {{ template "prometheus.serviceAccountName.alertmanager" . }} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-statefulset.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-statefulset.yaml deleted file mode 100644 index 8429ab12..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/alertmanager-statefulset.yaml +++ /dev/null @@ -1,139 +0,0 @@ -{{- if and .Values.alertmanager.enabled .Values.alertmanager.statefulSet.enabled -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 4 }} - name: {{ template "prometheus.alertmanager.fullname" . }} -spec: - serviceName: {{ template "prometheus.alertmanager.fullname" . }}-headless - selector: - matchLabels: - {{- include "prometheus.alertmanager.matchLabels" . | nindent 6 }} - replicas: {{ .Values.alertmanager.replicaCount }} - podManagementPolicy: {{ .Values.alertmanager.statefulSet.podManagementPolicy }} - template: - metadata: - {{- if .Values.alertmanager.podAnnotations }} - annotations: -{{ toYaml .Values.alertmanager.podAnnotations | indent 8 }} - {{- end }} - labels: - {{- include "prometheus.alertmanager.labels" . | nindent 8 }} - spec: -{{- if .Values.alertmanager.affinity }} - affinity: -{{ toYaml .Values.alertmanager.affinity | indent 8 }} -{{- end }} -{{- if .Values.alertmanager.schedulerName }} - schedulerName: "{{ .Values.alertmanager.schedulerName }}" -{{- end }} - serviceAccountName: {{ template "prometheus.serviceAccountName.alertmanager" . }} -{{- if .Values.alertmanager.priorityClassName }} - priorityClassName: "{{ .Values.alertmanager.priorityClassName }}" -{{- end }} - containers: - - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }} - image: "{{ .Values.alertmanager.image.repository }}:{{ .Values.alertmanager.image.tag }}" - imagePullPolicy: "{{ .Values.alertmanager.image.pullPolicy }}" - env: - {{- range $key, $value := .Values.alertmanager.extraEnv }} - - name: {{ $key }} - value: {{ $value }} - {{- end }} - - name: POD_IP - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: status.podIP - args: - - --config.file=/etc/config/alertmanager.yml - - --storage.path={{ .Values.alertmanager.persistentVolume.mountPath }} - - --cluster.advertise-address=$(POD_IP):6783 - {{- if .Values.alertmanager.statefulSet.headless.enableMeshPeer }} - - --cluster.listen-address=0.0.0.0:6783 - {{- range $n := until (.Values.alertmanager.replicaCount | int) }} - - --cluster.peer={{ template "prometheus.alertmanager.fullname" $ }}-{{ $n }}.{{ template "prometheus.alertmanager.fullname" $ }}-headless:6783 - {{- end }} - {{- end }} - {{- range $key, $value := .Values.alertmanager.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- if .Values.alertmanager.baseURL }} - - --web.external-url={{ .Values.alertmanager.baseURL }} - {{- end }} - - ports: - - containerPort: 9093 - readinessProbe: - httpGet: - path: {{ .Values.alertmanager.prefixURL }}/#/status - port: 9093 - initialDelaySeconds: 30 - timeoutSeconds: 30 - resources: -{{ toYaml .Values.alertmanager.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - - name: storage-volume - mountPath: "{{ .Values.alertmanager.persistentVolume.mountPath }}" - subPath: "{{ .Values.alertmanager.persistentVolume.subPath }}" - - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }}-{{ .Values.configmapReload.name }} - image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}" - imagePullPolicy: "{{ .Values.configmapReload.image.pullPolicy }}" - args: - - --volume-dir=/etc/config - - --webhook-url=http://localhost:9093{{ .Values.alertmanager.prefixURL }}/-/reload - resources: -{{ toYaml .Values.configmapReload.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - readOnly: true - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{ toYaml .Values.imagePullSecrets | indent 2 }} - {{- end }} - {{- if .Values.alertmanager.nodeSelector }} - nodeSelector: -{{ toYaml .Values.alertmanager.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.alertmanager.securityContext }} - securityContext: -{{ toYaml .Values.alertmanager.securityContext | indent 8 }} - {{- end }} - {{- if .Values.alertmanager.tolerations }} - tolerations: -{{ toYaml .Values.alertmanager.tolerations | indent 8 }} - {{- end }} - volumes: - - name: config-volume - configMap: - name: {{ if .Values.alertmanager.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.alertmanager.configMapOverrideName }}{{- else }}{{ template "prometheus.alertmanager.fullname" . }}{{- end }} -{{- if .Values.alertmanager.persistentVolume.enabled }} - volumeClaimTemplates: - - metadata: - name: storage-volume - {{- if .Values.alertmanager.persistentVolume.annotations }} - annotations: -{{ toYaml .Values.alertmanager.persistentVolume.annotations | indent 10 }} - {{- end }} - spec: - accessModes: -{{ toYaml .Values.alertmanager.persistentVolume.accessModes | indent 10 }} - resources: - requests: - storage: "{{ .Values.alertmanager.persistentVolume.size }}" - {{- if .Values.server.persistentVolume.storageClass }} - {{- if (eq "-" .Values.server.persistentVolume.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ .Values.alertmanager.persistentVolume.storageClass }}" - {{- end }} - {{- end }} -{{- else }} - - name: storage-volume - emptyDir: {} -{{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-clusterrole.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-clusterrole.yaml deleted file mode 100644 index a58ccc8c..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-clusterrole.yaml +++ /dev/null @@ -1,77 +0,0 @@ -{{- if and .Values.kubeStateMetrics.enabled .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - labels: - {{- include "prometheus.kubeStateMetrics.labels" . | nindent 4 }} - name: {{ template "prometheus.kubeStateMetrics.fullname" . }} -rules: - - apiGroups: - - "" - resources: - - namespaces - - nodes - - persistentvolumeclaims - - pods - - services - - resourcequotas - - replicationcontrollers - - limitranges - - persistentvolumeclaims - - persistentvolumes - - endpoints - - secrets - - configmaps - verbs: - - list - - watch - - apiGroups: - - extensions - resources: - - daemonsets - - deployments - - ingresses - - replicasets - verbs: - - list - - watch - - apiGroups: - - apps - resources: - - daemonsets - - deployments - - statefulsets - verbs: - - get - - list - - watch - - apiGroups: - - batch - resources: - - cronjobs - - jobs - verbs: - - list - - watch - - apiGroups: - - autoscaling - resources: - - horizontalpodautoscalers - verbs: - - list - - watch - - apiGroups: - - policy - resources: - - poddisruptionbudgets - verbs: - - list - - watch - - apiGroups: - - certificates.k8s.io - resources: - - certificatesigningrequests - verbs: - - list - - watch -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-clusterrolebinding.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-clusterrolebinding.yaml deleted file mode 100644 index 5e3b2750..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-clusterrolebinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if and .Values.kubeStateMetrics.enabled .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - labels: - {{- include "prometheus.kubeStateMetrics.labels" . | nindent 4 }} - name: {{ template "prometheus.kubeStateMetrics.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "prometheus.serviceAccountName.kubeStateMetrics" . }} - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "prometheus.kubeStateMetrics.fullname" . }} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-deployment.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-deployment.yaml deleted file mode 100644 index cdb8710e..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ -{{- if .Values.kubeStateMetrics.enabled -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -{{- if .Values.kubeStateMetrics.deploymentAnnotations }} - annotations: -{{ toYaml .Values.kubeStateMetrics.deploymentAnnotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.kubeStateMetrics.labels" . | nindent 4 }} - name: {{ template "prometheus.kubeStateMetrics.fullname" . }} -spec: - selector: - matchLabels: - {{- include "prometheus.kubeStateMetrics.matchLabels" . | nindent 6 }} - replicas: {{ .Values.kubeStateMetrics.replicaCount }} - template: - metadata: - {{- if .Values.kubeStateMetrics.podAnnotations }} - annotations: -{{ toYaml .Values.kubeStateMetrics.podAnnotations | indent 8 }} - {{- end }} - labels: - {{- include "prometheus.kubeStateMetrics.labels" . | nindent 8 }} -{{- if .Values.kubeStateMetrics.pod.labels }} -{{ toYaml .Values.kubeStateMetrics.pod.labels | indent 8 }} -{{- end }} - spec: - serviceAccountName: {{ template "prometheus.serviceAccountName.kubeStateMetrics" . }} -{{- if .Values.kubeStateMetrics.priorityClassName }} - priorityClassName: "{{ .Values.kubeStateMetrics.priorityClassName }}" -{{- end }} - containers: - - name: {{ template "prometheus.name" . }}-{{ .Values.kubeStateMetrics.name }} - image: "{{ .Values.kubeStateMetrics.image.repository }}:{{ .Values.kubeStateMetrics.image.tag }}" - imagePullPolicy: "{{ .Values.kubeStateMetrics.image.pullPolicy }}" - {{- if .Values.kubeStateMetrics.args }} - args: - {{- range $key, $value := .Values.kubeStateMetrics.args }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- end }} - ports: - - name: metrics - containerPort: 8080 - resources: -{{ toYaml .Values.kubeStateMetrics.resources | indent 12 }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{ toYaml .Values.imagePullSecrets | indent 2 }} - {{- end }} - {{- if .Values.kubeStateMetrics.nodeSelector }} - nodeSelector: -{{ toYaml .Values.kubeStateMetrics.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.kubeStateMetrics.securityContext }} - securityContext: -{{ toYaml .Values.kubeStateMetrics.securityContext | indent 8 }} - {{- end }} - {{- if .Values.kubeStateMetrics.tolerations }} - tolerations: -{{ toYaml .Values.kubeStateMetrics.tolerations | indent 8 }} - {{- end }} - {{- if .Values.kubeStateMetrics.affinity }} - affinity: -{{ toYaml .Values.kubeStateMetrics.affinity | indent 8 }} - {{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-networkpolicy.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-networkpolicy.yaml deleted file mode 100644 index 56893cec..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-networkpolicy.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.kubeStateMetrics.enabled .Values.networkPolicy.enabled -}} -apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }} -kind: NetworkPolicy -metadata: - name: {{ template "prometheus.kubeStateMetrics.fullname" . }} - labels: - {{- include "prometheus.kubeStateMetrics.labels" . | nindent 4 }} -spec: - podSelector: - matchLabels: - {{- include "prometheus.kubeStateMetrics.matchLabels" . | nindent 6 }} - ingress: - - from: - - podSelector: - matchLabels: - {{- include "prometheus.server.matchLabels" . | nindent 10 }} - - ports: - - port: 8080 -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-serviceaccount.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-serviceaccount.yaml deleted file mode 100644 index 5f974806..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-serviceaccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if and .Values.kubeStateMetrics.enabled .Values.serviceAccounts.kubeStateMetrics.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "prometheus.kubeStateMetrics.labels" . | nindent 4 }} - name: {{ template "prometheus.serviceAccountName.kubeStateMetrics" . }} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-svc.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-svc.yaml deleted file mode 100644 index 717d85fe..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/kube-state-metrics-svc.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if and .Values.kubeStateMetrics.enabled .Values.kubeStateMetrics.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.kubeStateMetrics.service.annotations }} - annotations: -{{ toYaml .Values.kubeStateMetrics.service.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.kubeStateMetrics.labels" . | nindent 4 }} -{{- if .Values.kubeStateMetrics.service.labels }} -{{ toYaml .Values.kubeStateMetrics.service.labels | indent 4 }} -{{- end }} - name: {{ template "prometheus.kubeStateMetrics.fullname" . }} -spec: -{{- if .Values.kubeStateMetrics.service.clusterIP }} - clusterIP: {{ .Values.kubeStateMetrics.service.clusterIP }} -{{- end }} -{{- if .Values.kubeStateMetrics.service.externalIPs }} - externalIPs: -{{ toYaml .Values.kubeStateMetrics.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.kubeStateMetrics.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.kubeStateMetrics.service.loadBalancerIP }} -{{- end }} -{{- if .Values.kubeStateMetrics.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range $cidr := .Values.kubeStateMetrics.service.loadBalancerSourceRanges }} - - {{ $cidr }} - {{- end }} -{{- end }} - ports: - - name: http - port: {{ .Values.kubeStateMetrics.service.servicePort }} - protocol: TCP - targetPort: 8080 - selector: - {{- include "prometheus.kubeStateMetrics.matchLabels" . | nindent 4 }} - type: "{{ .Values.kubeStateMetrics.service.type }}" -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-daemonset.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-daemonset.yaml deleted file mode 100644 index dc0c83ac..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-daemonset.yaml +++ /dev/null @@ -1,113 +0,0 @@ -{{- if .Values.nodeExporter.enabled -}} -apiVersion: extensions/v1beta1 -kind: DaemonSet -metadata: -{{- if .Values.nodeExporter.deploymentAnnotations }} - annotations: -{{ toYaml .Values.nodeExporter.deploymentAnnotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} - name: {{ template "prometheus.nodeExporter.fullname" . }} -spec: - selector: - matchLabels: - {{- include "prometheus.nodeExporter.matchLabels" . | nindent 6 }} - {{- if .Values.nodeExporter.updateStrategy }} - updateStrategy: -{{ toYaml .Values.nodeExporter.updateStrategy | indent 4 }} - {{- end }} - template: - metadata: - {{- if .Values.nodeExporter.podAnnotations }} - annotations: -{{ toYaml .Values.nodeExporter.podAnnotations | indent 8 }} - {{- end }} - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 8 }} -{{- if .Values.nodeExporter.pod.labels }} -{{ toYaml .Values.nodeExporter.pod.labels | indent 8 }} -{{- end }} - spec: - serviceAccountName: {{ template "prometheus.serviceAccountName.nodeExporter" . }} -{{- if .Values.nodeExporter.priorityClassName }} - priorityClassName: "{{ .Values.nodeExporter.priorityClassName }}" -{{- end }} - containers: - - name: {{ template "prometheus.name" . }}-{{ .Values.nodeExporter.name }} - image: "{{ .Values.nodeExporter.image.repository }}:{{ .Values.nodeExporter.image.tag }}" - imagePullPolicy: "{{ .Values.nodeExporter.image.pullPolicy }}" - args: - - --path.procfs=/host/proc - - --path.sysfs=/host/sys - {{- range $key, $value := .Values.nodeExporter.extraArgs }} - {{- if $value }} - - --{{ $key }}={{ $value }} - {{- else }} - - --{{ $key }} - {{- end }} - {{- end }} - ports: - - name: metrics - containerPort: 9100 - hostPort: {{ .Values.nodeExporter.service.hostPort }} - resources: -{{ toYaml .Values.nodeExporter.resources | indent 12 }} - volumeMounts: - - name: proc - mountPath: /host/proc - readOnly: true - - name: sys - mountPath: /host/sys - readOnly: true - {{- range .Values.nodeExporter.extraHostPathMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.nodeExporter.extraConfigmapMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{ toYaml .Values.imagePullSecrets | indent 2 }} - {{- end }} - {{- if .Values.nodeExporter.hostNetwork }} - hostNetwork: true - {{- end }} - {{- if .Values.nodeExporter.hostPID }} - hostPID: true - {{- end }} - {{- if .Values.nodeExporter.tolerations }} - tolerations: -{{ toYaml .Values.nodeExporter.tolerations | indent 8 }} - {{- end }} - {{- if .Values.nodeExporter.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeExporter.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.nodeExporter.securityContext }} - securityContext: -{{ toYaml .Values.nodeExporter.securityContext | indent 8 }} - {{- end }} - volumes: - - name: proc - hostPath: - path: /proc - - name: sys - hostPath: - path: /sys - {{- range .Values.nodeExporter.extraHostPathMounts }} - - name: {{ .name }} - hostPath: - path: {{ .hostPath }} - {{- end }} - {{- range .Values.nodeExporter.extraConfigmapMounts }} - - name: {{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-podsecuritypolicy.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-podsecuritypolicy.yaml deleted file mode 100644 index 159ff354..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-podsecuritypolicy.yaml +++ /dev/null @@ -1,55 +0,0 @@ -{{- if and .Values.nodeExporter.enabled .Values.rbac.create }} -{{- if .Values.nodeExporter.podSecurityPolicy.enabled }} -apiVersion: extensions/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "prometheus.nodeExporter.fullname" . }} - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} - annotations: -{{- if .Values.nodeExporter.podSecurityPolicy.annotations }} -{{ toYaml .Values.nodeExporter.podSecurityPolicy.annotations | indent 4 }} -{{- end }} -spec: - privileged: false - allowPrivilegeEscalation: false - requiredDropCapabilities: - - ALL - volumes: - - 'configMap' - - 'hostPath' - - 'secret' - AllowedHostPaths: - - pathPrefix: /proc - readOnly: true - - pathPrefix: /sys - readOnly: true - {{- range .Values.nodeExporter.extraHostPathMounts }} - - pathPrefix: {{ .hostPath }} - readOnly: {{ .readOnly }} - {{- end }} - hostNetwork: {{ .Values.nodeExporter.hostNetwork }} - hostPID: {{ .Values.nodeExporter.hostPID }} - hostIPC: false - runAsUser: - rule: 'RunAsAny' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - fsGroup: - rule: 'MustRunAs' - ranges: - # Forbid adding the root group. - - min: 1 - max: 65535 - readOnlyRootFilesystem: false - hostPorts: - - min: 1 - max: 65535 -{{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-role.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-role.yaml deleted file mode 100644 index e5dac348..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-role.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if and .Values.nodeExporter.enabled .Values.rbac.create }} -{{- if .Values.nodeExporter.podSecurityPolicy.enabled }} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: Role -metadata: - name: {{ template "prometheus.nodeExporter.fullname" . }} - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} - namespace: {{ .Release.Namespace }} -rules: -- apiGroups: ['extensions'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: - - {{ template "prometheus.nodeExporter.fullname" . }} -{{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-rolebinding.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-rolebinding.yaml deleted file mode 100644 index 976c6320..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if and .Values.nodeExporter.enabled .Values.rbac.create }} -{{- if .Values.nodeExporter.podSecurityPolicy.enabled }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ template "prometheus.nodeExporter.fullname" . }} - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: Role - name: {{ template "prometheus.nodeExporter.fullname" . }} - apiGroup: rbac.authorization.k8s.io -subjects: -- kind: ServiceAccount - name: {{ template "prometheus.serviceAccountName.nodeExporter" . }} - namespace: {{ .Release.Namespace }} -{{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-service.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-service.yaml deleted file mode 100644 index 55c683b6..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-service.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.nodeExporter.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.nodeExporter.service.annotations }} - annotations: -{{ toYaml .Values.nodeExporter.service.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} -{{- if .Values.nodeExporter.service.labels }} -{{ toYaml .Values.nodeExporter.service.labels | indent 4 }} -{{- end }} - name: {{ template "prometheus.nodeExporter.fullname" . }} -spec: -{{- if .Values.nodeExporter.service.clusterIP }} - clusterIP: {{ .Values.nodeExporter.service.clusterIP }} -{{- end }} -{{- if .Values.nodeExporter.service.externalIPs }} - externalIPs: -{{ toYaml .Values.nodeExporter.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.nodeExporter.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.nodeExporter.service.loadBalancerIP }} -{{- end }} -{{- if .Values.nodeExporter.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range $cidr := .Values.nodeExporter.service.loadBalancerSourceRanges }} - - {{ $cidr }} - {{- end }} -{{- end }} - ports: - - name: metrics - port: {{ .Values.nodeExporter.service.servicePort }} - protocol: TCP - targetPort: 9100 - selector: - {{- include "prometheus.nodeExporter.matchLabels" . | nindent 4 }} - type: "{{ .Values.nodeExporter.service.type }}" -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-serviceaccount.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-serviceaccount.yaml deleted file mode 100644 index a922b238..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/node-exporter-serviceaccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if and .Values.nodeExporter.enabled .Values.serviceAccounts.nodeExporter.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "prometheus.nodeExporter.labels" . | nindent 4 }} - name: {{ template "prometheus.serviceAccountName.nodeExporter" . }} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-deployment.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-deployment.yaml deleted file mode 100644 index befc4a79..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-deployment.yaml +++ /dev/null @@ -1,80 +0,0 @@ -{{- if .Values.pushgateway.enabled -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} - name: {{ template "prometheus.pushgateway.fullname" . }} -spec: - selector: - matchLabels: - {{- include "prometheus.pushgateway.matchLabels" . | nindent 6 }} - replicas: {{ .Values.pushgateway.replicaCount }} - template: - metadata: - {{- if .Values.pushgateway.podAnnotations }} - annotations: -{{ toYaml .Values.pushgateway.podAnnotations | indent 8 }} - {{- end }} - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 8 }} - spec: - serviceAccountName: {{ template "prometheus.serviceAccountName.pushgateway" . }} -{{- if .Values.pushgateway.priorityClassName }} - priorityClassName: "{{ .Values.pushgateway.priorityClassName }}" -{{- end }} - containers: - - name: {{ template "prometheus.name" . }}-{{ .Values.pushgateway.name }} - image: "{{ .Values.pushgateway.image.repository }}:{{ .Values.pushgateway.image.tag }}" - imagePullPolicy: "{{ .Values.pushgateway.image.pullPolicy }}" - args: - {{- range $key, $value := .Values.pushgateway.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - ports: - - containerPort: 9091 - readinessProbe: - httpGet: - {{- if (index .Values "pushgateway" "extraArgs" "web.route-prefix") }} - path: /{{ index .Values "pushgateway" "extraArgs" "web.route-prefix" }}/#/status - {{- else }} - path: /#/status - {{- end }} - port: 9091 - initialDelaySeconds: 10 - timeoutSeconds: 10 - resources: -{{ toYaml .Values.pushgateway.resources | indent 12 }} - {{- if .Values.pushgateway.persistentVolume.enabled }} - volumeMounts: - - name: storage-volume - mountPath: "{{ .Values.pushgateway.persistentVolume.mountPath }}" - subPath: "{{ .Values.pushgateway.persistentVolume.subPath }}" - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{ toYaml .Values.imagePullSecrets | indent 2 }} - {{- end }} - {{- if .Values.pushgateway.nodeSelector }} - nodeSelector: -{{ toYaml .Values.pushgateway.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.pushgateway.securityContext }} - securityContext: -{{ toYaml .Values.pushgateway.securityContext | indent 8 }} - {{- end }} - {{- if .Values.pushgateway.tolerations }} - tolerations: -{{ toYaml .Values.pushgateway.tolerations | indent 8 }} - {{- end }} - {{- if .Values.pushgateway.affinity }} - affinity: -{{ toYaml .Values.pushgateway.affinity | indent 8 }} - {{- end }} - {{- if .Values.pushgateway.persistentVolume.enabled }} - volumes: - - name: storage-volume - persistentVolumeClaim: - claimName: {{ if .Values.pushgateway.persistentVolume.existingClaim }}{{ .Values.pushgateway.persistentVolume.existingClaim }}{{- else }}{{ template "prometheus.pushgateway.fullname" . }}{{- end }} - {{- end -}} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-ingress.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-ingress.yaml deleted file mode 100644 index a84b57d8..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-ingress.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- if and .Values.pushgateway.enabled .Values.pushgateway.ingress.enabled -}} -{{- $releaseName := .Release.Name -}} -{{- $serviceName := include "prometheus.pushgateway.fullname" . }} -{{- $servicePort := .Values.pushgateway.service.servicePort -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: -{{- if .Values.pushgateway.ingress.annotations }} - annotations: -{{ toYaml .Values.pushgateway.ingress.annotations | indent 4}} -{{- end }} - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} - name: {{ template "prometheus.pushgateway.fullname" . }} -spec: - rules: - {{- range .Values.pushgateway.ingress.hosts }} - {{- $url := splitList "/" . }} - - host: {{ first $url }} - http: - paths: - - path: /{{ rest $url | join "/" }} - backend: - serviceName: {{ $serviceName }} - servicePort: {{ $servicePort }} - {{- end -}} -{{- if .Values.pushgateway.ingress.tls }} - tls: -{{ toYaml .Values.pushgateway.ingress.tls | indent 4 }} - {{- end -}} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-pvc.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-pvc.yaml deleted file mode 100644 index 061ca19c..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-pvc.yaml +++ /dev/null @@ -1,27 +0,0 @@ -{{- if .Values.pushgateway.persistentVolume.enabled -}} -{{- if not .Values.pushgateway.persistentVolume.existingClaim -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - {{- if .Values.pushgateway.persistentVolume.annotations }} - annotations: -{{ toYaml .Values.pushgateway.persistentVolume.annotations | indent 4 }} - {{- end }} - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} - name: {{ template "prometheus.pushgateway.fullname" . }} -spec: - accessModes: -{{ toYaml .Values.pushgateway.persistentVolume.accessModes | indent 4 }} -{{- if .Values.pushgateway.persistentVolume.storageClass }} -{{- if (eq "-" .Values.pushgateway.persistentVolume.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.pushgateway.persistentVolume.storageClass }}" -{{- end }} -{{- end }} - resources: - requests: - storage: "{{ .Values.pushgateway.persistentVolume.size }}" -{{- end -}} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-service.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-service.yaml deleted file mode 100644 index e84771d8..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-service.yaml +++ /dev/null @@ -1,40 +0,0 @@ -{{- if .Values.pushgateway.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.pushgateway.service.annotations }} - annotations: -{{ toYaml .Values.pushgateway.service.annotations | indent 4}} -{{- end }} - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} -{{- if .Values.pushgateway.service.labels }} -{{ toYaml .Values.pushgateway.service.labels | indent 4}} -{{- end }} - name: {{ template "prometheus.pushgateway.fullname" . }} -spec: -{{- if .Values.pushgateway.service.clusterIP }} - clusterIP: {{ .Values.pushgateway.service.clusterIP }} -{{- end }} -{{- if .Values.pushgateway.service.externalIPs }} - externalIPs: -{{ toYaml .Values.pushgateway.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.pushgateway.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.pushgateway.service.loadBalancerIP }} -{{- end }} -{{- if .Values.pushgateway.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range $cidr := .Values.pushgateway.service.loadBalancerSourceRanges }} - - {{ $cidr }} - {{- end }} -{{- end }} - ports: - - name: http - port: {{ .Values.pushgateway.service.servicePort }} - protocol: TCP - targetPort: 9091 - selector: - {{- include "prometheus.pushgateway.matchLabels" . | nindent 4 }} - type: "{{ .Values.pushgateway.service.type }}" -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-serviceaccount.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-serviceaccount.yaml deleted file mode 100644 index 1596a28f..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/pushgateway-serviceaccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if and .Values.pushgateway.enabled .Values.serviceAccounts.pushgateway.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "prometheus.pushgateway.labels" . | nindent 4 }} - name: {{ template "prometheus.serviceAccountName.pushgateway" . }} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-clusterrole.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/server-clusterrole.yaml deleted file mode 100644 index e039172a..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-clusterrole.yaml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.server.fullname" . }} -rules: - - apiGroups: - - "" - resources: - - nodes - - nodes/proxy - - services - - endpoints - - pods - - ingresses - - configmaps - verbs: - - get - - list - - watch - - apiGroups: - - "extensions" - resources: - - ingresses/status - - ingresses - verbs: - - get - - list - - watch - - nonResourceURLs: - - "/metrics" - verbs: - - get -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-clusterrolebinding.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/server-clusterrolebinding.yaml deleted file mode 100644 index 9cbec5ec..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-clusterrolebinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.server.fullname" . }} -subjects: - - kind: ServiceAccount - name: {{ template "prometheus.serviceAccountName.server" . }} - namespace: {{ .Release.Namespace }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "prometheus.server.fullname" . }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-configmap.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/server-configmap.yaml deleted file mode 100644 index fa6e44a4..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-configmap.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{- if (empty .Values.server.configMapOverrideName) -}} -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.server.fullname" . }} -data: -{{- $root := . -}} -{{- range $key, $value := .Values.serverFiles }} - {{ $key }}: | -{{- if eq $key "prometheus.yml" }} - global: -{{ $root.Values.server.global | toYaml | trimSuffix "\n" | indent 6 }} -{{- end }} -{{ toYaml $value | default "{}" | indent 4 }} -{{- if eq $key "prometheus.yml" -}} -{{- if $root.Values.extraScrapeConfigs }} -{{ tpl $root.Values.extraScrapeConfigs $root | indent 4 }} -{{- end -}} -{{- if $root.Values.alertmanager.enabled }} - alerting: - alertmanagers: - - kubernetes_sd_configs: - - role: pod - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - {{- if $root.Values.alertmanager.prefixURL }} - path_prefix: {{ $root.Values.alertmanager.prefixURL }} - {{- end }} - relabel_configs: - - source_labels: [__meta_kubernetes_namespace] - regex: {{ $root.Release.Namespace }} - action: keep - - source_labels: [__meta_kubernetes_pod_label_app] - regex: {{ template "prometheus.name" $root }} - action: keep - - source_labels: [__meta_kubernetes_pod_label_component] - regex: alertmanager - action: keep - - source_labels: [__meta_kubernetes_pod_container_port_number] - regex: - action: drop -{{- end -}} -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-deployment.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/server-deployment.yaml deleted file mode 100644 index e4a96403..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-deployment.yaml +++ /dev/null @@ -1,217 +0,0 @@ -{{- if not .Values.server.statefulSet.enabled -}} -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: -{{- if .Values.server.deploymentAnnotations }} - annotations: -{{ toYaml .Values.server.deploymentAnnotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.server.fullname" . }} -spec: - selector: - matchLabels: - {{- include "prometheus.server.matchLabels" . | nindent 6 }} - replicas: {{ .Values.server.replicaCount }} - {{- if .Values.server.strategy }} - strategy: -{{ toYaml .Values.server.strategy | indent 4 }} - {{- end }} - template: - metadata: - {{- if .Values.server.podAnnotations }} - annotations: -{{ toYaml .Values.server.podAnnotations | indent 8 }} - {{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 8 }} - spec: -{{- if .Values.server.priorityClassName }} - priorityClassName: "{{ .Values.server.priorityClassName }}" -{{- end }} -{{- if .Values.server.schedulerName }} - schedulerName: "{{ .Values.server.schedulerName }}" -{{- end }} - serviceAccountName: {{ template "prometheus.serviceAccountName.server" . }} - {{- if .Values.initChownData.enabled }} - initContainers: - - name: "{{ .Values.initChownData.name }}" - image: "{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}" - imagePullPolicy: "{{ .Values.initChownData.image.pullPolicy }}" - resources: -{{ toYaml .Values.initChownData.resources | indent 10 }} - # 65534 is the nobody user that prometheus uses. - command: ["chown", "-R", "65534:65534", "{{ .Values.server.persistentVolume.mountPath }}"] - volumeMounts: - - name: storage-volume - mountPath: {{ .Values.server.persistentVolume.mountPath }} - subPath: "{{ .Values.server.persistentVolume.subPath }}" - {{- end }} - containers: - - name: {{ template "prometheus.name" . }}-{{ .Values.server.name }}-{{ .Values.configmapReload.name }} - image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}" - imagePullPolicy: "{{ .Values.configmapReload.image.pullPolicy }}" - args: - - --volume-dir=/etc/config - - --webhook-url=http://127.0.0.1:9090{{ .Values.server.prefixURL }}/-/reload - {{- range $key, $value := .Values.configmapReload.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- range .Values.configmapReload.extraVolumeDirs }} - - --volume-dir={{ . }} - {{- end }} - resources: -{{ toYaml .Values.configmapReload.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - readOnly: true - {{- range .Values.configmapReload.extraConfigmapMounts }} - - name: {{ $.Values.configmapReload.name }}-{{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - - - name: {{ template "prometheus.name" . }}-{{ .Values.server.name }} - image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag }}" - imagePullPolicy: "{{ .Values.server.image.pullPolicy }}" - {{- if .Values.server.env }} - env: -{{ toYaml .Values.server.env | indent 12}} - {{- end }} - args: - {{- if .Values.server.retention }} - - --storage.tsdb.retention.time={{ .Values.server.retention }} - {{- end }} - - --config.file={{ .Values.server.configPath }} - - --storage.tsdb.path={{ .Values.server.persistentVolume.mountPath }} - - --web.console.libraries=/etc/prometheus/console_libraries - - --web.console.templates=/etc/prometheus/consoles - - --web.enable-lifecycle - {{- range $key, $value := .Values.server.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- if .Values.server.baseURL }} - - --web.external-url={{ .Values.server.baseURL }} - {{- end }} - {{- if .Values.server.enableAdminApi }} - - --web.enable-admin-api - {{- end }} - {{- if .Values.server.skipTSDBLock }} - - --storage.tsdb.no-lockfile - {{- end }} - ports: - - containerPort: 9090 - readinessProbe: - httpGet: - path: {{ .Values.server.prefixURL }}/-/ready - port: 9090 - initialDelaySeconds: 30 - timeoutSeconds: 30 - livenessProbe: - httpGet: - path: {{ .Values.server.prefixURL }}/-/healthy - port: 9090 - initialDelaySeconds: 30 - timeoutSeconds: 30 - resources: -{{ toYaml .Values.server.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - - name: storage-volume - mountPath: {{ .Values.server.persistentVolume.mountPath }} - subPath: "{{ .Values.server.persistentVolume.subPath }}" - {{- range .Values.server.extraHostPathMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.server.extraConfigmapMounts }} - - name: {{ $.Values.server.name }}-{{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.server.extraSecretMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- if .Values.server.extraVolumeMounts }} - {{ toYaml .Values.server.extraVolumeMounts | nindent 12 }} - {{- end }} - {{- if .Values.server.sidecarContainers }} - {{- toYaml .Values.server.sidecarContainers | nindent 8 }} - {{- end }} - - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{ toYaml .Values.imagePullSecrets | indent 2 }} - {{- end }} - {{- if .Values.server.nodeSelector }} - nodeSelector: -{{ toYaml .Values.server.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.server.securityContext }} - securityContext: -{{ toYaml .Values.server.securityContext | indent 8 }} - {{- end }} - {{- if .Values.server.tolerations }} - tolerations: -{{ toYaml .Values.server.tolerations | indent 8 }} - {{- end }} - {{- if .Values.server.affinity }} - affinity: -{{ toYaml .Values.server.affinity | indent 8 }} - {{- end }} - terminationGracePeriodSeconds: {{ .Values.server.terminationGracePeriodSeconds }} - volumes: - - name: config-volume - configMap: - name: {{ if .Values.server.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.server.configMapOverrideName }}{{- else }}{{ template "prometheus.server.fullname" . }}{{- end }} - - name: storage-volume - {{- if .Values.server.persistentVolume.enabled }} - persistentVolumeClaim: - claimName: {{ if .Values.server.persistentVolume.existingClaim }}{{ .Values.server.persistentVolume.existingClaim }}{{- else }}{{ template "prometheus.server.fullname" . }}{{- end }} - {{- else }} - emptyDir: - {{- if .Values.server.emptyDir.sizeLimit }} - sizeLimit: {{ .Values.server.emptyDir.sizeLimit }} - {{- else }} - {} - {{- end -}} - {{- end -}} -{{- if .Values.server.extraVolumes }} -{{ toYaml .Values.server.extraVolumes | indent 8}} -{{- end }} - {{- range .Values.server.extraHostPathMounts }} - - name: {{ .name }} - hostPath: - path: {{ .hostPath }} - {{- end }} - {{- range .Values.configmapReload.extraConfigmapMounts }} - - name: {{ $.Values.configmapReload.name }}-{{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - {{- range .Values.server.extraConfigmapMounts }} - - name: {{ $.Values.server.name }}-{{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - {{- range .Values.server.extraSecretMounts }} - - name: {{ .name }} - secret: - secretName: {{ .secretName }} - {{- end }} - {{- range .Values.configmapReload.extraConfigmapMounts }} - - name: {{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-ingress.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/server-ingress.yaml deleted file mode 100644 index bcff5aac..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-ingress.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- if .Values.server.ingress.enabled -}} -{{- $releaseName := .Release.Name -}} -{{- $serviceName := include "prometheus.server.fullname" . }} -{{- $servicePort := .Values.server.service.servicePort -}} -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: -{{- if .Values.server.ingress.annotations }} - annotations: -{{ toYaml .Values.server.ingress.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} -{{- range $key, $value := .Values.server.ingress.extraLabels }} - {{ $key }}: {{ $value }} -{{- end }} - name: {{ template "prometheus.server.fullname" . }} -spec: - rules: - {{- range .Values.server.ingress.hosts }} - {{- $url := splitList "/" . }} - - host: {{ first $url }} - http: - paths: - - path: /{{ rest $url | join "/" }} - backend: - serviceName: {{ $serviceName }} - servicePort: {{ $servicePort }} - {{- end -}} -{{- if .Values.server.ingress.tls }} - tls: -{{ toYaml .Values.server.ingress.tls | indent 4 }} - {{- end -}} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-networkpolicy.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/server-networkpolicy.yaml deleted file mode 100644 index 4f71146b..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-networkpolicy.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.networkPolicy.enabled }} -apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }} -kind: NetworkPolicy -metadata: - name: {{ template "prometheus.server.fullname" . }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} -spec: - podSelector: - matchLabels: - {{- include "prometheus.server.matchLabels" . | nindent 6 }} - ingress: - - ports: - - port: 9090 -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-pvc.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/server-pvc.yaml deleted file mode 100644 index c7eaaeb9..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-pvc.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if not .Values.server.statefulSet.enabled -}} -{{- if .Values.server.persistentVolume.enabled -}} -{{- if not .Values.server.persistentVolume.existingClaim -}} -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - {{- if .Values.server.persistentVolume.annotations }} - annotations: -{{ toYaml .Values.server.persistentVolume.annotations | indent 4 }} - {{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.server.fullname" . }} -spec: - accessModes: -{{ toYaml .Values.server.persistentVolume.accessModes | indent 4 }} -{{- if .Values.server.persistentVolume.storageClass }} -{{- if (eq "-" .Values.server.persistentVolume.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.server.persistentVolume.storageClass }}" -{{- end }} -{{- end }} - resources: - requests: - storage: "{{ .Values.server.persistentVolume.size }}" -{{- end -}} -{{- end -}} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-service-headless.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/server-service-headless.yaml deleted file mode 100644 index cf82b5d1..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-service-headless.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if .Values.server.statefulSet.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.server.statefulSet.headless.annotations }} - annotations: -{{ toYaml .Values.server.statefulSet.headless.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} -{{- if .Values.server.statefulSet.headless.labels }} -{{ toYaml .Values.server.statefulSet.headless.labels | indent 4 }} -{{- end }} - name: {{ template "prometheus.server.fullname" . }}-headless -spec: - clusterIP: None - ports: - - name: http - port: {{ .Values.server.statefulSet.headless.servicePort }} - protocol: TCP - targetPort: 9090 - selector: - {{- include "prometheus.server.matchLabels" . | nindent 4 }} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-service.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/server-service.yaml deleted file mode 100644 index e607803c..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-service.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.server.service.annotations }} - annotations: -{{ toYaml .Values.server.service.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} -{{- if .Values.server.service.labels }} -{{ toYaml .Values.server.service.labels | indent 4 }} -{{- end }} - name: {{ template "prometheus.server.fullname" . }} -spec: -{{- if .Values.server.service.clusterIP }} - clusterIP: {{ .Values.server.service.clusterIP }} -{{- end }} -{{- if .Values.server.service.externalIPs }} - externalIPs: -{{ toYaml .Values.server.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.server.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.server.service.loadBalancerIP }} -{{- end }} -{{- if .Values.server.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: - {{- range $cidr := .Values.server.service.loadBalancerSourceRanges }} - - {{ $cidr }} - {{- end }} -{{- end }} - ports: - - name: http - port: {{ .Values.server.service.servicePort }} - protocol: TCP - targetPort: 9090 - {{- if .Values.server.service.nodePort }} - nodePort: {{ .Values.server.service.nodePort }} - {{- end }} - selector: - {{- include "prometheus.server.matchLabels" . | nindent 4 }} - type: "{{ .Values.server.service.type }}" diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-serviceaccount.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/server-serviceaccount.yaml deleted file mode 100644 index 4697b4aa..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-serviceaccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if .Values.serviceAccounts.server.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.serviceAccountName.server" . }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-statefulset.yaml b/sources/loki/helm/loki-stack/charts/prometheus/templates/server-statefulset.yaml deleted file mode 100644 index b952590d..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/templates/server-statefulset.yaml +++ /dev/null @@ -1,226 +0,0 @@ -{{- if .Values.server.statefulSet.enabled -}} -apiVersion: apps/v1 -kind: StatefulSet -metadata: -{{- if .Values.server.statefulSet.annotations }} - annotations: -{{ toYaml .Values.server.statefulSet.annotations | indent 4 }} -{{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 4 }} - name: {{ template "prometheus.server.fullname" . }} -spec: - serviceName: {{ template "prometheus.server.fullname" . }}-headless - selector: - matchLabels: - {{- include "prometheus.server.matchLabels" . | nindent 6 }} - replicas: {{ .Values.server.replicaCount }} - podManagementPolicy: {{ .Values.server.statefulSet.podManagementPolicy }} - template: - metadata: - {{- if .Values.server.podAnnotations }} - annotations: -{{ toYaml .Values.server.podAnnotations | indent 8 }} - {{- end }} - labels: - {{- include "prometheus.server.labels" . | nindent 8 }} - spec: -{{- if .Values.server.affinity }} - affinity: -{{ toYaml .Values.server.affinity | indent 8 }} -{{- end }} -{{- if .Values.server.priorityClassName }} - priorityClassName: "{{ .Values.server.priorityClassName }}" -{{- end }} -{{- if .Values.server.schedulerName }} - schedulerName: "{{ .Values.server.schedulerName }}" -{{- end }} - serviceAccountName: {{ template "prometheus.serviceAccountName.server" . }} - {{- if .Values.initChownData.enabled }} - initContainers: - - name: "{{ .Values.initChownData.name }}" - image: "{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}" - imagePullPolicy: "{{ .Values.initChownData.image.pullPolicy }}" - resources: -{{ toYaml .Values.initChownData.resources | indent 10 }} - # 65534 is the nobody user that prometheus uses. - command: ["chown", "-R", "65534:65534", "{{ .Values.server.persistentVolume.mountPath }}"] - volumeMounts: - - name: storage-volume - mountPath: {{ .Values.server.persistentVolume.mountPath }} - subPath: "{{ .Values.server.persistentVolume.subPath }}" - {{- end }} - containers: - - name: {{ template "prometheus.name" . }}-{{ .Values.server.name }}-{{ .Values.configmapReload.name }} - image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}" - imagePullPolicy: "{{ .Values.configmapReload.image.pullPolicy }}" - args: - - --volume-dir=/etc/config - - --webhook-url=http://127.0.0.1:9090{{ .Values.server.prefixURL }}/-/reload - {{- range $key, $value := .Values.configmapReload.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- range .Values.configmapReload.extraVolumeDirs }} - - --volume-dir={{ . }} - {{- end }} - resources: -{{ toYaml .Values.configmapReload.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - readOnly: true - {{- range .Values.configmapReload.extraConfigmapMounts }} - - name: {{ $.Values.configmapReload.name }}-{{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - - name: {{ template "prometheus.name" . }}-{{ .Values.server.name }} - image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag }}" - imagePullPolicy: "{{ .Values.server.image.pullPolicy }}" - args: - {{- if .Values.server.retention }} - - --storage.tsdb.retention.time={{ .Values.server.retention }} - {{- end }} - - --config.file={{ .Values.server.configPath }} - - --storage.tsdb.path={{ .Values.server.persistentVolume.mountPath }} - - --web.console.libraries=/etc/prometheus/console_libraries - - --web.console.templates=/etc/prometheus/consoles - - --web.enable-lifecycle - {{- range $key, $value := .Values.server.extraArgs }} - - --{{ $key }}={{ $value }} - {{- end }} - {{- if .Values.server.baseURL }} - - --web.external-url={{ .Values.server.baseURL }} - {{- end }} - {{- if .Values.server.enableAdminApi }} - - --web.enable-admin-api - {{- end }} - {{- if .Values.server.skipTSDBLock }} - - --storage.tsdb.no-lockfile - {{- end }} - ports: - - containerPort: 9090 - readinessProbe: - httpGet: - path: {{ .Values.server.prefixURL }}/-/ready - port: 9090 - initialDelaySeconds: 30 - timeoutSeconds: 30 - livenessProbe: - httpGet: - path: {{ .Values.server.prefixURL }}/-/healthy - port: 9090 - initialDelaySeconds: 30 - timeoutSeconds: 30 - resources: -{{ toYaml .Values.server.resources | indent 12 }} - volumeMounts: - - name: config-volume - mountPath: /etc/config - - name: storage-volume - mountPath: {{ .Values.server.persistentVolume.mountPath }} - subPath: "{{ .Values.server.persistentVolume.subPath }}" - {{- range .Values.server.extraHostPathMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.server.extraConfigmapMounts }} - - name: {{ $.Values.server.name }}-{{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- range .Values.server.extraSecretMounts }} - - name: {{ .name }} - mountPath: {{ .mountPath }} - subPath: {{ .subPath }} - readOnly: {{ .readOnly }} - {{- end }} - {{- if .Values.server.extraVolumeMounts }} - {{ toYaml .Values.server.extraVolumeMounts | nindent 12 }} - {{- end }} - {{- if .Values.server.sidecarContainers }} - {{- toYaml .Values.server.sidecarContainers | nindent 8 }} - {{- end }} - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{ toYaml .Values.imagePullSecrets | indent 2 }} - {{- end }} - {{- if .Values.server.nodeSelector }} - nodeSelector: -{{ toYaml .Values.server.nodeSelector | indent 8 }} - {{- end }} - {{- if .Values.server.securityContext }} - securityContext: -{{ toYaml .Values.server.securityContext | indent 8 }} - {{- end }} - {{- if .Values.server.tolerations }} - tolerations: -{{ toYaml .Values.server.tolerations | indent 8 }} - {{- end }} - {{- if .Values.server.affinity }} - affinity: -{{ toYaml .Values.server.affinity | indent 8 }} - {{- end }} - terminationGracePeriodSeconds: {{ .Values.server.terminationGracePeriodSeconds }} - volumes: - - name: config-volume - configMap: - name: {{ if .Values.server.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.server.configMapOverrideName }}{{- else }}{{ template "prometheus.server.fullname" . }}{{- end }} - {{- range .Values.server.extraHostPathMounts }} - - name: {{ .name }} - hostPath: - path: {{ .hostPath }} - {{- end }} - {{- range .Values.configmapReload.extraConfigmapMounts }} - - name: {{ $.Values.configmapReload.name }}-{{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - {{- range .Values.server.extraConfigmapMounts }} - - name: {{ $.Values.server.name }}-{{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} - {{- range .Values.server.extraSecretMounts }} - - name: {{ .name }} - secret: - secretName: {{ .secretName }} - {{- end }} - {{- range .Values.configmapReload.extraConfigmapMounts }} - - name: {{ .name }} - configMap: - name: {{ .configMap }} - {{- end }} -{{- if .Values.server.extraVolumes }} -{{ toYaml .Values.server.extraVolumes | indent 8}} -{{- end }} -{{- if .Values.server.persistentVolume.enabled }} - volumeClaimTemplates: - - metadata: - name: storage-volume - {{- if .Values.server.persistentVolume.annotations }} - annotations: -{{ toYaml .Values.server.persistentVolume.annotations | indent 10 }} - {{- end }} - spec: - accessModes: -{{ toYaml .Values.server.persistentVolume.accessModes | indent 10 }} - resources: - requests: - storage: "{{ .Values.server.persistentVolume.size }}" - {{- if .Values.server.persistentVolume.storageClass }} - {{- if (eq "-" .Values.server.persistentVolume.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ .Values.server.persistentVolume.storageClass }}" - {{- end }} - {{- end }} -{{- else }} - - name: storage-volume - emptyDir: {} -{{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/prometheus/values.yaml b/sources/loki/helm/loki-stack/charts/prometheus/values.yaml deleted file mode 100644 index 41002dde..00000000 --- a/sources/loki/helm/loki-stack/charts/prometheus/values.yaml +++ /dev/null @@ -1,1254 +0,0 @@ -rbac: - create: true - -imagePullSecrets: -# - name: "image-pull-secret" - -## Define serviceAccount names for components. Defaults to component's fully qualified name. -## -serviceAccounts: - alertmanager: - create: true - name: - kubeStateMetrics: - create: true - name: - nodeExporter: - create: true - name: - pushgateway: - create: true - name: - server: - create: true - name: - -alertmanager: - ## If false, alertmanager will not be installed - ## - enabled: true - - ## alertmanager container name - ## - name: alertmanager - - ## alertmanager container image - ## - image: - repository: prom/alertmanager - tag: v0.17.0 - pullPolicy: IfNotPresent - - ## alertmanager priorityClassName - ## - priorityClassName: "" - - ## Additional alertmanager container arguments - ## - extraArgs: {} - - ## The URL prefix at which the container can be accessed. Useful in the case the '-web.external-url' includes a slug - ## so that the various internal URLs are still able to access as they are in the default case. - ## (Optional) - prefixURL: "" - - ## External URL which can access alertmanager - ## Maybe same with Ingress host name - baseURL: "/" - - ## Additional alertmanager container environment variable - ## For instance to add a http_proxy - ## - extraEnv: {} - - ## ConfigMap override where fullname is {{.Release.Name}}-{{.Values.alertmanager.configMapOverrideName}} - ## Defining configMapOverrideName will cause templates/alertmanager-configmap.yaml - ## to NOT generate a ConfigMap resource - ## - configMapOverrideName: "" - - ## The name of a secret in the same kubernetes namespace which contains the Alertmanager config - ## Defining configFromSecret will cause templates/alertmanager-configmap.yaml - ## to NOT generate a ConfigMap resource - ## - configFromSecret: "" - - ## The configuration file name to be loaded to alertmanager - ## Must match the key within configuration loaded from ConfigMap/Secret - ## - configFileName: alertmanager.yml - - ingress: - ## If true, alertmanager Ingress will be created - ## - enabled: false - - ## alertmanager Ingress annotations - ## - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: 'true' - - ## alertmanager Ingress additional labels - ## - extraLabels: {} - - ## alertmanager Ingress hostnames with optional path - ## Must be provided if Ingress is enabled - ## - hosts: [] - # - alertmanager.domain.com - # - domain.com/alertmanager - - ## alertmanager Ingress TLS configuration - ## Secrets must be manually created in the namespace - ## - tls: [] - # - secretName: prometheus-alerts-tls - # hosts: - # - alertmanager.domain.com - - ## Alertmanager Deployment Strategy type - # strategy: - # type: Recreate - - ## Node tolerations for alertmanager scheduling to nodes with taints - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - - ## Node labels for alertmanager pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Pod affinity - ## - affinity: {} - - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - persistentVolume: - ## If true, alertmanager will create/use a Persistent Volume Claim - ## If false, use emptyDir - ## - enabled: true - - ## alertmanager data Persistent Volume access modes - ## Must match those of existing PV or dynamic provisioner - ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - accessModes: - - ReadWriteOnce - - ## alertmanager data Persistent Volume Claim annotations - ## - annotations: {} - - ## alertmanager data Persistent Volume existing claim name - ## Requires alertmanager.persistentVolume.enabled: true - ## If defined, PVC must be created manually before volume will be bound - existingClaim: "" - - ## alertmanager data Persistent Volume mount root path - ## - mountPath: /data - - ## alertmanager data Persistent Volume size - ## - size: 2Gi - - ## alertmanager data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - - ## Subdirectory of alertmanager data Persistent Volume to mount - ## Useful if the volume's root directory is not empty - ## - subPath: "" - - ## Annotations to be added to alertmanager pods - ## - podAnnotations: {} - - ## Use a StatefulSet if replicaCount needs to be greater than 1 (see below) - ## - replicaCount: 1 - - statefulSet: - ## If true, use a statefulset instead of a deployment for pod management. - ## This allows to scale replicas to more than 1 pod - ## - enabled: false - - podManagementPolicy: OrderedReady - - ## Alertmanager headless service to use for the statefulset - ## - headless: - annotations: {} - labels: {} - - ## Enabling peer mesh service end points for enabling the HA alert manager - ## Ref: https://github.com/prometheus/alertmanager/blob/master/README.md - # enableMeshPeer : true - - servicePort: 80 - - ## alertmanager resource requests and limits - ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - # limits: - # cpu: 10m - # memory: 32Mi - # requests: - # cpu: 10m - # memory: 32Mi - - ## Security context to be added to alertmanager pods - ## - securityContext: {} - - service: - annotations: {} - labels: {} - clusterIP: "" - - ## Enabling peer mesh service end points for enabling the HA alert manager - ## Ref: https://github.com/prometheus/alertmanager/blob/master/README.md - # enableMeshPeer : true - - ## List of IP addresses at which the alertmanager service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 80 - # nodePort: 30000 - type: ClusterIP - -## Monitors ConfigMap changes and POSTs to a URL -## Ref: https://github.com/jimmidyson/configmap-reload -## -configmapReload: - ## configmap-reload container name - ## - name: configmap-reload - - ## configmap-reload container image - ## - image: - repository: jimmidyson/configmap-reload - tag: v0.2.2 - pullPolicy: IfNotPresent - - ## Additional configmap-reload container arguments - ## - extraArgs: {} - ## Additional configmap-reload volume directories - ## - extraVolumeDirs: [] - - - ## Additional configmap-reload mounts - ## - extraConfigmapMounts: [] - # - name: prometheus-alerts - # mountPath: /etc/alerts.d - # subPath: "" - # configMap: prometheus-alerts - # readOnly: true - - - ## configmap-reload resource requests and limits - ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - -initChownData: - ## If false, data ownership will not be reset at startup - ## This allows the prometheus-server to be run with an arbitrary user - ## - enabled: true - - ## initChownData container name - ## - name: init-chown-data - - ## initChownData container image - ## - image: - repository: busybox - tag: latest - pullPolicy: IfNotPresent - - ## initChownData resource requests and limits - ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - -kubeStateMetrics: - ## If false, kube-state-metrics will not be installed - ## - enabled: true - - ## kube-state-metrics container name - ## - name: kube-state-metrics - - ## kube-state-metrics container image - ## - image: - repository: quay.io/coreos/kube-state-metrics - tag: v1.6.0 - pullPolicy: IfNotPresent - - ## kube-state-metrics priorityClassName - ## - priorityClassName: "" - - ## kube-state-metrics container arguments - ## - args: {} - - ## Node tolerations for kube-state-metrics scheduling to nodes with taints - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - - ## Node labels for kube-state-metrics pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Annotations to be added to kube-state-metrics pods - ## - podAnnotations: {} - - pod: - labels: {} - - replicaCount: 1 - - ## kube-state-metrics resource requests and limits - ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - # limits: - # cpu: 10m - # memory: 16Mi - # requests: - # cpu: 10m - # memory: 16Mi - - ## Security context to be added to kube-state-metrics pods - ## - securityContext: {} - - service: - annotations: - prometheus.io/scrape: "true" - labels: {} - - # Exposed as a headless service: - # https://kubernetes.io/docs/concepts/services-networking/service/#headless-services - clusterIP: None - - ## List of IP addresses at which the kube-state-metrics service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 80 - type: ClusterIP - -nodeExporter: - ## If false, node-exporter will not be installed - ## - enabled: true - - ## If true, node-exporter pods share the host network namespace - ## - hostNetwork: true - - ## If true, node-exporter pods share the host PID namespace - ## - hostPID: true - - ## node-exporter container name - ## - name: node-exporter - - ## node-exporter container image - ## - image: - repository: prom/node-exporter - tag: v0.18.0 - pullPolicy: IfNotPresent - - ## Specify if a Pod Security Policy for node-exporter must be created - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/ - ## - podSecurityPolicy: - enabled: False - annotations: {} - ## Specify pod annotations - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#seccomp - ## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#sysctl - ## - # seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' - # seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default' - # apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default' - - ## node-exporter priorityClassName - ## - priorityClassName: "" - - ## Custom Update Strategy - ## - updateStrategy: - type: RollingUpdate - - ## Additional node-exporter container arguments - ## - extraArgs: {} - - ## Additional node-exporter hostPath mounts - ## - extraHostPathMounts: [] - # - name: textfile-dir - # mountPath: /srv/txt_collector - # hostPath: /var/lib/node-exporter - # readOnly: true - - extraConfigmapMounts: [] - # - name: certs-configmap - # mountPath: /prometheus - # configMap: certs-configmap - # readOnly: true - - ## Node tolerations for node-exporter scheduling to nodes with taints - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - - ## Node labels for node-exporter pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Annotations to be added to node-exporter pods - ## - podAnnotations: {} - - ## Labels to be added to node-exporter pods - ## - pod: - labels: {} - - ## node-exporter resource limits & requests - ## Ref: https://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - # limits: - # cpu: 200m - # memory: 50Mi - # requests: - # cpu: 100m - # memory: 30Mi - - ## Security context to be added to node-exporter pods - ## - securityContext: {} - # runAsUser: 0 - - service: - annotations: - prometheus.io/scrape: "true" - labels: {} - - # Exposed as a headless service: - # https://kubernetes.io/docs/concepts/services-networking/service/#headless-services - clusterIP: None - - ## List of IP addresses at which the node-exporter service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - hostPort: 9100 - loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 9100 - type: ClusterIP - -server: - ## Prometheus server container name - ## - name: server - sidecarContainers: - - ## Prometheus server container image - ## - image: - repository: prom/prometheus - tag: v2.9.2 - pullPolicy: IfNotPresent - - ## prometheus server priorityClassName - ## - priorityClassName: "" - - ## The URL prefix at which the container can be accessed. Useful in the case the '-web.external-url' includes a slug - ## so that the various internal URLs are still able to access as they are in the default case. - ## (Optional) - prefixURL: "" - - ## External URL which can access alertmanager - ## Maybe same with Ingress host name - baseURL: "" - - ## Additional server container environment variables - ## - ## You specify this manually like you would a raw deployment manifest. - ## This means you can bind in environment variables from secrets. - ## - ## e.g. static environment variable: - ## - name: DEMO_GREETING - ## value: "Hello from the environment" - ## - ## e.g. secret environment variable: - ## - name: USERNAME - ## valueFrom: - ## secretKeyRef: - ## name: mysecret - ## key: username - env: {} - - ## This flag controls access to the administrative HTTP API which includes functionality such as deleting time - ## series. This is disabled by default. - enableAdminApi: false - - ## This flag controls BD locking - skipTSDBLock: false - - ## Path to a configuration file on prometheus server container FS - configPath: /etc/config/prometheus.yml - - global: - ## How frequently to scrape targets by default - ## - scrape_interval: 1m - ## How long until a scrape request times out - ## - scrape_timeout: 10s - ## How frequently to evaluate rules - ## - evaluation_interval: 1m - - ## Additional Prometheus server container arguments - ## - extraArgs: {} - - ## Additional Prometheus server Volume mounts - ## - extraVolumeMounts: [] - - ## Additional Prometheus server Volumes - ## - extraVolumes: [] - - ## Additional Prometheus server hostPath mounts - ## - extraHostPathMounts: [] - # - name: certs-dir - # mountPath: /etc/kubernetes/certs - # subPath: "" - # hostPath: /etc/kubernetes/certs - # readOnly: true - - extraConfigmapMounts: [] - # - name: certs-configmap - # mountPath: /prometheus - # subPath: "" - # configMap: certs-configmap - # readOnly: true - - ## Additional Prometheus server Secret mounts - # Defines additional mounts with secrets. Secrets must be manually created in the namespace. - extraSecretMounts: [] - # - name: secret-files - # mountPath: /etc/secrets - # subPath: "" - # secretName: prom-secret-files - # readOnly: true - - ## ConfigMap override where fullname is {{.Release.Name}}-{{.Values.server.configMapOverrideName}} - ## Defining configMapOverrideName will cause templates/server-configmap.yaml - ## to NOT generate a ConfigMap resource - ## - configMapOverrideName: "" - - ingress: - ## If true, Prometheus server Ingress will be created - ## - enabled: false - - ## Prometheus server Ingress annotations - ## - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: 'true' - - ## Prometheus server Ingress additional labels - ## - extraLabels: {} - - ## Prometheus server Ingress hostnames with optional path - ## Must be provided if Ingress is enabled - ## - hosts: [] - # - prometheus.domain.com - # - domain.com/prometheus - - ## Prometheus server Ingress TLS configuration - ## Secrets must be manually created in the namespace - ## - tls: [] - # - secretName: prometheus-server-tls - # hosts: - # - prometheus.domain.com - - ## Server Deployment Strategy type - # strategy: - # type: Recreate - - ## Node tolerations for server scheduling to nodes with taints - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - - ## Node labels for Prometheus server pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Pod affinity - ## - affinity: {} - - ## Use an alternate scheduler, e.g. "stork". - ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ - ## - # schedulerName: - - persistentVolume: - ## If true, Prometheus server will create/use a Persistent Volume Claim - ## If false, use emptyDir - ## - enabled: true - - ## Prometheus server data Persistent Volume access modes - ## Must match those of existing PV or dynamic provisioner - ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - accessModes: - - ReadWriteOnce - - ## Prometheus server data Persistent Volume annotations - ## - annotations: {} - - ## Prometheus server data Persistent Volume existing claim name - ## Requires server.persistentVolume.enabled: true - ## If defined, PVC must be created manually before volume will be bound - existingClaim: "" - - ## Prometheus server data Persistent Volume mount root path - ## - mountPath: /data - - ## Prometheus server data Persistent Volume size - ## - size: 8Gi - - ## Prometheus server data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - - ## Subdirectory of Prometheus server data Persistent Volume to mount - ## Useful if the volume's root directory is not empty - ## - subPath: "" - - emptyDir: - sizeLimit: "" - - ## Annotations to be added to Prometheus server pods - ## - podAnnotations: {} - # iam.amazonaws.com/role: prometheus - - ## Use a StatefulSet if replicaCount needs to be greater than 1 (see below) - ## - replicaCount: 1 - - statefulSet: - ## If true, use a statefulset instead of a deployment for pod management. - ## This allows to scale replicas to more than 1 pod - ## - enabled: false - - annotations: {} - podManagementPolicy: OrderedReady - - ## Alertmanager headless service to use for the statefulset - ## - headless: - annotations: {} - labels: {} - servicePort: 80 - - ## Prometheus server resource requests and limits - ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - # limits: - # cpu: 500m - # memory: 512Mi - # requests: - # cpu: 500m - # memory: 512Mi - - ## Security context to be added to server pods - ## - securityContext: {} - - service: - annotations: {} - labels: {} - clusterIP: "" - - ## List of IP addresses at which the Prometheus server service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 80 - type: ClusterIP - - ## Prometheus server pod termination grace period - ## - terminationGracePeriodSeconds: 300 - - ## Prometheus data retention period (default if not specified is 15 days) - ## - retention: "15d" - -pushgateway: - ## If false, pushgateway will not be installed - ## - enabled: true - - ## pushgateway container name - ## - name: pushgateway - - ## pushgateway container image - ## - image: - repository: prom/pushgateway - tag: v0.6.0 - pullPolicy: IfNotPresent - - ## pushgateway priorityClassName - ## - priorityClassName: "" - - ## Additional pushgateway container arguments - ## - ## for example: persistence.file: /data/pushgateway.data - extraArgs: {} - - ingress: - ## If true, pushgateway Ingress will be created - ## - enabled: false - - ## pushgateway Ingress annotations - ## - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: 'true' - - ## pushgateway Ingress hostnames with optional path - ## Must be provided if Ingress is enabled - ## - hosts: [] - # - pushgateway.domain.com - # - domain.com/pushgateway - - ## pushgateway Ingress TLS configuration - ## Secrets must be manually created in the namespace - ## - tls: [] - # - secretName: prometheus-alerts-tls - # hosts: - # - pushgateway.domain.com - - ## Node tolerations for pushgateway scheduling to nodes with taints - ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - ## - tolerations: [] - # - key: "key" - # operator: "Equal|Exists" - # value: "value" - # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - - ## Node labels for pushgateway pod assignment - ## Ref: https://kubernetes.io/docs/user-guide/node-selection/ - ## - nodeSelector: {} - - ## Annotations to be added to pushgateway pods - ## - podAnnotations: {} - - replicaCount: 1 - - ## pushgateway resource requests and limits - ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/ - ## - resources: {} - # limits: - # cpu: 10m - # memory: 32Mi - # requests: - # cpu: 10m - # memory: 32Mi - - ## Security context to be added to push-gateway pods - ## - securityContext: {} - - service: - annotations: - prometheus.io/probe: pushgateway - labels: {} - clusterIP: "" - - ## List of IP addresses at which the pushgateway service is available - ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips - ## - externalIPs: [] - - loadBalancerIP: "" - loadBalancerSourceRanges: [] - servicePort: 9091 - type: ClusterIP - - persistentVolume: - ## If true, pushgateway will create/use a Persistent Volume Claim - ## If false, use emptyDir - ## - enabled: false - - ## pushgateway data Persistent Volume access modes - ## Must match those of existing PV or dynamic provisioner - ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ - ## - accessModes: - - ReadWriteOnce - - ## pushgateway data Persistent Volume Claim annotations - ## - annotations: {} - - ## pushgateway data Persistent Volume existing claim name - ## Requires pushgateway.persistentVolume.enabled: true - ## If defined, PVC must be created manually before volume will be bound - existingClaim: "" - - ## pushgateway data Persistent Volume mount root path - ## - mountPath: /data - - ## pushgateway data Persistent Volume size - ## - size: 2Gi - - ## alertmanager data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - - ## Subdirectory of alertmanager data Persistent Volume to mount - ## Useful if the volume's root directory is not empty - ## - subPath: "" - - -## alertmanager ConfigMap entries -## -alertmanagerFiles: - alertmanager.yml: - global: {} - # slack_api_url: '' - - receivers: - - name: default-receiver - # slack_configs: - # - channel: '@you' - # send_resolved: true - - route: - group_wait: 10s - group_interval: 5m - receiver: default-receiver - repeat_interval: 3h - -## Prometheus server ConfigMap entries -## -serverFiles: - - ## Alerts configuration - ## Ref: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/ - alerts: {} - # groups: - # - name: Instances - # rules: - # - alert: InstanceDown - # expr: up == 0 - # for: 5m - # labels: - # severity: page - # annotations: - # description: '{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes.' - # summary: 'Instance {{ $labels.instance }} down' - - rules: {} - - prometheus.yml: - rule_files: - - /etc/config/rules - - /etc/config/alerts - - scrape_configs: - - job_name: prometheus - static_configs: - - targets: - - localhost:9090 - - # A scrape configuration for running Prometheus on a Kubernetes cluster. - # This uses separate scrape configs for cluster components (i.e. API server, node) - # and services to allow each to use different authentication configs. - # - # Kubernetes labels will be added as Prometheus labels on metrics via the - # `labelmap` relabeling action. - - # Scrape config for API servers. - # - # Kubernetes exposes API servers as endpoints to the default/kubernetes - # service so this uses `endpoints` role and uses relabelling to only keep - # the endpoints associated with the default/kubernetes service using the - # default named port `https`. This works for single API server deployments as - # well as HA API server deployments. - - job_name: 'kubernetes-apiservers' - - kubernetes_sd_configs: - - role: endpoints - - # Default to scraping over https. If required, just disable this or change to - # `http`. - scheme: https - - # This TLS & bearer token file config is used to connect to the actual scrape - # endpoints for cluster components. This is separate to discovery auth - # configuration because discovery & scraping are two separate concerns in - # Prometheus. The discovery auth config is automatic if Prometheus runs inside - # the cluster. Otherwise, more config options have to be provided within the - # . - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - # If your node certificates are self-signed or use a different CA to the - # master CA, then disable certificate verification below. Note that - # certificate verification is an integral part of a secure infrastructure - # so this should only be disabled in a controlled environment. You can - # disable certificate verification by uncommenting the line below. - # - insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - # Keep only the default/kubernetes service endpoints for the https port. This - # will add targets for each API server which Kubernetes adds an endpoint to - # the default/kubernetes service. - relabel_configs: - - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] - action: keep - regex: default;kubernetes;https - - - job_name: 'kubernetes-nodes' - - # Default to scraping over https. If required, just disable this or change to - # `http`. - scheme: https - - # This TLS & bearer token file config is used to connect to the actual scrape - # endpoints for cluster components. This is separate to discovery auth - # configuration because discovery & scraping are two separate concerns in - # Prometheus. The discovery auth config is automatic if Prometheus runs inside - # the cluster. Otherwise, more config options have to be provided within the - # . - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - # If your node certificates are self-signed or use a different CA to the - # master CA, then disable certificate verification below. Note that - # certificate verification is an integral part of a secure infrastructure - # so this should only be disabled in a controlled environment. You can - # disable certificate verification by uncommenting the line below. - # - insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - kubernetes_sd_configs: - - role: node - - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/$1/proxy/metrics - - - - job_name: 'kubernetes-nodes-cadvisor' - - # Default to scraping over https. If required, just disable this or change to - # `http`. - scheme: https - - # This TLS & bearer token file config is used to connect to the actual scrape - # endpoints for cluster components. This is separate to discovery auth - # configuration because discovery & scraping are two separate concerns in - # Prometheus. The discovery auth config is automatic if Prometheus runs inside - # the cluster. Otherwise, more config options have to be provided within the - # . - tls_config: - ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt - # If your node certificates are self-signed or use a different CA to the - # master CA, then disable certificate verification below. Note that - # certificate verification is an integral part of a secure infrastructure - # so this should only be disabled in a controlled environment. You can - # disable certificate verification by uncommenting the line below. - # - insecure_skip_verify: true - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token - - kubernetes_sd_configs: - - role: node - - # This configuration will work only on kubelet 1.7.3+ - # As the scrape endpoints for cAdvisor have changed - # if you are using older version you need to change the replacement to - # replacement: /api/v1/nodes/$1:4194/proxy/metrics - # more info here https://github.com/coreos/prometheus-operator/issues/633 - relabel_configs: - - action: labelmap - regex: __meta_kubernetes_node_label_(.+) - - target_label: __address__ - replacement: kubernetes.default.svc:443 - - source_labels: [__meta_kubernetes_node_name] - regex: (.+) - target_label: __metrics_path__ - replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor - - # Scrape config for service endpoints. - # - # The relabeling allows the actual service scrape endpoint to be configured - # via the following annotations: - # - # * `prometheus.io/scrape`: Only scrape services that have a value of `true` - # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need - # to set this to `https` & most likely set the `tls_config` of the scrape config. - # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. - # * `prometheus.io/port`: If the metrics are exposed on a different port to the - # service then set this appropriately. - - job_name: 'kubernetes-service-endpoints' - - kubernetes_sd_configs: - - role: endpoints - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] - action: replace - target_label: __scheme__ - regex: (https?) - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] - action: replace - target_label: __address__ - regex: ([^:]+)(?::\d+)?;(\d+) - replacement: $1:$2 - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: kubernetes_namespace - - source_labels: [__meta_kubernetes_service_name] - action: replace - target_label: kubernetes_name - - source_labels: [__meta_kubernetes_pod_node_name] - action: replace - target_label: kubernetes_node - - - job_name: 'prometheus-pushgateway' - honor_labels: true - - kubernetes_sd_configs: - - role: service - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe] - action: keep - regex: pushgateway - - # Example scrape config for probing services via the Blackbox Exporter. - # - # The relabeling allows the actual service scrape endpoint to be configured - # via the following annotations: - # - # * `prometheus.io/probe`: Only probe services that have a value of `true` - - job_name: 'kubernetes-services' - - metrics_path: /probe - params: - module: [http_2xx] - - kubernetes_sd_configs: - - role: service - - relabel_configs: - - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe] - action: keep - regex: true - - source_labels: [__address__] - target_label: __param_target - - target_label: __address__ - replacement: blackbox - - source_labels: [__param_target] - target_label: instance - - action: labelmap - regex: __meta_kubernetes_service_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - target_label: kubernetes_namespace - - source_labels: [__meta_kubernetes_service_name] - target_label: kubernetes_name - - # Example scrape config for pods - # - # The relabeling allows the actual pod scrape endpoint to be configured via the - # following annotations: - # - # * `prometheus.io/scrape`: Only scrape pods that have a value of `true` - # * `prometheus.io/path`: If the metrics path is not `/metrics` override this. - # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`. - - job_name: 'kubernetes-pods' - - kubernetes_sd_configs: - - role: pod - - relabel_configs: - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] - action: keep - regex: true - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - action: replace - regex: ([^:]+)(?::\d+)?;(\d+) - replacement: $1:$2 - target_label: __address__ - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - source_labels: [__meta_kubernetes_namespace] - action: replace - target_label: kubernetes_namespace - - source_labels: [__meta_kubernetes_pod_name] - action: replace - target_label: kubernetes_pod_name - -# adds additional scrape configs to prometheus.yml -# must be a string so you have to add a | after extraScrapeConfigs: -# example adds prometheus-blackbox-exporter scrape config -extraScrapeConfigs: - # - job_name: 'prometheus-blackbox-exporter' - # metrics_path: /probe - # params: - # module: [http_2xx] - # static_configs: - # - targets: - # - https://example.com - # relabel_configs: - # - source_labels: [__address__] - # target_label: __param_target - # - source_labels: [__param_target] - # target_label: instance - # - target_label: __address__ - # replacement: prometheus-blackbox-exporter:9115 - -networkPolicy: - ## Enable creation of NetworkPolicy resources. - ## - enabled: false diff --git a/sources/loki/helm/loki-stack/charts/promtail/.helmignore b/sources/loki/helm/loki-stack/charts/promtail/.helmignore deleted file mode 100644 index 50af0317..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/.helmignore +++ /dev/null @@ -1,22 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/sources/loki/helm/loki-stack/charts/promtail/Chart.yaml b/sources/loki/helm/loki-stack/charts/promtail/Chart.yaml deleted file mode 100644 index a86a765a..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -appVersion: 0.0.1 -description: Responsible for gathering logs and sending them to Loki -engine: gotpl -home: https://grafana.com/loki -icon: https://github.com/grafana/loki/raw/master/docs/logo.png -kubeVersion: ^1.10.0-0 -maintainers: -- email: lokiproject@googlegroups.com - name: Loki Maintainers -name: promtail -sources: -- https://github.com/grafana/loki -version: 0.8.1 diff --git a/sources/loki/helm/loki-stack/charts/promtail/templates/NOTES.txt b/sources/loki/helm/loki-stack/charts/promtail/templates/NOTES.txt deleted file mode 100644 index 82df065f..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Verify the application is working by running these commands: - kubectl --namespace {{ .Release.Namespace }} port-forward daemonset/{{ include "promtail.fullname" . }} {{ .Values.port }} - curl http://127.0.0.1:{{ .Values.port }}/metrics \ No newline at end of file diff --git a/sources/loki/helm/loki-stack/charts/promtail/templates/_helpers.tpl b/sources/loki/helm/loki-stack/charts/promtail/templates/_helpers.tpl deleted file mode 100644 index c270b0b2..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "promtail.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "promtail.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "promtail.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account -*/}} -{{- define "promtail.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "promtail.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -The service name to connect to Loki. Defaults to the same logic as "loki.fullname" -*/}} -{{- define "loki.serviceName" -}} -{{- if .Values.loki.serviceName -}} -{{- .Values.loki.serviceName -}} -{{- else if .Values.loki.fullnameOverride -}} -{{- .Values.loki.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default "loki" .Values.loki.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - diff --git a/sources/loki/helm/loki-stack/charts/promtail/templates/clusterrole.yaml b/sources/loki/helm/loki-stack/charts/promtail/templates/clusterrole.yaml deleted file mode 100644 index b872041b..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/templates/clusterrole.yaml +++ /dev/null @@ -1,20 +0,0 @@ -{{- if .Values.rbac.create }} -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - labels: - app: {{ template "promtail.name" . }} - chart: {{ template "promtail.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - name: {{ template "promtail.fullname" . }}-clusterrole -rules: -- apiGroups: [""] # "" indicates the core API group - resources: - - nodes - - nodes/proxy - - services - - endpoints - - pods - verbs: ["get", "watch", "list"] -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/promtail/templates/clusterrolebinding.yaml b/sources/loki/helm/loki-stack/charts/promtail/templates/clusterrolebinding.yaml deleted file mode 100644 index 2b739457..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.rbac.create }} -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "promtail.fullname" . }}-clusterrolebinding - labels: - app: {{ template "promtail.name" . }} - chart: {{ template "promtail.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -subjects: - - kind: ServiceAccount - name: {{ template "promtail.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: {{ template "promtail.fullname" . }}-clusterrole - apiGroup: rbac.authorization.k8s.io -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/promtail/templates/configmap.yaml b/sources/loki/helm/loki-stack/charts/promtail/templates/configmap.yaml deleted file mode 100644 index 68dad71d..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/templates/configmap.yaml +++ /dev/null @@ -1,263 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "promtail.fullname" . }} - labels: - app: {{ template "promtail.name" . }} - chart: {{ template "promtail.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - promtail.yaml: | - {{- toYaml .Values.config | nindent 4 }} - scrape_configs: - {{- if .Values.scrapeConfigs }} - {{- toYaml .Values.scrapeConfigs | nindent 4 }} - {{- else }} - - job_name: kubernetes-pods-name - pipeline_stages: - {{- toYaml .Values.pipelineStages | nindent 8 }} - kubernetes_sd_configs: - - role: pod - relabel_configs: - - source_labels: - - __meta_kubernetes_pod_label_name - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_uid - - __meta_kubernetes_pod_container_name - target_label: __path__ - - job_name: kubernetes-pods-app - pipeline_stages: - {{- toYaml .Values.pipelineStages | nindent 8 }} - kubernetes_sd_configs: - - role: pod - relabel_configs: - - action: drop - regex: .+ - source_labels: - - __meta_kubernetes_pod_label_name - - source_labels: - - __meta_kubernetes_pod_label_app - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_uid - - __meta_kubernetes_pod_container_name - target_label: __path__ - - job_name: kubernetes-pods-direct-controllers - pipeline_stages: - {{- toYaml .Values.pipelineStages | nindent 8 }} - kubernetes_sd_configs: - - role: pod - relabel_configs: - - action: drop - regex: .+ - separator: '' - source_labels: - - __meta_kubernetes_pod_label_name - - __meta_kubernetes_pod_label_app - - action: drop - regex: ^([0-9a-z-.]+)(-[0-9a-f]{8,10})$ - source_labels: - - __meta_kubernetes_pod_controller_name - - source_labels: - - __meta_kubernetes_pod_controller_name - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_uid - - __meta_kubernetes_pod_container_name - target_label: __path__ - - job_name: kubernetes-pods-indirect-controller - pipeline_stages: - {{- toYaml .Values.pipelineStages | nindent 8 }} - kubernetes_sd_configs: - - role: pod - relabel_configs: - - action: drop - regex: .+ - separator: '' - source_labels: - - __meta_kubernetes_pod_label_name - - __meta_kubernetes_pod_label_app - - action: keep - regex: ^([0-9a-z-.]+)(-[0-9a-f]{8,10})$ - source_labels: - - __meta_kubernetes_pod_controller_name - - action: replace - regex: ^([0-9a-z-.]+)(-[0-9a-f]{8,10})$ - source_labels: - - __meta_kubernetes_pod_controller_name - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_uid - - __meta_kubernetes_pod_container_name - target_label: __path__ - - job_name: kubernetes-pods-static - pipeline_stages: - {{- toYaml .Values.pipelineStages | nindent 8 }} - kubernetes_sd_configs: - - role: pod - relabel_configs: - - action: drop - regex: ^$ - source_labels: - - __meta_kubernetes_pod_annotation_kubernetes_io_config_mirror - - action: replace - source_labels: - - __meta_kubernetes_pod_label_component - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_annotation_kubernetes_io_config_mirror - - __meta_kubernetes_pod_container_name - target_label: __path__ - {{- end }} diff --git a/sources/loki/helm/loki-stack/charts/promtail/templates/daemonset.yaml b/sources/loki/helm/loki-stack/charts/promtail/templates/daemonset.yaml deleted file mode 100644 index e5923b1e..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/templates/daemonset.yaml +++ /dev/null @@ -1,95 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: {{ template "promtail.fullname" . }} - labels: - app: {{ template "promtail.name" . }} - chart: {{ template "promtail.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - annotations: - {{- toYaml .Values.annotations | nindent 4 }} -spec: - selector: - matchLabels: - app: {{ template "promtail.name" . }} - release: {{ .Release.Name }} - updateStrategy: - type: {{ .Values.deploymentStrategy }} - {{- if ne .Values.deploymentStrategy "RollingUpdate" }} - rollingUpdate: null - {{- end }} - template: - metadata: - labels: - app: {{ template "promtail.name" . }} - release: {{ .Release.Name }} - {{- with .Values.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - annotations: - checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- with .Values.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ template "promtail.serviceAccountName" . }} - {{- if .Values.priorityClassName }} - priorityClassName: {{ .Values.priorityClassName }} - {{- end }} - containers: - - name: promtail - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - args: - - "-config.file=/etc/promtail/promtail.yaml" - {{- if and .Values.loki.user .Values.loki.password }} - - "-client.url={{ .Values.loki.serviceScheme }}://{{ .Values.loki.user }}:{{ .Values.loki.password }}@{{ include "loki.serviceName" . }}:{{ .Values.loki.servicePort }}/api/prom/push" - {{- else }} - - "-client.url={{ .Values.loki.serviceScheme }}://{{ include "loki.serviceName" . }}:{{ .Values.loki.servicePort }}/api/prom/push" - {{- end }} - volumeMounts: - - name: config - mountPath: /etc/promtail - - name: run - mountPath: /run/promtail - {{- with .Values.volumeMounts }} - {{- toYaml . | nindent 12 }} - {{- end }} - env: - - name: HOSTNAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - ports: - - containerPort: {{ .Values.config.server.http_listen_port }} - name: http-metrics - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - {{- if .Values.livenessProbe }} - livenessProbe: - {{- toYaml .Values.livenessProbe | nindent 12 }} - {{- end }} - {{- if .Values.readinessProbe }} - readinessProbe: - {{- toYaml .Values.readinessProbe | nindent 12 }} - {{- end }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - nodeSelector: - {{- toYaml .Values.nodeSelector | nindent 8 }} - affinity: - {{- toYaml .Values.affinity | nindent 8 }} - tolerations: - {{- toYaml .Values.tolerations | nindent 8 }} - volumes: - - name: config - configMap: - name: {{ template "promtail.fullname" . }} - - name: run - hostPath: - path: /run/promtail - {{- with .Values.volumes }} - {{- toYaml . | nindent 8 }} - {{- end }} - diff --git a/sources/loki/helm/loki-stack/charts/promtail/templates/podsecuritypolicy.yaml b/sources/loki/helm/loki-stack/charts/promtail/templates/podsecuritypolicy.yaml deleted file mode 100644 index a38595ee..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/templates/podsecuritypolicy.yaml +++ /dev/null @@ -1,32 +0,0 @@ -{{- if .Values.rbac.pspEnabled }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "promtail.fullname" . }} - labels: - app: {{ template "promtail.name" . }} - chart: {{ template "promtail.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -spec: - privileged: false - allowPrivilegeEscalation: false - volumes: - - 'secret' - - 'configMap' - - 'hostPath' - hostNetwork: false - hostIPC: false - hostPID: false - runAsUser: - rule: 'RunAsAny' - seLinux: - rule: 'RunAsAny' - supplementalGroups: - rule: 'RunAsAny' - fsGroup: - rule: 'RunAsAny' - readOnlyRootFilesystem: true - requiredDropCapabilities: - - ALL - {{- end }} diff --git a/sources/loki/helm/loki-stack/charts/promtail/templates/role.yaml b/sources/loki/helm/loki-stack/charts/promtail/templates/role.yaml deleted file mode 100644 index 97969e1a..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/templates/role.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ template "promtail.fullname" . }} - labels: - app: {{ template "promtail.name" . }} - chart: {{ template "promtail.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -{{- if .Values.rbac.pspEnabled }} -rules: -- apiGroups: ['extensions'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: [{{ template "promtail.fullname" . }}] -{{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/charts/promtail/templates/rolebinding.yaml b/sources/loki/helm/loki-stack/charts/promtail/templates/rolebinding.yaml deleted file mode 100644 index ff99f2a9..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/templates/rolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ template "promtail.fullname" . }} - labels: - app: {{ template "promtail.name" . }} - chart: {{ template "promtail.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "promtail.fullname" . }} -subjects: -- kind: ServiceAccount - name: {{ template "promtail.serviceAccountName" . }} -{{- end }} - diff --git a/sources/loki/helm/loki-stack/charts/promtail/templates/serviceaccount.yaml b/sources/loki/helm/loki-stack/charts/promtail/templates/serviceaccount.yaml deleted file mode 100644 index 8165e08d..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - app: {{ template "promtail.name" . }} - chart: {{ template "promtail.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} - name: {{ template "promtail.serviceAccountName" . }} -{{- end }} - diff --git a/sources/loki/helm/loki-stack/charts/promtail/values.yaml b/sources/loki/helm/loki-stack/charts/promtail/values.yaml deleted file mode 100644 index 884e7298..00000000 --- a/sources/loki/helm/loki-stack/charts/promtail/values.yaml +++ /dev/null @@ -1,126 +0,0 @@ -## Affinity for pod assignment -## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -affinity: {} - -annotations: {} - -deploymentStrategy: RollingUpdate - -image: - repository: grafana/promtail - tag: v0.1.0 - pullPolicy: IfNotPresent - -livenessProbe: {} - -loki: - serviceName: "" # Defaults to "${RELEASE}-loki" if not set - servicePort: 3100 - serviceScheme: http - # user: user - # password: pass - -nameOverride: promtail - -## Node labels for pod assignment -## ref: https://kubernetes.io/docs/user-guide/node-selection/ -nodeSelector: {} - -pipelineStages: -- docker: {} - -## Pod Labels -podLabels: {} - -podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "http-metrics" - -## Assign a PriorityClassName to pods if set -# priorityClassName: - -rbac: - create: true - pspEnabled: true - -readinessProbe: - failureThreshold: 5 - httpGet: - path: /ready - port: http-metrics - initialDelaySeconds: 10 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 1 - -resources: {} -# limits: -# cpu: 200m -# memory: 128Mi -# requests: -# cpu: 100m -# memory: 128Mi - -# Custom scrape_configs to override the default ones in the configmap -scrapeConfigs: [] - -securityContext: - readOnlyRootFilesystem: true - runAsGroup: 0 - runAsUser: 0 - -serviceAccount: - create: true - name: - -## Tolerations for pod assignment -## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -tolerations: -- key: node-role.kubernetes.io/master - effect: NoSchedule - -# Extra volumes to scrape logs from -volumes: -- name: docker - hostPath: - path: /var/lib/docker/containers -- name: pods - hostPath: - path: /var/log/pods - -volumeMounts: -- name: docker - mountPath: /var/lib/docker/containers - readOnly: true -- name: pods - mountPath: /var/log/pods - readOnly: true - -config: - client: - # Maximum wait period before sending batch - batchwait: 1s - # Maximum batch size to accrue before sending, unit is byte - batchsize: 102400 - - # Maximum time to wait for server to respond to a request - timeout: 10s - - backoff_config: - # Initial backoff time between retries - minbackoff: 100ms - # Maximum backoff time between retries - maxbackoff: 5s - # Maximum number of retires when sending batches, 0 means infinite retries - maxretries: 5 - - # The labels to add to any time series or alerts when communicating with loki - external_labels: {} - - server: - http_listen_port: 3101 - positions: - filename: /run/promtail/positions.yaml - target_config: - # Period to resync directories being watched and files being tailed - sync_period: 10s diff --git a/sources/loki/helm/loki-stack/requirements.lock b/sources/loki/helm/loki-stack/requirements.lock deleted file mode 100644 index a05d3a5d..00000000 --- a/sources/loki/helm/loki-stack/requirements.lock +++ /dev/null @@ -1,15 +0,0 @@ -dependencies: -- name: loki - repository: file://../loki - version: 0.10.0 -- name: promtail - repository: file://../promtail - version: 0.8.1 -- name: grafana - repository: https://kubernetes-charts.storage.googleapis.com/ - version: 3.4.3 -- name: prometheus - repository: https://kubernetes-charts.storage.googleapis.com/ - version: 8.11.6 -digest: sha256:56ec74e718c0340dc9ae5566e1b8a10a5a6314e3fbab087115d22bdc52e730e7 -generated: 2019-07-05T13:53:58.83092587Z diff --git a/sources/loki/helm/loki-stack/requirements.yaml b/sources/loki/helm/loki-stack/requirements.yaml deleted file mode 100644 index 2554a0ee..00000000 --- a/sources/loki/helm/loki-stack/requirements.yaml +++ /dev/null @@ -1,17 +0,0 @@ -dependencies: -- name: "loki" - condition: loki.enabled - repository: "file://../loki" - version: "^0.6.0" -- name: "promtail" - condition: promtail.enabled - repository: "file://../promtail" - version: "^0.6.0" -- name: "grafana" - condition: grafana.enabled - version: "~3.4.3" - repository: "https://kubernetes-charts.storage.googleapis.com/" -- name: "prometheus" - condition: prometheus.enabled - version: "~8.11.2" - repository: "https://kubernetes-charts.storage.googleapis.com/" \ No newline at end of file diff --git a/sources/loki/helm/loki-stack/templates/NOTES.txt b/sources/loki/helm/loki-stack/templates/NOTES.txt deleted file mode 100644 index d9cdccbe..00000000 --- a/sources/loki/helm/loki-stack/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -The Loki stack has been deployed to your cluster. Loki can now be added as a datasource in Grafana. - -See http://docs.grafana.org/features/datasources/loki/ for more detail. diff --git a/sources/loki/helm/loki-stack/templates/_helpers.tpl b/sources/loki/helm/loki-stack/templates/_helpers.tpl deleted file mode 100644 index 9c9e5176..00000000 --- a/sources/loki/helm/loki-stack/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "loki-stack.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "loki-stack.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "loki-stack.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/sources/loki/helm/loki-stack/templates/datasources.yaml b/sources/loki/helm/loki-stack/templates/datasources.yaml deleted file mode 100644 index 581bd589..00000000 --- a/sources/loki/helm/loki-stack/templates/datasources.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if and .Values.grafana.enabled .Values.grafana.sidecar.datasources.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "loki-stack.fullname" . }} - labels: - app: {{ template "loki-stack.name" . }} - chart: {{ template "loki-stack.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - grafana_datasource: "1" -data: - loki-stack-datasource.yaml: |- - apiVersion: 1 - datasources: -{{- if .Values.loki.enabled }} - - name: Loki - type: loki - access: proxy - url: http://{{(include "loki.serviceName" .)}}:{{ .Values.loki.service.port }} - version: 1 -{{- end }} -{{- if .Values.prometheus.enabled }} - - name: Prometheus - type: prometheus - access: proxy - url: http://{{ .Values.prometheus.server.fullnameOverride }}:{{ .Values.prometheus.server.service.servicePort }} - version: 1 -{{- end }} -{{- end }} diff --git a/sources/loki/helm/loki-stack/templates/tests/loki-test-configmap.yaml b/sources/loki/helm/loki-stack/templates/tests/loki-test-configmap.yaml deleted file mode 100644 index 205fd774..00000000 --- a/sources/loki/helm/loki-stack/templates/tests/loki-test-configmap.yaml +++ /dev/null @@ -1,42 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "loki-stack.fullname" . }}-test - labels: - app: {{ template "loki-stack.name" . }} - chart: {{ template "loki-stack.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - test.sh: | - #!/usr/bin/env bash - - LOKI_URI="http://${LOKI_SERVICE}:${LOKI_PORT}" - - function setup() { - apk add -u curl jq - until (curl -s ${LOKI_URI}/api/prom/label/app/values | jq -e '.values[] | select(. == "loki")'); do - sleep 1 - done - } - - @test "Has labels" { - curl -s ${LOKI_URI}/api/prom/label | \ - jq -e '.values[] | select(. == "app")' - } - - @test "Query log entry" { - curl -sG ${LOKI_URI}/api/prom/query?limit=10 --data-urlencode 'query={app="loki"}' | \ - jq -e '.streams[].entries | length >= 1' - } - - @test "Push log entry" { - local timestamp=$(date -Iseconds -u | sed 's/UTC/.000000000+00:00/') - local data=$(jq -n --arg timestamp "${timestamp}" '{"streams": [{"labels": "{app=\"loki-test\"}", "entries": [{"ts": $timestamp, "line": "foobar"}]}]}') - - curl -s -X POST -H "Content-Type: application/json" ${LOKI_URI}/api/prom/push -d "${data}" - - curl -sG ${LOKI_URI}/api/prom/query?limit=1 --data-urlencode 'query={app="loki-test"}' | \ - jq -e '.streams[].entries[].line == "foobar"' - } - diff --git a/sources/loki/helm/loki-stack/templates/tests/loki-test-pod.yaml b/sources/loki/helm/loki-stack/templates/tests/loki-test-pod.yaml deleted file mode 100644 index a153a05d..00000000 --- a/sources/loki/helm/loki-stack/templates/tests/loki-test-pod.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - annotations: - "helm.sh/hook": test-success - labels: - app: {{ template "loki-stack.name" . }} - chart: {{ template "loki-stack.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - name: {{ template "loki-stack.fullname" . }}-test -spec: - containers: - - name: test - image: bats/bats:v1.1.0 - args: - - /var/lib/loki/test.sh - env: - - name: LOKI_SERVICE - value: {{ template "loki.serviceName" . }} - - name: LOKI_PORT - value: "{{ .Values.loki.service.port }}" - volumeMounts: - - name: tests - mountPath: /var/lib/loki - restartPolicy: Never - volumes: - - name: tests - configMap: - name: {{ template "loki-stack.fullname" . }}-test diff --git a/sources/loki/helm/loki-stack/values.yaml b/sources/loki/helm/loki-stack/values.yaml deleted file mode 100644 index 3da8751e..00000000 --- a/sources/loki/helm/loki-stack/values.yaml +++ /dev/null @@ -1,16 +0,0 @@ -loki: - enabled: true - -promtail: - enabled: true - -grafana: - enabled: false - sidecar: - datasources: - enabled: true - -prometheus: - enabled: false - server: - fullnameOverride: prometheus-server diff --git a/sources/loki/helm/values.yaml b/sources/loki/helm/values.yaml deleted file mode 100644 index 3da8751e..00000000 --- a/sources/loki/helm/values.yaml +++ /dev/null @@ -1,16 +0,0 @@ -loki: - enabled: true - -promtail: - enabled: true - -grafana: - enabled: false - sidecar: - datasources: - enabled: true - -prometheus: - enabled: false - server: - fullnameOverride: prometheus-server diff --git a/sources/loki/overlay/kustomization.yaml b/sources/loki/overlay/kustomization.yaml deleted file mode 100644 index a921f792..00000000 --- a/sources/loki/overlay/kustomization.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: loki -commonLabels: - app.kubernetes.io/part-of: loki - -bases: -- ../base - -patchesStrategicMerge: -- ./promtail-config.yaml \ No newline at end of file diff --git a/sources/loki/overlay/promtail-config.yaml b/sources/loki/overlay/promtail-config.yaml deleted file mode 100644 index 03b0633a..00000000 --- a/sources/loki/overlay/promtail-config.yaml +++ /dev/null @@ -1,274 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: loki-promtail -data: - promtail.yaml: | - client: - backoff_config: - maxbackoff: 5s - maxretries: 5 - minbackoff: 100ms - batchsize: 102400 - batchwait: 1s - external_labels: {} - timeout: 10s - positions: - filename: /run/promtail/positions.yaml - server: - http_listen_port: 3101 - target_config: - sync_period: 10s - - scrape_configs: - - job_name: kubernetes-pods-name - pipeline_stages: - - cri: {} - - kubernetes_sd_configs: - - role: pod - relabel_configs: - - source_labels: - - __meta_kubernetes_pod_label_name - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_uid - - __meta_kubernetes_pod_container_name - target_label: __path__ - - job_name: kubernetes-pods-app - pipeline_stages: - - cri: {} - - kubernetes_sd_configs: - - role: pod - relabel_configs: - - action: drop - regex: .+ - source_labels: - - __meta_kubernetes_pod_label_name - - source_labels: - - __meta_kubernetes_pod_label_app - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_uid - - __meta_kubernetes_pod_container_name - target_label: __path__ - - job_name: kubernetes-pods-direct-controllers - pipeline_stages: - - cri: {} - - kubernetes_sd_configs: - - role: pod - relabel_configs: - - action: drop - regex: .+ - separator: '' - source_labels: - - __meta_kubernetes_pod_label_name - - __meta_kubernetes_pod_label_app - - action: drop - regex: ^([0-9a-z-.]+)(-[0-9a-f]{8,10})$ - source_labels: - - __meta_kubernetes_pod_controller_name - - source_labels: - - __meta_kubernetes_pod_controller_name - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_uid - - __meta_kubernetes_pod_container_name - target_label: __path__ - - job_name: kubernetes-pods-indirect-controller - pipeline_stages: - - cri: {} - - kubernetes_sd_configs: - - role: pod - relabel_configs: - - action: drop - regex: .+ - separator: '' - source_labels: - - __meta_kubernetes_pod_label_name - - __meta_kubernetes_pod_label_app - - action: keep - regex: ^([0-9a-z-.]+)(-[0-9a-f]{8,10})$ - source_labels: - - __meta_kubernetes_pod_controller_name - - action: replace - regex: ^([0-9a-z-.]+)(-[0-9a-f]{8,10})$ - source_labels: - - __meta_kubernetes_pod_controller_name - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_uid - - __meta_kubernetes_pod_container_name - target_label: __path__ - - job_name: kubernetes-pods-static - pipeline_stages: - - cri: {} - - kubernetes_sd_configs: - - role: pod - relabel_configs: - - action: drop - regex: ^$ - source_labels: - - __meta_kubernetes_pod_annotation_kubernetes_io_config_mirror - - action: replace - source_labels: - - __meta_kubernetes_pod_label_component - target_label: __service__ - - source_labels: - - __meta_kubernetes_pod_node_name - target_label: __host__ - - action: drop - regex: ^$ - source_labels: - - __service__ - - action: replace - replacement: $1 - separator: / - source_labels: - - __meta_kubernetes_namespace - - __service__ - target_label: job - - action: replace - source_labels: - - __meta_kubernetes_namespace - target_label: namespace - - action: replace - source_labels: - - __meta_kubernetes_pod_name - target_label: instance - - action: replace - source_labels: - - __meta_kubernetes_pod_container_name - target_label: container_name - - action: labelmap - regex: __meta_kubernetes_pod_label_(.+) - - replacement: /var/log/pods/*$1/*.log - separator: / - source_labels: - - __meta_kubernetes_pod_annotation_kubernetes_io_config_mirror - - __meta_kubernetes_pod_container_name - target_label: __path__ diff --git a/sources/meine-stadt-transparent/README.md b/sources/meine-stadt-transparent/README.md deleted file mode 100644 index 7915e360..00000000 --- a/sources/meine-stadt-transparent/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Meine Stadt Transparent - -Kubernetes deployment for [https://github.com/meine-stadt-transparent/meine-stadt-transparent](https://github.com/meine-stadt-transparent/meine-stadt-transparent) - -## Todo - -- Figure out why elasticsearch uses admin:admin - -## Instructions - -- Use the `secrets/*.env-example` files to create service secrets in the `secrets` folder. Fill your newly created files with random strings -- Install [`certstrap`](https://github.com/square/certstrap/releases/tag/v1.2.0) -- Generate certificates for elasticsearch with the script `make-elasticsearch-certs.sh` - - -Then: - -```bash -kubectl create namespace meine-stadt-transparent -kustomize build . | kubectl -n meine-stadt-transparent apply -f - -``` - -## Image pull secret - -``` -kubectl -n meine-stadt-transparent create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username= --docker-password= --docker-email= -``` - -## Initial scrape - -``` -kubectl -n meine-stadt-transparent create job initial-scrape --from=cronjob/sessionnet-scraper -``` - -## Map shows Japan - -Find your Gemeindeschlüssel - -``` -kubectl -n meine-stadt-transparent exec deployments/meine-stadt-transparent .venv/bin/python manage.py import_outline 1 --ags -kubectl -n meine-stadt-transparent exec deployments/meine-stadt-transparent .venv/bin/python manage.py import_streets 1 --ags -``` diff --git a/sources/meine-stadt-transparent/configs/meine-stadt-transparent.env-example b/sources/meine-stadt-transparent/configs/meine-stadt-transparent.env-example deleted file mode 100644 index e21047e6..00000000 --- a/sources/meine-stadt-transparent/configs/meine-stadt-transparent.env-example +++ /dev/null @@ -1,10 +0,0 @@ -DEBUG=False -REAL_HOST=meine-stadt-transparent.codeformuenster.org -SITE_NAME=Meine Stadt Transparent -LANGUAGE_CODE=de-de -TIME_ZONE=Europe/Berlin -ELASTICSEARCH_LANG=german -ELASTICSEARCH_URL=elasticsearch-master:9200 -MINIO_HOST=minio:9000 -STATIC_ROOT=/static -ELASTICSEARCH_TIMEOUT=30 diff --git a/sources/meine-stadt-transparent/configs/nginx-http.conf b/sources/meine-stadt-transparent/configs/nginx-http.conf deleted file mode 100644 index 59fff2a0..00000000 --- a/sources/meine-stadt-transparent/configs/nginx-http.conf +++ /dev/null @@ -1,24 +0,0 @@ -server { - listen 80; - listen [::]:80; - server_name meine-stadt-transparent.codeformuenster.org; - - # The actual application - location / { - proxy_set_header Host $http_host; - proxy_pass http://meine-stadt-transparent:8000; - } - - # Static assets such as css and js - location /static { - rewrite ^/static/(.*) /$1 break; - root /static; - } - - # Files stored by minio - location /file-content/ { - proxy_set_header Host $http_host; - proxy_pass http://minio:9000; - rewrite /file-content/(.*) /meine-stadt-transparent-files/$1 break; - } -} diff --git a/sources/meine-stadt-transparent/elasticsearch_patch.yaml b/sources/meine-stadt-transparent/elasticsearch_patch.yaml deleted file mode 100644 index b3b1952a..00000000 --- a/sources/meine-stadt-transparent/elasticsearch_patch.yaml +++ /dev/null @@ -1,79 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: elasticsearch-master-config -data: - elasticsearch.yml: | - path.data: /usr/share/elasticsearch/data - - opendistro_security: - disabled: true - allow_default_init_securityindex: true - ssl.transport.enabled: true - ssl.transport.enforce_hostname_verification: false - ssl.transport.pemtrustedcas_filepath: root-ca.pem - ssl.transport.pemcert_filepath: node.pem - ssl.transport.pemkey_filepath: node-key.pem - ssl.http.enabled: false - nodes_dn: - - "CN=elasticsearch,O=cfm,L=ms,ST=nrw,C=DE" - authcz.admin_dn: - - "CN=admin,O=cfm,L=ms,ST=nrw,C=DE" - - ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: elasticsearch-master -spec: - replicas: 1 # for single node cluster - template: - spec: - containers: - - name: elasticsearch - env: - - name: ELASTIC_USERNAME - value: null - valueFrom: - secretKeyRef: - name: elasticsearch-passwords - key: username - - name: ELASTIC_PASSWORD - value: null - valueFrom: - secretKeyRef: - name: elasticsearch-passwords - key: password - - name: ES_JAVA_OPTS - #value: "-Xmx1g -Xms1g" - # special `-D` settings needed for the performance_analyzer to start: - value: |- - -Xmx1g - -Xms1g - -Djava.security.policy=file:///usr/share/elasticsearch/plugins/opendistro_performance_analyzer/pa_config/es_security.policy - -Dclk.tck=100 - -Djdk.attach.allowAttachSelf=true - - name: cluster.initial_master_nodes - value: null - - name: discovery.type # for single node k8s cluster - value: single-node - volumeMounts: - - name: elasticsearch-certificates - mountPath: /usr/share/elasticsearch/config/root-ca.pem - subPath: root-ca.pem - readOnly: true - - name: elasticsearch-certificates - mountPath: /usr/share/elasticsearch/config/node-key.pem - subPath: node-key.pem - readOnly: true - - name: elasticsearch-certificates - mountPath: /usr/share/elasticsearch/config/node.pem - subPath: node.pem - readOnly: true - volumes: - - name: elasticsearch-certificates - secret: - secretName: elasticsearch-certificates - defaultMode: 0600 diff --git a/sources/meine-stadt-transparent/kustomization.yaml b/sources/meine-stadt-transparent/kustomization.yaml deleted file mode 100644 index 507976b3..00000000 --- a/sources/meine-stadt-transparent/kustomization.yaml +++ /dev/null @@ -1,76 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: meine-stadt-transparent -commonLabels: - app.kubernetes.io/part-of: meine-stadt-transparent - -resources: -- github.com/codeformuenster/kustomized//minio?ref=1e7ba4237e771b4281c0df468bd7177d3db15511 -- github.com/codeformuenster/kustomized//elasticsearch?ref=1e7ba4237e771b4281c0df468bd7177d3db15511 -- github.com/codeformuenster/kustomized//mariadb?ref=1e7ba4237e771b4281c0df468bd7177d3db15511 - -- ./meine-stadt-transparent.yaml -- ./nginx.yaml -- ./scraping.yaml - -patchesStrategicMerge: -- ./elasticsearch_patch.yaml -- ./minio_pvc_patch.yaml - -configMapGenerator: -- name: nginx-config - behavior: create - files: - - nginx.conf=./configs/nginx-http.conf -- name: mariadb-env-vars - behavior: replace - literals: - - user=meine-stadt-transparent - - database=meine-stadt-transparent -- name: meine-stadt-transparent-dot-env - behavior: create - files: - - .env=./configs/meine-stadt-transparent.env - -secretGenerator: -- name: minio - behavior: replace - envs: - - ./secrets/minio.env -- name: mariadb-passwords - behavior: replace - envs: - - ./secrets/mariadb.env -- name: elasticsearch-passwords - behavior: create - envs: - - ./secrets/elasticsearch.env -- name: elasticsearch-certificates - behavior: create - files: - - root-ca.pem=./secrets/certificates/elasticsearch-ca.crt - - node.pem=./secrets/certificates/elasticsearch.crt - - node-key.pem=./secrets/certificates/elasticsearch-pk8.key -- name: meine-stadt-transparent-secrets - behavior: create - envs: - - ./secrets/meine-stadt-transparent.env - - -images: -- name: nginx - newTag: 1.18-alpine -- name: minio/minio - newTag: RELEASE.2020-10-03T02-19-42Z -- name: mariadb - newTag: 10.4.14 -- name: konstin2/scrape-session - newTag: v0.1.16 -- name: konstin2/meine-stadt-transparent - newTag: v0.2.9 - # newName: quay.io/codeformuenster/meine-stadt-transparent-customization - # digest: sha256:bb19fc3f870612570cb1e118c97d752412d0d5cd552f4cba226b0a61f3ba6d2f - #newTag: v0.2.5 - #- name: quay.io/codeformuenster/meine-stadt-transparent-customization - # digest: sha256:c3c31b9fa459881e14bc91e48b4a3fdc85c85d89117ed55481d20c23ec1d87c0 diff --git a/sources/meine-stadt-transparent/make-elasticsearch-certs.sh b/sources/meine-stadt-transparent/make-elasticsearch-certs.sh deleted file mode 100755 index 455fdbff..00000000 --- a/sources/meine-stadt-transparent/make-elasticsearch-certs.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -e - -certificates_path=secrets/certificates -# don't change these unless you're changing the `nodes_dn` in `elasticsearch.yml` as well -CN=elasticsearch -O=cfm -L=ms -ST=nrw -C=DE - -#common_opts= --passphrase "" --key-bits 2048 --cn "${CN}" --organization "${O}" --locality "${L}" --province "${ST}" --country "${C}" - -# generate CA -certstrap --depot-path "${certificates_path}" init --expires "10 years" --passphrase "" --key-bits 2048 --cn "${CN}-ca" --organization "${O}" --locality "${L}" --province "${ST}" --country "${C}" -# generate Cert -certstrap --depot-path "${certificates_path}" request-cert --passphrase "" --key-bits 2048 --cn "${CN}" --organization "${O}" --locality "${L}" --province "${ST}" --country "${C}" -# Sign it -certstrap --depot-path "${certificates_path}" sign --CA "${CN}-ca" --expires "10 years" "${CN}" -# Convert key -openssl pkcs8 -v1 "PBE-SHA1-3DES" -in "${certificates_path}/${CN}.key" -topk8 -out "$certificates_path/${CN}-pk8.key" -nocrypt diff --git a/sources/meine-stadt-transparent/meine-stadt-transparent.yaml b/sources/meine-stadt-transparent/meine-stadt-transparent.yaml deleted file mode 100644 index df47859c..00000000 --- a/sources/meine-stadt-transparent/meine-stadt-transparent.yaml +++ /dev/null @@ -1,117 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: meine-stadt-transparent - labels: - app.kubernetes.io/name: meine-stadt-transparent - app.kubernetes.io/component: django -spec: - ports: - - port: 8000 - selector: - app.kubernetes.io/name: meine-stadt-transparent - app.kubernetes.io/component: django - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: meine-stadt-transparent - labels: - app.kubernetes.io/name: meine-stadt-transparent - app.kubernetes.io/component: django -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: meine-stadt-transparent - app.kubernetes.io/component: django - template: - metadata: - labels: - app.kubernetes.io/name: meine-stadt-transparent - app.kubernetes.io/component: django - spec: - volumes: - - name: dotenv - configMap: - name: meine-stadt-transparent-dot-env - initContainers: - - name: django-migrate - image: konstin2/meine-stadt-transparent:v0.2.0 - command: - - /bin/bash - - -c - args: - - 'set -e && - /app/.venv/bin/python /app/manage.py setup' - env: - - name: DATABASE_URL - valueFrom: - secretKeyRef: - name: meine-stadt-transparent-secrets - key: database_url - - name: SENTRY_DSN - valueFrom: - secretKeyRef: - name: meine-stadt-transparent-secrets - key: sentry_dsn - - name: SECRET_KEY - valueFrom: - secretKeyRef: - name: meine-stadt-transparent-secrets - key: secret_key - - name: MINIO_SECRET_KEY - valueFrom: - secretKeyRef: - name: minio - key: secret-key - - name: MINIO_ACCESS_KEY - valueFrom: - secretKeyRef: - name: minio - key: access-key - volumeMounts: - - name: dotenv - mountPath: /app/.env - subPath: .env - containers: - - name: meine-stadt-transparent - image: konstin2/meine-stadt-transparent:v0.2.0 - ports: - - containerPort: 8000 - volumeMounts: - - name: dotenv - mountPath: /app/.env - subPath: .env - env: - - name: DATABASE_URL - valueFrom: - secretKeyRef: - name: meine-stadt-transparent-secrets - key: database_url - - name: SENTRY_DSN - valueFrom: - secretKeyRef: - name: meine-stadt-transparent-secrets - key: sentry_dsn - - name: SECRET_KEY - valueFrom: - secretKeyRef: - name: meine-stadt-transparent-secrets - key: secret_key - - name: MINIO_SECRET_KEY - valueFrom: - secretKeyRef: - name: minio - key: secret-key - - name: MINIO_ACCESS_KEY - valueFrom: - secretKeyRef: - name: minio - key: access-key - - name: EMAIL_URL - valueFrom: - secretKeyRef: - name: meine-stadt-transparent-secrets - key: email_url diff --git a/sources/meine-stadt-transparent/minio_pvc_patch.yaml b/sources/meine-stadt-transparent/minio_pvc_patch.yaml deleted file mode 100644 index 7c2fb55b..00000000 --- a/sources/meine-stadt-transparent/minio_pvc_patch.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: minio -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 25Gi diff --git a/sources/meine-stadt-transparent/nginx.yaml b/sources/meine-stadt-transparent/nginx.yaml deleted file mode 100644 index 02e1269c..00000000 --- a/sources/meine-stadt-transparent/nginx.yaml +++ /dev/null @@ -1,101 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: nginx - labels: - app.kubernetes.io/name: nginx - app.kubernetes.io/component: nginx -spec: - ports: - - port: 80 - selector: - app.kubernetes.io/name: nginx - app.kubernetes.io/component: nginx - ---- -apiVersion: networking.k8s.io/v1beta1 -kind: Ingress -metadata: - name: meine-stadt-transparent - labels: - app.kubernetes.io/name: nginx - app.kubernetes.io/component: nginx -spec: - rules: - - host: meine-stadt-transparent.codeformuenster.org - http: - paths: - - path: / - backend: - serviceName: nginx - servicePort: 80 - tls: - - hosts: - - meine-stadt-transparent.codeformuenster.org - secretName: meine-stadt-transparent-tls - ---- -apiVersion: cert-manager.io/v1alpha2 -kind: Certificate -metadata: - name: meine-stadt-transparent-tls - labels: - app.kubernetes.io/name: nginx - app.kubernetes.io/component: nginx -spec: - secretName: meine-stadt-transparent-tls - commonName: - dnsNames: - - meine-stadt-transparent.codeformuenster.org - issuerRef: - kind: ClusterIssuer - name: letsencrypt - ---- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nginx - labels: - app.kubernetes.io/name: nginx - app.kubernetes.io/component: nginx -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: nginx - app.kubernetes.io/component: nginx - template: - metadata: - labels: - app.kubernetes.io/name: nginx - app.kubernetes.io/component: nginx - spec: - volumes: - - name: static-files-volume - emptyDir: {} - - name: nginxconfig - configMap: - name: nginx-config - initContainers: - - name: copy-static - image: konstin2/meine-stadt-transparent:v0.2.0 - command: - - cp - - -r - - /static - - /static-files - volumeMounts: - - mountPath: /static-files - name: static-files-volume - containers: - - name: nginx - image: nginx:1.17-alpine - volumeMounts: - - mountPath: /static - name: static-files-volume - subPath: static - - mountPath: /etc/nginx/conf.d/meine-stadt-transparent.conf - name: nginxconfig - subPath: nginx.conf diff --git a/sources/meine-stadt-transparent/scraping.yaml b/sources/meine-stadt-transparent/scraping.yaml deleted file mode 100644 index 047a7330..00000000 --- a/sources/meine-stadt-transparent/scraping.yaml +++ /dev/null @@ -1,89 +0,0 @@ -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - name: sessionnet-scraper - labels: - app.kubernetes.io/name: sessionnet-scraper-cronjob - app.kubernetes.io/component: sessionnet-scraper -spec: - schedule: "5 4 * * *" - concurrencyPolicy: Replace - suspend: false - jobTemplate: - spec: - parallelism: 1 - template: - spec: - restartPolicy: OnFailure - volumes: - - name: scraping-data-volume - emptyDir: {} - - name: dotenv - configMap: - name: meine-stadt-transparent-dot-env - initContainers: - - name: download-and-parse - image: konstin2/scrape-session:v0.1.1 - args: - - 'scrape' - - 'Münster' - volumeMounts: - - mountPath: /app/storage - name: scraping-data-volume - env: - - name: SENTRY_DSN - valueFrom: - secretKeyRef: - name: meine-stadt-transparent-secrets - key: sentry_dsn - containers: - - name: import-scraped-json - image: konstin2/meine-stadt-transparent:v0.2.0 - imagePullPolicy: Always - command: - - /bin/bash - - -c - args: - - 'set -e && - /app/.venv/bin/python /app/manage.py setup && - /app/.venv/bin/python /app/manage.py import_json --allow-shrinkage /app/storage/json/Münster.json && - /app/.venv/bin/python /app/manage.py notifyusers' - volumeMounts: - - mountPath: /app/storage - name: scraping-data-volume - - name: dotenv - mountPath: /app/.env - subPath: .env - env: - - name: DATABASE_URL - valueFrom: - secretKeyRef: - name: meine-stadt-transparent-secrets - key: database_url - - name: SENTRY_DSN - valueFrom: - secretKeyRef: - name: meine-stadt-transparent-secrets - key: sentry_dsn - - name: SECRET_KEY - valueFrom: - secretKeyRef: - name: meine-stadt-transparent-secrets - key: secret_key - - name: MINIO_SECRET_KEY - valueFrom: - secretKeyRef: - name: minio - key: secret-key - - name: MINIO_ACCESS_KEY - valueFrom: - secretKeyRef: - name: minio - key: access-key - - name: EMAIL_URL - valueFrom: - secretKeyRef: - name: meine-stadt-transparent-secrets - key: email_url - imagePullSecrets: - - name: regcred diff --git a/sources/meine-stadt-transparent/secrets/certificates/.gitkeep b/sources/meine-stadt-transparent/secrets/certificates/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/sources/meine-stadt-transparent/secrets/elasticsearch.env-example b/sources/meine-stadt-transparent/secrets/elasticsearch.env-example deleted file mode 100644 index 121353a1..00000000 --- a/sources/meine-stadt-transparent/secrets/elasticsearch.env-example +++ /dev/null @@ -1,4 +0,0 @@ -# openssl rand -base64 32 | tr -d "=\n" -username= -password= - diff --git a/sources/meine-stadt-transparent/secrets/mariadb.env-example b/sources/meine-stadt-transparent/secrets/mariadb.env-example deleted file mode 100644 index 2c4806b7..00000000 --- a/sources/meine-stadt-transparent/secrets/mariadb.env-example +++ /dev/null @@ -1,3 +0,0 @@ -# openssl rand -base64 32 | tr -d "=\n" -mysql= -root= diff --git a/sources/meine-stadt-transparent/secrets/meine-stadt-transparent.env-example b/sources/meine-stadt-transparent/secrets/meine-stadt-transparent.env-example deleted file mode 100644 index 4f678dfa..00000000 --- a/sources/meine-stadt-transparent/secrets/meine-stadt-transparent.env-example +++ /dev/null @@ -1,3 +0,0 @@ -secret_key=Generate_a_new_one -database_url= -sentry_dsn= diff --git a/sources/meine-stadt-transparent/secrets/minio.env-example b/sources/meine-stadt-transparent/secrets/minio.env-example deleted file mode 100644 index 230d5ba4..00000000 --- a/sources/meine-stadt-transparent/secrets/minio.env-example +++ /dev/null @@ -1,3 +0,0 @@ -# openssl rand -base64 32 -access-key= -secret-key= diff --git a/sources/nominatim/README.md b/sources/nominatim/README.md deleted file mode 100644 index 5838b335..00000000 --- a/sources/nominatim/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# nominatim - -```bash -# build manifests to verify -kustomize build ./overlay - -# apply to cluster -kubectl create namespace nominatim -kubectl apply -k ./overlay - -# or place manifests in local directory -rm -r ../../manifests/nominatim ; mkdir -p ../../manifests/nominatim - -kubectl kustomize ./overlay > ../../manifests/nominatim/kustomized.yaml -kubectl apply -f ../../manifests/nominatim/kustomized.yaml - -# or -kubectl apply --recursive -f ../../manifests -``` diff --git a/sources/nominatim/base/kustomization.yaml b/sources/nominatim/base/kustomization.yaml deleted file mode 100644 index 3e0322cd..00000000 --- a/sources/nominatim/base/kustomization.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: nominatim -commonLabels: - app.kubernetes.io/part-of: nominatim-geocoder - -resources: -- postgis.yaml -- nominatim.yaml diff --git a/sources/nominatim/base/nominatim.yaml b/sources/nominatim/base/nominatim.yaml deleted file mode 100644 index 319d07b6..00000000 --- a/sources/nominatim/base/nominatim.yaml +++ /dev/null @@ -1,182 +0,0 @@ -# apiVersion: extensions/v1beta1 -# kind: Ingress -# metadata: -# name: nominatim -# labels: -# app.kubernetes.io/name: nominatim -# app.kubernetes.io/component: api -# spec: -# rules: -# - host: nominatim.example.com -# http: -# paths: -# - backend: -# serviceName: nominatim -# servicePort: api -# tls: -# - secretName: nominatim-tls -# hosts: -# - nominatim.example.com - -# --- -# apiVersion: certmanager.k8s.io/v1alpha1 -# kind: Certificate -# metadata: -# name: nominatim -# labels: -# app.kubernetes.io/name: nominatim -# app.kubernetes.io/component: api -# spec: -# secretName: nominatim-tls -# commonName: nominatim.example.com -# issuerRef: -# kind: ClusterIssuer -# name: letsencrypt - ---- -apiVersion: v1 -kind: Service -metadata: - name: nominatim - labels: - app.kubernetes.io/name: nominatim - app.kubernetes.io/component: api - app.kubernetes.io/part-of: nominatim-geocoder -spec: - ports: - - name: api - port: 8080 - targetPort: api - selector: - app.kubernetes.io/name: nominatim - app.kubernetes.io/component: api - app.kubernetes.io/part-of: nominatim-geocoder - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: nominatim-api-configmap - labels: - app.kubernetes.io/name: nominatim - app.kubernetes.io/component: api - app.kubernetes.io/part-of: nominatim-geocoder -data: - local.php: | - :host=;port=;user=;password=;dbname= - ?> - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: nominatim-data - labels: - app.kubernetes.io/name: nominatim - app.kubernetes.io/component: api - app.kubernetes.io/part-of: nominatim-geocoder -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 2G - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nominatim - labels: - app.kubernetes.io/name: nominatim - app.kubernetes.io/component: api - app.kubernetes.io/part-of: nominatim-geocoder -spec: - selector: - matchLabels: - app.kubernetes.io/name: nominatim - app.kubernetes.io/component: api - app.kubernetes.io/part-of: nominatim-geocoder - template: - metadata: - labels: - app.kubernetes.io/name: nominatim - app.kubernetes.io/component: api - app.kubernetes.io/part-of: nominatim-geocoder - spec: - volumes: - - name: localphp - configMap: - name: nominatim-api-configmap - items: - - key: local.php - path: local.php - - name: data - persistentVolumeClaim: - claimName: nominatim-data - initContainers: - - name: init-db - image: mediagis/nominatim:3.4 - # image: localhost:5000/nominatim:3.4 - volumeMounts: - - name: data - mountPath: /data - - name: localphp - mountPath: /app/src/build/settings/local.php - subPath: local.php - command: - - /usr/bin/bash - - -c - args: - - | - set -e - if [ "$( psql -tAc "SELECT 1 FROM pg_database WHERE datname='nominatim'" )" != '1' ]; then - echo -n "fetching pbf file from $PBF_URL" - curl -s -C - -o /data/regbez-muenster.osm.pbf "$PBF_URL" - echo -e "done\nstarting import" - /app/src/build/utils/setup.php --osm-file /data/regbez-muenster.osm.pbf --all --threads 4 - rm -rf /data/regbez-muenster.osm.pbf - else - echo "skipping initialization" - fi - env: - - name: PBF_URL - value: http://download.geofabrik.de/europe/germany/nordrhein-westfalen/muenster-regbez-latest.osm.pbf - - name: PGHOST - value: postgis - - name: PGUSER - value: nominatim - containers: - - name: nominatim - image: mediagis/nominatim:3.4 - # image: localhost:5000/nominatim:3.4 - command: - - /usr/bin/bash - - -c - args: - - | - /usr/sbin/apache2ctl -D FOREGROUND - tail -f /var/log/apache2/error.log - env: - - name: PGHOST - value: postgis - - name: PGUSER - value: nominatim - ports: - - name: api - containerPort: 8080 - volumeMounts: - - name: localphp - mountPath: /app/src/build/settings/local.php - subPath: local.php diff --git a/sources/nominatim/base/postgis.yaml b/sources/nominatim/base/postgis.yaml deleted file mode 100644 index bb648ece..00000000 --- a/sources/nominatim/base/postgis.yaml +++ /dev/null @@ -1,142 +0,0 @@ -# based on https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/master/deploy/single/all-in-one-postgres.yaml ---- -apiVersion: v1 -kind: Service -metadata: - name: postgis - labels: - app.kubernetes.io/name: postgis - app.kubernetes.io/component: database - app.kubernetes.io/part-of: nominatim-geocoder -spec: - ports: - - name: pgql - port: 5432 - targetPort: 5432 - protocol: TCP - selector: - app.kubernetes.io/name: postgis - app.kubernetes.io/component: database - app.kubernetes.io/part-of: nominatim-geocoder - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: postgis-data - labels: - app.kubernetes.io/name: postgis - app.kubernetes.io/component: database - app.kubernetes.io/part-of: nominatim-geocoder -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10G - ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: postgis - labels: - app.kubernetes.io/name: postgis - app.kubernetes.io/component: database - app.kubernetes.io/part-of: nominatim-geocoder -spec: - serviceName: postgis - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: postgis - app.kubernetes.io/component: database - app.kubernetes.io/part-of: nominatim-geocoder - template: - metadata: - labels: - app.kubernetes.io/name: postgis - app.kubernetes.io/component: database - app.kubernetes.io/part-of: nominatim-geocoder - spec: - volumes: - - name: data - persistentVolumeClaim: - claimName: postgis-data - initContainers: - - name: init - image: mediagis/nominatim:3.4 - # image: localhost:5000/nominatim:3.4 - volumeMounts: - - name: data - mountPath: /var/lib/postgresql/11 - env: - - name: PGDIR - value: /var/lib/postgresql/11 - - name: PGDATA - value: /var/lib/postgresql/11/main - command: - - /usr/bin/bash - - -c - args: - - | - set -ex - if [ ! -f "${PGDIR}/initialized" ]; then - rm -rf "${PGDATA}" - mkdir -p "${PGDATA}" - chown -R postgres:postgres "${PGDATA}" - sudo -u postgres /usr/lib/postgresql/11/bin/initdb -D "${PGDATA}" - sudo -u postgres /usr/lib/postgresql/11/bin/pg_ctl -o "-c listen_addresses=''" -D "${PGDATA}" start - sudo -u postgres psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='nominatim'" | grep -q 1 || sudo -u postgres createuser -s nominatim - sudo -u postgres psql postgres -tAc "SELECT 1 FROM pg_roles WHERE rolname='www-data'" | grep -q 1 || sudo -u postgres createuser -SDR www-data - sudo -u postgres psql postgres -c "DROP DATABASE IF EXISTS nominatim" - sudo -u postgres /usr/lib/postgresql/11/bin/pg_ctl -D "${PGDATA}" -m fast -w stop - chown -R root:root "${PGDATA}" - touch "${PGDIR}/initialized" - fi - containers: - - name: postgis - image: mediagis/nominatim:3.4 - # image: localhost:5000/nominatim:3.4 - volumeMounts: - - name: data - mountPath: /var/lib/postgresql/11 - command: - - /usr/bin/bash - - -c - args: - - | - chown -R postgres:postgres /var/lib/postgresql - service postgresql start - tail -f /var/log/postgresql/postgresql-11-main.log - env: - - name: PGDIR - value: /var/lib/postgresql/11 - - name: PGDATA - value: /var/lib/postgresql/11/main - # args: - # - 'ls -la /var/lib/postgresql/11/main' - #env: - ## FIXME create random password in secret on commandline - #- name: POSTGRES_USER - # value: nominatim-admin - #- name: POSTGRES_PASSWORD - # value: n0mn0m - #- name: POSTGRES_DB - # value: nominatimdb - ports: - - containerPort: 5432 - # No pre-stop hook is required, a SIGTERM plus some time is all that's - # needed for graceful shutdown of a node. -# terminationGracePeriodSeconds: 60 - # FIXME needs openebs - # volumeClaimTemplates: - # - metadata: - # name: data - # spec: - # accessModes: - # - ReadWriteOnce - # resources: - # requests: - # storage: 5Gi - # storageClassName: high-performance-high-resilience diff --git a/sources/nominatim/overlay/kustomization.yaml b/sources/nominatim/overlay/kustomization.yaml deleted file mode 100644 index 9bc5370d..00000000 --- a/sources/nominatim/overlay/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -bases: -- ../base - -patchesStrategicMerge: -- ./nominatim_patches.yaml diff --git a/sources/nominatim/overlay/nominatim_patches.yaml b/sources/nominatim/overlay/nominatim_patches.yaml deleted file mode 100644 index 651fe058..00000000 --- a/sources/nominatim/overlay/nominatim_patches.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: nominatim -spec: - rules: - - host: nominatim.codeformuenster.org - http: - paths: - - backend: - serviceName: nominatim - servicePort: api - tls: - - secretName: nominatim-tls - hosts: - - nominatim.codeformuenster.org - ---- -apiVersion: certmanager.k8s.io/v1alpha1 -kind: Certificate -metadata: - name: nominatim -spec: - commonName: nominatim.codeformuenster.org diff --git a/sources/openebs/README.md b/sources/openebs/README.md deleted file mode 100644 index d462899e..00000000 --- a/sources/openebs/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# openebs - -https://docs.openebs.io/docs/overview.html - - -```bash -# build manifests to verify -kubectl kustomize . - -# apply to cluster -kubectl apply -k . - - -# create storagepool: edit cstor-storage.yaml -# StoragePoolClaim/cstor-disk-pool > spec.blockDevices.blockDeviceList -# fill in values from `kubectl get -A blockdevices.openebs.io` -kubectl apply -f ./cstor-storage.yaml -``` - - -## upgrading - -See https://github.com/openebs/openebs/tree/master/k8s/upgrades - - -## metrics and logging - -https://github.com/openebs/openebs/tree/master/k8s#optional-enable-monitoring-using-prometheus-and-grafana -https://github.com/openebs/openebs/tree/master/k8s#optional-enable-monitoring-using-prometheus-operator - -matrix prefixes: - openebs* or latest_openebs*. - -**maya-exporter** -https://grafana.com/dashboards/9065 - -https://github.com/coreos/kube-prometheus/blob/master/manifests/0prometheus-operator-0podmonitorCustomResourceDefinition.yaml - - -**loki** - - -## debug - -```bash -kubectl api-resources --api-group openebs.io - -kubectl -n openebs logs -f -l openebs.io/component-name=ndm-operator -kubectl -n openebs logs -f -l openebs.io/component-name=maya-apiserver - -kubectl get --all-namespaces blockdevices - -kubectl api-resources --api-group openebs.io -o name \ - | xargs -n 1 kubectl get --all-namespaces --show-kind --ignore-not-found - -kubectl get storageclasses -kubectl get storagepoolclaim.openebs.io -kubectl get cstorpools -``` - - -## deleting - -https://docs.openebs.io/docs/next/uninstall.html - -```bash -# (!) before deleting uncomment namespace in manifest -kubectl delete -f ../../manifests/openebs - -kubectl get storageclasses -o name | fgrep "openebs-" \ - | xargs -n 1 kubectl delete - -kubectl api-resources --api-group openebs.io -o name \ - | xargs -n 1 kubectl delete --all-namespaces --all - -kubectl api-resources --api-group openebs.io -o name \ - | xargs -n 1 kubectl delete crd - -kubectl delete ValidatingWebhookConfiguration validation-webhook-cfg -kubectl delete namespace openebs - -# when stuck -kubectl proxy - -kubectl get namespace openebs -o json \ - | jq 'del(.spec.finalizers[] | select("kubernetes"))' \ - | curl --request PUT --header "Content-Type: application/json" \ - --data-binary @- http://localhost:8001/api/v1/namespaces/openebs/finalize -``` - - -## Test - -```bash -cat << EOF | kubectl apply -f - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: test1 -spec: - # storageClassName: cstor-localssd-3x-nowait - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ---- -apiVersion: v1 -kind: Pod -metadata: - name: test1 -spec: - containers: - - name: alpine-noop - image: alpine:3.10 - command: ["/bin/sh", "-c"] - args: [ "tail -f /dev/null" ] - volumeMounts: - - name: data - mountPath: "/srv/data" - volumes: - - name: data - persistentVolumeClaim: - claimName: test1 -EOF -``` diff --git a/sources/openebs/cstor-storage.yaml b/sources/openebs/cstor-storage.yaml deleted file mode 100644 index 48dec666..00000000 --- a/sources/openebs/cstor-storage.yaml +++ /dev/null @@ -1,108 +0,0 @@ -# https://docs.openebs.io/docs/next/ugcstor.html#creating-cStor-storage-pools - ---- -apiVersion: openebs.io/v1alpha1 -kind: StoragePoolClaim -metadata: - name: cstor-disk-pool - # annotations: - # https://docs.openebs.io/docs/next/ugcstor.html#setting-pool-policies - # cas.openebs.io/config: | - # - name: PoolResourceRequests - # value: |- - # memory: 2Gi - # - name: PoolResourceLimits - # value: |- - # memory: 4Gi - # - name: AuxResourceLimits - # value: |- - # memory: 0.5Gi - # cpu: 100m - # - name: AuxResourceRequests - # value: |- - # memory: 0.5Gi - # cpu: 100m - # openebs.io/cas-type: cstor -spec: - name: cstor-disk-pool - type: disk - # maxPools: 3 - # minPools: 3 - poolSpec: - poolType: striped - # cacheFile: /var/openebs/sparse/sparse-claim-auto.cache - # overProvisioning: false - blockDevices: - # kubectl -n openebs describe blockdevices - # kubectl -n openebs get blockdevices - # kubectl -n openebs get blockdevices -o name - blockDeviceList: - - blockdevice-7a8f643f80f28da689d2961833f91bda - - blockdevice-86fc1ddbabee9f1522e2777c609b511b - - blockdevice-c1d827a4691218ff02682cb5ef3e262f - ---- -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: cstor-localssd-3x-nowait - annotations: - openebs.io/cas-type: cstor - # cas.openebs.io/config: | - # - name: FSType - # value: ext4 - # - name: TargetResourceLimits - # value: |- - # memory: 1Gi - # cpu: 100m - # - name: TargetResourceRequests - # value: |- - # memory: 1Gi - # cpu: 100m - # - name: AuxResourceLimits - # value: |- - # memory: 0.5Gi - # cpu: 100m - # - name: AuxResourceRequests - # value: |- - # memory: 0.5Gi - # cpu: 100m - cas.openebs.io/config: | - - name: StoragePoolClaim - value: "cstor-disk-pool" - - name: ReplicaCount - value: "3" - storageclass.kubernetes.io/is-default-class: "true" -provisioner: openebs.io/provisioner-iscsi -reclaimPolicy: Delete - ---- -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: cstor-localssd-1x-wait - annotations: - openebs.io/cas-type: cstor - cas.openebs.io/config: | - - name: StoragePoolClaim - value: "cstor-disk-pool" - - name: ReplicaCount - value: "1" - - name: TargetResourceLimits - value: |- - memory: 1Gi - cpu: 100m - - name: TargetResourceRequests - value: |- - memory: 1Gi - cpu: 100m - - name: AuxResourceLimits - value: |- - memory: 0.5Gi - cpu: 100m - - name: AuxResourceRequests - value: |- - memory: 0.5Gi - cpu: 100m -provisioner: openebs.io/provisioner-iscsi -volumeBindingMode: WaitForFirstConsumer \ No newline at end of file diff --git a/sources/openebs/kustomization.yaml b/sources/openebs/kustomization.yaml deleted file mode 100644 index 077a210a..00000000 --- a/sources/openebs/kustomization.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -bases: -- github.com/codeformuenster/kustomized//openebs?ref=fac01a5 - -# resources: -# - ./cstor-storage.yaml - -patchesStrategicMerge: -- ./openebs-operator_patches.yaml diff --git a/sources/openebs/openebs-operator_patches.yaml b/sources/openebs/openebs-operator_patches.yaml deleted file mode 100644 index 1cbcdd76..00000000 --- a/sources/openebs/openebs-operator_patches.yaml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: openebs-ndm-config - namespace: openebs -data: - # https://docs.openebs.io/docs/next/ugndm.html - node-disk-manager.config: | - probeconfigs: - - key: udev-probe - name: udev probe - state: true - - key: seachest-probe - name: seachest probe - state: true - - key: smart-probe - name: smart probe - state: true - filterconfigs: - - key: os-disk-exclude-filter - name: os disk exclude filter - state: true - exclude: "/,/etc/hosts,/boot" - - key: vendor-filter - name: vendor filter - state: true - include: "" - exclude: "CLOUDBYT,OpenEBS" - - key: path-filter - name: path filter - state: true - include: "/dev/sda" - exclude: "" - ---- -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: openebs-ndm - namespace: openebs -spec: - template: - spec: - containers: - - name: node-disk-manager - env: - - name: SPARSE_FILE_DIR - value: null - -# --- -# # FIXME create certs and put in a safe place - -# apiVersion: v1 -# kind: Secret -# metadata: -# name: admission-server-certs -# namespace: openebs -# data: -# cert.pem: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUQ3VENDQXRXZ0F3SUJBZ0lVYk84NS9JR0ZXYTA2Vm11WVdTWjdxaTUybmRRd0RRWUpLb1pJaHZjTkFRRUwKQlFBd1hERUxNQWtHQTFVRUJoTUNlSGd4Q2pBSUJnTlZCQWdNQVhneENqQUlCZ05WQkFjTUFYZ3hDakFJQmdOVgpCQW9NQVhneENqQUlCZ05WQkFzTUFYZ3hDekFKQmdOVkJBTU1BbU5oTVJBd0RnWUpLb1pJaHZjTkFRa0JGZ0Y0Ck1CNFhEVEU1TURNd01qQTNNek13TUZvWERUSXdNRE13TVRBM01qYzFNbG93S3pFcE1DY0dBMVVFQXhNZ1lXUnQKYVhOemFXOXVMWE5sY25abGNpMXpkbU11YjNCbGJtVmljeTV6ZG1Nd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQQpBNElCRHdBd2dnRUtBb0lCQVFERk5MRE1xKzd6eFZidDNPcnFhaVUyOFB6K25ZeFRCblA0NVhFWGFjSUpPWG1aClM1c2ZjMjM3WVNWS0I5Tlp4cXNYT08wcXpWb0xtNlZ0UDJjREpWZGZIVUQ0QXBZSC94UVBVTktrcFg3K0NVTFEKZ3VBNWowOXozdkFaeDJidXBTaXFFdE1mVldqNkh5V0Jyd2FuZW9IaVVXVVdpbmtnUXpCQzR1SWtiRkE2djYrZwp4ZzAwS09TY2NFRWY3eU5McjBvejBKVHRpRm1aS1pVVVBwK3N3WTRpRTZ3RER5bVVnTmY4SW8wUEExVkQ1TE9vCkFwQ0l2WDJyb1RNd3VkR1VrZUc1VTA2OWIrMWtQMEJsUWdDZk9TQTBmZEN3Snp0aWE1aHpaUlVIWGxFOVArN0kKekgyR0xXeHh1aHJPTlFmT25HcVRiUE13UmowekZIdmcycUo1azJ2VkFnTUJBQUdqZ2Rjd2dkUXdEZ1lEVlIwUApBUUgvQkFRREFnV2dNQk1HQTFVZEpRUU1NQW9HQ0NzR0FRVUZCd01CTUF3R0ExVWRFd0VCL3dRQ01BQXdIUVlEClZSME9CQllFRklnOVFSOSsyVW12THQwQXY4MlYwZml0bU81WE1COEdBMVVkSXdRWU1CYUFGTU5HNkZ4aUxhYWYKMWV3bDVEN3VJcmIrRStIT01GOEdBMVVkRVFSWU1GYUNGR0ZrYldsemMybHZiaTF6WlhKMlpYSXRjM1pqZ2h4aApaRzFwYzNOcGIyNHRjMlZ5ZG1WeUxYTjJZeTV2Y0dWdVpXSnpnaUJoWkcxcGMzTnBiMjR0YzJWeWRtVnlMWE4yCll5NXZjR1Z1WldKekxuTjJZekFOQmdrcWhraUc5dzBCQVFzRkFBT0NBUUVBSlpJRzd2d0RYaWxhWUFCS1Brc0oKZVJtdml4ZnYybTRVTVdzdlBKVVVJTXhHbzhtc1J6aWhBRjVuTExzaURKRDl4MjhraXZXaGUwbWE4aWVHYjY5Sgp1U1N4bys0OStaV3NVaTB3UlRDMi9ZWGlkWS9xNDU2c1g4ck9qQURDZlFUcFpYc2ZyekVWa2Q4NE0zdU5GTmhnCnMyWmxJMnNDTWljYXExNWxIWEh3akFkY2FqZit1VklwOXNHUElsMUhmZFcxWVFLc0NoU3dhdi80NUZJcFlMSVYKM3hiS2ZIbmh2czhJck5ZbTVIenAvVVdvcFN1Tm5tS1IwWGo3cXpGcllUYzV3eHZ3VVZrKzVpZFFreWMwZ0RDcApGbkFVdEdmaUVUQnBhU3pISjQ4STZqUFpneVE0NzlZMmRxRUtXcWtyc0RkZ2tVcXlnNGlQQ0YwWC9YVU9YU3VGClNnPT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= -# key.pem: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcEFJQkFBS0NBUUVBeFRTd3pLdnU4OFZXN2R6cTZtb2xOdkQ4L3AyTVV3WnorT1Z4RjJuQ0NUbDVtVXViCkgzTnQrMkVsU2dmVFdjYXJGemp0S3MxYUM1dWxiVDluQXlWWFh4MUErQUtXQi84VUQxRFNwS1YrL2dsQzBJTGcKT1k5UGM5N3dHY2RtN3FVb3FoTFRIMVZvK2g4bGdhOEdwM3FCNGxGbEZvcDVJRU13UXVMaUpHeFFPcit2b01ZTgpOQ2prbkhCQkgrOGpTNjlLTTlDVTdZaFptU21WRkQ2ZnJNR09JaE9zQXc4cGxJRFgvQ0tORHdOVlErU3pxQUtRCmlMMTlxNkV6TUxuUmxKSGh1Vk5PdlcvdFpEOUFaVUlBbnprZ05IM1FzQ2M3WW11WWMyVVZCMTVSUFQvdXlNeDkKaGkxc2Nib2F6alVIenB4cWsyenpNRVk5TXhSNzROcWllWk5yMVFJREFRQUJBb0lCQVFDcXRIT2VsKzRlUWVKLwp3RTN4WUxTYUhIMURnZWxvTFJ2U2hmb2hSRURjYjA0ZExsODNHRnBKMGN2UGkzcWVLZVVNRXhEcGpoeTJFNk5kCk1CYmhtRDlMYkMxREFpb1EvZkxGVnpjZm9zcU02RU5YN3hKZGdQcEwyTjJKMHh2ODFDYWhJZTV6SHlIaDhYZ3MKQysvOHBZVXMvVHcrQ052VTI1UTVNZUNEbXViUUVuemJqQ3lIQm5SVmw1dVF6bk8zWEt2NEVyejdBT1BBWmFJTQozYmNFNC83c1JGczM4SE1aMVZTZ2JxUi9rM1N5SEFzNXhNWHVtY0hMMTBkK0FVK21BQ0svUThpdWJHMm9kNnJiCko3S0RONmFuUzRPZk4zZ3RtaEppN3ZsTjJVL3JycHdnblI0d3Y0bmV4U1ZlamYzQU9iaU9jNnYzZ0xJbXJ2Q3oKNzFETDFPaTVBb0dCQU9HeFp2RWFUSFFnNFdaQVJZbXlGZEtZeXY2MURDc1JycElmUlh3Q1YrcnBZTFM2NlV4SQprWHJISlNreWFqTjNTOXVsZUtUTXRWaU5wY2JCcjVNZ0lOaFFvdThRc2dpZlZHWFJGQ3d0OXJ3MGNDbEc1Y2pCClZ3bUQzYWFBTGR5WVQvbHc4dnk1Zndqc1hFZHd1OEQ2cC9rd0ZzMmlwZWQ4QVFPUVZlQ1dPeXF6QW9HQkFOK3YKL2VxKzZ5NHhPZ2ZtQ01KcHJ0THBBN1J0M3FsU0JKbEw3RkNsQXRCeUUxazBPTVIrZTdhSDBVTDdYWVR4YlBLOApBYnRZR3lzWDkydGM3RHlaU0k0cDFjUHhvcHdzNkt3N0RYZUt0YTNnVkRmSXVuZ3haR25XWjk2WmNjcEhyVzgyCnl5OTk5dTQ2WE1tQWZwSzEvbGxjdGdLem5FUVp5ZkhEUmlWdVVQTlhBb0dCQUxkMGxORDNKNTVkKzlvNTlFeHgKVGZ2WjUyZ1Rrc2lQbnU5NEsrc1puSTEvRnZUUjJrSC8yd0dLVDFLbGdGNUZZb3d3ZlZpNGJkQ0ZrM04walZ0eQppa0JMaTZYNFZEOWVCQ1NmUjE2Q0hrWHQraDRUVzBWTW80dEFmVE9TamJUNnVrZHc0Sk05MVYxVGc4OHVlKy9wCjBCQm1YcUxZeXpMWFFadTcvNUtIaTZDeEFvR0FaTWV2R0E5eWVEcFhrZTF6THR4Y2xzdkREb3lkMEIyUzB0cGgKR3lodEx5cm1Tcjk3Z0JRWWV2R1FONlIyeXduVzh6bi9jYi9OWmNvRGdFeTZac2NNNkhneXhuaGNzZzZOdWVOVgpPdkcwenlVTjdLQTBXeWl0dS8yTWlMOExoSDVzeG5taWE4Qk4rNkV4NHR0UXE1cnhnS09Eb1kzNHJyb0x3VEFnCnI0YVhWRHNDZ1lBYnRwZXhvNTJ4VmJkTzZCL3B5RUU2cEJCS1FkK3hiVkJNMDZwUzArSlFudSt5SVBmeXFhekwKbGdYTEhBSm01bU9Sb2RFRHk0WlVJRkM5RmhraGcrV0ZzSHJCOXpGU1IrZFc2Uzg1eFA4ZGxHVE42S2cydXJNQQowNTRCQUh4RWhPNU9QblNqT0VHSmQwYTdGQmc1UlkxN0RRQlFxV25SZENURHlDWmU0OStLcWc9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= - -# --- -# apiVersion: admissionregistration.k8s.io/v1beta1 -# kind: ValidatingWebhookConfiguration -# metadata: -# name: validation-webhook-cfg -# namespace: openebs -# webhooks: -# - name: admission-webhook.openebs.io -# clientConfig: -# caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURpekNDQW5PZ0F3SUJBZ0lKQUk5NG9wdWdKb1drTUEwR0NTcUdTSWIzRFFFQkN3VUFNRnd4Q3pBSkJnTlYKQkFZVEFuaDRNUW93Q0FZRFZRUUlEQUY0TVFvd0NBWURWUVFIREFGNE1Rb3dDQVlEVlFRS0RBRjRNUW93Q0FZRApWUVFMREFGNE1Rc3dDUVlEVlFRRERBSmpZVEVRTUE0R0NTcUdTSWIzRFFFSkFSWUJlREFlRncweE9UQXpNREl3Ck56TXlOREZhRncweU1EQXpNREV3TnpNeU5ERmFNRnd4Q3pBSkJnTlZCQVlUQW5oNE1Rb3dDQVlEVlFRSURBRjQKTVFvd0NBWURWUVFIREFGNE1Rb3dDQVlEVlFRS0RBRjRNUW93Q0FZRFZRUUxEQUY0TVFzd0NRWURWUVFEREFKagpZVEVRTUE0R0NTcUdTSWIzRFFFSkFSWUJlRENDQVNJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dFUEFEQ0NBUW9DCmdnRUJBT0pxNmI2dnI0cDMzM3FRaHJQbmNCVFVIUE1ESnJtaEYvOU44NjZodzFvOGZLclFwNkJmRkcvZEQ0N2gKVGcvWnJ0U2VHT0NoRjFxSEk1dGp3SlVEeGphSUM3U0FkZGpxb1pJUGFoT1pjVlpxZE1POVVFTlFUbktIRXczVQpCUjJUaHdydi9QTTRxZitUazdRa1J6Y2VJQXg1VS9lbUlEV2t4NEk3RlRYQk1XT1hGUTNoRlFtWFppZHpHN21mCnZJTlhYN0krOHR3QVM0alNSdGhxYjVUTzMwYmpxQTFzY0RRdXlZU2R6OVg5TGw1WU1QSUtSZHpnYUR1d1Q5QkQKZjNxT1VqazN6M1FZd0IvWmowaXJtQlpKejJla0V3a1QxbWlyUHF2NTA5QVJ5V1U2QUlSSTN6dnB6S2tWeFJUaApmcUROa1M5SmRRV1Q3RW9vN2lITmRtZlhOYmtDQXdFQUFhTlFNRTR3SFFZRFZSME9CQllFRk1ORzZGeGlMYWFmCjFld2w1RDd1SXJiK0UrSE9NQjhHQTFVZEl3UVlNQmFBRk1ORzZGeGlMYWFmMWV3bDVEN3VJcmIrRStIT01Bd0cKQTFVZEV3UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFHQnYxeC92OWRnWU1ZY1h5TU9MUUNENgpVZWNsS3YzSFRTVGUybXZQcTZoTW56K0ExOGF6RWhPU0xONHZuQUNSd2pzRmVobWIrWk9wMVlYWDkzMi9OckRxCk1XUmh1bENiblFndjlPNVdHWXBDQUR1dnBBMkwyT200aU50S0FucUpGNm5ubHI1UFdQZnVJelB1eVlvQUpKRDkKSFpZRjVwa2hac0EwdDlUTDFuUmdPbFY4elZ0eUg2TTVDWm5nSEpjWG9CWlVvSlBvcGJsc3BpUnh6dzBkMUU0SgpUVmVHaXZFa0RJNFpFYTVuTzZyTUZzcXJ1L21ydVQwN1FCaWd5ZzlEY3h0QU5TUTczQUhOemNRUWpZMWg3L2RiCmJ6QXQ2aWxNZXZKc2lpVFlGYjRPb0dIVW53S2tTQUJuazFNQW5oUUhvYUNuS2dXZE1vU3orQWVuYkhzYXJSMD0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= diff --git a/sources/openebs/servicemonitor.yaml b/sources/openebs/servicemonitor.yaml deleted file mode 100644 index 14cb74f7..00000000 --- a/sources/openebs/servicemonitor.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# FIXME service to maya-exporter here ---- -apiVersion: v1 -kind: Service -metadata: - name: maya-apiserver-service - namespace: openebs -spec: - ports: - - name: exporter - port: 5656 - protocol: TCP - targetPort: 5656 - selector: - name: maya-apiserver - - ---- -# https://github.com/openebs/openebs/blob/master/k8s/openebs-servicemonitor.yaml - -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - labels: - app: openebs - name: openebs - namespace: openebs -spec: - endpoints: - - path: /metrics - port: exporter - namespaceSelector: - matchNames: - - openebs - selector: - matchLabels: - openebs.io/cas-type: cstor - monitoring: volume_exporter_prometheus \ No newline at end of file diff --git a/sources/openebs/upgrade-jobs/upgrade-cstor-pvc.yaml b/sources/openebs/upgrade-jobs/upgrade-cstor-pvc.yaml deleted file mode 100644 index ab1f1c0f..00000000 --- a/sources/openebs/upgrade-jobs/upgrade-cstor-pvc.yaml +++ /dev/null @@ -1,58 +0,0 @@ -#This is an example YAML for upgrading cstor volume. -#Some of the values below needs to be changed to -#match your openebs installation. The fields are -#indicated with VERIFY ---- -apiVersion: batch/v1 -kind: Job -metadata: - #VERIFY that you have provided a unique name for this upgrade job. - #The name can be any valid K8s string for name. This example uses - #the following convention: cstor-vol-- - name: cstor-vol-REPLACEME-pvc-REPLACEME - - #VERIFY the value of namespace is same as the namespace where openebs components - # are installed. You can verify using the command: - # `kubectl get pods -n -l openebs.io/component-name=maya-apiserver` - # The above command should return status of the openebs-apiserver. - namespace: openebs - -spec: - backoffLimit: 4 - template: - spec: - #VERIFY the value of serviceAccountName is pointing to service account - # created within openebs namespace. Use the non-default account. - # by running `kubectl get sa -n ` - serviceAccountName: openebs-maya-operator - containers: - - name: upgrade - args: - - "cstor-volume" - - # --from-version is the current version of the volume - - "--from-version=1.1.0" - - # --to-version is the version desired upgrade version - - "--to-version=1.8.0" - - #VERIFY that you have provided the correct cStor PV Name - - "--pv-name=pvc-REPLACEME" - - #Following are optional parameters - #Log Level - - "--v=4" - #DO NOT CHANGE BELOW PARAMETERS - env: - - name: OPENEBS_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - tty: true - - # the image version should be same as the --to-version mentioned above - # in the args of the job - image: quay.io/openebs/m-upgrade:1.8.0 - imagePullPolicy: Always - restartPolicy: OnFailure ---- \ No newline at end of file diff --git a/sources/swms-busradar-gtfs-realtime/README.md b/sources/swms-busradar-gtfs-realtime/README.md deleted file mode 100644 index 3e348b12..00000000 --- a/sources/swms-busradar-gtfs-realtime/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# swms-busradar-gtfs-realtime Deployment - -Deployment of [swms-busradar-gtfs-realtime](https://github.com/codeformuenster/swms-busradar-gtfs-realtime) - -```bash -# build manifests to verify -kubectl kustomize - -# apply to cluster -kubectl create namespace swms-busradar-gtfs-realtime -kubectl apply -k . -``` diff --git a/sources/swms-busradar-gtfs-realtime/fileserver.yaml b/sources/swms-busradar-gtfs-realtime/fileserver.yaml deleted file mode 100644 index e8cbae29..00000000 --- a/sources/swms-busradar-gtfs-realtime/fileserver.yaml +++ /dev/null @@ -1,114 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: swms-busradar-gtfs-realtime-fileserver - labels: - app.kubernetes.io/name: swms-busradar-gtfs-realtime-fileserver - app.kubernetes.io/component: fileserver - app.kubernetes.io/part-of: swms-busradar-gtfs-realtime -spec: - ports: - - port: 2015 - selector: - app.kubernetes.io/name: swms-busradar-gtfs-realtime-fileserver - app.kubernetes.io/component: fileserver - app.kubernetes.io/part-of: swms-busradar-gtfs-realtime - ---- -apiVersion: extensions/v1beta1 -kind: Ingress -metadata: - name: swms-busradar-gtfs-realtime-fileserver - labels: - app.kubernetes.io/name: swms-busradar-gtfs-realtime-fileserver - app.kubernetes.io/component: fileserver - app.kubernetes.io/part-of: swms-busradar-gtfs-realtime -spec: - rules: - - host: swms-busradar-gtfs-realtime.codeformuenster.org - http: - paths: - - path: / - backend: - serviceName: swms-busradar-gtfs-realtime-fileserver - servicePort: 2015 - tls: - - hosts: - - swms-busradar-gtfs-realtime.codeformuenster.org - secretName: swms-busradar-gtfs-realtime-tls - ---- -apiVersion: certmanager.k8s.io/v1alpha2 -kind: Certificate -metadata: - name: swms-busradar-gtfs-realtime-tls - labels: - app.kubernetes.io/name: swms-busradar-gtfs-realtime-fileserver - app.kubernetes.io/component: fileserver - app.kubernetes.io/part-of: swms-busradar-gtfs-realtime -spec: - secretName: swms-busradar-gtfs-realtime-tls - commonName: swms-busradar-gtfs-realtime.codeformuenster.org - issuerRef: - kind: ClusterIssuer - name: letsencrypt - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: swms-busradar-gtfs-realtime-fileserver - labels: - app.kubernetes.io/name: swms-busradar-gtfs-realtime-fileserver - app.kubernetes.io/component: fileserver - app.kubernetes.io/part-of: swms-busradar-gtfs-realtime -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: swms-busradar-gtfs-realtime-fileserver - app.kubernetes.io/component: fileserver - app.kubernetes.io/part-of: swms-busradar-gtfs-realtime - template: - metadata: - labels: - app.kubernetes.io/name: swms-busradar-gtfs-realtime-fileserver - app.kubernetes.io/component: fileserver - app.kubernetes.io/part-of: swms-busradar-gtfs-realtime - spec: - containers: - - name: swms-busradar-gtfs-realtime-fileserver - image: abiosoft/caddy:1.0.3-no-stats - ports: - - containerPort: 2015 - volumeMounts: - - name: caddyfile - mountPath: /etc/Caddyfile - subPath: Caddyfile - - name: realtime-feed-volume - mountPath: /srv - readOnly: true - volumes: - - name: caddyfile - configMap: - name: caddyfile - - name: realtime-feed-volume - persistentVolumeClaim: - claimName: swms-busradar-gtfs-realtime-volume - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: caddyfile - labels: - app.kubernetes.io/name: swms-busradar-gtfs-realtime-fileserver - app.kubernetes.io/component: fileserver - app.kubernetes.io/part-of: swms-busradar-gtfs-realtime -data: - Caddyfile: | - 0.0.0.0 - root /srv - gzip - log stdout - errors stdout diff --git a/sources/swms-busradar-gtfs-realtime/kustomization.yaml b/sources/swms-busradar-gtfs-realtime/kustomization.yaml deleted file mode 100644 index 14454d12..00000000 --- a/sources/swms-busradar-gtfs-realtime/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: swms-busradar-gtfs-realtime -commonLabels: - app.kubernetes.io/part-of: swms-busradar-gtfs-realtime - -resources: -- ./swms-busradar-gtfs-realtime.yaml -- ./fileserver.yaml - -images: -- name: quay.io/codeformuenster/swms-busradar-gtfs-realtime - newTag: 0.3.3 -- name: quay.io/codeformuenster/swms-busradar-gtfs-realtime-init - newTag: 0.3.3 -- name: abiosoft/caddy - newTag: 1.0.3-no-stats diff --git a/sources/swms-busradar-gtfs-realtime/swms-busradar-gtfs-realtime.yaml b/sources/swms-busradar-gtfs-realtime/swms-busradar-gtfs-realtime.yaml deleted file mode 100644 index 772ae04a..00000000 --- a/sources/swms-busradar-gtfs-realtime/swms-busradar-gtfs-realtime.yaml +++ /dev/null @@ -1,60 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: swms-busradar-gtfs-realtime-volume -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 5M ---- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: swms-busradar-gtfs-realtime - labels: - app.kubernetes.io/name: swms-busradar-gtfs-realtime - app.kubernetes.io/component: translator - app.kubernetes.io/part-of: swms-busradar-gtfs-realtime -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: swms-busradar-gtfs-realtime - app.kubernetes.io/component: translator - app.kubernetes.io/part-of: swms-busradar-gtfs-realtime - template: - metadata: - labels: - app.kubernetes.io/name: swms-busradar-gtfs-realtime - app.kubernetes.io/component: translator - app.kubernetes.io/part-of: swms-busradar-gtfs-realtime - spec: - volumes: - - name: static-feed-volume - emptyDir: {} - - name: realtime-feed-volume - persistentVolumeClaim: - claimName: swms-busradar-gtfs-realtime-volume - initContainers: - - name: swms-busradar-gtfs-realtime-init - image: quay.io/codeformuenster/swms-busradar-gtfs-realtime-init:0.2.0 - volumeMounts: - - mountPath: /gtfsfeed - name: static-feed-volume - containers: - - name: swms-busradar-gtfs-realtime - image: quay.io/codeformuenster/swms-busradar-gtfs-realtime:0.2.0 - env: - - name: GTFS_FEED_PATH - value: /gtfs-static-feed - - name: GTFS_REALTIME_FEED_PATH - value: /gtfs-realtime-feed/feed - volumeMounts: - - mountPath: /gtfs-static-feed - name: static-feed-volume - readOnly: true - - mountPath: /gtfs-realtime-feed - name: realtime-feed-volume diff --git a/sources/traffics/.kube-linter.yaml b/sources/traffics/.kube-linter.yaml deleted file mode 100644 index 547caca2..00000000 --- a/sources/traffics/.kube-linter.yaml +++ /dev/null @@ -1,6 +0,0 @@ -checks: - exclude: - - no-read-only-root-fs - - run-as-non-root - - unset-cpu-requirements - - unset-memory-requirements diff --git a/sources/traffics/0-namespace.yaml b/sources/traffics/0-namespace.yaml deleted file mode 100644 index a171b832..00000000 --- a/sources/traffics/0-namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: traffics diff --git a/sync/kustomization.yaml b/sync/kustomization.yaml new file mode 100644 index 00000000..fc8960b3 --- /dev/null +++ b/sync/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +commonAnnotations: + sourceRepo: https://github.com/codeformuenster/kubernetes-deployment + +buildMetadata: +- originAnnotations + +resources: +- ../apps +- ../addons diff --git a/vsh-cluster/apps/crashes/0-namespace.yaml b/vsh-cluster/apps/crashes/0-namespace.yaml deleted file mode 100644 index 51e3bf86..00000000 --- a/vsh-cluster/apps/crashes/0-namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: crashes diff --git a/vsh-cluster/apps/crashes/README.md b/vsh-cluster/apps/crashes/README.md deleted file mode 100644 index b5217a9e..00000000 --- a/vsh-cluster/apps/crashes/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# crashes - -```bash -# build manifests to verify -kustomize build . - -# apply to cluster -kubectl create namespace crashes -kustomize build . | kubectl apply -f - -``` diff --git a/vsh-cluster/apps/crashes/crashes.yaml b/vsh-cluster/apps/crashes/crashes.yaml deleted file mode 100644 index c02af3ed..00000000 --- a/vsh-cluster/apps/crashes/crashes.yaml +++ /dev/null @@ -1,83 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: crashes -spec: - ports: - - port: 3838 - protocol: TCP - name: shiny - targetPort: shiny ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: crashes - annotations: - cert-manager.io/cluster-issuer: letsencrypt -spec: - rules: - - host: crashes.codeformuenster.org - http: - paths: - - backend: - service: - name: crashes - port: - name: shiny - path: / - pathType: Prefix - tls: - - hosts: - - crashes.codeformuenster.org - secretName: crashes-tls ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: crashes -spec: - replicas: 1 - template: - metadata: - spec: - containers: - - name: shiny - image: quay.io/codeformuenster/crashes-shiny:v6.7.2 - ports: - - containerPort: 3838 - name: shiny - securityContext: - runAsUser: 998 - runAsGroup: 998 - runAsNonRoot: true - allowPrivilegeEscalation: false - resources: - requests: - cpu: "0.5" - memory: "512Mi" - limits: - cpu: "1" - memory: "1Gi" - volumeMounts: - - name: renviron-file - mountPath: /srv/shiny-server/.Renviron - subPath: .Renviron - - name: cache-volume - mountPath: /var/lib/shiny-server - volumes: - - name: renviron-file - configMap: - name: renviron - - emptyDir: {} - name: cache-volume ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: renviron -data: - .Renviron: | - SHINY_LOG_STDERR=1 - POSTGRES_HOST=postgis - FATHOM_SITEID=ESCBJ diff --git a/vsh-cluster/apps/crashes/kustomization.yaml b/vsh-cluster/apps/crashes/kustomization.yaml deleted file mode 100644 index 5ecfb64f..00000000 --- a/vsh-cluster/apps/crashes/kustomization.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: crashes -commonLabels: - app.kubernetes.io/part-of: crashes - -resources: -- ./0-namespace.yaml -- ./postgis.yaml -- ./crashes.yaml - -images: -- name: quay.io/codeformuenster/crashes-shiny - newTag: v6.7.2 -- name: quay.io/codeformuenster/verkehrsunfaelle - newTag: 2019-11-15 - -# inventory: -# type: ConfigMap -# configMap: -# name: prune-crashes -# # namespace: crashes diff --git a/vsh-cluster/apps/traffics/0-namespace.yaml b/vsh-cluster/apps/traffics/0-namespace.yaml deleted file mode 100644 index a171b832..00000000 --- a/vsh-cluster/apps/traffics/0-namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: traffics diff --git a/vsh-cluster/apps/traffics/kustomization.yaml b/vsh-cluster/apps/traffics/kustomization.yaml deleted file mode 100644 index 16ea7ca9..00000000 --- a/vsh-cluster/apps/traffics/kustomization.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: traffics - -resources: -- ./0-namespace.yaml -- ./traffics.yaml - -commonLabels: - app.kubernetes.io/name: traffics - app.kubernetes.io/component: shiny - app.kubernetes.io/part-of: traffics diff --git a/vsh-cluster/apps/traffics/traffics.yaml b/vsh-cluster/apps/traffics/traffics.yaml deleted file mode 100644 index 488fe4de..00000000 --- a/vsh-cluster/apps/traffics/traffics.yaml +++ /dev/null @@ -1,83 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: traffics -spec: - ports: - - port: 3838 - protocol: TCP - name: shiny - targetPort: shiny ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: traffics - annotations: - cert-manager.io/cluster-issuer: letsencrypt - nginx.ingress.kubernetes.io/server-alias: "traffics.codeformuenster.org" -spec: - rules: - - host: traffics.kube.vsh.codeformuenster.org - http: - paths: - - backend: - service: - name: traffics - port: - name: shiny - path: / - pathType: Prefix - tls: - - hosts: - - traffics.kube.vsh.codeformuenster.org - - traffics.codeformuenster.org - secretName: traffics-tls ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: traffics -spec: - replicas: 1 - template: - metadata: - spec: - containers: - - name: shiny - image: codeformuenster/traffic-dynamics-shiny:v0.6.4 - ports: - - containerPort: 3838 - name: shiny - securityContext: - runAsUser: 998 - runAsGroup: 998 - runAsNonRoot: true - allowPrivilegeEscalation: false - resources: - requests: - cpu: "0.5" - memory: "512Mi" - limits: - cpu: "1" - memory: "1Gi" - volumeMounts: - - name: renviron-file - mountPath: /srv/shiny-server/.Renviron - subPath: .Renviron - - name: cache-volume - mountPath: /var/lib/shiny-server - volumes: - - name: renviron-file - configMap: - name: renviron - - emptyDir: {} - name: cache-volume ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: renviron -data: - .Renviron: | - FATHOM_SITEID=UFRTE diff --git a/vsh-cluster/essentials/cert-manager.yaml b/vsh-cluster/essentials/cert-manager.yaml deleted file mode 100644 index 08c67b8a..00000000 --- a/vsh-cluster/essentials/cert-manager.yaml +++ /dev/null @@ -1,56 +0,0 @@ -apiVersion: source.toolkit.fluxcd.io/v1beta1 -kind: HelmRepository -metadata: - name: jetstack - namespace: flux-system -spec: - interval: 30m - url: https://charts.jetstack.io - ---- -apiVersion: helm.toolkit.fluxcd.io/v2beta1 -kind: HelmRelease -metadata: - name: cert-manager - namespace: flux-system -spec: - chart: - spec: - chart: cert-manager - interval: 1m0s - sourceRef: - kind: HelmRepository - name: jetstack - namespace: flux-system - version: v1.3.1 - interval: 5m0s - releaseName: cert-manager - targetNamespace: cert-manager - install: - createNamespace: true - crds: CreateReplace - upgrade: - crds: CreateReplace - - # https://artifacthub.io/packages/helm/cert-manager/cert-manager#configuration - values: - installCRDs: true - # global: - # podSecurityPolicy: - # enabled: true - ---- -apiVersion: cert-manager.io/v1 -kind: ClusterIssuer -metadata: - name: letsencrypt -spec: - acme: - email: admin@codeformuenster.org - server: https://acme-v02.api.letsencrypt.org/directory - privateKeySecretRef: - name: letsencrypt-issuer-account-key - solvers: - - http01: - ingress: - class: nginx diff --git a/vsh-cluster/essentials/flux/kustomization.yaml b/vsh-cluster/essentials/flux/kustomization.yaml deleted file mode 100644 index c02abc36..00000000 --- a/vsh-cluster/essentials/flux/kustomization.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: flux-system - -resources: -- https://github.com/fluxcd/flux2/releases/download/v0.16.2/install.yaml - -patches: -- path: ./zero-replicas-patch.yaml - target: - group: apps - version: v1 - kind: Deployment - name: image-.*-controller diff --git a/vsh-cluster/essentials/flux/zero-replicas-patch.yaml b/vsh-cluster/essentials/flux/zero-replicas-patch.yaml deleted file mode 100644 index 9b1b26d3..00000000 --- a/vsh-cluster/essentials/flux/zero-replicas-patch.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- op: replace - path: /spec/replicas - value: 0 diff --git a/vsh-cluster/essentials/ingress-nginx/kustomization.yaml b/vsh-cluster/essentials/ingress-nginx/kustomization.yaml deleted file mode 100644 index 343e3f36..00000000 --- a/vsh-cluster/essentials/ingress-nginx/kustomization.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: ingress-nginx - -resources: -- https://raw.githubusercontent.com/kubernetes/ingress-nginx/helm-chart-3.34.0/deploy/static/provider/baremetal/deploy.yaml - -configMapGenerator: -- name: ingress-nginx-controller - literals: - - use-forwarded-headers=true - - use-proxy-protocol=true - namespace: ingress-nginx - behavior: replace - -patches: -- path: ./node-port-patch.yaml - target: - version: v1 - kind: Service - name: ingress-nginx-controller diff --git a/vsh-cluster/essentials/ingress-nginx/node-port-patch.yaml b/vsh-cluster/essentials/ingress-nginx/node-port-patch.yaml deleted file mode 100644 index 148cac84..00000000 --- a/vsh-cluster/essentials/ingress-nginx/node-port-patch.yaml +++ /dev/null @@ -1,16 +0,0 @@ -- op: replace - path: /spec/ports/0 - value: - name: http - port: 80 - protocol: TCP - targetPort: http - nodePort: 30680 -- op: replace - path: /spec/ports/1 - value: - name: https - port: 443 - protocol: TCP - targetPort: https - nodePort: 31043 diff --git a/vsh-cluster/essentials/longhorn/kustomization.yaml b/vsh-cluster/essentials/longhorn/kustomization.yaml deleted file mode 100644 index eeb3d721..00000000 --- a/vsh-cluster/essentials/longhorn/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: longhorn-system - -resources: -- https://raw.githubusercontent.com/longhorn/longhorn/v1.1.2/deploy/longhorn.yaml